/* ============================================================
   TEMPLATE-HERO-SLIDER.CSS — Tarawell Travels
   "Golden Passage" — v8.0 full redesign
   Class prefix: fh- (TarawellHero)

   All values reference css/main.css design tokens exclusively — no
   hardcoded colors, fonts, spacing or hex/rgba values in this file
   (ds.txt rule: main.css is the single source of truth). This file
   must be loaded AFTER main.css.
============================================================ */

.fh-hero {
  position: relative;
  width: 100%;
  min-height: clamp(600px, 94vh, 960px);
  overflow: hidden;
  background: var(--color-navy-abyss);
  isolation: isolate;
}

/* ---------- Media: one continuous video backdrop ---------- */
.fh-hero__media {
  position: absolute;
  inset: 0;
  z-index: var(--z-index-0);
}

.fh-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 900ms ease;
}
.fh-hero__video.fh-video--ready { opacity: 1; }
/* If the video errors out entirely, the poster frame (set via the
   poster attribute in HTML) remains visible as the static fallback —
   no extra CSS needed for that path. */

.fh-hero__grain {
  position: absolute;
  inset: 0;
  z-index: var(--z-index-10);
  opacity: 0.035;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fh-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: var(--z-index-10);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(var(--color-navy-rgb), 0.50) 0%, rgba(var(--color-navy-rgb), 0.06) 26%, rgba(var(--color-navy-rgb), 0.10) 52%, rgba(var(--color-navy-rgb), 0.42) 78%, rgba(var(--color-navy-rgb), 0.86) 100%),
    linear-gradient(90deg, rgba(var(--color-navy-rgb), 0.72) 0%, rgba(var(--color-navy-rgb), 0.10) 46%, rgba(var(--color-navy-rgb), 0.05) 70%, rgba(var(--color-navy-rgb), 0.30) 100%);
}

.fh-hero__vignette {
  position: absolute;
  inset: 0;
  z-index: var(--z-index-10);
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(var(--color-navy-rgb), 0) 42%, rgba(var(--color-navy-rgb), 0.42) 100%);
}

/* ---------- Stage: bottom-anchored, left-aligned — never centered ---------- */
.fh-hero__stage {
  position: relative;
  z-index: var(--z-index-20);
  min-height: clamp(600px, 94vh, 960px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.fh-hero__stage-inner {
  position: relative;
  max-width: 720px;
  width: 100%;
  padding-left: var(--spacing-8);
  padding-right: var(--spacing-6);
  padding-bottom: clamp(108px, 15vh, 166px);
  padding-top: var(--spacing-24);
}

.fh-hero__copy-viewport {
  position: relative;
  z-index: 1;
  padding-left: var(--spacing-6);
  border-left: 2px solid var(--border-gold);
}

.fh-hero__copy {
  display: none;
  flex-direction: column;
  gap: var(--spacing-4);
}
.fh-hero__copy.is-active {
  display: flex;
  animation: fhCopyIn 700ms cubic-bezier(0.165, 0.84, 0.44, 1) both;
}
@keyframes fhCopyIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fh-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gold-light);
}
.fh-hero__eyebrow i { color: var(--color-gold); font-size: 9px; }

.fh-hero__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-normal);
  font-size: clamp(2.1rem, 4.6vw, 3.85rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--color-white);
  text-shadow: var(--text-shadow-strong);
  text-wrap: balance;
  margin: 0;
}

.fh-hero__desc {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-light);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: var(--leading-relaxed);
  color: var(--color-white-80);
  text-shadow: var(--text-shadow-medium);
  max-width: 600px;
  margin: 0;
}

.fh-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2) var(--spacing-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.fh-hero__stats li {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  color: var(--color-royal-light);
}
.fh-hero__stats li i { color: var(--color-gold); font-size: .95em; }

.fh-hero__actions {
  display: flex;
  gap: var(--spacing-4);
  margin-top: var(--spacing-2);
  flex-wrap: wrap;
}

/* ---------- Right rail: trust ring + progress dots ---------- */
.fh-hero__rail {
  position: absolute;
  right: var(--spacing-8);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-index-30);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-5);
}

.fh-hero__trust {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.fh-hero__trust-ring {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  font-size: 1.15rem;
  background: rgba(var(--color-navy-rgb), 0.30);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fh-hero__trust-l1 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-white);
  margin-top: var(--spacing-2);
}
.fh-hero__trust-l2 {
  font-family: var(--font-label);
  font-size: .58rem;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-royal);
  line-height: 1.4;
  max-width: 90px;
}
.fh-hero__rail-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, var(--border-gold), transparent);
}
.fh-hero__dots {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
}
.fh-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-white-20);
  border: 1px solid var(--color-white-40);
  padding: 0;
  cursor: pointer;
  transition: var(--transition-base);
}
.fh-hero__dot:hover { background: var(--color-white-40); }
.fh-hero__dot.is-active {
  background: var(--color-gold);
  border-color: var(--color-gold);
  height: 22px;
  border-radius: var(--radius-md);
}

/* ---------- Bottom-left: video controls + progress + counter ---------- */
.fh-hero__media-controls {
  position: absolute;
  left: var(--spacing-8);
  bottom: var(--spacing-8);
  z-index: var(--z-index-30);
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
}
.fh-hero__glass-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(var(--color-navy-rgb), 0.55);
  border: 1px solid var(--color-white-18);
  border-radius: var(--radius-full);
  padding: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fh-hero__glass-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: .78rem;
  transition: var(--transition-base);
}
.fh-hero__glass-btn:hover,
.fh-hero__glass-btn:focus-visible {
  background: var(--color-gold);
  color: var(--color-navy);
  outline: none;
}
.fh-hero__glass-divider { width: 1px; height: 16px; background: var(--color-white-18); }
.fh-hero__progress {
  width: 120px;
  height: 2px;
  background: var(--color-white-20);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.fh-hero__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-gold);
  transition: width 120ms linear;
}
.fh-hero__counter {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: var(--ls-wider);
  color: var(--color-royal-light);
  font-variant-numeric: tabular-nums;
}
.fh-hero__counter b { color: var(--color-gold-light); }

/* ---------- Nav arrow ---------- */
.fh-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-index-30);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white-08);
  border: 1px solid var(--color-white-18);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}
.fh-hero__arrow:hover,
.fh-hero__arrow:focus-visible {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-navy);
  outline: none;
}
.fh-hero__arrow--prev { left: var(--spacing-6); }

/* ---------- Scroll cue ---------- */
.fh-hero__scroll {
  position: absolute;
  right: var(--spacing-6);
  bottom: var(--spacing-6);
  z-index: var(--z-index-20);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  color: var(--color-white-70);
  font-family: var(--font-label);
  font-size: .62rem;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  transition: var(--transition-base);
}
.fh-hero__scroll:hover { color: var(--color-gold); }

/* ============================================================
   TICKER
   ============================================================ */
.fh-ticker {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-navy-card);
  border-top: 1px solid var(--border-navy);
  border-bottom: 1px solid var(--border-navy);
  padding: var(--spacing-3) 0;
}
.fh-ticker__track {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  width: max-content;
  animation: fhMarquee 38s linear infinite;
}
.fh-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-3);
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-royal);
  white-space: nowrap;
}
.fh-ticker__item i { color: var(--color-gold); font-size: .6rem; }
@keyframes fhMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   RESPONSIVE — matches main.css breakpoints (1200 / 992 / 768 / 480)
   ============================================================ */
@media (max-width: 1200px) {
  .fh-hero__rail { right: var(--spacing-5); }
}

@media (max-width: 992px) {
  .fh-hero__stage-inner { max-width: 600px; }
  .fh-hero__rail { gap: var(--spacing-4); }
  .fh-hero__trust { display: none; }
}

@media (max-width: 768px) {
  .fh-hero { min-height: auto; }
  .fh-hero__stage { min-height: 100svh; }
  .fh-hero__stage-inner {
    max-width: 100%;
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
    padding-top: var(--spacing-16);
    padding-bottom: clamp(140px, 26vh, 190px);
  }
  .fh-hero__rail {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(var(--spacing-8) + 46px);
    transform: translateX(-50%);
    flex-direction: row;
  }
  .fh-hero__rail-line { display: none; }
  .fh-hero__dots { flex-direction: row; }
  .fh-hero__dot.is-active { width: 22px; height: 8px; }
  .fh-hero__media-controls { left: 50%; transform: translateX(-50%); bottom: var(--spacing-4); }
  .fh-hero__arrow { display: none; }
  .fh-hero__scroll { display: none; }
  .fh-hero__actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .fh-hero__title { font-size: clamp(1.7rem, 8vw, 2.1rem); }
  .fh-hero__desc { font-size: .92rem; }
  .fh-ticker__item { font-size: .64rem; }
  .fh-ticker__track { gap: var(--spacing-5); animation-duration: 26s; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fh-ticker__track,
  .fh-hero__copy.is-active {
    animation: none !important;
  }
  .fh-hero__copy.is-active { opacity: 1; transform: none; }
  .fh-hero__video { transition: none; }
}
