/* ============================
   Global
   ============================ */
:root {
  --text: #ffffff;
  --muted: rgba(255,255,255,0.82);

  --overlayTop: rgba(0,0,0,0.20);
  --overlayMid: rgba(0,0,0,0.22);
  --overlayBot: rgba(0,0,0,0.62);

  --pillBg: rgba(0,0,0,0.45);
  --pillBorder: rgba(255,255,255,0.16);

  --shadow: 0 14px 40px rgba(0,0,0,0.22);
  --radius: 18px;
  --pill: 999px;

  /* Fade tuning */
  --fadeDuration: 900ms;
  --fadeEase: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #000;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Hide scrollbar but keep scrolling */
  -ms-overflow-style: none;  /* IE/Edge legacy */
  scrollbar-width: none;     /* Firefox */
}
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Each full-screen section snaps */
.snap {
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ============================
   Fixed menu (bottom-right)
   ============================ */

/* If you keep <header class="dock"> in HTML, make it not affect layout */
.dock {
  position: static;
  padding: 0;
  margin: 0;
}

/* If the title still lives in the dock, hide it (optional).
   Remove this if you want the title visible somewhere. */
/* .dock .hero-title {
  display: none;
} */

/* Keep your pill menu styling, but pin it to bottom-right */
.hero-menu {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 1000;

  display: inline-flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;

  padding: 12px 18px;
  border-radius: var(--pill);
  background: var(--pillBg);
  border: 1px solid var(--pillBorder);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.92;
  padding: 10px 12px;
  border-radius: var(--pill);
  transition: opacity 160ms ease, background 160ms ease, transform 160ms ease;
}

.hero-menu a:hover {
  opacity: 1;
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

.hero-menu a:focus-visible {
  outline: 3px solid rgba(255,255,255,0.45);
  outline-offset: 3px;
}

/* ============================
   Hero (Slide 1)
   ============================ */

/* Treat hero like a slide. Use --img when provided; fallback to ski.jpg. */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;

  background: var(--img, url("/images/ski.jpg")) no-repeat center / cover;
  overflow: hidden;

  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--overlayTop),
    var(--overlayMid) 45%,
    var(--overlayBot)
  );
  pointer-events: none;
}

/* If you still have hero-content in HTML, keep it safe but unobtrusive */
.hero-content {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  padding: clamp(14px, 2.4vw, 22px);
  point-events: none; 
}

/* Title styling (used elsewhere if needed) */
.hero-title {
  margin: 0;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0,0,0,0.55); 
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.1;
  font-weight: 720;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ============================
   Story (full-screen slides)
   Smooth cross-fade via sticky stacking
   ============================ */
.story {
  width: 100%;
}

/* KEY: sticky stacking allows slides to overlap for true cross-fades */
.story-slide {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;

  background: var(--img) no-repeat center / cover;
  overflow: hidden;

  /* Fade baseline: invisible until activated by JS */
  opacity: 0;
  transition: opacity var(--fadeDuration) var(--fadeEase);
  will-change: opacity;

  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Active slide is visible */
.story-slide.is-active {
  opacity: 1;
}

/* Overlay stays consistent across slides */
.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.12),
    rgba(0,0,0,0.18) 55%,
    rgba(0,0,0,0.68)
  );
  pointer-events: none;
}

/* No captions (even if any remain in HTML) */
.story-caption {
  display: none !important;
}

/* ============================
   Fade-on-scroll (legacy hook)
   ============================ */
.fade-on-scroll {
  opacity: 1;
  transition: opacity 200ms linear;
}

/* ============================
   Mobile tweaks
   ============================ */
@media (max-width: 520px) {
  .hero-menu { gap: 12px; }
  .hero-menu a { font-size: 0.92rem; padding: 10px 10px; }
}

/* ============================
   Reduced motion
   ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .story-slide {
    transition: none !important;
  }
