/* COL NOIR — the mountain bulletin.
   Institutional avalanche-report grammar over full-bleed alpine 4K:
   glacier paper, hard ink, one Swiss red for rules and action, and the
   European danger scale as the only other chroma — always as data.
   Archivo (variable width) speaks for the office; Chivo Mono for every
   measurement. No frameworks, no libraries. */

:root {
  --paper: #f5f6f4;
  --paper-dim: #ecefec;
  --ink: #16181a;
  --muted: #667074;
  --hair: #d5dad7;
  --red: #d8272c;
  --d1: #4f9d5b;
  --d2: #e9c531;
  --d3: #ee8b2c;
  --d4: #d8272c;
  --d5: #1a1a1a;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Chivo Mono', 'Cascadia Mono', monospace;
  --gut: clamp(18px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }

.skip {
  position: fixed; top: -48px; left: 16px; z-index: 300;
  padding: 10px 16px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; text-decoration: none;
  transition: top 0.2s;
}
.skip:focus-visible { top: 12px; }

/* ---------------- masthead ---------------- */
.mast {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.mast-in {
  display: flex; align-items: center; gap: clamp(12px, 2.5vw, 30px);
  padding: 12px var(--gut);
}
.mark {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto;
}
.mark svg { width: 30px; height: 30px; }
.mark b {
  font-size: 17px; font-weight: 900; letter-spacing: 0.06em;
  font-stretch: 125%; text-transform: uppercase;
}
.mark small {
  display: block; font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.14em; color: var(--muted); font-weight: 400;
}
.mnav { display: flex; gap: clamp(10px, 2vw, 22px); }
.mnav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; color: var(--muted);
  padding: 8px 2px; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.mnav a:hover, .mnav a:focus-visible { color: var(--ink); }
.mnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }

.snd {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--ink); border-radius: 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink);
  padding: 8px 12px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.snd:hover, .snd:focus-visible { background: var(--ink); color: var(--paper); }
.snd[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.snd svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; }

@media (max-width: 760px) {
  .mnav { display: none; }
  .subnav-mobile { display: flex !important; }
}
/* mobile bottom nav */
.subnav-mobile {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 120;
  background: var(--paper); border-top: 2px solid var(--ink);
}
.subnav-mobile a {
  flex: 1; text-align: center; padding: 13px 4px max(13px, env(safe-area-inset-bottom));
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; color: var(--muted);
}
.subnav-mobile a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--red); }

/* ---------------- issue strip ---------------- */
.issue {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  padding: 9px var(--gut);
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  background: var(--paper);
}
.issue b { color: var(--ink); font-weight: 500; }
.issue .flash { color: var(--red); }

/* ---------------- hero ---------------- */
.hero { position: relative; min-height: 88svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero video, .hero .hero-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(245, 246, 244, 0.98) 0%, rgba(245, 246, 244, 0.4) 22%, rgba(245, 246, 244, 0) 46%);
}
.hero-body {
  position: relative; z-index: 2; width: 100%;
  padding: 0 var(--gut) clamp(20px, 4vh, 44px);
}
@media (max-width: 760px) {
  .hero-body { padding-bottom: 68px; } /* clear the fixed bottom nav */
}
.hero-title {
  font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(2.6rem, 9.2vw, 8.6rem);
  line-height: 0.92; letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero-title .thin { font-weight: 250; font-stretch: 100%; }
.hero-sub {
  font-family: var(--mono); font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  margin-top: 16px;
}
.hero-sub .sep { color: var(--red); }

/* big danger block riding the hero's edge */
.danger-card {
  position: relative; z-index: 3;
  margin: -1px var(--gut) 0;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: auto 1fr auto;
  gap: clamp(16px, 3vw, 44px); align-items: center;
  padding: clamp(16px, 2.6vw, 30px) clamp(18px, 3vw, 40px);
}
.danger-num {
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(3.6rem, 7.5vw, 7rem); line-height: 0.85;
}
.danger-what .word {
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: clamp(1.15rem, 2.4vw, 1.9rem);
}
.danger-what .where {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(245, 246, 244, 0.62); margin-top: 7px;
}
.scale { display: flex; gap: 7px; align-items: flex-end; }
.scale i {
  display: block; width: clamp(20px, 2.6vw, 30px); background: rgba(245, 246, 244, 0.16);
}
.scale i.on-1 { background: var(--d1); }
.scale i.on-2 { background: var(--d2); }
.scale i.on-3 { background: var(--d3); }
.scale i.on-4 { background: var(--d4); }
.scale i.on-5 { background: var(--paper); outline: 2px solid var(--red); }
.scale i:nth-child(1) { height: 12px; } .scale i:nth-child(2) { height: 20px; }
.scale i:nth-child(3) { height: 28px; } .scale i:nth-child(4) { height: 36px; }
.scale i:nth-child(5) { height: 44px; }
@media (max-width: 760px) {
  .danger-card { grid-template-columns: auto 1fr; }
  .scale { grid-column: 1 / -1; }
}

/* ---------------- report layout ---------------- */
.report { max-width: 1290px; margin: 0 auto; padding: 0 var(--gut); }
.sect { border-bottom: 1px solid var(--hair); padding: clamp(40px, 7vh, 84px) 0; }
.sect:last-child { border-bottom: 0; }
.sect-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: clamp(26px, 4vh, 44px);
}
.sect-no {
  font-family: var(--mono); font-size: 12px; color: var(--red); letter-spacing: 0.08em;
}
.sect-title {
  font-weight: 850; font-stretch: 118%; text-transform: uppercase;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem); letter-spacing: 0;
}
.sect-aside {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}

/* stat rows */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.stat { background: var(--paper); padding: 18px 18px 16px; }
.stat b {
  display: block; font-weight: 250; font-stretch: 105%;
  font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat b small { font-size: 0.42em; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat span {
  display: block; margin-top: 9px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.stat.hot b { color: var(--red); }

.duo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }

.prose { font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.7; font-weight: 400; max-width: 62ch; }
.prose + .prose { margin-top: 1em; }
.prose strong { font-weight: 700; }

/* SVG diagram frames */
.diagram { border: 1px solid var(--hair); background: #fbfcfa; padding: clamp(14px, 2vw, 24px); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption {
  margin-top: 12px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* problems */
.problems { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.problem { background: var(--paper); display: grid; grid-template-columns: minmax(120px, 200px) 84px 1fr; gap: 20px; padding: 18px; align-items: center; }
.problem h4 { font-weight: 800; font-stretch: 112%; text-transform: uppercase; font-size: 1rem; }
.problem h4 small { display: block; font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: 0.12em; color: var(--muted); margin-top: 6px; }
.problem p { font-size: 0.94rem; line-height: 1.6; color: #33393c; max-width: 58ch; }
.rose { width: 74px; height: 74px; }
@media (max-width: 760px) {
  .problem { grid-template-columns: 1fr 74px; }
  .problem p { grid-column: 1 / -1; }
}

/* ---------------- footage bands ---------------- */
.band { position: relative; height: clamp(340px, 68svh, 720px); overflow: hidden; }
.band video, .band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band .fig {
  position: absolute; left: var(--gut); bottom: 18px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
  background: var(--ink); padding: 7px 10px;
}
.band .fig .sep { color: var(--red); }
.band-quote {
  position: absolute; right: var(--gut); top: clamp(24px, 6vh, 64px); z-index: 2;
  max-width: min(78vw, 560px); text-align: right;
  font-weight: 900; font-stretch: 122%; text-transform: uppercase;
  font-size: clamp(1.7rem, 4.6vw, 4rem); line-height: 0.95; color: #fff;
  text-shadow: 0 2px 30px rgba(10, 14, 18, 0.45);
}

/* ---------------- lift board ---------------- */
.board { border: 1px solid var(--hair); }
.board-row {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(120px, 0.9fr);
  gap: 14px; align-items: center;
  padding: 13px 16px; border-bottom: 1px solid var(--hair);
  background: var(--paper);
}
.board-row:last-child { border-bottom: 0; }
.board-row.head {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); background: var(--paper-dim);
}
.lift-name { font-weight: 700; font-stretch: 110%; font-size: 1.02rem; }
.lift-kind, .lift-alt { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.lift-state {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
}
.lift-state i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lift-state.open i { background: var(--d1); }
.lift-state.delayed i { background: var(--d3); }
.lift-state.hold i { background: var(--d4); animation: pulse 1.6s ease-in-out infinite; }
.lift-state.closed i { background: var(--ink); border-radius: 0; }
.lift-state small { color: var(--muted); letter-spacing: 0.04em; text-transform: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (max-width: 760px) {
  .board-row { grid-template-columns: 1fr auto; }
  .board-row.head { display: none; }
  .lift-kind { display: none; }
  .lift-alt { grid-column: 1; }
}

/* ---------------- observations ---------------- */
.obs { max-width: 820px; }
.obs li {
  list-style: none; display: grid; grid-template-columns: 66px 92px 1fr;
  gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--hair);
}
.obs .t { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.obs .s { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); padding-top: 2px; }
.obs .m { font-size: 0.97rem; line-height: 1.6; }
@media (max-width: 600px) { .obs li { grid-template-columns: 60px 1fr; } .obs .m { grid-column: 1 / -1; } }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; border: 0; cursor: pointer;
  padding: 15px 28px; transition: background 0.2s;
}
.btn:hover, .btn:focus-visible { background: var(--red); }
.btn-ghost {
  display: inline-block; background: none; color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  padding: 14px 22px; border: 1px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: default; }
.btn[disabled]:hover { background: var(--ink); }

/* ---------------- sector cards (terrain + teaser) ---------------- */
.sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.sector { position: relative; background: var(--paper); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sector-top { display: flex; align-items: flex-start; gap: 14px; }
.sector h3 { font-weight: 850; font-stretch: 118%; text-transform: uppercase; font-size: 1.25rem; }
.sector .meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted); margin-top: 7px; }
.sector .mini-rose { margin-left: auto; width: 46px; height: 46px; flex: none; }
.sector p { font-size: 0.94rem; line-height: 1.6; color: #33393c; }
.sector-state {
  align-self: flex-start; font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 9px;
}
.sector-state.open { background: var(--d1); color: #fff; }
.sector-state.closed { background: var(--ink); color: var(--paper); }
.sector-state.no-access { background: var(--paper-dim); color: var(--muted); border: 1px solid var(--hair); }
.sector-state.loaded { background: var(--d3); color: #fff; }
.sector-media { position: relative; margin: 4px -20px -20px; aspect-ratio: 16 / 9; overflow: hidden; }
.sector-media video, .sector-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- terrain page ---------------- */
.massif-wrap { position: relative; border: 1px solid var(--hair); background: #fbfcfa; overflow: hidden; }
.massif-wrap canvas { width: 100%; height: clamp(320px, 52svh, 560px); display: block; touch-action: pan-y; cursor: grab; }
.massif-wrap canvas:active { cursor: grabbing; }
.massif-hint {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.massif-legend {
  position: absolute; right: 14px; top: 12px; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}
.massif-legend b { color: var(--red); font-weight: 500; }

/* ---------------- passes page ---------------- */
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); overflow-x: auto; }
.day {
  background: var(--paper); padding: 14px 12px; text-align: left; cursor: pointer; border: 0;
  font-family: inherit; color: inherit; display: flex; flex-direction: column; gap: 8px;
  transition: background 0.15s;
}
.day:hover { background: #ffffff; }
.day[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.day .dow { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.day[aria-pressed="true"] .dow { color: rgba(245, 246, 244, 0.6); }
.day .dnum { font-weight: 250; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.day .dmeta { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; color: var(--muted); line-height: 1.7; }
.day[aria-pressed="true"] .dmeta { color: rgba(245, 246, 244, 0.72); }
.day .dd { display: inline-block; width: 8px; height: 8px; margin-right: 5px; vertical-align: baseline; }
.day .dd.l1 { background: var(--d1); } .day .dd.l2 { background: var(--d2); }
.day .dd.l3 { background: var(--d3); } .day .dd.l4 { background: var(--d4); }
.day .dd.l5 { background: var(--d5); outline: 1px solid var(--red); }
@media (max-width: 900px) { .day-strip { grid-template-columns: repeat(7, minmax(104px, 1fr)); } }

.pass-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: end; margin-top: 26px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  background: #fff; border: 1px solid var(--ink); border-radius: 0;
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  padding: 12px; width: 100%;
}
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--red); outline-offset: -1px; }
.field.err input { border-color: var(--red); background: #fdf1f1; }
.field-err { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; color: var(--red); min-height: 12px; }

.count { display: flex; border: 1px solid var(--ink); background: #fff; }
.count button {
  background: none; border: 0; font-family: var(--mono); font-size: 16px; color: var(--ink);
  width: 42px; height: 41px; cursor: pointer;
}
.count button:hover { background: var(--paper-dim); }
.count button:disabled { color: var(--hair); cursor: default; background: none; }
.count output { flex: 1; text-align: center; align-self: center; font-family: var(--mono); font-size: 14px; }

.noted {
  border: 1px solid var(--ink); background: #fff;
  padding: 14px 18px; margin-top: 20px;
  font-size: 1.02rem; line-height: 1.65;
}
.noted::before {
  content: 'NOTED'; display: inline-block; margin-right: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: var(--paper); background: var(--red); padding: 3px 7px;
  transform: translateY(-2px);
}
.noted .code { font-family: var(--mono); font-size: 0.88em; letter-spacing: 0.1em; font-weight: 500; }

/* the issued pass card */
.wallet { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 26px; }
.passcard { border: 1px solid var(--hair); background: #fff; }
.passcard canvas { width: 100%; height: auto; display: block; }
.passcard-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted);
}
.passcard-foot button {
  background: none; border: 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); cursor: pointer;
}

/* ---------------- snow overlay canvas ---------------- */
.snowfall { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity 1s; }
.snowfall.on { opacity: 1; }

/* ---------------- footer ---------------- */
.foot {
  border-top: 2px solid var(--ink); margin-top: clamp(40px, 8vh, 90px);
  padding: 30px var(--gut) calc(46px + 52px);
  display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: baseline; justify-content: space-between;
}
@media (min-width: 761px) { .foot { padding-bottom: 46px; } }
.foot-brand { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.foot-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.foot-nav a:hover { color: var(--ink); }
.foot-fine { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ---------------- reveals ---------------- */
.rise { opacity: 0; transform: translateY(22px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.rise.lit { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .lift-state.hold i { animation: none; }
  .snowfall { display: none; }
}

.no-js .rise { opacity: 1; transform: none; }
.no-js .snd, .no-js .snowfall { display: none; }
