/* alpynski.com: the site reads like a printed trail map. Paper and ink,
   trail signs for navigation, a lift ticket for the waitlist, features as
   runs by difficulty, and one dark "live" panel. Colours from the app
   (Packages/SkiUI/Sources/SkiUI/Tokens.swift). */

:root {
  --paper: #EDE8DF;        /* the skis in the icon */
  --paper-2: #E4DED2;
  --card: #F7F4EE;
  --ink: #0E0E0F;          /* the launch screen black */
  --ink-2: #2A2926;        /* body text on paper */
  --dim: #5F5B54;
  --line: rgba(14, 14, 15, .14);
  --signal: #F2C230;       /* SkiColor.accent: fills only on paper, never text */
  --green: #2FA84F;
  --blue: #2A7DE1;
  --glacier: #4FA3D8;      /* Backcountry Pro */
  --danger: #C72B33;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-card: 16px;
  --r-button: 13px;        /* SkiRadius.button (14pt at 58pt tall), scaled to 52px */
  --r-small: 10px;         /* SkiRadius.small */
  --r-sign: 8px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--signal); color: var(--ink); padding: 8px 12px; border-radius: var(--r-small); }

h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin: 0; }
h1 { font-size: clamp(52px, 8.2vw, 112px); letter-spacing: -.045em; line-height: .9; }
h2 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -.04em; }
h3 { font-size: clamp(28px, 3.2vw, 42px); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 30em; margin: 24px 0 0; }
.kicker { font: 600 12px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ---------- trail signs ---------- */
.sign {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border-radius: var(--r-sign); background: var(--ink); color: var(--paper);
  font: 700 13px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; transition: transform .12s;
}
a.sign:hover { transform: translateY(-1px); }
.sign.y { background: var(--signal); color: var(--ink); }
.sign[aria-current="page"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.sym { width: 14px; height: 14px; flex: none; display: inline-block; position: relative; }
.sym.g { border-radius: 50%; background: var(--green); }
.sym.b { background: var(--blue); border-radius: 2px; }
.sym.k::before, .sym.kk::before, .sym.kk::after {
  content: ""; position: absolute; top: 2px; width: 10px; height: 10px; background: currentColor; transform: rotate(45deg); border-radius: 1px;
}
.sym.k::before { left: 2px; }
.sym.kk { width: 26px; }
.sym.kk::before { left: 1px; } .sym.kk::after { left: 13px; }
.sym.sun { border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--ink) inset; }
.sym.peak { background: var(--glacier); clip-path: polygon(50% 8%, 100% 92%, 0 92%); }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 10px; height: 72px; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: 30px; width: auto; }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav {
  position: absolute; left: 0; right: 0; top: 72px; padding: 16px var(--gutter) 24px;
  background: var(--paper); border-bottom: 2px solid var(--ink); display: grid; gap: 10px; justify-items: start;
}
@media (max-width: 820px) {
  .site-header .wrap > .sign:not(.y) { display: none; }
  .menu { display: block; }
}

/* ---------- buttons, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: var(--r-button); border: 0;
  background: var(--signal); color: var(--ink); font: 700 16px/1 var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.98); }
.btn.ink { background: var(--ink); color: var(--paper); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- the lift ticket (waitlist) ---------- */
.ticket { position: relative; width: min(100%, 380px); }
.ticket.hang { justify-self: center; transform: rotate(-4deg); margin-top: 110px; transform-origin: 50% -110px; }
@media (prefers-reduced-motion: no-preference) {
  .ticket.hang { animation: sway 7s ease-in-out infinite alternate; }
  @keyframes sway { from { transform: rotate(-4.5deg); } to { transform: rotate(-2deg); } }
}
.ticket .wicket { position: absolute; left: 50%; top: -118px; width: 2px; height: 128px; background: linear-gradient(#6d6a64, #b9b4ab); transform: translateX(-50%); }
.ticket .wicket::after { content: ""; position: absolute; left: -9px; bottom: -8px; width: 20px; height: 20px; border: 2px solid #9a968e; border-radius: 50%; }
.ticket .card { padding: 0; background: #fff; border-radius: var(--r-card); overflow: hidden; position: relative; box-shadow: 0 30px 60px -22px rgba(14, 14, 15, .45), 0 0 0 1px rgba(14, 14, 15, .08); }
.ticket .top { background: var(--ink); color: var(--paper); padding: 30px 22px 20px; position: relative; }
.ticket .hole { position: absolute; left: 50%; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper-2); transform: translateX(-50%); }
.ticket .top img { height: 26px; margin: 8px 0 16px; }
.ticket .meta { display: flex; justify-content: space-between; gap: 12px; font: 600 11px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #B8B3AA; }
.ticket .meta b { display: block; color: var(--paper); font-size: 15px; letter-spacing: .02em; margin-top: 4px; }
.ticket .strap { height: 12px; background: var(--signal); }
.ticket form { padding: 20px 22px 6px; }
.ticket label.field { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ticket input[type="email"] {
  display: block; width: 100%; margin: 8px 0 12px; height: 52px; border: 1.5px solid var(--ink); border-radius: var(--r-button);
  padding: 0 14px; font: 17px var(--sans); background: #fff; color: var(--ink); caret-color: var(--ink);
}
.ticket input[type="email"]:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(242, 194, 48, .4); }
.ticket .btn { width: 100%; }
.ticket .bar { display: flex; gap: 2px; height: 32px; margin: 14px 22px 12px; }
.ticket .bar i { flex: 1; background: var(--ink); } .ticket .bar i:nth-child(3n) { flex: 2; } .ticket .bar i:nth-child(5n) { background: none; }
.ticket small { display: block; text-align: center; font-size: 12px; color: var(--dim); padding: 0 22px 16px; }
.waitlist .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist .status { font-size: 15px; margin: 4px 0 6px; min-height: 1.4em; color: var(--ink-2); }
.waitlist .status.ok { color: var(--ink); font-weight: 600; }
.waitlist .status.err { color: var(--danger); }
.waitlist.done .row, .waitlist.done .tiers { display: none; }
.waitlist .tiers { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.waitlist .tiers legend { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; padding: 0; }
.waitlist .tiers label {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--r-small);
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 600; cursor: pointer;
}
.waitlist .tiers input { accent-color: var(--ink); margin: 0; }
.waitlist .tiers label:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
/* punched: a stamp lands on the ticket */
.ticket .stamp {
  position: absolute; right: 18px; bottom: 58px; padding: 6px 12px; border: 3px solid var(--danger); background: rgba(255,255,255,.85); border-radius: 8px;
  color: var(--danger); font: 800 18px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  transform: rotate(12deg) scale(1.6); opacity: 0; pointer-events: none; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), opacity .2s;
}
.ticket .card:has(.waitlist.done) .stamp { opacity: .9; transform: rotate(12deg) scale(1); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink); margin-top: -72px; padding-top: 72px; }
.topo-bg { position: absolute; inset: -4%; background: url("/assets/topo.svg") center / cover no-repeat; filter: invert(1); opacity: .5; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; min-height: min(86vh, 820px); padding-top: 32px; padding-bottom: 72px; }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .ticket.hang { margin: 120px auto 0; width: min(100% - 28px, 340px); animation: none; transform: rotate(-2deg); transform-origin: 50% 0; }
}

/* ---------- the live panel (sun and shade) ---------- */
.live { position: relative; height: min(100svh, 860px); min-height: 640px; overflow: hidden; background: var(--ink); color: var(--paper); }
.live canvas, .live .contours { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live .contours { opacity: .28; mix-blend-mode: difference; pointer-events: none; }
.live .fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(14,14,15,.55) 0, rgba(14,14,15,0) 25%, rgba(14,14,15,0) 50%, rgba(14,14,15,.92) 100%); }
.live .tag { position: absolute; top: 28px; left: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); }
.live .copy { position: absolute; left: 0; right: 0; padding: 0 var(--gutter); bottom: clamp(24px, 5vh, 48px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; max-width: var(--wrap); margin: 0 auto; }
.live h2 { color: var(--paper); }
.live p { max-width: 30em; color: #D8D5CE; margin: 16px 0 0; font-size: 18px; }
.dial { width: min(380px, 100%); background: rgba(14,14,15,.74); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(237,232,223,.14); border-radius: var(--r-card); padding: 18px 18px 16px; }
.dial .t { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dial .clock { font: 700 34px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dial .sun, .dial .ticks, .dial .cond div { font: 11px var(--mono); color: #A3A099; text-transform: uppercase; letter-spacing: .06em; }
.dial input[type="range"] { width: 100%; margin: 16px 0 6px; accent-color: var(--signal); height: 28px; }
.dial .ticks { display: flex; justify-content: space-between; }
.dial .cond { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(237,232,223,.12); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dial .cond b { display: block; font: 600 19px/1.2 var(--sans); color: var(--paper); letter-spacing: -.01em; text-transform: none; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dial .where { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,168,79,.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(47,168,79,0); } }
}
@media (max-width: 820px) { .live .copy { grid-template-columns: 1fr; } }

/* ---------- runs (features) ---------- */
.runs { position: relative; padding-bottom: 24px; }
.runs .lift { position: absolute; left: var(--gutter); top: 0; bottom: 0; width: 3px; background: var(--signal); }
.runs-head { padding: clamp(72px, 9vw, 112px) 0 24px 48px; }
.runs-head p { margin: 16px 0 0; }
.run {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 200px; gap: 40px; align-items: start;
  padding: 56px 0 56px 48px; border-top: 1px solid var(--line); position: relative;
}
.run::before { content: ""; position: absolute; left: -5px; top: 66px; width: 13px; height: 13px; border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 3px var(--paper); }
.run h3 { margin-top: 16px; }
.run p { margin: 0; color: var(--ink-2); }
.run .kicker { margin-top: 16px; }
.run .shot { border-radius: 28px; padding: 6px; background: var(--ink); box-shadow: 0 24px 48px -24px rgba(14,14,15,.5); }
.run .shot img { border-radius: 22px; width: 100%; height: auto; aspect-ratio: 1206 / 2622; object-fit: cover; }
@media (max-width: 880px) {
  .run { grid-template-columns: 1fr; gap: 16px; }
  .run .shot { max-width: 220px; margin-top: 12px; }
}

/* ---------- tickets as plans ---------- */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-card); overflow: hidden; box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: inherit; }
a.plan { transition: transform .15s, box-shadow .15s; }
a.plan:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 20px 40px -24px rgba(14,14,15,.4); }
.plan .head { background: var(--ink); color: var(--paper); padding: 30px 24px 20px; position: relative; }
.plan .head .hole { position: absolute; left: 50%; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); transform: translateX(-50%); }
.plan .head .sign { background: var(--paper); color: var(--ink); }
.plan .price { font: 800 44px/1 var(--sans); letter-spacing: -.04em; margin: 18px 0 4px; }
.plan .price small { font-size: 16px; font-weight: 500; color: #B8B3AA; letter-spacing: 0; }
.plan .alt { color: #B8B3AA; font-size: 15px; margin: 0; }
.plan .strap { height: 10px; background: var(--strap, var(--paper-2)); }
.plan.free { --strap: var(--paper-2); }
.plan.resort { --strap: var(--signal); }
.plan.backcountry { --strap: var(--glacier); }
.plan .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.plan .body p { margin: 0; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 24px; font-size: 16px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 3px; border-radius: 2px; background: var(--strap, var(--ink)); }
.plan.free .ticks li::before { background: var(--ink); }
.ticks .later { color: var(--dim); }
.ticks .later::before { background: var(--line) !important; }
.pill { display: inline-block; font: 700 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: var(--paper-2); color: var(--dim); vertical-align: 2px; margin-left: 4px; }

/* ---------- generic sections ---------- */
section { padding: clamp(72px, 9vw, 112px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.rule { border: 0; border-top: 2px solid var(--ink); margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card { background: var(--card); border-radius: var(--r-card); padding: 28px; box-shadow: 0 0 0 1px var(--line); }
.card h3 { font-size: 28px; margin: 14px 0 16px; }
.card .ticks { margin-top: 4px; }

/* CTA: a ticket lying flat beside the headline */
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 48px; align-items: center; }
.cta .ticket { justify-self: end; transform: rotate(2deg); }
@media (max-width: 820px) { .cta .wrap { grid-template-columns: 1fr; } .cta .ticket { justify-self: center; } }

/* ---------- page head (inner pages) ---------- */
.page-head { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink); margin-top: -72px; padding: calc(72px + clamp(40px, 6vw, 72px)) 0 clamp(40px, 5vw, 64px); }
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(48px, 7vw, 92px); margin-top: 20px; }

/* ---------- prose (legal, support) ---------- */
.prose { max-width: 720px; padding: clamp(40px, 6vw, 64px) 0 clamp(72px, 10vw, 120px); }
.prose h2 { font-size: 28px; letter-spacing: -.025em; line-height: 1.1; margin: 52px 0 14px; }
.prose h3 { font-size: 19px; letter-spacing: -.01em; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 16px; }
.prose ul { padding-left: 20px; margin: 0 0 18px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--dim); }
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose .meta { color: var(--dim); font-size: 15px; }
.prose .callout { background: var(--card); border-left: 4px solid var(--signal); border-radius: 0 var(--r-small) var(--r-small) 0; padding: 18px 20px; margin: 0 0 20px; box-shadow: 0 0 0 1px var(--line); }
.prose .callout p:last-child { margin: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.prose th { color: var(--dim); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid var(--ink); }
.placeholder { background: var(--signal); color: var(--ink); padding: 0 4px; border-radius: 4px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 700 19px/1.35 var(--sans); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 22px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- footer: the map's legend strip ---------- */
.site-footer { background: var(--ink); color: #A3A099; padding: 56px 0 64px; font-size: 14px; }
.site-footer .wrap { display: grid; gap: 28px; }
.site-footer .top { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.site-footer .brand img { height: 26px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer nav a { text-decoration: none; color: var(--paper); display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: var(--r-sign); box-shadow: inset 0 0 0 1px rgba(237,232,223,.2); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.site-footer nav a:hover { box-shadow: inset 0 0 0 1px var(--paper); }
.site-footer .legend { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 13px; }
.site-footer .legend span { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .legend .sym.k::before { background: var(--paper); }
.site-footer p { margin: 0; max-width: 62em; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
