/* SilkFX website: paper, ink and one blue. Laid out like an After Effects comp. */

:root {
  --paper: #eeebe3;
  --paper-2: #e5e1d6;
  --paper-3: #f7f5f0;
  --ink: #0d0d0f;
  --ink-2: #2a2a2e;
  --mute: #6f6c64;
  --rule: rgba(13, 13, 15, .14);
  --rule-2: rgba(13, 13, 15, .28);
  --accent: #0a84ff;
  --accent-rgb: 10, 132, 255;
  --accent-2: #4da3ff;
  --accent-soft: rgba(var(--accent-rgb), .14);
  --indigo: #5e5ce6;
  --sky: #64d2ff;
  --ae: #1d1d1d;
  --ae-2: #232323;
  --ae-3: #2e2e2e;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --wrap: 1180px;
  --gut: 32px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.38  0 0 0 0 0.33  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main, .footer, .nav { position: relative; z-index: 1; }
::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
code { font-family: var(--mono); font-size: .84em; background: rgba(13, 13, 15, .06); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.narrow { max-width: 860px; }

.display { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 92px); line-height: .95; letter-spacing: -.02em; }
.display em, .hero-title .accent { font-style: italic; color: var(--accent); }

/* keyframe diamond */
.kf { display: inline-block; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; white-space: nowrap; border-radius: 4px; cursor: pointer;
  transition: transform .45s var(--spring), background-color .2s, color .2s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); transition-duration: .1s; }
.btn-small { height: 38px; padding: 0 14px; font-size: 14px; }
.btn-large { height: 56px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-ink { background: var(--ink); color: var(--paper-3); box-shadow: 4px 4px 0 var(--accent); }
.btn-ink:hover { box-shadow: 6px 6px 0 var(--accent); }
.btn-blue { background: var(--accent); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-blue:hover { box-shadow: 6px 6px 0 var(--ink); }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper-3); }
.btn-sep { width: 1px; height: 18px; background: currentColor; opacity: .3; }
.btn .arrow { transition: transform .45s var(--spring); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------------------------------------------------------------- scroll rail */
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: 22px; z-index: 40; border-right: 1px solid var(--rule); background: var(--paper); }
.rail-ticks { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, var(--rule-2) 0 1px, transparent 1px 12px); -webkit-mask: linear-gradient(90deg, transparent 55%, #000 55%); mask: linear-gradient(90deg, transparent 55%, #000 55%); }
.rail-head { position: absolute; left: 0; right: -1px; top: 0; height: 2px; background: var(--accent); }
.rail-head::before { content: ""; position: absolute; left: 4px; top: -6px; width: 13px; height: 13px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
body { padding-left: 22px; }

/* ---------------------------------------------------------------- nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(238, 235, 227, .95); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.03em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; }
.brand-mark svg { width: 20px; height: 20px; }
.tc { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--ink); padding: 4px 8px; border-radius: 3px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; font-weight: 500; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--out); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--mute); padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.hero-new { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.hero-new:hover { color: var(--accent); }
.hero-title { position: relative; z-index: 2; font-family: var(--serif); font-weight: 400; font-size: clamp(62px, 12.4vw, 190px); line-height: .88; letter-spacing: -.035em; margin-top: 34px; max-width: 11ch; }
.stage .w { display: inline-block; white-space: nowrap; }
.stage .c { display: inline-block; white-space: pre; will-change: transform; }

.ribbon { position: relative; z-index: 1; display: block; width: 100%; height: 300px; margin: -150px 0 -70px; pointer-events: none; }

.hero-foot { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 1fr .8fr; gap: 40px; align-items: end; }
.lede { font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 32ch; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.fine { color: var(--mute); font-size: 11px; margin-top: 4px; }
.hero-specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.hero-specs div { padding: 12px 0 10px; border-bottom: 1px solid var(--rule); }
.hero-specs div:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--rule); }
.hero-specs div:nth-child(even) { padding-left: 14px; }
.hero-specs dt { font-family: var(--serif); font-size: 40px; line-height: 1; text-transform: none; letter-spacing: -.02em; color: var(--ink); }
.hero-specs dd { margin: 4px 0 0; color: var(--mute); font-size: 10.5px; }

/* ---------------------------------------------------------------- marquee */
.marquee { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; background: var(--paper-3); margin-top: 48px; }
.marquee-track { display: flex; width: max-content; animation: marquee 80s linear infinite; padding: 14px 0; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: 34px; line-height: 1; padding: 0 22px; display: inline-flex; align-items: center; gap: 44px; white-space: nowrap; }
.marquee-track span::after { content: ""; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- sections */
.section { padding: 120px 0; }
.section-rule { border-top: 1px solid var(--rule); }
.band { position: relative; padding: 120px 0; }
.band-ink { background: var(--ink); color: #e9e7e1; }
.band-ink .display em { color: var(--accent-2); }
.head { margin-bottom: 56px; max-width: 760px; }
.head-split { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; max-width: none; flex-wrap: wrap; }
.label { display: flex; align-items: center; gap: 12px; color: var(--mute); margin-bottom: 22px; }
.label::before { content: ""; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.label .lt { color: var(--accent); }
.band-ink .label { color: #8d8a83; }
.sub { margin-top: 20px; font-size: 18px; color: var(--ink-2); max-width: 52ch; }
.sub.sm { font-size: 13px; color: var(--mute); margin-top: 10px; max-width: 34ch; }

/* ---------------------------------------------------------------- demo */
.demo-grid { display: grid; grid-template-columns: 1fr auto; gap: 72px; align-items: center; }
.demo-copy > p:not(.label) { margin-top: 24px; color: #b6b3ab; font-size: 17px; max-width: 44ch; }
.try-accent { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; color: #8d8a83; }
.site-accents { display: flex; flex-wrap: wrap; gap: 10px; }
.site-accents button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px rgba(255, 255, 255, .15); transition: transform .45s var(--spring), box-shadow .2s; }
.site-accents button:hover { transform: scale(1.15); }
.site-accents button.on { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff; }
.mini-list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 10px; color: #d6d3cb; }
.mini-list li { display: flex; align-items: center; gap: 14px; }
.mini-list .kf { width: 7px; height: 7px; }

.ae-panel { margin: 0; background: var(--ae); border: 1px solid #000; border-radius: 4px; box-shadow: 0 0 0 1px #3a3a3a inset, 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 120px -20px rgba(var(--accent-rgb), .35); }
.ae-tabs { display: flex; height: 30px; background: var(--ae); border-bottom: 1px solid #000; font: 500 12px var(--sans); color: #8b8b8b; }
.ae-tab { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-right: 1px solid #111; }
.ae-tab b { font-weight: 400; color: #777; }
.ae-tab.on { background: var(--ae-2); color: #e6e6e6; box-shadow: inset 0 2px 0 var(--accent); }
.demo-viewport { position: relative; overflow: hidden; width: 525px; height: 656px; }
.demo-viewport iframe { display: block; border: 0; width: 525px; height: 656px; transform-origin: 0 0; background: var(--ae-2); }

/* ---------------------------------------------------------------- timeline */
.timeline { border: 1px solid var(--ink); background: var(--paper-3); }
.tl-ruler { display: grid; grid-template-columns: 300px 1fr; height: 34px; align-items: stretch; border-bottom: 1px solid var(--ink); color: var(--mute); font-size: 10.5px; }
.tl-ruler > span:first-child { display: flex; align-items: center; padding: 0 16px; border-right: 1px solid var(--rule-2); }
.tl-ruler-ticks { position: relative; }
.tl-ruler-ticks i { position: absolute; bottom: 0; width: 1px; height: 8px; background: var(--rule-2); font-style: normal; }
.tl-ruler-ticks i.big { height: 14px; background: var(--ink); }
.tl-ruler-ticks em { position: absolute; top: 6px; transform: translateX(4px); font-style: normal; }
.tl-row { border-bottom: 1px solid var(--rule); }
.tl-row:last-child { border-bottom: 0; }
.tl-head { display: grid; grid-template-columns: 300px 1fr; width: 100%; height: 58px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tl-name { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-right: 1px solid var(--rule-2); }
.tl-tw { width: 12px; color: var(--mute); transition: transform .45s var(--spring); font-size: 11px; }
.tl-row.open .tl-tw { transform: rotate(90deg); }
.tl-swatch { width: 14px; height: 14px; border-radius: 2px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.tl-num { font-family: var(--mono); font-size: 11px; color: var(--mute); width: 16px; }
.tl-title { font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.tl-count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--mute); }
.tl-track { position: relative; }
.tl-bar { position: absolute; top: 14px; bottom: 14px; border-radius: 3px; opacity: .9; transition: filter .2s, transform .5s var(--spring); transform-origin: left; }
.tl-head:hover .tl-bar { filter: brightness(1.08) saturate(1.1); }
.tl-bar i { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--ink); transform: rotate(45deg); box-shadow: 0 0 0 1.5px var(--paper-3); }
.tl-playhead { position: absolute; top: 34px; bottom: 0; width: 1px; background: var(--accent); pointer-events: none; z-index: 2; left: 300px; }
.tl-playhead::before { content: ""; position: absolute; top: -14px; left: -6px; width: 13px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
.tl-body { height: 0; overflow: hidden; transition: height .55s var(--out); }
.tl-body-in { padding: 6px 24px 28px 70px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; align-items: start; }
.tl-body p { font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tags span { font-family: var(--mono); font-size: 11px; padding: 4px 8px; border: 1px solid var(--rule-2); border-radius: 3px; background: var(--paper); }
.timeline { position: relative; }

/* ---------------------------------------------------------------- specimen */
.specimen-ctl { display: flex; flex-direction: column; gap: 8px; color: var(--mute); }
.specimen-ctl input { width: 300px; max-width: 100%; height: 48px; padding: 0 14px; font: 600 20px var(--sans); letter-spacing: -.02em; color: var(--ink); background: var(--paper-3); border: 1.5px solid var(--ink); border-radius: 4px; outline: none; box-shadow: 4px 4px 0 var(--accent); }
.specimen-ctl input:focus { box-shadow: 4px 4px 0 var(--ink); }
.specimen { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.sp-row { display: grid; grid-template-columns: 56px 1fr 1.2fr; align-items: center; gap: 24px; min-height: 132px; border-bottom: 1px solid var(--rule); cursor: default; transition: background-color .25s; }
.sp-row:hover { background: var(--paper-3); }
.sp-no { font-family: var(--mono); font-size: 12px; color: var(--mute); padding-left: 4px; }
.sp-name { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 46px); line-height: 1; letter-spacing: -.02em; }
.sp-meta { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .03em; }
.sp-stage { position: relative; height: 112px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sp-stage .stage-text { position: relative; font-weight: 800; font-size: 50px; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.sp-row:nth-child(3n+2) .stage-text { color: var(--accent); }

/* ---------------------------------------------------------------- spring lab */
.lab { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
.lab-copy > p:not(.label) { margin-top: 24px; font-size: 17px; color: var(--ink-2); max-width: 44ch; }
.lab-ctl { margin-top: 36px; display: grid; gap: 22px; max-width: 380px; }
.lab-ctl label { display: grid; gap: 10px; }
.lab-ctl label > span { display: flex; justify-content: space-between; color: var(--mute); }
.lab-ctl output { color: var(--ink); font-weight: 700; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
input[type=range]::-moz-range-track { height: 2px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px; background: var(--accent); border: 2px solid var(--ink); transform: rotate(45deg); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--accent); border: 2px solid var(--ink); border-radius: 0; transform: rotate(45deg); }
.lab-stage { border: 1px solid var(--ink); background: var(--paper-3); }
.lab-track { position: relative; height: 120px; border-bottom: 1px solid var(--rule); touch-action: none; background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 40px); }
.lab-rest { position: absolute; top: 18px; bottom: 18px; left: 50%; width: 1px; background: var(--accent); }
.lab-dot { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 0; background: var(--ink); cursor: grab; box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .18); touch-action: none; }
.lab-dot::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--accent); }
.lab-dot:active { cursor: grabbing; }
.lab-graph { display: block; width: 100%; height: 240px; }
.lab-code { margin: 0; padding: 16px 18px; border-top: 1px solid var(--rule); font-size: 12px; text-transform: none; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; word-break: break-all; background: var(--paper); }

/* ---------------------------------------------------------------- glass */
.band-glass { background: #0d0d14; color: #fff; overflow: hidden; min-height: 760px; display: flex; align-items: center; }
.glass-bg { position: absolute; inset: 0; }
.glass-bg i { position: absolute; border-radius: 50%; filter: blur(10px); animation: blob 18s ease-in-out infinite alternate; }
.glass-bg i:nth-child(1) { width: 520px; height: 520px; left: 52%; top: -12%; background: radial-gradient(circle at 35% 35%, #64d2ff, #0a84ff 60%, transparent 70%); }
.glass-bg i:nth-child(2) { width: 460px; height: 460px; left: 70%; top: 38%; background: radial-gradient(circle at 40% 40%, #bf5af2, #5e5ce6 60%, transparent 70%); animation-delay: -6s; }
.glass-bg i:nth-child(3) { width: 340px; height: 340px; left: 44%; top: 50%; background: radial-gradient(circle, #ff9f0a, #ff375f 60%, transparent 70%); animation-delay: -11s; }
.glass-bg i:nth-child(4) { width: 260px; height: 260px; left: 84%; top: 4%; background: radial-gradient(circle, #30d158, transparent 70%); animation-delay: -3s; }
@keyframes blob { to { transform: translate(-60px, 50px) scale(1.12); } }
.glass-word { position: absolute; right: -2%; bottom: -6%; font-family: var(--serif); font-style: italic; font-size: clamp(160px, 26vw, 400px); line-height: 1; color: #fff; letter-spacing: -.04em; pointer-events: none; opacity: .95; }
.glass-pane {
  position: absolute; z-index: 3; left: 58%; top: 22%; width: 340px; height: 230px; border-radius: 34px; cursor: grab; touch-action: none;
  display: flex; align-items: flex-end; padding: 22px 26px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px) saturate(170%) brightness(1.12); -webkit-backdrop-filter: blur(16px) saturate(170%) brightness(1.12);
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, .55), inset -2px -2px 4px rgba(0, 0, 0, .18), inset 0 0 30px rgba(255, 255, 255, .18), 0 30px 60px -20px rgba(0, 0, 0, .6);
  transition: transform .5s var(--spring);
}
.glass-pane.drag { cursor: grabbing; transform: scale(1.04); transition: none; }
.glass-pane:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.glass-copy { position: relative; z-index: 2; pointer-events: none; }
.glass-copy > * { pointer-events: auto; max-width: 520px; }
.glass-copy .label { color: rgba(255, 255, 255, .7); }
.glass-copy .display em { color: var(--sky); }
.glass-copy > p:not(.label) { margin-top: 24px; font-size: 17px; color: rgba(255, 255, 255, .78); max-width: 42ch; }
.glass-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; max-width: 460px; }
.glass-list li { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); display: flex; justify-content: space-between; color: rgba(255, 255, 255, .9); font-size: 11.5px; }
.glass-list li span { color: rgba(255, 255, 255, .45); }

/* ---------------------------------------------------------------- under the hood */
.hood { display: grid; grid-template-columns: 1fr 1fr; gap: 0 72px; }
.hood .head { grid-column: 1 / -1; }
.notes { list-style: none; margin: 0; padding: 0; counter-reset: n; border-top: 1px solid var(--ink); }
.notes li { counter-increment: n; display: grid; grid-template-columns: 48px 1fr; gap: 4px 0; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.notes li::before { content: "0" counter(n); grid-row: span 2; font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 4px; }
.notes h3 { font-size: 18px; letter-spacing: -.02em; }
.notes p { color: var(--ink-2); font-size: 15px; }
.expr { margin: 0; align-self: start; position: sticky; top: 96px; background: var(--ae); color: #d4d4d4; border-radius: 4px; overflow: hidden; border: 1px solid #000; box-shadow: 8px 8px 0 var(--accent); }
.expr figcaption { padding: 10px 14px; background: var(--ae-3); color: #9a9a9a; font-size: 10.5px; text-transform: none; border-bottom: 1px solid #000; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.expr figcaption span { color: #e6e6e6; }
.expr figcaption b { color: var(--accent-2); font-weight: 500; }
.expr code { display: block; background: none; border: 0; padding: 0; font: inherit; white-space: normal; }
.expr pre { margin: 0; padding: 18px 18px 22px; overflow-x: auto; font: 12.5px/1.75 var(--mono); counter-reset: ln; }
.expr .ln { display: block; padding-left: 38px; position: relative; white-space: pre; }
.expr .ln::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 24px; text-align: right; color: #5a5a5a; }
.tok-c { color: #6a9955; } .tok-k { color: #c586c0; } .tok-f { color: #4fc1ff; } .tok-n { color: #b5cea8; }

/* ---------------------------------------------------------------- ticket */
.price { display: grid; grid-template-columns: 1fr 1.15fr; gap: 72px; align-items: center; }
.price .head { margin: 0; }
.ticket { position: relative; display: grid; grid-template-columns: 1fr 150px; transform: rotate(-1.6deg); transition: transform .7s var(--spring); }
.ticket:hover { transform: rotate(0deg) translateY(-4px); }
.ticket-main, .ticket-stub { background: var(--paper-3); border: 1.5px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.ticket::before, .ticket::after { content: ""; position: absolute; z-index: 2; right: 137px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.ticket::before { top: -13px; clip-path: inset(50% 0 0 0); }
.ticket::after { bottom: -13px; clip-path: inset(0 0 50% 0); }
.ticket-main {
  border-right: 0; padding: 30px 32px 28px; border-radius: 10px 0 0 10px;
}
.ticket-stub {
  border-left: 2px dashed var(--rule-2); border-radius: 0 10px 10px 0; padding: 28px 18px; background: var(--accent); color: #fff;
  display: flex; flex-direction: column; gap: 10px; font-size: 10.5px;
}
.stub-no { opacity: .8; }
.stub-big { font-family: var(--serif); font-style: italic; font-size: 76px; line-height: 1; text-transform: none; letter-spacing: -.02em; writing-mode: vertical-rl; transform: rotate(180deg); margin: 6px auto auto 0; }
.barcode { height: 46px; margin-top: 12px; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 8px, #fff 8px 11px, transparent 11px 12px); }
.ticket-top { display: flex; justify-content: space-between; gap: 14px; color: var(--mute); padding-bottom: 14px; border-bottom: 1px dashed var(--rule-2); }
.ticket-amount { display: flex; align-items: baseline; gap: 14px; margin: 18px 0 10px; }
.ticket-amount > span { font-family: var(--serif); font-size: 128px; line-height: .9; letter-spacing: -.04em; }
.ticket-amount small { color: var(--mute); }
.ticket-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 9px; font-size: 15px; }
.ticket-list li { position: relative; padding-left: 20px; }
.ticket-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.price-note { margin-top: 14px; font-size: 13px; color: var(--mute); text-align: center; }
.price-note.warn { color: #c2410c; }

/* ---------------------------------------------------------------- install */
.keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.keys::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 1px; background: var(--ink); }
.keys li { position: relative; padding-right: 36px; }
.key-tc { display: block; color: var(--mute); height: 22px; }
.keys .kf { position: relative; width: 16px; height: 16px; margin: 4px 0 28px; border: 2px solid var(--ink); }
.keys h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -.02em; line-height: 1; margin-bottom: 12px; }
.keys p { color: var(--ink-2); font-size: 15px; }
.specs { margin: 72px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.specs div { padding: 16px 18px 16px 0; }
.specs div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.specs dt { color: var(--mute); font-size: 10.5px; }
.specs dd { margin: 6px 0 0; color: var(--ink); font-size: 13px; text-transform: none; }

/* ---------------------------------------------------------------- release log */
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--rule-2); }
.log > li { position: relative; padding: 0 0 40px 40px; }
.log > li::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; background: var(--paper); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.log > li.latest::before { background: var(--accent); border-color: var(--accent); }
.log-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 10px; }
.log-ver { font-family: var(--serif); font-size: 32px; line-height: 1; }
.log-date, .log-tag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--mute); }
.log-tag { color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 3px; }
.log ul { margin: 0; padding: 0 0 0 18px; color: var(--ink-2); display: grid; gap: 4px; }
.log-empty { color: var(--mute); padding-left: 40px; }

/* ---------------------------------------------------------------- faq */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; }
.faq-grid .head { margin: 0; }
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 0; cursor: pointer; font-family: var(--serif); font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; font: 400 20px var(--sans); border: 1.5px solid var(--ink); border-radius: 50%; transition: transform .5s var(--spring), background-color .2s, color .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--ink); color: var(--paper); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 50px 22px 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- final + footer */
.final { padding: 140px 0 120px; border-top: 1px solid var(--ink); text-align: center; }
.final-title { font-family: var(--serif); font-weight: 400; font-size: clamp(72px, 15vw, 230px); line-height: .9; letter-spacing: -.04em; margin-bottom: 48px; }
.final-title .w:last-child .c { font-style: italic; color: var(--accent); }
.footer { background: var(--ink); color: #8d8a83; overflow: hidden; }
.footer-word { font: 800 clamp(110px, 25vw, 380px)/.8 var(--sans); letter-spacing: -.07em; color: var(--paper); margin: 40px 0 -0.06em -0.04em; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 22px 0 26px; border-top: 1px solid #2a2a2e; font-size: 10.5px; position: relative; background: var(--ink); }
.footer-row a:hover { color: #fff; }

/* ---------------------------------------------------------------- reveal */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--out), transform 1.1s var(--spring); }
.rv.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero-foot { grid-template-columns: 1fr 1fr; }
  .hero-specs { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .hero-specs div, .hero-specs div:nth-child(odd), .hero-specs div:nth-child(even) { padding: 12px 12px 10px; border-right: 1px solid var(--rule); }
  .demo-grid, .lab, .price, .faq-grid { grid-template-columns: 1fr; gap: 56px; }
  .demo-grid .ae-panel { justify-self: center; }
  .hood { grid-template-columns: 1fr; gap: 48px; }
  .expr { position: static; }
  .tl-ruler, .tl-head { grid-template-columns: 240px 1fr; }
  .tl-playhead { left: 240px; }
  .nav-links { gap: 18px; }
}
@media (max-width: 760px) {
  :root { --gut: 16px; }
  .rail { display: none; }
  body { padding-left: 0; }
  .nav-links, .tc { display: none; }
  .nav-inner .btn { margin-left: auto; }
  .hero { padding-top: 28px; }
  .hero-title { margin-top: 26px; }
  .ribbon { height: 200px; margin: -90px 0 -40px; }
  .hero-foot { grid-template-columns: 1fr; gap: 28px; }
  .hero-specs { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .section, .band { padding: 80px 0; }
  .head { margin-bottom: 36px; }
  .marquee-track span { font-size: 26px; }
  .tl-ruler, .tl-head { grid-template-columns: 1fr; }
  .tl-ruler > span:first-child, .tl-name { border-right: 0; }
  .tl-track, .tl-ruler-ticks, .tl-playhead { display: none; }
  .tl-body-in { padding: 4px 16px 22px; grid-template-columns: 1fr; gap: 16px; }
  .sp-row { grid-template-columns: 1fr; gap: 0; padding: 18px 0 6px; }
  .sp-no { display: none; }
  .sp-stage { height: 96px; }
  .sp-stage .stage-text { font-size: 42px; }
  .specimen-ctl input { width: 100%; }
  .head-split > * { width: 100%; }
  .band-glass { min-height: 0; padding-bottom: 360px; align-items: flex-start; }
  .glass-pane { left: 22%; top: auto; bottom: 70px; width: 260px; height: 170px; }
  .glass-list { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; transform: none; }
  .ticket::before, .ticket::after { display: none; }
  .ticket-main { border-right: 1.5px solid var(--ink); border-radius: 10px; -webkit-mask: none; mask: none; padding: 24px 20px; box-shadow: 6px 6px 0 var(--ink); }
  .ticket-stub { display: none; }
  .ticket-amount > span { font-size: 100px; }
  .keys { grid-template-columns: 1fr; gap: 36px; }
  .keys::before { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .keys li { padding: 0 0 0 40px; }
  .keys .kf { position: absolute; left: 0; top: 0; margin: 0; }
  .key-tc { height: auto; margin-bottom: 6px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs div, .specs div + div { padding: 14px 10px 14px 0; border-left: 0; }
  .faq summary { font-size: 22px; }
  .faq details p { padding-right: 0; }
  .final { padding: 100px 0 90px; }
  .final .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
}
