/* Shores & Slopes: the home-page journey. Layered over styles.css, which the destination pages share. */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --hairline: rgba(25, 33, 49, 0.12);
}

/* Smooth scrolling is handled in script when it runs; let it own the scroll position. */
html.smooth-scroll, html.lenis { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: hidden; }

body { background: #efede5; }
#scene { transition: opacity 1.6s var(--ease-soft); }

/* A soft veil while the landscape is being built, lifted on the first frame.
   It also lifts on its own after a few seconds, so nothing is ever hidden behind it. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, #fefefe 0%, #f1efe9 60%, #e5e3d9 100%);
  animation: veil-out 1.2s var(--ease-soft) 4s forwards;
}
.scene-ready body::after, .no-webgl body::after { opacity: 0; transition: opacity 1.4s var(--ease-soft); animation: none; }
@keyframes veil-out { to { opacity: 0; } }

/* ---------- Header: clear over the beach, glass once you start to climb ---------- */
.top {
  background: transparent; border-bottom-color: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background 0.6s var(--ease-soft), border-color 0.6s var(--ease-soft), padding 0.6s var(--ease-soft);
}
.top.is-scrolled {
  background: rgba(255, 255, 255, 0.6); border-bottom-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  padding-block: 10px;
}
nav a { letter-spacing: 0.01em; position: relative; }
nav a:not(.pill)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out);
}
nav a:not(.pill):hover::after { transform: scaleX(1); transform-origin: left; }
nav .pill { transition: background 0.3s ease, transform 0.3s var(--ease-out); }
nav .pill:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero { align-content: start; padding-top: clamp(130px, 21vh, 220px); }
.hero::before { display: none; }
.hero > * {
  transform: translate3d(0, calc(var(--leave, 0) * -70px), 0);
  opacity: calc(1 - var(--leave, 0) * 1.25);
  will-change: transform, opacity;
}
.hero .eyebrow { color: #182f5e; letter-spacing: 0.32em; font-size: 0.72rem; }
.hero h1 {
  font-weight: 300; font-size: clamp(3.6rem, 12.5vw, 10.5rem); letter-spacing: -0.035em; line-height: 0.92;
  color: #111c33; text-shadow: 0 1px 40px rgba(255, 255, 255, 0.55);
  font-variation-settings: "opsz" 144;
}
.hero h1 em { font-style: italic; font-weight: 300; color: var(--clay); padding: 0 0.04em; }
.hero h1 .ch { display: inline-block; }
.ui-ready .hero h1 .ch { opacity: 0; transform: translate3d(0, 0.42em, 0) rotate(4deg); }
.intro .hero h1 .ch {
  animation: ch-rise 1.5s var(--ease-out) calc(160ms + var(--i) * 48ms) forwards;
}
@keyframes ch-rise { to { opacity: 1; transform: none; } }
.ui-ready .hero .eyebrow, .ui-ready .hero .lede, .ui-ready .hero .scroll-cue { opacity: 0; }
.intro .hero .eyebrow { animation: fade-up 1.2s var(--ease-out) 0.1s forwards; }
.intro .hero .lede { animation: fade-up 1.3s var(--ease-out) 0.85s forwards; }
.intro .hero .scroll-cue { animation: fade-up 1.3s var(--ease-out) 1.25s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
/* After the intro, the scroll-linked drift takes over from the keyframes. */
.intro-done .hero > *, .intro-done .hero h1 .ch { animation: none !important; opacity: calc(1 - var(--leave, 0) * 1.25) !important; }
.intro-done .hero h1 .ch { opacity: 1 !important; transform: none !important; }

.hero .lede {
  max-width: 30rem; margin-top: 26px; padding: 0; border: 0; border-radius: 0;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  font-size: clamp(1.05rem, 1.9vw, 1.28rem); line-height: 1.55; color: #142039;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6), 0 0 26px rgba(255, 255, 255, 0.85);
}
.hero .scroll-cue { margin-top: 40px; color: #142039; text-shadow: 0 0 18px rgba(255, 255, 255, 0.9); letter-spacing: 0.28em; font-size: 0.7rem; }
.hero .scroll-cue i { height: 54px; background: linear-gradient(#142039, transparent); }

/* ---------- Bands and cards ---------- */
.band { min-height: 130vh; }
.card {
  position: relative; border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.68));
  backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 80px -20px rgba(16, 29, 55, 0.32), 0 8px 24px -12px rgba(16, 29, 55, 0.2);
}
.card .eyebrow {
  display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums;
  letter-spacing: 0.24em; font-size: 0.7rem; color: #34627e;
}
.card .eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.6; }
.card--cta .eyebrow { justify-content: center; }
.card--cta .eyebrow::after { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.6; }
.card h2 { font-weight: 350; letter-spacing: -0.018em; font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: #111c33; font-variation-settings: "opsz" 96; }
.card p { color: #3b4557; }
.dest { border-top-color: var(--hairline); }
.dest li { border-bottom-color: var(--hairline); padding: 13px 0; transition: transform 0.5s var(--ease-out); }
.dest li:hover { transform: translateX(4px); }
.dest b { font-weight: 450; font-size: 1.12rem; }

/* Reveal: cards rise into place as they arrive, their contents following one after another. */
.ui-ready main .card { opacity: 0; transform: translate3d(0, 56px, 0) scale(0.975); transition: opacity 1.1s var(--ease-soft), transform 1.4s var(--ease-out); }
.ui-ready main .card.is-in { opacity: 1; transform: none; }
.ui-ready main .card > *, .ui-ready main .card :is(.dest, .steps) > li {
  opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity 0.9s var(--ease-soft), transform 1.1s var(--ease-out);
  transition-delay: calc(140ms + var(--i, 0) * 75ms);
}
.ui-ready main .card :is(.dest, .steps) { opacity: 1; transform: none; }
.ui-ready main .card.is-in > *, .ui-ready main .card.is-in :is(.dest, .steps) > li { opacity: 1; transform: none; }

/* ---------- Altimeter: a slim gauge with the waypoints of the climb ---------- */
.altimeter {
  right: clamp(14px, 2.6vw, 34px); gap: 10px; padding: 0; border: 0; border-radius: 0;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #111c33;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
}
.altimeter .lbl { font-size: 0.58rem; letter-spacing: 0.32em; color: #2a344a; }
.altimeter .track {
  position: relative; width: 1px; height: min(36vh, 300px); overflow: visible; border-radius: 0;
  background: linear-gradient(180deg, rgba(17, 28, 51, 0.08), rgba(17, 28, 51, 0.32));
}
#alt-bar { position: absolute; inset: 0; background: linear-gradient(0deg, #3b6f8f, #2a5fae 70%, #ffffff); transform-origin: bottom; }
.altimeter .wp { position: absolute; left: 50%; bottom: calc(var(--at) * 100%); width: 9px; height: 1px; background: rgba(17, 28, 51, 0.5); transform: translateX(-50%); }
.altimeter .wp::before {
  content: attr(data-name); position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font: 500 0.6rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(17, 28, 51, 0.62);
  opacity: 0; transition: opacity 0.4s ease;
}
.altimeter:hover .wp::before { opacity: 1; }
.altimeter .marker {
  position: absolute; left: 50%; bottom: calc(var(--f, 0) * 100%); width: 9px; height: 9px; border-radius: 50%;
  background: #ffffff; border: 1.5px solid #111c33; transform: translate(-50%, 50%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 2px 10px rgba(17, 28, 51, 0.35);
}
.altimeter .val { font: 500 1.02rem/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.altimeter .sub { font-size: 0.66rem; letter-spacing: 0.08em; color: #2a344a; }
@media (max-width: 640px) {
  .altimeter {
    top: auto; bottom: 14px; right: 14px; transform: none; padding: 8px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6); text-shadow: none;
  }
  .altimeter .track { display: none; }
  .band { min-height: 120svh; }
}

#plan { min-height: auto; padding-top: 34vh; padding-bottom: 14vh; }

/* ---------- Summit and footer: dusk light, so the footer turns light ---------- */
.foot p { color: #ffffff; text-shadow: 0 1px 14px rgba(40, 20, 30, 0.55); }

@media (prefers-reduced-motion: reduce) {
  .hero > * { transform: none; }
  .ui-ready main .card, .ui-ready main .card > *, .ui-ready main .card :is(.dest, .steps) > li { transition: none; }
}

/* "Plan a trip" moves focus to the form heading; no outline box on it. */
#plan-title:focus { outline: none; }

/* Riviera: soft light halo so the navy title stays readable over dark hills and palms */
.hero h1 { text-shadow: 0 0 2px rgba(255, 255, 255, 0.6), 0 0 16px rgba(255, 255, 255, 0.75), 0 0 44px rgba(255, 255, 255, 0.5); }
/* Riviera: same light halo for the small line and intro text over the hills */
.hero .eyebrow, .hero .lede, .hero h1 + p { text-shadow: 0 0 2px rgba(255,255,255,.7), 0 0 12px rgba(255,255,255,.8); }
/* Riviera: on desktop the small line sits on a soft light chip so it reads over the green hills */
html:not(.look-a):not(.look-b) .hero .eyebrow { text-shadow: none; background: rgba(246,245,241,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: .45em 1.1em; border-radius: 999px; width: fit-content; margin-left: auto; margin-right: auto; }
