/* Strange Heuristics — site styles.
   Brand rules (kit/BRAND.md): black background, Jost for text,
   Jost Heuristic (crossbar-less A) for the name only. */

@font-face {
  font-family: 'Jost Heuristic';
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/JostHeuristic-Light.woff') format('woff');
}
@font-face {
  font-family: 'Jost Heuristic';
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/JostHeuristic-Regular.woff') format('woff');
}
@font-face {
  font-family: 'Jost';
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/Jost-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'Jost';
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Jost-Regular.ttf') format('truetype');
}

:root {
  color-scheme: dark;
  --black: #000;
  --surface: #05070c;
  --raised: #0a0e17;
  --ink: #f4f6fb;
  --ink-dark: #0b0d12;
  --muted: #9aa6bd;
  --line: #1c2333;
  --line-strong: #2f3a52;
  --ice: rgb(150, 218, 255);
  --violet: rgb(220, 128, 255);
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1180px;
  --sans: 'Jost', Futura, 'Century Gothic', 'Avenir Next', sans-serif;
  --name: 'Jost Heuristic', 'Jost', Futura, 'Century Gothic', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--black); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 300 18px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ice); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 1px solid var(--ice); outline-offset: 4px; border-radius: 2px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 30;
  padding: 10px 16px; background: var(--ink); color: var(--ink-dark);
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---- the name ------------------------------------------------------- */
.wordmark {
  font-family: var(--name);
  font-weight: 300;
  letter-spacing: .42em;
  margin-right: -.42em;       /* trailing tracking shouldn't offset centring */
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark--small { font-weight: 400; letter-spacing: .32em; margin-right: -.32em; }

/* ---- header --------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  transition: background-color .5s ease, border-color .5s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 36px; flex: none; }
.brand .wordmark { font-size: 13px; }
/* On the home page the hero already shows the logo, so the header lockup waits. */
.home .brand { opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .5s ease, transform .5s ease, visibility 0s linear .5s; }
.home .site-header.is-solid .brand { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.nav { display: flex; gap: clamp(18px, 3vw, 36px); margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  padding: 10px 0;
  transition: color .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 640px) {
  .brand .wordmark { display: none; }   /* below the lockup's minimum width: mark alone */
  .nav a { font-size: 12px; letter-spacing: .16em; }
}

/* ---- hero ----------------------------------------------------------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 440px; background: var(--black); overflow: hidden; }
.hero canvas { width: 100%; height: 100%; }

.hero-ui {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px;
  padding: 0 var(--gutter) 26px;
  pointer-events: none;
}
.hero-ui > * { pointer-events: auto; }
.hero-controls { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.hero-controls .group { display: flex; gap: 4px; align-items: center; }

.chip {
  appearance: none; background: none; border: 0; cursor: pointer;
  min-height: 40px; padding: 0 8px;
  color: var(--muted);
  font: 400 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  transition: color .2s ease;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ice); }
.chip-label { color: #5d6880; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; padding-right: 4px; }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--muted); text-decoration: none;
  font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase;
  min-height: 40px;
}
.scroll-cue::after { content: ''; width: 1px; height: 28px; background: linear-gradient(var(--ice), transparent); }
.scroll-cue:hover { color: var(--ink); }

@media (max-width: 640px) {
  .hero-ui { justify-content: center; padding-bottom: 14px; }
  .hero-controls { justify-content: center; }
  .scroll-cue { display: none; }
}

/* ---- sections ------------------------------------------------------- */
main { background: var(--surface); }
.section { padding: clamp(72px, 12vw, 150px) var(--gutter); border-top: 1px solid var(--line); }
.section > .inner { max-width: var(--measure); margin: 0 auto; }

.eyebrow {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 clamp(28px, 4vw, 48px);
  color: var(--muted);
  font-size: 12px; font-weight: 400; letter-spacing: .28em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 40px; height: 1px; background: linear-gradient(90deg, var(--ice), var(--violet)); }

h1, h2, h3 { font-weight: 300; margin: 0; }
.display { font-size: clamp(30px, 4.6vw, 58px); line-height: 1.16; letter-spacing: -.005em; max-width: 20ch; text-wrap: balance; }
.lede { font-size: clamp(18px, 1.7vw, 22px); color: #c9d1e2; max-width: 56ch; margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---- work ----------------------------------------------------------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }

.card {
  display: flex; flex-direction: column;
  background: var(--raised); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  color: inherit; text-decoration: none;
  transition: border-color .25s ease, transform .25s ease;
}
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: inherit; }
.card-media { aspect-ratio: 16 / 9; background: #000; display: flex; align-items: center; justify-content: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder { width: 22%; height: auto; opacity: .16; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; }
.card-meta .status { color: var(--ice); }
.card h3 { font-size: 24px; line-height: 1.25; }
.card p { color: #b9c2d6; font-size: 16px; line-height: 1.55; margin: 0; }

.empty {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap;
  padding: clamp(32px, 5vw, 56px);
  border: 1px dashed var(--line-strong); border-radius: 6px;
}
.empty img { width: 72px; height: auto; opacity: .22; flex: none; }
.empty h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 52ch; }

/* ---- symbol / facts ------------------------------------------------- */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts .k { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; padding-top: 4px; white-space: nowrap; }
.facts .v { text-align: right; }

.formula { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); letter-spacing: 0; overflow-x: auto; white-space: nowrap; padding: 2px 0; }

.textlink {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  color: var(--ink); text-decoration: none;
  font-size: 12px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase;
  padding: 10px 0; border-bottom: 1px solid var(--line-strong);
  transition: border-color .2s ease, color .2s ease;
}
.textlink:hover { border-color: var(--ice); color: var(--ice); }

/* ---- footer --------------------------------------------------------- */
.site-footer {
  background: var(--black); border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 88px) var(--gutter) 36px;
}
.site-footer .inner { max-width: var(--measure); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center; }
.site-footer .lockup { display: flex; flex-direction: column; align-items: center; gap: 22px; color: var(--ink); text-decoration: none; }
.site-footer .lockup img { width: 96px; height: auto; }
.site-footer .lockup .wordmark { font-size: 13px; }
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; padding: 8px 0; }
.site-footer nav a:hover { color: var(--ink); }
.legal { color: #5d6880; font-size: 13px; letter-spacing: .06em; margin: 0; }

/* ---- brand page ----------------------------------------------------- */
.page-head { padding: clamp(130px, 18vw, 210px) var(--gutter) clamp(48px, 7vw, 88px); background: var(--black); }
.page-head .inner { max-width: var(--measure); margin: 0 auto; }
.page-head .display { margin-bottom: 22px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.tile { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.tile-art { min-height: 280px; display: flex; align-items: center; justify-content: center; padding: 44px 28px; }
.tile-art.on-black { background: #000; }
.tile-art.on-white { background: #fff; }
.tile-art img { max-height: 190px; width: auto; }
.tile-art img.wide { max-height: none; width: min(100%, 440px); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 20px; background: var(--raised); border-top: 1px solid var(--line); }
.tile-foot .name { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; }
.tile-foot .dl { display: flex; gap: 18px; }
.tile-foot a { font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; padding: 6px 0; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.swatch { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.swatch .chip-color { height: 96px; border-bottom: 1px solid var(--line); }
.swatch .info { padding: 14px 16px 16px; }
.swatch .info strong { display: block; font-weight: 400; font-size: 15px; }
.swatch .info code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }
.c-black { background: #000; } .c-surface { background: #05070c; } .c-ink { background: #f4f6fb; }
.c-inkdark { background: #0b0d12; } .c-ice { background: rgb(150, 218, 255); } .c-violet { background: rgb(220, 128, 255); }

.specimen { border: 1px solid var(--line); border-radius: 6px; background: #000; padding: clamp(28px, 5vw, 56px); overflow: hidden; }
.specimen + .specimen { margin-top: 20px; }
.specimen .wordmark { display: block; font-size: clamp(13px, 2.6vw, 34px); }
.specimen .sample { font-size: clamp(22px, 3vw, 38px); line-height: 1.3; }
.specimen .note { margin-top: 18px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }

.rules { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 48px; }
.rules li { padding: 16px 0; border-bottom: 1px solid var(--line); color: #c9d1e2; }

/* ---- 404 ------------------------------------------------------------ */
.notfound { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px var(--gutter); text-align: center; background: var(--black); }
.notfound img { width: 120px; height: auto; opacity: .9; }
.notfound h1 { font-size: clamp(28px, 4vw, 44px); }

/* ---- reveal on scroll ----------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

.after-specimen { margin-top: 24px; }

/* ---- without JavaScript: a still image instead of the animation ----- */
html:not(.js) .hero canvas, html:not(.js) .hero-controls { display: none; }
.hero noscript img { width: 100%; height: 100%; object-fit: contain; }
