/* ============================================================
   TEMPLATE: HERO SLIDER — v19.0 "Ceylon Premium"
   Tarquin Travels · Authentic Green Journeys · Tea Heritage
   ⚠ ALL values use main.css variables — zero hardcoding
   ============================================================ */

/* ── SECTION SHELL ─────────────────────────────────────────── */
.tt-hero {
  position: relative;
  width: 100%;
  height: 78vh;
  min-height: 520px;
  max-height: 740px;
  overflow: hidden;
  background: var(--color-navy-deep);
  display: flex;
  align-items: center;
}

/* ── IMAGE SLIDES ──────────────────────────────────────────── */
.tt-hero__slides {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tt-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);                        /* Fix 4: subtle scale — completes well within 8s */
  transition: opacity 1.8s ease, transform 8s ease; /* Fix 3: 1.8s crossfade finishes before text animates in */
  will-change: opacity, transform;
}

.tt-hero__slide.tt-slide--active {
  opacity: 1;
  transform: scale(1);
}

/* ── VIDEO LAYER ───────────────────────────────────────────── */
.tt-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

/* Show video once it can play — JS adds this class */
.tt-hero__video.tt-video--ready {
  opacity: 1;
}

/* ── OVERLAY LAYERS ────────────────────────────────────────── */
.tt-hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Base dark layer — keeps image visible, text readable */
.tt-hero__overlay--base {
  z-index: 3;
  background: rgba(10, 24, 16, 0.38);
}

/* Left-biased gradient — content sits left, image breathes right */
.tt-hero__overlay--gradient {
  z-index: 4;
  background:
    linear-gradient(
      105deg,
      rgba(10, 24, 16, 0.78) 0%,
      rgba(10, 24, 16, 0.50) 38%,
      rgba(10, 24, 16, 0.18) 62%,
      transparent 80%
    ),
    linear-gradient(
      180deg,
      rgba(10, 24, 16, 0.22) 0%,
      transparent 40%,
      rgba(10, 24, 16, 0.55) 100%
    );
}

/* ── DECORATIVE GOLD LINES — removed, visually noisy ──────── */
.tt-hero__decor { display: none; }

/* ── CONTENT STAGE ─────────────────────────────────────────── */
.tt-hero__stage {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--spacing-10);
  padding-right: var(--spacing-10);
  padding-top: calc(var(--header-height-total) + var(--spacing-4));
  padding-bottom: var(--spacing-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}

/* ── EYEBROW ───────────────────────────────────────────────── */
.tt-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--spacing-2-5);
  margin-bottom: var(--spacing-3);
  opacity: 0;                  /* JS will animate this in — no CSS animation to conflict */
  will-change: opacity, transform; /* Fix 8: GPU layer for smooth mobile repaint */
}

.tt-hero__eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  box-shadow: 0 0 6px rgba(200, 146, 42, 0.7);
  flex-shrink: 0;
}

.tt-hero__eyebrow-text {
  font-family: var(--font-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gold-light);
}

/* ── HEADLINE ──────────────────────────────────────────────── */
.tt-hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.8vw, 3.25rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--color-white);
  max-width: 580px;
  margin: 0 0 var(--spacing-3) 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;                  /* JS animates — no CSS animation */
  will-change: opacity, transform;
}

.tt-hero__headline .tt-highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

/* ── GOLD SEPARATOR ────────────────────────────────────────── */
.tt-hero__sep {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  margin-bottom: var(--spacing-3);
  opacity: 0;                  /* JS animates */
  will-change: opacity, transform;
}

.tt-hero__sep-line {
  display: block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 146, 42, 0.7));
}

.tt-hero__sep-line:last-child {
  background: linear-gradient(90deg, rgba(200, 146, 42, 0.7), transparent);
}

.tt-hero__sep-gem {
  color: var(--color-gold);
  font-size: 8px;
  opacity: 0.8;
}

/* ── DESCRIPTION ───────────────────────────────────────────── */
.tt-hero__desc {
  font-family: var(--font-primary);
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  font-weight: var(--font-weight-light);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 460px;
  margin: 0 0 var(--spacing-5) 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;                  /* JS animates */
  will-change: opacity, transform;
}

/* ── METRICS ───────────────────────────────────────────────── */
.tt-hero__metrics {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: var(--spacing-6);
  opacity: 0;                  /* JS animates */
  will-change: opacity, transform;
}

.tt-hero__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--spacing-5);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.tt-hero__metric:first-child { padding-left: 0; }
.tt-hero__metric:last-child  { border-right: none; }

.tt-hero__metric-value {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-gold-light);
  line-height: 1;
  letter-spacing: -0.01em;
}

.tt-hero__metric-label {
  font-family: var(--font-primary);
  font-size: 0.62rem;
  font-weight: var(--font-weight-semibold);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── CTA BUTTONS ───────────────────────────────────────────── */
.tt-hero__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-5);
  opacity: 0;                  /* JS animates */
  will-change: opacity, transform;
}

/* ── INLINE MEDIA CONTROLS — below CTAs on left ────────────── */
.tt-hero__media-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  opacity: 0;                  /* JS animates */
  will-change: opacity, transform;
}

.tt-hero__media-label {
  display: none;
}

.tt-hero__media-ctrl {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.tt-hero__media-ctrl:hover {
  background: rgba(200, 146, 42, 0.20);
  border-color: rgba(200, 146, 42, 0.55);
  color: var(--color-gold-light);
  transform: scale(1.1);
}

.tt-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: 0.7rem var(--spacing-7);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  white-space: nowrap;
}

.tt-btn--gold {
  background: var(--gradient-gold);
  color: var(--color-white);
  border: none;
  box-shadow: 0 4px 18px rgba(200, 146, 42, 0.38);
}

.tt-btn--gold::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.5s ease;
}

.tt-btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 146, 42, 0.5);
  color: var(--color-white);
}

.tt-btn--gold:hover::before { left: 100%; }

.tt-btn__arrow {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
}

.tt-btn--gold:hover .tt-btn__arrow { transform: translateX(4px); }

.tt-btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--color-white);
}

.tt-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--color-gold-light);
  color: var(--color-gold-light);
  transform: translateY(-2px);
}

/* ── TRUST BADGE ───────────────────────────────────────────── */
.tt-hero__trust {
  position: absolute;
  top: 50%;
  right: var(--spacing-10);
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-5) var(--spacing-4);
  background: rgba(10, 24, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(200, 146, 42, 0.30);
  border-radius: var(--radius-2xl);
  text-align: center;
  min-width: 120px;
  opacity: 0;
  animation: ttFadeIn 0.7s ease 1.1s forwards;
}

.tt-hero__trust-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(200, 146, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  font-size: var(--text-base);
  margin-bottom: var(--spacing-1);
}

.tt-hero__trust-line1 {
  font-family: var(--font-primary);
  font-size: 0.68rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}

.tt-hero__trust-line2 {
  font-family: var(--font-primary);
  font-size: 0.62rem;
  color: var(--color-gold-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── SLIDE COUNTER RAIL ────────────────────────────────────── */
.tt-hero__rail {
  position: absolute;
  bottom: var(--spacing-10);
  left: var(--spacing-10);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

.tt-hero__rail-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  min-width: 1.5em;
}

.tt-hero__rail-num--cur { color: var(--color-gold-light); }
.tt-hero__rail-num--tot { color: rgba(255, 255, 255, 0.38); }

.tt-hero__rail-track {
  width: 52px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.tt-hero__rail-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  width: 0%;
  /* transition set inline by JS using actual SLIDE_DURATION — CSS variable removed */
}

/* ── DOT INDICATORS ────────────────────────────────────────── */
.tt-hero__dots {
  position: absolute;
  bottom: var(--spacing-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.tt-hero__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.32);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tt-hero__dot.tt-dot--active {
  width: 24px;
  background: var(--color-gold);
  box-shadow: 0 0 8px rgba(200, 146, 42, 0.5);
}

.tt-hero__dot:hover:not(.tt-dot--active) {
  background: rgba(255, 255, 255, 0.6);
}

/* ── VIDEO / SLIDESHOW CONTROLS — HIDDEN (inline media row used instead) ── */
.tt-hero__controls {
  display: none;
}

/* ── SCROLL CUE ────────────────────────────────────────────── */
.tt-hero__scroll {
  position: absolute;
  bottom: var(--spacing-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-1-5);
  animation: ttScrollBounce 2.2s ease-in-out infinite;
  /* Hidden when dots are present on desktop */
  display: none;
}

.tt-hero__scroll-track {
  width: 1.5px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.tt-hero__scroll-pip {
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--color-gold);
  border-radius: var(--radius-full);
  animation: ttScrollPip 1.8s ease-in-out infinite;
}

@keyframes ttScrollPip {
  0%   { top: -8px; opacity: 1; }
  80%  { top: 36px; opacity: 0; }
  100% { top: -8px; opacity: 0; }
}

@keyframes ttScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(5px); }
}

.tt-hero__scroll-lbl {
  font-family: var(--font-primary);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ── MARQUEE STRIP ─────────────────────────────────────────── */
.tt-hero__marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 30px;
  background: rgba(200, 146, 42, 0.10);
  border-top: 1px solid rgba(200, 146, 42, 0.18);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.tt-hero__marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ttMarquee 32s linear infinite;
  font-family: var(--font-primary);
  font-size: 0.62rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-light);
}

@keyframes ttMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── KEYFRAMES ─────────────────────────────────────────────── */
@keyframes ttSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ttFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .tt-hero__stage {
    padding-left: var(--spacing-8);
    padding-right: var(--spacing-8);
  }
  .tt-hero__trust { right: var(--spacing-5); }
}

@media (max-width: 1024px) {
  .tt-hero {
    max-height: none;
    height: 80vh;
    min-height: 500px;
  }
  .tt-hero__stage {
    padding-left: var(--spacing-6);
    padding-right: var(--spacing-6);
  }
  .tt-hero__headline { font-size: clamp(1.6rem, 4vw, 2.6rem); max-width: 520px; }
  .tt-hero__desc     { max-width: 420px; }
  .tt-hero__trust    { right: var(--spacing-4); }
}

@media (max-width: 768px) {
  .tt-hero {
    height: 85vh;
    min-height: 480px;
    align-items: flex-end;
    max-height: none;
  }

  .tt-hero__overlay--gradient {
    background:
      linear-gradient(180deg,
        rgba(10, 24, 16, 0.20) 0%,
        rgba(10, 24, 16, 0.60) 50%,
        rgba(10, 24, 16, 0.88) 100%
      );
  }

  .tt-hero__stage {
    padding: var(--spacing-4) var(--spacing-4) var(--spacing-12);
    padding-top: calc(var(--header-height-total) + var(--spacing-2));
    justify-content: flex-end;
  }

  .tt-hero__headline {
    font-size: clamp(1.55rem, 6vw, 2.2rem);
    max-width: 100%;
  }

  .tt-hero__desc {
    font-size: 0.82rem;
    max-width: 100%;
  }

  .tt-hero__metrics {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tt-hero__metrics::-webkit-scrollbar { display: none; }
  .tt-hero__metric { min-width: max-content; padding: 0 var(--spacing-4); }

  .tt-hero__actions { gap: var(--spacing-2); }
  .tt-btn { padding: 0.6rem var(--spacing-5); font-size: 0.72rem; }

  .tt-hero__trust { display: none; }
  .tt-hero__rail  { display: none; }
  .tt-hero__dots  { bottom: var(--spacing-3); }
}

@media (max-width: 480px) {
  .tt-hero__stage {
    padding: var(--spacing-3) var(--spacing-3) var(--spacing-12);
    padding-top: calc(var(--header-height-total) + var(--spacing-1));
  }
  .tt-hero__headline { font-size: clamp(1.4rem, 7vw, 1.9rem); }
  .tt-hero__actions  { flex-direction: column; align-items: stretch; }
  .tt-btn { justify-content: center; width: 100%; }
  .tt-hero__metric-value { font-size: 1rem; }
}

/* ── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tt-hero__slide,
  .tt-hero__marquee-track,
  .tt-hero__scroll-pip {
    animation: none !important;
    transition: none !important;
  }
  /* Content elements: JS checks this via matchMedia and skips transitions */
  .tt-hero__eyebrow,
  .tt-hero__headline,
  .tt-hero__sep,
  .tt-hero__desc,
  .tt-hero__metrics,
  .tt-hero__actions,
  .tt-hero__media-row,
  .tt-hero__trust {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }
  .tt-hero__slide.tt-slide--active { opacity: 1; transform: scale(1); }
  .tt-hero__video { transition: none; }
}
