/* ============================================================
   TEMPLATE-HERO-SLIDER.CSS  SSP TOURS
   v10.0 "Crossroads Daylight, layered" (Emerald Daylight, white theme)
   Class prefix: fh-

   White hero on a wide stage (up to 1600px). Copy on the left; on the
   right a layered arch composition: the video in a tall Kandyan arch
   with a silver ring, a gold hairline echo arch behind it, and a small
   photo arch overlapping the lower corner. Faint gold contour arches sit
   in the background. A white quick-booking bar closes the hero.
   No dark overlays, no text on the video. main.css v7.1 tokens only.
============================================================ */

.fh-hero {
  --fh-max: 1600px;
  --fh-gutter: clamp(var(--spacing-5), 4vw, var(--spacing-16));
  /* Fixed header height. Hero JS replaces it with the measured height. */
  --fh-top-offset: calc(var(--tt-util-h) + var(--tt-header-h));
  /* arch height: fill the first screen and leave room for the booking bar */
  --fh-arch-h: clamp(420px, calc(100vh - var(--fh-top-offset) - 250px), 680px);
  position: relative;
  background: var(--bg-primary);
  padding: calc(var(--fh-top-offset) + var(--spacing-5)) 0 var(--spacing-10);
  overflow: hidden;
  isolation: isolate;
}

/* ── Background: faint gold Kandyan contour arches ───────── */
.fh-hero__contours {
  position: absolute;
  z-index: -1;
  top: 0;
  right: -4%;
  width: 62%;
  height: 100%;
  pointer-events: none;
}
.fh-hero__contours path {
  fill: none;
  stroke: var(--color-gold-light);
  stroke-width: 1;
  opacity: .55;
  vector-effect: non-scaling-stroke;
}
.fh-hero__contours path:nth-child(2) { opacity: .45; }
.fh-hero__contours path:nth-child(3) { opacity: .35; }
.fh-hero__contours path:nth-child(4) { opacity: .4; }
.fh-hero__contours path:nth-child(5) { opacity: .25; }

/* ── Stage ───────────────────────────────────────────────── */
.fh-hero__inner {
  /* Copy starts on the same line as the header logo; the arch side
     reaches further out so wide screens are filled, not padded. */
  margin: 0;
  padding-left: max(var(--fh-gutter), calc((100% - var(--tt-max)) / 2 + 32px));
  padding-right: max(var(--fh-gutter), calc((100% - var(--fh-max)) / 2 + var(--fh-gutter)));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(var(--spacing-8), 5vw, var(--spacing-24));
  align-items: center;
}

/* ── Copy column ─────────────────────────────────────────── */
.fh-hero__copy-col { min-width: 0; max-width: 660px; justify-self: start; width: 100%; }
.fh-hero__copy-viewport { position: relative; min-height: 360px; display: flex; align-items: center; }

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

.fh-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-3);
  margin: 0;
  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-dark);
}
.fh-hero__eyebrow::before { content: ''; width: 32px; height: 2px; border-radius: var(--radius-full); background: var(--sheen-gold); }

.fh-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: var(--font-weight-normal);
  font-size: clamp(2.2rem, 3.2vw, 3.5rem);
  line-height: 1.08;
  max-width: 17ch;
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  text-wrap: balance;
}
.fh-hero__title em { font-style: italic; color: var(--color-navy); }

.fh-hero__desc { margin: 0; max-width: 54ch; font-family: var(--font-primary); font-size: var(--text-base); line-height: var(--leading-relaxed); color: var(--text-secondary); }

.fh-hero__stats { display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacing-2) 0; 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);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}
.fh-hero__stats li + li::before { content: ''; width: 4px; height: 4px; margin: 0 var(--spacing-4); border-radius: 50%; background: var(--color-gold); }
.fh-hero__stats li i { color: var(--color-navy); font-size: .85em; }

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

/* Slide controls */
.fh-hero__controls { display: flex; align-items: center; gap: var(--spacing-3); margin-top: var(--spacing-6); padding-top: var(--spacing-4); border-top: 1px solid var(--border-primary); }
.fh-hero__arrow {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sheen-silver); box-shadow: var(--shadow-royal);
  color: var(--text-primary); font-size: .8rem; cursor: pointer;
  transition: var(--transition-base);
}
.fh-hero__arrow:hover, .fh-hero__arrow:focus-visible { background: var(--sheen-emerald); box-shadow: var(--shadow-metal); color: var(--text-white); outline: none; }
.fh-hero__dots { display: flex; align-items: center; gap: var(--spacing-2); }
.fh-hero__dot { width: 9px; height: 9px; padding: 0; border-radius: var(--radius-full); background: var(--color-royal); border: none; cursor: pointer; transition: var(--transition-base); }
.fh-hero__dot:hover { background: var(--color-royal-dark); }
.fh-hero__dot.is-active { width: 26px; background: var(--sheen-gold); }
.fh-hero__progress { flex: 1; min-width: 60px; max-width: 180px; height: 2px; background: var(--color-royal-light); border-radius: var(--radius-full); overflow: hidden; }
.fh-hero__progress-fill { width: 0%; height: 100%; background: var(--color-navy); transition: width 120ms linear; }
.fh-hero__counter { margin-left: auto; font-family: var(--font-primary); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: var(--ls-wider); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fh-hero__counter b { color: var(--text-primary); }

/* ── Layered arch composition ────────────────────────────── */
.fh-hero__media {
  position: relative;
  margin: 0;
  min-width: 0;
  justify-self: start;
  width: 100%;
  max-width: 720px;
  padding: 22px 0 40px 0;
}

/* Main video arch: tall, fills the hero height */
.fh-hero__arch {
  position: relative;
  z-index: 2;
  width: 100%;
  height: var(--fh-arch-h);
  border-radius: var(--radius-arch);
  overflow: hidden;
  background: var(--color-pearl-deep);
  box-shadow: 0 0 0 7px var(--bg-primary), 0 0 0 8px var(--color-royal), var(--shadow-2xl);
  animation: fhArchIn 1.1s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes fhArchIn {
  from { clip-path: inset(100% -12px -12px -12px round 9999px 9999px 0 0); }
  to   { clip-path: inset(-12px -12px -12px -12px round 9999px 9999px 0 0); }
}
.fh-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Gold hairline echo arch, offset behind */
.fh-hero__echo {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 26px;
  right: -26px;
  height: var(--fh-arch-h);
  border-radius: var(--radius-arch);
  border: 1px solid var(--color-gold);
  opacity: .7;
  pointer-events: none;
  animation: fhFade 1.4s ease .5s both;
}
@keyframes fhFade { from { opacity: 0; } to { opacity: .7; } }

/* Small photo arch overlapping the lower right corner */
.fh-hero__mini {
  position: absolute;
  z-index: 3;
  right: -28px;
  bottom: 0;
  width: clamp(130px, 11vw, 180px);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-arch);
  overflow: hidden;
  background: var(--color-pearl-deep);
  box-shadow: 0 0 0 6px var(--bg-primary), 0 0 0 7px var(--color-gold-light), var(--shadow-xl);
  animation: fhRise .9s cubic-bezier(.22, 1, .36, 1) .55s both;
}
@keyframes fhRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.fh-hero__mini-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s ease, transform 6s ease;
}
.fh-hero__mini-img.is-active { opacity: 1; transform: scale(1); }

/* Play / mute pill (white frosted) */
.fh-hero__glass-pill {
  position: absolute;
  left: var(--spacing-6);
  bottom: var(--spacing-6);
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--color-white-90);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}
.fh-hero__glass-pill[hidden] { display: none; }
.fh-hero__glass-btn { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-primary); font-size: .78rem; cursor: pointer; transition: var(--transition-base); }
.fh-hero__glass-btn:hover, .fh-hero__glass-btn:focus-visible { background: var(--sheen-emerald); color: var(--text-white); outline: none; }
.fh-hero__glass-divider { width: 1px; height: 16px; background: var(--border-silver); }

/* Floating caption card */
.fh-hero__trust {
  position: absolute;
  z-index: 4;
  left: calc(-1 * var(--spacing-10));
  top: 46%;
  display: grid;
  gap: 2px;
  max-width: 230px;
  padding: var(--spacing-4) var(--spacing-6) var(--spacing-4) var(--spacing-6);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px var(--color-royal-light), var(--shadow-lg);
  animation: fhRise .9s cubic-bezier(.22, 1, .36, 1) .8s both;
}
.fh-hero__trust::before { content: ''; position: absolute; left: 0; top: var(--spacing-4); bottom: var(--spacing-4); width: 3px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--sheen-gold); }
.fh-hero__trust[hidden] { display: none; }
.fh-hero__trust-l1 { font-family: var(--font-display); font-variation-settings: "opsz" 144; font-size: var(--text-3xl); line-height: 1.05; color: var(--color-navy); }
.fh-hero__trust-l2 { font-family: var(--font-primary); font-size: var(--text-sm); line-height: 1.4; color: var(--text-secondary); }

/* ── Quick booking bar ───────────────────────────────────── */
.fh-book-wrap { position: relative; z-index: 5; max-width: var(--tt-max); margin: var(--spacing-5) auto 0; padding: 0 32px; }
.fh-book {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 1fr 1fr auto;
  gap: var(--spacing-4);
  align-items: end;
  margin: 0;
  padding: var(--spacing-5) var(--spacing-6);
  background: var(--bg-primary);
  border-radius: var(--radius-3xl);
  box-shadow: 0 0 0 1px var(--color-royal), var(--shadow-xl);
  animation: fhRise .9s cubic-bezier(.22, 1, .36, 1) .35s both;
}
.fh-book::before { content: ''; position: absolute; left: 28px; right: 28px; top: 0; height: 2px; border-radius: 2px; background: var(--sheen-gold); }
.fh-book__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fh-book__label { font-family: var(--font-primary); font-size: .68rem; font-weight: var(--font-weight-semibold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--color-royal-darker); }
.fh-book__input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--spacing-4);
  background: var(--color-pearl);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.fh-book__input::placeholder { color: var(--text-muted); }
.fh-book__input:focus { outline: none; background: var(--bg-primary); border-color: var(--color-gold); box-shadow: 0 0 0 4px var(--color-gold-glow-sm); }
.fh-book__submit { min-height: 48px; white-space: nowrap; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1280px) {
  .fh-hero__trust { left: calc(-1 * var(--spacing-5)); }
  .fh-hero__mini { right: -12px; }
  .fh-book { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .fh-book__submit { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 960px) {
  .fh-hero__contours { width: 100%; right: 0; opacity: .7; }
  .fh-hero__inner { grid-template-columns: 1fr; gap: var(--spacing-8); }
  .fh-hero__copy-col { justify-self: stretch; max-width: none; }
  .fh-hero__media { order: -1; justify-self: center; max-width: 560px; padding: 16px 0 48px; }
  .fh-hero { --fh-arch-h: clamp(320px, 62vw, 520px); }
  .fh-hero__echo { left: 16px; right: -16px; }
  .fh-hero__mini { right: 0; width: clamp(110px, 24vw, 170px); }
  .fh-hero__trust { left: 0; top: auto; bottom: 64px; }
  .fh-hero__copy-viewport { min-height: 0; }
  .fh-book { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .fh-hero { --fh-top-offset: var(--tt-header-h); padding-bottom: var(--spacing-10); }
  .fh-book-wrap { padding: 0 var(--fh-gutter); }
  .fh-hero__stats { flex-direction: column; align-items: flex-start; gap: var(--spacing-2); }
  .fh-hero__stats li + li::before { display: none; }
  .fh-hero__actions { flex-direction: column; align-items: stretch; }
  .fh-hero__actions .btn { justify-content: center; }
  .fh-hero__progress { display: none; }
  .fh-hero__glass-pill { left: var(--spacing-5); bottom: var(--spacing-4); }
  .fh-hero__trust { top: 34%; bottom: auto; }
  .fh-book { grid-template-columns: 1fr; padding: var(--spacing-5); gap: var(--spacing-3); }
}

@media (max-width: 480px) {
  .fh-hero__title { font-size: clamp(1.9rem, 8vw, 2.3rem); }
  .fh-hero__trust { max-width: 180px; padding: var(--spacing-3) var(--spacing-4) var(--spacing-3) var(--spacing-5); }
  .fh-hero__trust-l1 { font-size: var(--text-xl); }
}

@media (prefers-reduced-motion: reduce) {
  .fh-hero__copy.is-active, .fh-hero__arch, .fh-hero__echo, .fh-hero__mini, .fh-hero__trust, .fh-book { animation: none !important; }
  .fh-hero__mini-img { transition: none; }
}
