/* Alp landing page — scrollytelling + frosted glass */

html, body { margin: 0; padding: 0; }
body {
  background: var(--parchment);
  color: var(--fg1);
  overflow-x: hidden;
}

* { box-sizing: border-box; }

/* ─── Scroll progress rail ─── */
.scroll-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 100;
  background: linear-gradient(90deg, var(--alpine-400), var(--alpine-500), var(--summit));
  transform-origin: 0 0;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* ─── Frosted nav ─── */
.nav-frost {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: rgba(245, 240, 235, 0.55);
  border-bottom: 1px solid rgba(26, 36, 54, 0.06);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.nav-frost.on-dark {
  background: rgba(14, 21, 32, 0.35);
  border-bottom: 1px solid rgba(245, 240, 235, 0.08);
}
.nav-frost.on-dark .nav-link,
.nav-frost.on-dark .nav-brand,
.nav-frost.on-dark .nav-time {
  color: rgba(245, 240, 235, 0.85);
}
.nav-frost.on-dark .nav-pill {
  background: rgba(245, 240, 235, 0.08);
  border-color: rgba(245, 240, 235, 0.14);
}

.nav-pill {
  background: rgba(245, 240, 235, 0.5);
  border: 1px solid rgba(26, 36, 54, 0.08);
  backdrop-filter: blur(10px);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

/* ─── Hero scrollytelling ─── */
.hero-stage {
  position: relative;
  height: 125vh; /* scroll length drives animation */
  background: linear-gradient(180deg, #C5E3EE 0%, #9CCFE2 18%, #F5F0EB 55%);
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.hero-sky-grad {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(242,187,160,0.55) 0%, rgba(242,187,160,0) 55%),
    radial-gradient(120% 90% at 20% 25%, rgba(85,170,203,0.30) 0%, rgba(85,170,203,0) 50%);
  pointer-events: none;
}
.hero-sun {
  position: absolute;
  top: 14%; right: 18%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,187,160,0.85) 0%, rgba(242,187,160,0.4) 40%, rgba(242,187,160,0) 70%);
  filter: blur(2px);
}

.hero-layer {
  position: absolute;
  left: calc(50vw - 60vw);
  width: 120vw;
  overflow: visible;
  will-change: transform;
}

/* Star field */
.hero-stars {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* ─── Frosted glass card primitives ─── */
.glass {
  background: rgba(245, 240, 235, 0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(245, 240, 235, 0.7);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 20px 60px -30px rgba(26, 36, 54, 0.25);
}
.glass-dark {
  background: rgba(14, 21, 32, 0.35);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(245, 240, 235, 0.12);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 20px 60px -30px rgba(0, 0, 0, 0.5);
  color: var(--parchment);
}
.glass-warm {
  background: rgba(255, 238, 226, 0.45);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 220, 200, 0.7);
}

/* ─── Line reveal for headlines ─── */
.reveal-line {
  display: block;
  overflow: hidden;
}
.reveal-line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.05s var(--ease-mask);
}
.reveal-line.in > span { transform: translateY(0); }

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.fade-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Hairline section dividers ─── */
.hairline {
  height: 1px;
  background: rgba(26, 36, 54, 0.08);
}

/* Link underline */
.link-u {
  position: relative;
  display: inline-block;
}
.link-u::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: currentColor;
  transition: width 0.35s var(--ease-out);
}
.link-u:hover::after { width: 100%; }

/* ─── Dark band ─── */
.abyss-band {
  background: var(--abyss);
  color: var(--parchment);
  position: relative;
}
.abyss-band .bg-grid-dark { position: absolute; inset: 0; opacity: 0.55; pointer-events: none; }

/* ─── Product card hover ─── */
.product-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.6s var(--ease-out);
}
.product-card:hover { transform: translateY(-4px); }
.product-card .fill-sweep {
  position: absolute; inset: 0;
  background: var(--abyss);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.product-card.featured .fill-sweep { background: var(--alpine-700); }
.product-card:hover .fill-sweep { transform: translateY(0); }
.product-card .product-inner { position: relative; z-index: 1; transition: color 0.4s var(--ease-out); }
.product-card:hover .product-inner,
.product-card:hover .product-inner * { color: var(--parchment) !important; }
.product-card:hover .product-inner .mono-sub { color: rgba(245,240,235,0.6) !important; }
.product-card:hover .product-inner .feat-dot { background: var(--summit) !important; }

/* ─── Ridge SVG parallax ─── */
.ridge-svg { width: 100%; height: auto; display: block; }

/* ─── Pinned dashboard ─── */
.pin-stage {
  position: relative;
  height: 320vh;
}
.pin-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ─── Quote estimator preview ─── */
.qe-bubble {
  border-radius: 18px;
  padding: 12px 16px;
  max-width: 78%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
}
.qe-bot {
  background: rgba(26, 36, 54, 0.06);
  color: var(--abyss);
  border-top-left-radius: 4px;
  align-self: flex-start;
}
.qe-user {
  background: var(--abyss);
  color: var(--parchment);
  border-top-right-radius: 4px;
  align-self: flex-end;
}

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(26, 36, 54, 0.15);
  background: rgba(245, 240, 235, 0.5);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--abyss);
}
.chip.dark {
  background: rgba(245, 240, 235, 0.08);
  border-color: rgba(245, 240, 235, 0.15);
  color: var(--parchment);
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 48s linear infinite;
}

/* Ticker */
.ticker-number {
  font-variant-numeric: tabular-nums;
}

/* FAQ accordion */
.faq-row {
  border-bottom: 1px solid rgba(26, 36, 54, 0.08);
  padding: 22px 0;
  cursor: pointer;
}
.faq-row:first-child { border-top: 1px solid rgba(26, 36, 54, 0.08); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-line > span, .fade-up { transition-duration: 0.001s !important; }
}

/* Noise overlay for dark sections */
.noise {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ─── Hero text column (responsive width) ─── */
.hero-text-col {
  max-width: min(780px, 62%);
}

/* ─── Hero atmospheric wash — soft parchment mist behind the headline,
       no hard panel edges; blends with the scene like morning light ─── */
.hero-mist {
  background:
    radial-gradient(70% 55% at 28% 38%, rgba(245, 240, 235, 0.85) 0%, rgba(245, 240, 235, 0.45) 35%, rgba(245, 240, 235, 0) 70%),
    linear-gradient(180deg, rgba(245, 240, 235, 0.35) 0%, rgba(245, 240, 235, 0) 45%);
}

/* Subtle luminous halo around headline letters so they separate cleanly
   from the parallax ridges without needing a card backdrop */
.hero-headline {
  text-shadow:
    0 1px 0 rgba(245, 240, 235, 0.6),
    0 0 24px rgba(245, 240, 235, 0.55);
}
.hero-sub {
  text-shadow: 0 0 18px rgba(245, 240, 235, 0.55);
}

/* ─── How section scrollytelling height (moved from inline) ─── */
.how-stage-wrap {
  height: 420vh;
}

/* ──────────────────────────────────────────────────────────
   Mobile / tablet responsive fixes
   ────────────────────────────────────────────────────────── */

/* Phones: widen hero text column + shorten hero scroll length */
@media (max-width: 767px) {
  .hero-text-col {
    max-width: 100%;
  }
  .hero-stage {
    height: 115vh;
  }
  .hero-mist {
    background:
      radial-gradient(85% 55% at 50% 32%, rgba(245, 240, 235, 0.9) 0%, rgba(245, 240, 235, 0.5) 40%, rgba(245, 240, 235, 0) 75%),
      linear-gradient(180deg, rgba(245, 240, 235, 0.45) 0%, rgba(245, 240, 235, 0) 50%);
  }
}

/* Tablet + phone: un-pin Products section, show all 3 cards stacked */
@media (max-width: 1023px) {
  .pin-stage {
    height: auto !important;
  }
  .pin-sticky {
    position: static !important;
    height: auto !important;
    display: block !important;
    align-items: initial !important;
    padding: 4rem 0 !important;
    overflow: visible !important;
  }
  .products-stack {
    display: block !important;
  }
  .products-step-card {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: auto !important;
    margin-bottom: 1.5rem;
  }
  .products-mountain-col {
    margin-bottom: 2.5rem;
  }
  .products-mountain-art {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
  /* light up all peaks when scroll isn't driving the mountain */
  .products-mountain-art svg > g[data-peak] {
    opacity: 1 !important;
  }
  .products-mountain-art svg > g[data-peak] text {
    opacity: 0.85 !important;
  }
}

/* Tablet + phone: un-pin How section, stack all 5 stages */
@media (max-width: 1023px) {
  .how-stage-wrap {
    height: auto !important;
  }
  .how-sticky {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 4rem;
  }
  .how-stack {
    display: block !important;
    min-height: 0 !important;
  }
  .how-stage {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(26, 36, 54, 0.1);
  }
  .how-stage:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0.5rem;
  }
  .how-mountain-col {
    max-width: 320px;
    margin: 0 auto 2rem;
  }
  .how-stage-dotnav {
    display: none !important;
  }
}
