/* ============================================================
   Almare Lanka Travels — template-hero-section.css
   Hero Section — Silver Shore v3.0
   - Full-width photo that fades into Pearl Mist from the left.
     No dark overlay on the photo.
   - Soft wave edge at the bottom, drawn in Pearl Mist.
   - Deep sapphire heading, last word in royal sapphire italic.
   - Cinzel champagne eyebrow, platinum badges with silver edge.
   - Markup and template-hero-section.js are unchanged: the JS still
     drives the crossfade, injects the progress bar, rule, shimmer and
     particles (particles are kept hidden in this theme).
   All values reference main.css tokens.
   ============================================================ */

/* ── Hero Container ───────────────────────────────────────── */
/* Top padding clears the floating header shell. The calc() reads the
   --tt-header-h / --tt-util-h properties from template-header.css. */
.hero-slideshow {
  position: relative;
  width: 100%;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-navy);
  color: var(--text-primary);
  padding: calc(var(--tt-util-h, 48px) + var(--tt-header-h, 100px) + var(--spacing-10)) 0 var(--spacing-24);
  margin-bottom: var(--spacing-0);
  isolation: isolate;
}

/* ── Background Crossfade Layers ──────────────────────────── */
.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  transition: opacity 1100ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  z-index: var(--z-index-0);
}

.hero-bg-layer-0 {
  opacity: 1;
  z-index: var(--z-index-10);
  animation: heroKenBurns 22s ease-in-out infinite alternate;
}

.hero-bg-layer-1 {
  opacity: 0;
  z-index: var(--z-index-0);
}

@keyframes heroKenBurns {
  0%   { transform: scale(1.00) translate(0, 0); }
  100% { transform: scale(1.07) translate(-0.6%, 0.3%); }
}

/* ── Pearl veil: photo fades into Pearl Mist from the left ── */
/* A light veil, not a dark overlay. The right side of the photo
   stays clear and carries the colour. */
.hero-slideshow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--z-index-20);
  background:
    linear-gradient(90deg,
      rgba(236, 239, 243, 0.97) 0%,
      rgba(236, 239, 243, 0.90) 28%,
      rgba(236, 239, 243, 0.62) 46%,
      rgba(236, 239, 243, 0.00) 68%),
    linear-gradient(180deg,
      rgba(246, 247, 249, 0.55) 0%,
      rgba(246, 247, 249, 0.00) 22%);
  pointer-events: none;
}

/* ── Animated sea waves at the bottom ─────────────────────── */
/* Three light, see-through wave layers drift left to right at
   different speeds. Each is only a soft tint (Lagoon #2F7F86,
   Ocean #3D6FD1, Royal Sapphire #0F3B8C) with a white foam line,
   so the hero photo stays visible through the water. Each SVG tile
   is 1440px wide and repeats seamlessly along the x axis. */
.hero-slideshow::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  z-index: var(--z-index-30);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 96' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C120,70 240,70 360,60 C480,50 600,50 720,60 C840,70 960,70 1080,60 C1200,50 1320,50 1440,60 L1440,96 L0,96 Z' fill='%230F3B8C' fill-opacity='.22'/%3E%3Cpath d='M0,60 C120,70 240,70 360,60 C480,50 600,50 720,60 C840,70 960,70 1080,60 C1200,50 1320,50 1440,60' fill='none' stroke='%23FFFFFF' stroke-width='1.6' opacity='.75'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 96' preserveAspectRatio='none'%3E%3Cpath d='M0,44 C120,58 240,58 360,44 C480,30 600,30 720,44 C840,58 960,58 1080,44 C1200,30 1320,30 1440,44 L1440,96 L0,96 Z' fill='%233D6FD1' fill-opacity='.16'/%3E%3Cpath d='M0,44 C120,58 240,58 360,44 C480,30 600,30 720,44 C840,58 960,58 1080,44 C1200,30 1320,30 1440,44' fill='none' stroke='%23FFFFFF' stroke-width='1.2' opacity='.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 96' preserveAspectRatio='none'%3E%3Cpath d='M0,28 C120,46 240,46 360,28 C480,10 600,10 720,28 C840,46 960,46 1080,28 C1200,10 1320,10 1440,28 L1440,96 L0,96 Z' fill='%232F7F86' fill-opacity='.12'/%3E%3Cpath d='M0,28 C120,46 240,46 360,28 C480,10 600,10 720,28 C840,46 960,46 1080,28 C1200,10 1320,10 1440,28' fill='none' stroke='%23FFFFFF' stroke-width='1' opacity='.35'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 1440px 100%, 1440px 100%, 1440px 100%;
  background-position: 0 bottom, -360px bottom, -720px bottom;
  animation: heroSeaWaves 36s linear infinite;
  pointer-events: none;
}

@keyframes heroSeaWaves {
  from { background-position: 0 bottom, -360px bottom, -720px bottom; }
  to   { background-position: 1440px bottom, 2520px bottom, 720px bottom; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow::after { animation: none; }
}

/* ── Ambient elements injected by JS ──────────────────────── */
/* Particles do not suit the calm Silver Shore look. */
.hero-particles,
.hero-particle { display: none; }

/* Slide progress: a thin satin-silver line resting on the wave */
.hero-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--gradient-gold);
  z-index: var(--z-index-50);
  transition: width 0.12s linear;
  opacity: 0.9;
}

/* Hairline rule: hidden, the wave carries the edge */
.hero-rule { display: none; }

/* Amber glow element from the old theme: not used */
.hero-glow { display: none; }

/* ── Content Container ────────────────────────────────────── */
/* Content sits on the pearl side, left-aligned. */
.hero-slideshow .container {
  position: relative;
  z-index: var(--z-index-30);
  text-align: left;
}
.hero-slideshow .container .row.justify-content-center { justify-content: flex-start !important; }
.hero-slideshow .container [class*="col-"] { text-align: left; }

.hero-slideshow .hero-eyebrow,
.hero-slideshow .hero-title,
.hero-slideshow h1,
.hero-slideshow .hero-subtitle {
  max-width: 38rem;
}

/* ── Eyebrow (Cinzel, champagne gold, small caps) ─────────── */
.hero-slideshow .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-3);
  font-family: var(--font-wordmark);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-champagne-text);
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  margin-bottom: var(--spacing-5);
  animation: heroFadeDown 0.7s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

.hero-slideshow .hero-eyebrow::before {
  content: '';
  width: 2.25rem;
  height: 1px;
  flex-shrink: 0;
  background: var(--color-champagne);
}

.hero-slideshow .hero-eyebrow i { color: var(--color-champagne); }

/* ── Title (Cormorant Garamond Light, deep sapphire) ──────── */
.hero-slideshow .hero-title,
.hero-slideshow h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 5.4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.005em;
  color: var(--color-royal-light);
  text-shadow: var(--text-shadow-pearl);
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-6);
  animation: heroReveal 1.0s cubic-bezier(0.165, 0.84, 0.44, 1) 0.08s both;
  position: relative;
  text-transform: none;
}

/* Last word, split by JS into <em>: royal sapphire italic */
.hero-slideshow .hero-title em,
.hero-slideshow h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-gold);
  text-shadow: none;
  position: relative;
  display: inline-block;
  animation: wordReveal 1.1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s both;
}

@keyframes wordReveal {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* Satin-silver rule under the title (72 x 2px) */
.hero-slideshow .hero-title::after,
.hero-slideshow h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-silver-sheen);
  border-radius: var(--radius-full);
  animation: expandRule 1.1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.6s forwards;
}

@keyframes expandRule {
  from { width: 0; }
  to   { width: 72px; }
}

/* ── Subtitle (Jost, ink) ─────────────────────────────────── */
.hero-slideshow .hero-subtitle,
.hero-slideshow p.hero-subtitle {
  font-family: var(--font-primary);
  font-size: clamp(var(--text-base), 1.3vw, 1.08rem);
  font-weight: 300;
  font-style: normal;
  color: var(--color-royal);
  line-height: 1.75;
  margin-top: var(--spacing-2);
  margin-bottom: var(--spacing-8);
  text-shadow: var(--text-shadow-pearl);
  animation: heroFadeUp 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) 0.30s both;
}

/* Fallback plain <p> inside the hero */
.hero-slideshow .container p:not(.hero-eyebrow):not(.hero-subtitle) {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-royal);
  line-height: 1.75;
  max-width: 38rem;
  margin-top: var(--spacing-2);
  margin-bottom: var(--spacing-8);
  animation: heroFadeUp 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) 0.30s both;
}

/* ── Hero Badges (platinum pills, silver edge) ────────────── */
.hero-slideshow .hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--spacing-3);
  margin-top: var(--spacing-4);
  max-width: 44rem;
}

.hero-slideshow .hero-badge:nth-child(1) { animation-delay: 0.50s; }
.hero-slideshow .hero-badge:nth-child(2) { animation-delay: 0.60s; }
.hero-slideshow .hero-badge:nth-child(3) { animation-delay: 0.70s; }
.hero-slideshow .hero-badge:nth-child(4) { animation-delay: 0.80s; }

.hero-slideshow .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(246, 247, 249, 0.86);
  border: 1px solid var(--color-navy-border);
  color: var(--color-royal-light);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 22px -16px rgba(10, 42, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: var(--transition-elegant);
  cursor: default;
  opacity: 0;
  animation: badgeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes badgeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-slideshow .hero-badge i { color: var(--color-gold); }

.hero-slideshow .hero-badge:hover {
  transform: translateY(-2px);
  border-color: var(--color-navy-soft);
  box-shadow: 0 16px 28px -18px rgba(10, 42, 102, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ── One-shot shimmer across the title (injected by JS) ───── */
.hero-shimmer-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  background-size: 200% 100%;
  pointer-events: none;
  z-index: 2;
  animation: shimmerSweep 1.6s cubic-bezier(0.4, 0, 0.2, 1) 1.0s forwards;
  opacity: 0;
}

@keyframes shimmerSweep {
  0%   { background-position: 200% 0; opacity: 0; }
  12%  { opacity: 1; }
  100% { background-position: -80% 0; opacity: 0; }
}

/* ── Core Keyframes ───────────────────────────────────────── */
@keyframes heroFadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(16px); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* ── Responsive — Tablet ──────────────────────────────────── */
@media (max-width: 992px) {
  .hero-slideshow {
    min-height: 62vh;
    padding: calc(var(--tt-util-h, 48px) + var(--tt-header-h, 100px) + var(--spacing-8)) 0 var(--spacing-20);
  }
  .hero-slideshow::before {
    background:
      linear-gradient(90deg,
        rgba(236, 239, 243, 0.96) 0%,
        rgba(236, 239, 243, 0.86) 45%,
        rgba(236, 239, 243, 0.30) 78%,
        rgba(236, 239, 243, 0.10) 100%);
  }
}

/* ── Responsive — Phone: photo on top, pearl rises from below ── */
@media (max-width: 768px) {
  .hero-slideshow {
    min-height: 0;
    align-items: flex-end;
    padding: calc(var(--tt-header-h, 76px) + 9rem) 0 var(--spacing-16);
  }
  .hero-slideshow::before {
    background: linear-gradient(180deg,
      rgba(236, 239, 243, 0.25) 0%,
      rgba(236, 239, 243, 0.78) 38%,
      rgba(236, 239, 243, 0.96) 62%,
      rgba(236, 239, 243, 0.98) 100%);
  }
  .hero-slideshow::after { height: 40px; }
  .hero-slideshow .hero-title,
  .hero-slideshow h1 { font-size: clamp(2.2rem, 9vw, 2.9rem); }
}

@media (max-width: 576px) {
  .hero-slideshow .hero-title,
  .hero-slideshow h1 { padding-bottom: var(--spacing-5); }
  .hero-slideshow .hero-subtitle,
  .hero-slideshow p.hero-subtitle { font-size: var(--text-sm); }
  .hero-slideshow .hero-badge { font-size: var(--text-xs); padding: 0.45rem 0.9rem; }
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-layer,
  .hero-bg-layer-0 { transition: opacity 200ms linear !important; animation: none !important; transform: none !important; }

  .hero-slideshow .hero-eyebrow,
  .hero-slideshow .hero-title,
  .hero-slideshow h1,
  .hero-slideshow .hero-title em,
  .hero-slideshow h1 em,
  .hero-slideshow .hero-subtitle,
  .hero-slideshow p,
  .hero-slideshow .hero-badges,
  .hero-slideshow .hero-badge { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }

  .hero-slideshow .hero-title::after,
  .hero-slideshow h1::after { animation: none !important; width: 72px !important; }

  .hero-shimmer-layer { animation: none !important; display: none; }
  .hero-progress-bar  { transition: none !important; }
}
