/* Landing page. Light: a calm editorial page on snow with one magenta route line.
   Dark: the same page at night, the route glowing. Colours are the app's tokens; the riders are the app's own. */
@font-face { font-family: "Fira Sans"; src: url(fonts/fira-sans-light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(fonts/fira-sans-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(fonts/fira-sans-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #F5F7F9; --surface: #FFFFFF; --text: #0F1720; --muted: #4D5967; --border: #D5DBE1;
  --primary: #B5146F; --primary-pressed: #8F0F57; --on-primary: #FFFFFF;
  --bezel: #11161C; --trail-opacity: .34; --header-bg: rgba(245, 247, 249, .82);
  --shadow: 0 40px 80px -32px rgba(15, 23, 32, .42);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1200px; --header: 72px;
  --foot: 90px; --gap: clamp(40px, 7vw, 110px); --line: 5px; --turn: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1); --error: #B42318;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1015; --surface: #151B22; --text: #EDF1F5; --muted: #A3AEBA; --border: #2A333D;
    --primary: #FF5FB9; --primary-pressed: #FF8ACB; --on-primary: #22061A;
    --bezel: #1F2730; --trail-opacity: .5; --header-bg: rgba(12, 16, 21, .8);
    --shadow: 0 40px 90px -30px rgba(0, 0, 0, .8); --error: #FF8A80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.55 "Fira Sans", system-ui, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-pressed); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); position: relative; }
/* clip, not hidden: hidden would make .page a scroll container and stop the header from sticking. */
.page { position: relative; overflow-x: clip; }

/* The trail map of a real resort (pistes and lifts, no names), dissolving into the page. It stays where it is
   while the page scrolls over it. */
.trail { position: fixed; z-index: 0; top: 0; right: max(-140px, calc((100% - var(--wrap)) / 2 - 160px)); width: min(64%, 860px); opacity: var(--trail-opacity); pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 62% 48% at 55% 32%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 62% 48% at 55% 32%, #000 30%, transparent 100%); }

main, .bottom { position: relative; z-index: 1; }

/* ---------- Header: stays on top, the page scrolls under it ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--header-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top-in { display: flex; align-items: center; gap: 16px; height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 22%; }
.sections { display: flex; gap: 2px; }
.sections a, .langs a { display: inline-grid; place-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; }
.sections a:hover, .langs a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.langs { display: flex; gap: 2px; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border); }
.langs a { min-width: 44px; font: 500 13px/1 var(--mono); letter-spacing: .08em; }
.langs a[aria-current="page"], .menu-langs a[aria-current="page"] { color: var(--text); font-weight: 700; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
@supports (animation-timeline: scroll()) {
  .top { animation: header-line linear both; animation-timeline: scroll(); animation-range: 0 120px; }
  @keyframes header-line { to { border-bottom-color: var(--border); } }
}

/* Phones: one "Menu" button with the sections and languages. */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 15px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 40px)); padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--border), 0 24px 48px -16px rgba(15, 23, 32, .35); }
.menu-panel nav { display: grid; }
.menu-panel a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; color: var(--text); text-decoration: none; font-size: 18px; }
.menu-panel a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.menu-langs { grid-template-columns: repeat(3, 1fr) !important; gap: 6px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; }
.menu-langs a { justify-content: center; font: 500 14px/1 var(--mono); }

/* ---------- The route ----------
   A line from each phone to the next one, like the app's route from lift to lift: it starts at "you" above the
   first phone and ends at a meeting pin. route.js draws it on wide screens while the page scrolls from one screen
   to the next (svg.route covers main, behind the sections); on phones it is a rail down the left edge. */
.shot { position: relative; align-self: stretch; justify-self: stretch; display: grid; place-items: center; margin: 0; }
.phone { position: relative; }
.hero-shot { padding-top: 72px; }
.hero-shot::before { content: ""; position: absolute; top: 32px; height: 46px; left: calc(50% - var(--line) / 2); width: var(--line); background: var(--primary); }
.you { position: absolute; top: 18px; left: calc(50% - 14px); width: 28px; height: 28px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 6px var(--bg); }
.you::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: var(--primary); opacity: .22; }
.route { position: absolute; top: 0; left: 0; z-index: 0; overflow: visible; pointer-events: none; }
main > section { position: relative; z-index: 1; }
.route-line { fill: none; stroke: var(--primary); stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
/* The mask is wide and blurred: across the line it is solid, along it only the moving tip fades. */
.route-pen { fill: none; stroke: #fff; stroke-width: 64; stroke-linecap: butt; }
.route-pin path { fill: var(--primary); }
.route-pin circle { fill: var(--bg); }
@media (prefers-color-scheme: dark) {
  .hero-shot::before, .route-line, .route-pin, .you { filter: drop-shadow(0 0 8px rgba(255, 95, 185, .65)); }
}


.step { font: 500 13px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: center; padding-top: clamp(16px, 3vw, 40px); }
.hero h1 { font-weight: 300; font-size: clamp(44px, 6.4vw, 96px); line-height: 1; letter-spacing: -.035em; margin: 20px 0 28px; }
.hero h1 strong { display: block; }
.hero h1 strong { font-weight: 700; color: var(--primary); }
.lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--muted); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 36px; }
.cta { display: inline-flex; align-items: center; min-height: 54px; padding: 0 28px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 18px; text-decoration: none; transition: transform .2s var(--ease), background .2s; }
.cta:hover { background: var(--primary-pressed); color: var(--on-primary); transform: translateY(-2px); }
.testing { font-weight: 700; color: var(--text); }
.store { display: inline-flex; border-radius: 9px; transition: transform .2s var(--ease); }
.store img { height: 48px; width: auto; }
.store:hover { transform: translateY(-2px); }
.later { color: var(--muted); font-size: 16px; }
.later a { color: inherit; text-underline-offset: 3px; }
.later a:hover { color: var(--primary); }

.phone { width: min(100%, 300px); border-radius: 48px; padding: 9px; background: var(--bezel); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.phone img { border-radius: 40px; }
.hero-shot .phone { width: min(100%, 330px); }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: center; }
.feature.flip .feature-text { order: 2; }
.feature h2 { font-weight: 300; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -.025em; margin: 16px 0 22px; }
.feature h2 strong { font-weight: 700; display: block; }
.feature-text p:not(.step) { color: var(--muted); max-width: 30em; }

.how { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(48px, 6vw, 96px); }
.how h2, .faq h2 { font-weight: 300; font-size: clamp(32px, 3.6vw, 48px); letter-spacing: -.02em; }
.how ol { list-style: none; counter-reset: step; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.how li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.how li::before { content: "0" counter(step); display: block; font: 500 13px/1 var(--mono); letter-spacing: .12em; color: var(--primary); margin-bottom: 18px; }
.how h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.how p { color: var(--muted); font-size: 17px; }

.faq { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: center; padding-bottom: clamp(64px, 8vw, 120px); }
/* Beside the questions: the group heading to a meeting point, drawn with the app's own riders. */
.crew { margin: 0; max-width: 380px; justify-self: center; width: 100%; }
.crew svg { display: block; width: 100%; height: auto; overflow: visible; }
.crew-routes path { fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 9; opacity: .55; }
.crew-ring { fill: var(--surface); stroke-width: 3; }
.crew-pin path { fill: var(--primary); }
.crew-pin circle { fill: var(--surface); }
/* Under the contact text: a rider writing, the message on its way to Snavi. */
.talk { margin: 40px 0 0; max-width: 340px; }
.talk svg { display: block; width: 100%; height: auto; overflow: visible; }
.talk-route { fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 9; opacity: .55; }
.talk-bubble path { fill: var(--primary); }
.talk-bubble circle { fill: var(--on-primary); }
.faq h2 { margin-bottom: 24px; }
:is(.faq, .doc) details { border-top: 1px solid var(--border); }
:is(.faq, .doc) details:last-of-type { border-bottom: 1px solid var(--border); }
:is(.faq, .doc) summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 64px; padding: 14px 0; font-size: 20px; font-weight: 700; }
:is(.faq, .doc) summary::-webkit-details-marker { display: none; }
:is(.faq, .doc) summary::after { content: "+"; content: "+" / ""; font-weight: 300; font-size: 30px; line-height: 1; color: var(--primary); transition: transform .25s var(--ease); }
:is(.faq, .doc) details[open] summary::after { transform: rotate(45deg); }
:is(.faq, .doc) details p { color: var(--muted); padding: 0 0 22px; max-width: 40em; }

.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; padding-bottom: clamp(64px, 8vw, 120px); }
.contact h2 { font-weight: 300; font-size: clamp(32px, 3.6vw, 48px); letter-spacing: -.02em; margin-bottom: 18px; }
.contact-text p { color: var(--muted); max-width: 26em; }
.contact-text .contact-mail { margin-top: 18px; }
.contact-form { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.contact-form[hidden] { display: none; }
.field { display: grid; gap: 6px; }
.field span { font-size: 15px; font-weight: 700; }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 17px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: transparent; }
/* Room for the Turnstile widget (65px) before it loads, so nothing below it jumps. */
.captcha { min-height: 65px; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.contact-row .cta { border: 0; cursor: pointer; font-family: inherit; }
.contact-row .cta:disabled { opacity: .6; cursor: progress; transform: none; }
.contact-status { font-size: 16px; color: var(--muted); }
.contact-status[data-state="ok"] { color: var(--text); font-weight: 700; }
.contact-status[data-state="error"] { color: var(--error); font-weight: 700; }
/* A field only bots fill in; kept off screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer: one quiet line (logo, links, map credit), wrapping on narrow screens. */
.bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--border); font-size: 15px; }
.bottom .brand { font-size: 16px; margin: 0; gap: 8px; min-height: 44px; }
.bottom .brand img { border-radius: 22%; }
.bottom ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.bottom ul a { display: inline-grid; place-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); text-decoration: none; }
.bottom ul a:hover { color: var(--primary); text-decoration: underline; }
.bottom .small { margin-left: auto; font-size: 13px; }
.small { font-size: 14px; color: var(--muted); }
.small a { color: inherit; }

/* Support and privacy: the landing's width, the title on the left and the text on the right. */
.doc { display: grid; gap: 28px clamp(40px, 6vw, 96px); padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(64px, 8vw, 120px); }
.doc h1 { font-weight: 300; font-size: clamp(36px, 3.4vw, 50px); overflow-wrap: break-word; hyphens: auto; line-height: 1.05; letter-spacing: -.025em; margin-bottom: 16px; }
.doc-lead { color: var(--muted); font-size: 20px; margin-top: 20px; max-width: 30em; }
.doc-body { max-width: 760px; min-width: 0; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 { font-size: 24px; font-weight: 700; margin: 44px 0 12px; }
.doc-body p, .doc-body li { color: var(--muted); }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.doc-body strong { color: var(--text); }
.table { overflow-x: auto; margin: 4px 0 16px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--border); }
.doc th { font-weight: 700; }
.doc td { color: var(--muted); }
@media (min-width: 1041px) {
  .doc { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .doc-head { position: sticky; top: calc(var(--header) + 32px); }
}

/* Wide screens: every part of the page fills the window. */
@media (min-width: 761px) {
  html { scroll-padding-top: var(--header); }
  .hero, .feature, .how, .faq, .contact { min-height: calc(100svh - var(--header)); align-content: center; }
  .feature { padding-top: 32px; padding-bottom: 32px; }
  /* The last screen is the contact part and the footer together. */
  .contact { min-height: calc(100svh - var(--header) - var(--foot)); padding-top: 32px; padding-bottom: 32px; }
  .how { display: flex; flex-direction: column; justify-content: center; }
  /* Phones are sized by the window's height too, so a whole phone fits on its screen. */
  .phone { width: min(100%, 300px, calc((100svh - var(--header) - 110px) / 2.2)); }
  .hero-shot .phone { width: min(100%, 330px, calc((100svh - var(--header) - 190px) / 2.2)); }
  /* and the headline by its height, so the first screen fits a laptop window */
  .hero h1 { font-size: clamp(44px, min(6.4vw, 9.5svh), 96px); }
}
@media (max-width: 1040px) {
  .sections, .langs { display: none; }
  .menu { display: block; }
}

@media (max-width: 760px) {
  :root { --header: 60px; }
  body { font-size: 17px; }
  .hero-shot::before, .route, .you { display: none; }
  .hero-shot { padding-top: 0; }
  .feature { padding-top: 64px; }
  .hero { padding-bottom: 8px; }
  .trail { width: 100%; right: 0; top: 0; opacity: calc(var(--trail-opacity) * .6); }
  .hero, .feature { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature.flip .feature-text { order: 0; }
  .hero-shot .phone, .phone { width: 260px; border-radius: 42px; padding: 8px; }
  .phone img { border-radius: 35px; }
  /* On phones the route is a rail down the left edge with a stop at each section, like the app's steps list. */
  main:not(.doc) { margin-left: 20px; border-left: 3px solid var(--primary); }
  .feature-text, .how h2, .faq h2, .contact h2 { position: relative; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature-text::before, .how h2::before, .faq h2::before, .contact h2::before { content: ""; position: absolute; left: calc(-1 * clamp(20px, 5vw, 48px) - 9.5px); top: 12px; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--primary); }
  .how ol { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .crew, .talk { display: none; }
  .bottom { gap: 0 16px; }
  .bottom .small { margin-left: 0; width: 100%; padding-bottom: 4px; }
}

/* ---------- Motion (none at all with reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @keyframes rise { from { opacity: 0; transform: translateY(28px); } }
  @keyframes pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.6); opacity: 0; } }
  /* Page load: the hero comes in line by line. */
  .hero-text > *, .hero h1 > * { animation: rise .8s var(--ease) both; }
  .hero h1 > strong { animation-delay: .2s; }
  .hero .lead { animation-delay: .32s; }
  .hero .actions { animation-delay: .44s; }
  .hero-shot .phone { animation: rise 1s var(--ease) .2s both; }
  .you::after { animation: pulse 2.2s ease-out infinite; }
  /* The dotted routes flow slowly towards the meeting point. */
  @keyframes flow { to { stroke-dashoffset: -40; } }
  .crew-routes path, .talk-route { animation: flow 4s linear infinite; }
  /* The rider is typing. */
  @keyframes typing { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
  .talk-bubble circle { animation: typing 1.4s ease-in-out infinite; }
  .talk-bubble circle:nth-of-type(2) { animation-delay: .2s; }
  .talk-bubble circle:nth-of-type(3) { animation-delay: .4s; }

  /* While scrolling (browsers with scroll-driven animations; others show everything at rest). On wide screens
     route.js moves the feature texts and phones itself. */
  @supports (animation-timeline: view()) {
    @keyframes reveal { from { opacity: 0; transform: translateY(48px); } }
    .how li, .faq details, .contact-text, .contact-form, .crew { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .how li:nth-child(2) { animation-range: entry 10% entry 80%; }
    .how li:nth-child(3) { animation-range: entry 20% entry 90%; }
  }
  @media (max-width: 760px) {
    @supports (animation-timeline: view()) {
      @keyframes show { from { opacity: 0; transform: translateY(28px) scale(.97); } }
      .feature-text { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
      .feature .phone { animation: show linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .top { border-bottom-color: var(--border); }
}
