/* VIPER 11 notes: the game's look on paper. Near-black, off-white, one warm accent, Cormorant. */
:root {
  --bg: #050505;
  --fg: #f6f2ea;
  --dim: rgba(246, 242, 234, 0.62);
  --faint: rgba(246, 242, 234, 0.32);
  --hair: rgba(246, 242, 234, 0.14);
  --acc: #e9b26a;
  --acc-dim: rgba(233, 178, 106, 0.35);
  --measure: 34rem;
  --wide: 68rem;
  --gutter: clamp(16px, 5vw, 48px);
  --serif: 'Cormorant Garamond', 'Cormorant', Garamond, 'Iowan Old Style', Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--serif); font-weight: 400; font-size: clamp(19px, 1rem + 0.45vw, 23px); line-height: 1.55;
  font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--acc); }
::selection { background: var(--acc-dim); }

/* top bar */
.bar { display: flex; justify-content: space-between; align-items: baseline; padding: 22px var(--gutter); font-size: 15px; letter-spacing: 0.32em; text-transform: uppercase; }
.bar a { text-decoration: none; opacity: 0.8; }
.bar a:hover { opacity: 1; }
.bar .fly { letter-spacing: 0.2em; font-style: italic; text-transform: none; letter-spacing: 0.04em; font-size: 17px; }

/* hero */
.hero { margin: 0 auto; max-width: 1600px; padding: 0 var(--gutter); }
.hero .media { position: relative; aspect-ratio: 2.39 / 1; background: #000; overflow: hidden; }
.hero video, .hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.head { max-width: calc(var(--measure) + 8rem); margin: 0 auto; padding: clamp(36px, 7vw, 84px) var(--gutter) 8px; text-align: center; }
.kicker { font-size: 14px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--dim); margin: 0 0 1.4em; padding-left: 0.42em; }
h1 { font-weight: 300; font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; letter-spacing: 0.01em; margin: 0 0 0.35em; }
.dek { font-style: italic; font-weight: 300; font-size: clamp(21px, 1.3rem + 0.6vw, 28px); line-height: 1.4; color: var(--dim); margin: 0 auto; max-width: 30em; }
.byline { margin-top: 2em; font-size: 15px; color: var(--faint); letter-spacing: 0.08em; }

/* prose */
article { padding: clamp(28px, 5vw, 56px) var(--gutter) 0; }
article > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
article p { margin: 0 auto 1.05em; }
article h2 { font-weight: 400; font-style: italic; font-size: clamp(27px, 1.5rem + 0.9vw, 36px); line-height: 1.15; margin: 2.2em auto 0.6em; }
article h2::before { content: ''; display: block; width: 2.2rem; height: 1px; background: var(--acc); margin-bottom: 0.9em; }
article strong { font-weight: 600; }
article em { font-style: italic; }
.num { font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
article .lead::first-letter { float: left; font-size: 3.6em; line-height: 0.82; padding: 0.06em 0.09em 0 0; font-weight: 300; color: var(--acc); }
article ul { padding-left: 1.1em; margin: 0 auto 1.1em; }
article li { margin: 0 0 0.35em; }
article li::marker { color: var(--acc); }
.aside { border-left: 1px solid var(--acc); padding: 0.1em 0 0.1em 1.1em; color: var(--dim); font-style: italic; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.72em; color: var(--dim); }

/* figures */
figure { margin: 2.4em auto 2.6em; }
figure.wide { max-width: var(--wide); }
figure.full { max-width: 1600px; }
figure img, figure video { display: block; width: 100%; height: auto; background: #0b0b0b; }
figure .frame { position: relative; aspect-ratio: 2.39 / 1; background: #0b0b0b; overflow: hidden; }
figure .frame > img, figure .frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
figcaption { font-style: italic; font-size: 0.8em; line-height: 1.45; color: var(--dim); margin: 0.85em auto 0; max-width: var(--measure); }
figcaption b { font-style: normal; font-weight: 500; color: var(--fg); letter-spacing: 0.02em; }
.fig-title { font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--dim); margin: 0 0 12px; padding-left: 0.32em; }
.chart { position: relative; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart canvas { display: block; width: 100%; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }

/* svg ink */
svg text { font-family: var(--serif); fill: var(--fg); font-variant-numeric: lining-nums tabular-nums; }
svg .t-dim { fill: var(--dim); }
svg .t-faint { fill: var(--faint); }
svg .t-acc { fill: var(--acc); }
svg .t-it { font-style: italic; }
svg .ax { stroke: var(--faint); stroke-width: 1; fill: none; shape-rendering: crispEdges; }
svg .grid { stroke: var(--hair); stroke-width: 1; fill: none; shape-rendering: crispEdges; }
svg .ln { stroke: var(--fg); stroke-width: 1.4; fill: none; stroke-linejoin: round; stroke-linecap: round; }
svg .ln-dim { stroke: var(--faint); stroke-width: 1.2; fill: none; stroke-dasharray: 4 4; }
svg .ln-acc { stroke: var(--acc); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
svg .fill-acc { fill: var(--acc); }
svg .fill-fg { fill: var(--fg); }
svg .box { fill: none; stroke: var(--line, rgba(246,242,234,.55)); stroke-width: 1; }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin: 14px 0 0; font-size: 17px; color: var(--dim); }
.controls label { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; }
.controls label span { white-space: nowrap; min-width: 4.5em; }
.controls output { color: var(--fg); font-variant-numeric: lining-nums tabular-nums; min-width: 4.2em; text-align: right; }
.btn { font: inherit; font-size: 16px; color: var(--fg); background: transparent; border: 1px solid var(--faint); border-radius: 999px; padding: 6px 16px 7px; cursor: pointer; letter-spacing: 0.02em; touch-action: manipulation; }
.btn:hover { border-color: var(--fg); }
.btn[aria-pressed='true'] { border-color: var(--acc); color: var(--acc); }
.btn:focus-visible, input:focus-visible { outline: 1px solid var(--acc); outline-offset: 3px; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 120px; height: 28px; background: transparent; margin: 0; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--faint); }
input[type=range]::-moz-range-track { height: 1px; background: var(--faint); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--acc); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--acc); }

/* compare slider */
.cmp { position: relative; overflow: hidden; background: #0b0b0b; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp .top { clip-path: inset(0 0 0 50%); }
.cmp .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--fg); box-shadow: 0 0 6px rgba(0,0,0,.6); pointer-events: none; }
.cmp .handle::after { content: ''; position: absolute; top: 50%; left: -14px; width: 26px; height: 26px; margin-top: -14px; border-radius: 50%; border: 1.5px solid var(--fg); background: rgba(5,5,5,.45); backdrop-filter: blur(4px); }
.cmp .lab { position: absolute; bottom: 10px; font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; padding: 3px 8px; background: rgba(5,5,5,.55); pointer-events: none; }
.cmp .lab.l { left: 10px; } .cmp .lab.r { right: 10px; }
.cmp input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* footer */
.fly-it { text-align: center; padding: clamp(64px, 10vw, 120px) var(--gutter) 24px; }
.fly-it p { margin: 0; font-size: 14px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--dim); padding-left: 0.42em; }
.fly-it a.big { display: inline-block; margin-top: 14px; font-weight: 300; font-size: clamp(36px, 6vw, 64px); letter-spacing: 0.04em; text-decoration: none; border-bottom: 1px solid var(--acc); line-height: 1.15; }
.others { max-width: var(--wide); margin: 0 auto; padding: 40px var(--gutter) 80px; }
.others h3 { font-weight: 400; font-size: 14px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--dim); text-align: center; margin: 0 0 28px; padding-left: 0.42em; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 28px 20px; }
.cards a { display: block; text-decoration: none; }
.cards .thumb { aspect-ratio: 2.39 / 1; background: #0b0b0b; overflow: hidden; }
.cards img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease, opacity 0.4s; opacity: 0.88; }
.cards a:hover img { transform: scale(1.03); opacity: 1; }
.cards .n { display: block; margin-top: 12px; font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim); }
.cards .t { display: block; font-size: 25px; line-height: 1.15; margin-top: 4px; }
.cards .d { display: block; font-style: italic; color: var(--dim); font-size: 17px; margin-top: 4px; line-height: 1.35; }
.cards li.here { opacity: 0.4; }
.colophon { text-align: center; color: var(--faint); font-size: 14px; padding: 0 var(--gutter) 48px; font-style: italic; }

@media (max-width: 640px) {
  .bar { padding: 16px var(--gutter); font-size: 12px; letter-spacing: 0.26em; }
  .bar .fly { font-size: 15px; }
  .hero { padding: 0; }
  .hero .media { aspect-ratio: 16 / 10; }
  figure.wide, figure.full { margin-left: calc(-1 * var(--gutter) + 0px); margin-right: calc(-1 * var(--gutter) + 0px); }
  figure.wide figcaption, figure.full figcaption, figure.wide .controls, figure.wide .fig-title, figure.full .fig-title { padding: 0 var(--gutter); }
  figure.wide .chart, figure.full .chart { padding: 0 var(--gutter); }
  .controls { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .cards img { transition: none; } }
