/* ===========================================================================
   Technology Packaging — Video Hero band ([tp_video_hero])
   Premium, cinematic, tema uyumlu (teal). Arka plan video + çok katmanlı
   scrim + editorial içerik bloğu + staggered reveal.
   Self-contained: dış kaynak yok, transform/opacity tabanlı animasyon.
   =========================================================================== */
.tp-vhero {
  /* Brand palette (Blocksy vars + güvenli fallback) */
  --vh-primary:   var(--theme-palette-color-1, #009abf);
  --vh-deep:      var(--theme-palette-color-2, #007b99);
  --vh-ink:       var(--theme-palette-color-4, #16383a);
  --vh-tint:      var(--theme-palette-color-5, #e3f3f3);

  /* Tunables (shortcode style ile override edilir) */
  --vh-min: clamp(520px, 64vh, 680px);
  --vh-overlay: .55;            /* scrim yoğunluğu çarpanı */

  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: var(--vh-min);
  padding: clamp(48px, 7vw, 104px) clamp(22px, 5vw, 80px);
  border-radius: 28px;
  overflow: hidden;
  margin: 24px 0;
  text-align: center;
  color: #fff;
  /* tema fontunu miras al */
  font-family: inherit;
  box-shadow:
    0 40px 80px -48px rgba(22, 56, 58, .55),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
}

/* ---------------------------------------------------------------------------
   Media layer — poster arka plan + video/iframe cover
   --------------------------------------------------------------------------- */
.tp-vhero-media {
  position: absolute; inset: 0; z-index: -3;
  background-color: var(--vh-ink, #16383a);
  background-size: cover; background-position: center;
}

/* Yavaş, zarif drift (kenar branding'i de kırpacak hafif ölçek) */
.tp-vhero-video,
.tp-vhero-media iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
  pointer-events: none;
  transform: scale(1.06);
  transform-origin: center;
  will-change: transform;
  animation: tp-vhero-drift 28s ease-in-out infinite alternate;
}

/* YouTube bg ölçek hilesi — band'i her viewport'ta gerçekten kaplar.
   16:9 oranı korunur; en büyük boyut neyse onu seçip biraz büyütüyoruz. */
.tp-vhero-media.is-yt iframe {
  width: 100vw; height: 56.25vw;            /* 16:9 genişlik bazlı */
  min-height: 100%; min-width: 177.78vh;    /* 16:9 yükseklik bazlı (cover) */
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1.06);
  transform-origin: center;
  animation: tp-vhero-drift-yt 28s ease-in-out infinite alternate;
}

@keyframes tp-vhero-drift {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}
@keyframes tp-vhero-drift-yt {
  from { transform: translate(-50%, -50%) scale(1.06); }
  to   { transform: translate(-50%, -50%) scale(1.14); }
}

/* ---------------------------------------------------------------------------
   Cinematic scrim — okunabilirlik için çok aşamalı koyulaştırma.
   3 katman: (1) genel dikey film grade, (2) markalı teal yan ışık,
   (3) içerik bloğu arkasına odaklı radial darkening + alt vignette.
   --vh-overlay çarpanı ile global yoğunluk ayarlanır.
   --------------------------------------------------------------------------- */
.tp-vhero-overlay {
  position: absolute; inset: 0; z-index: -2;
  /* Genel dikey film grade — üst/alt koyu, orta nefes alır */
  background:
    linear-gradient(
      180deg,
      rgba(8, 26, 28, calc(.62 * var(--vh-overlay))) 0%,
      rgba(8, 26, 28, calc(.30 * var(--vh-overlay))) 38%,
      rgba(8, 26, 28, calc(.40 * var(--vh-overlay))) 62%,
      rgba(8, 26, 28, calc(.82 * var(--vh-overlay))) 100%
    ),
    /* Markalı teal yan ışık (sol-üstten gelen sıcaklık) */
    linear-gradient(
      120deg,
      color-mix(in srgb, var(--vh-deep) 55%, transparent) 0%,
      transparent 58%
    );
}

/* İçerik bloğunun tam arkasına odaklı darkening + alt vignette.
   Bu, başlık/lead'in altını lokal olarak koyulaştırıp AA kontrastı garanti eder
   ama düz siyah kutu gibi durmaz. */
.tp-vhero-scrim {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      120% 90% at 50% 50%,
      rgba(8, 26, 28, calc(.55 * var(--vh-overlay))) 0%,
      rgba(8, 26, 28, calc(.20 * var(--vh-overlay))) 45%,
      transparent 72%
    ),
    /* CSS-only grain: çok hafif dokunsal gürültü hissi */
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.012) 0 1px,
      transparent 1px 2px
    );
}

/* Sol hizalı varyantta odak da sola kayar */
.tp-vhero.is-left .tp-vhero-scrim {
  background:
    radial-gradient(
      120% 110% at 22% 55%,
      rgba(8, 26, 28, calc(.58 * var(--vh-overlay))) 0%,
      rgba(8, 26, 28, calc(.22 * var(--vh-overlay))) 48%,
      transparent 74%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.012) 0 1px,
      transparent 1px 2px
    );
}

/* color-mix desteklemeyen tarayıcılarda yan ışık yedeği */
@supports not (background: color-mix(in srgb, #000, #fff)) {
  .tp-vhero-overlay {
    background:
      linear-gradient(180deg, rgba(8,26,28,.62) 0%, rgba(8,26,28,.30) 38%, rgba(8,26,28,.40) 62%, rgba(8,26,28,.82) 100%),
      linear-gradient(120deg, rgba(0, 123, 153,.5) 0%, transparent 58%);
  }
}

/* ---------------------------------------------------------------------------
   Content
   --------------------------------------------------------------------------- */
.tp-vhero-inner {
  position: relative; z-index: 1;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Eyebrow / tag chip — küçük uppercase etiket + accent nokta + ince çizgi */
.tp-vhero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 7px 16px 7px 14px;
  border-radius: 999px;
  font-size: clamp(11px, 1vw, 12.5px);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.tp-vhero-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--vh-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--vh-primary) 30%, transparent);
  flex: none;
}

.tp-vhero-title {
  margin: 0 0 22px; color: #fff;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.08;
  font-size: clamp(32px, 5vw, 58px);
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(8, 26, 28, .45);
}

.tp-vhero-lead {
  margin: 0 auto 34px;
  max-width: 56ch;
  font-size: clamp(15px, 1.55vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, .92);
  font-weight: 450;
  text-shadow: 0 1px 16px rgba(8, 26, 28, .5);
}

/* Action row — primary pill + ghost ikincil affordance */
.tp-vhero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.tp-vhero-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 34px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  color: #fff;
  background-image: linear-gradient(135deg, var(--vh-primary), var(--vh-deep));
  box-shadow:
    0 18px 36px -16px rgba(8, 26, 28, .8),
    inset 0 1px 0 rgba(255, 255, 255, .25);
  transition:
    transform .3s cubic-bezier(.2,.7,.3,1),
    box-shadow .3s cubic-bezier(.2,.7,.3,1);
}
.tp-vhero-btn::after { content: "→"; transition: transform .3s ease; }
.tp-vhero-btn:hover,
.tp-vhero-btn:focus-visible {
  transform: translateY(-3px); color: #fff;
  box-shadow:
    0 26px 48px -16px rgba(8, 26, 28, .9),
    inset 0 1px 0 rgba(255, 255, 255, .3);
}
.tp-vhero-btn:hover::after,
.tp-vhero-btn:focus-visible::after { transform: translateX(4px); }

/* İkincil ghost link (ör. "Aşağı kaydır" / scroll affordance) */
.tp-vhero-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .26);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.tp-vhero-ghost .tp-vhero-ghost-ico {
  display: inline-flex; width: 22px; height: 22px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  font-size: 11px; line-height: 1;
}
.tp-vhero-ghost:hover,
.tp-vhero-ghost:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .5);
  transform: translateY(-2px);
}

/* Odak görünürlüğü (klavye) */
.tp-vhero-btn:focus-visible,
.tp-vhero-ghost:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   Dekoratif aksanlar — köşe accent çizgileri (ince, premium, az)
   --------------------------------------------------------------------------- */
.tp-vhero::before,
.tp-vhero::after {
  content: "";
  position: absolute;
  width: 56px; height: 56px;
  pointer-events: none;
  z-index: 0;
  opacity: .7;
}
.tp-vhero::before {
  top: 22px; left: 22px;
  border-top: 2px solid color-mix(in srgb, var(--vh-primary) 80%, #fff 20%);
  border-left: 2px solid color-mix(in srgb, var(--vh-primary) 80%, #fff 20%);
  border-top-left-radius: 10px;
}
.tp-vhero::after {
  bottom: 22px; right: 22px;
  border-bottom: 2px solid color-mix(in srgb, var(--vh-primary) 80%, #fff 20%);
  border-right: 2px solid color-mix(in srgb, var(--vh-primary) 80%, #fff 20%);
  border-bottom-right-radius: 10px;
}

/* ---------------------------------------------------------------------------
   Sol hizalı varyant
   --------------------------------------------------------------------------- */
.tp-vhero.is-left { place-items: center start; text-align: left; }
.tp-vhero.is-left .tp-vhero-inner { margin-right: auto; align-items: flex-start; }
.tp-vhero.is-left .tp-vhero-lead { margin-left: 0; margin-right: 0; }
.tp-vhero.is-left .tp-vhero-actions { justify-content: flex-start; }

/* ---------------------------------------------------------------------------
   Staggered entrance reveal — JS .is-revealed ekleyene kadar gizli.
   JS yoksa içerik yine de görünür kalsın diye .no-js fallback (aşağıda).
   --------------------------------------------------------------------------- */
.tp-vhero[data-reveal] .tp-vhero-eyebrow,
.tp-vhero[data-reveal] .tp-vhero-title,
.tp-vhero[data-reveal] .tp-vhero-lead,
.tp-vhero[data-reveal] .tp-vhero-actions {
  opacity: 0;
  transform: translateY(18px);
}
.tp-vhero.is-revealed .tp-vhero-eyebrow,
.tp-vhero.is-revealed .tp-vhero-title,
.tp-vhero.is-revealed .tp-vhero-lead,
.tp-vhero.is-revealed .tp-vhero-actions {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.tp-vhero.is-revealed .tp-vhero-eyebrow { transition-delay: .05s; }
.tp-vhero.is-revealed .tp-vhero-title   { transition-delay: .15s; }
.tp-vhero.is-revealed .tp-vhero-lead    { transition-delay: .28s; }
.tp-vhero.is-revealed .tp-vhero-actions { transition-delay: .40s; }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 690px) {
  .tp-vhero {
    --vh-min: clamp(440px, 78vh, 560px);
    border-radius: 20px;
    padding: clamp(40px, 12vw, 64px) clamp(20px, 7vw, 32px);
  }
  .tp-vhero::before, .tp-vhero::after { width: 36px; height: 36px; }
  .tp-vhero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .tp-vhero.is-left .tp-vhero-actions { align-items: stretch; }
  .tp-vhero-btn { width: 100%; justify-content: center; }
  .tp-vhero-ghost { width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------------------
   Reduced motion — drift ve reveal kapanır, poster kalır
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tp-vhero-video { display: none; }      /* hareketi durdur, poster kalır */
  .tp-vhero-media iframe { animation: none; transform: translate(-50%, -50%) scale(1.06); }
  .tp-vhero-media.is-yt iframe { transform: translate(-50%, -50%) scale(1.06); }
  .tp-vhero-btn, .tp-vhero-ghost { transition: none; }
  .tp-vhero[data-reveal] .tp-vhero-eyebrow,
  .tp-vhero[data-reveal] .tp-vhero-title,
  .tp-vhero[data-reveal] .tp-vhero-lead,
  .tp-vhero[data-reveal] .tp-vhero-actions {
    opacity: 1; transform: none;
  }
  .tp-vhero.is-revealed .tp-vhero-eyebrow,
  .tp-vhero.is-revealed .tp-vhero-title,
  .tp-vhero.is-revealed .tp-vhero-lead,
  .tp-vhero.is-revealed .tp-vhero-actions {
    transition: none;
  }
}
