:root {
  --bg: #0B0B0D;
  --surface: #121216;
  --text: #EDEDEF;
  --muted: #8A8A92;
  --bit0: #F4D56C;
  --bit1: #EF8552;
  --bit2: #E27A74;
  --bit3: #86BE72;
  --bit4: #89B9D9;
  --bit5: #9A95C9;
  --bit6: #6E6E72;
  --bit7: #F2F2F2;
  --display: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gutter: 16px;
  --col: 72ch;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--bit5); color: var(--bg); }

#byte-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}
html:not(.js) #byte-canvas { display: none; }

main { position: relative; }

section {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center;
  padding: clamp(64px, 12vh, 160px) var(--gutter);
  position: relative;
}
.col { width: 100%; max-width: var(--col); margin: 0 auto; }

/* ---------- type ---------- */
.label {
  font-family: var(--mono); font-weight: 400; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 1.5rem;
}
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: 0.95; letter-spacing: -0.02em;
  margin: 0.4em 0 0.3em;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.01em; margin: 0; color: var(--text);
}
.wordmark .aps { font-family: var(--mono); font-size: 0.5em; color: var(--muted); margin-left: 0.6em; vertical-align: 0.35em; letter-spacing: 0.1em; }
.sub { font-size: clamp(1.1rem, 1.6vw, 1.5rem); color: var(--muted); margin: 0 0 2rem; }

/* ---------- readout ---------- */
.readout { display: inline-flex; flex-direction: column; gap: 0.25rem; font-family: var(--mono); }
.readout-bin { font-size: clamp(1.4rem, 2.6vw, 2.2rem); letter-spacing: 0.22em; color: var(--text); }
.readout-dec { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.1em; }
.digit { display: inline-block; min-width: 1ch; transition: color 150ms; }
.digit.flap { color: var(--bit4); }
.js:not(.ready) .digit { visibility: hidden; }

/* ---------- hero ---------- */
.hero .col { max-width: 1200px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-aspect-ratio: 1/1) {
  .hero .col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-aspect-ratio: 1/1) {
  .hero { align-content: end; padding-bottom: 14vh; }
}
.cue {
  position: absolute; left: 50%; bottom: 28px; width: 12px; height: 12px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateX(-50%) rotate(45deg);
  opacity: 0.8; transition: opacity 500ms;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 50% { transform: translate(-50%, 6px) rotate(45deg); } }
body.scrolled .cue { opacity: 0; }

/* ---------- who ---------- */
.line {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.2; letter-spacing: -0.01em;
  margin: 0 0 1.2em;
}

/* ---------- bits ---------- */
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.6rem 3rem; }
@media (min-width: 720px) { .principles { grid-template-columns: 1fr 1fr; } }
.principle { display: grid; grid-template-columns: 14px 1fr; grid-template-rows: auto auto; column-gap: 14px; transition: opacity 600ms var(--ease); }
.principle .swatch { grid-row: 1 / 3; width: 14px; height: 14px; margin-top: 0.45em; background: var(--c); border-radius: 2px; }
.principle strong { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.principle span:last-child { color: var(--muted); }
/* Unlit bits dim only the swatch and label; the description stays readable. */
.principle .swatch, .principle strong { transition: opacity 600ms var(--ease); }
.js .principle:not(.on) .swatch, .js .principle:not(.on) strong { opacity: 0.45; }

/* ---------- facts ---------- */
.factlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 0; text-align: center; }
@media (max-width: 600px) { .factlist { grid-template-columns: 1fr; } }
.factlist dt { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.factlist dd { margin: 0.4em 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.1; }

/* ---------- reach ---------- */
.reach .col { text-align: center; max-width: 1200px; }
.reach .label { margin-top: 2rem; color: var(--text); }
.email-row { display: flex; flex-direction: column; align-items: center; gap: 2.2rem; margin: 1rem 0 0; }
.email {
  font-family: var(--display); font-weight: 800; text-decoration: none;
  font-size: clamp(2rem, 7.5vw, 7rem); line-height: 1; letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.email:hover, .email:focus-visible { color: var(--bit0); outline: none; }
.copy {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); background: transparent; border: 1px solid var(--muted); border-radius: 999px;
  padding: 0.7em 1.4em; min-height: 44px; cursor: pointer; transition: border-color 200ms, color 200ms;
}
.copy:hover, .copy:focus-visible { border-color: var(--text); outline: none; }
.footer {
  position: absolute; left: 0; right: 0; bottom: 24px; text-align: center;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--muted);
}

/* ---------- reveal ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-letters] .ch {
  display: inline-block; transform: translateY(110%);
  transition: transform 700ms var(--ease);
  transition-delay: calc(var(--i) * 40ms);
}
.js [data-letters] { overflow: hidden; }
.js [data-letters].in .ch { transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cue { animation: none; }
  .js [data-reveal] { transition: none; transform: none; }
  .js [data-letters] .ch { transition: none; transform: none; }
  .principle { transition: none; }
}
