/* CSMak: black, teal #00C79F, pastel pink #F386A1, mint accent. Square lines, pixel details. */

@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Departure Mono";
  src: url("/fonts/departure-mono.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #050505;
  --ink-2: #0e0e0e;
  --ink-3: #1a1a1a;
  --paper: #f1eee8;
  --mute: #8f8c85;
  --line: rgba(241, 238, 232, 0.2);
  --teal: #00c79f;
  --teal-2: #00a888;
  --pink: #f386a1;
  --mint: #bdf2d0;

  --f-sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Departure Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1280px;
  --pad: clamp(16px, 4vw, 48px);
  --nav-h: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.45 var(--f-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg, canvas { display: block; }
::selection { background: var(--teal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--f-mono); font-size: 11px; line-height: 1.6; letter-spacing: 0; }
.label { font-family: var(--f-mono); font-size: 11px; line-height: 1.4; color: var(--mute); margin-bottom: 14px; }
.band .label { color: inherit; opacity: 0.75; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--teal); color: var(--ink); padding: 8px 12px; }
.skip:focus { top: 8px; }

/* Pixel sprites */
.px { width: 32px; height: auto; image-rendering: pixelated; }
.px-a { fill: var(--pink); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 0; pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-links, .nav-end { display: flex; gap: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 9px;
  background: var(--ink-3); color: var(--paper);
  font: 500 15px/1 var(--f-sans); letter-spacing: -0.01em; text-decoration: none;
  transition: background-color 120ms, color 120ms;
}
.chip:hover { background: var(--teal); color: var(--ink); }
.chip-brand { background: var(--paper); color: var(--ink); font-weight: 600; }
.chip-brand .mark { width: 16px; }
.chip-solid { background: var(--teal); color: var(--ink); }
.chip-solid:hover { background: var(--pink); }
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); }

/* ---------- Shared blocks ---------- */
.display {
  font-family: var(--f-sans); font-weight: 500;
  font-size: clamp(48px, 9.4vw, 150px); line-height: 0.9; letter-spacing: -0.055em;
  text-wrap: balance;
}
.display-2 { font-size: clamp(40px, 6.6vw, 104px); line-height: 0.92; letter-spacing: -0.05em; }
.display-3 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1; letter-spacing: -0.04em; }
.body-l { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.38; letter-spacing: -0.012em; }

.section { padding-block: clamp(72px, 10vw, 140px); }

/* Crop marks on four corners, like a print frame. */
.frame {
  --c: currentColor; --s: 10px;
  padding: clamp(28px, 4vw, 48px) clamp(0px, 2vw, 24px);
  margin-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--s),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--s),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--s),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--s);
  background-repeat: no-repeat;
}
.frame .label { margin-bottom: 18px; }

.band { position: relative; color: var(--ink); }
.band-teal { background: var(--teal); }
.band-pink { background: var(--pink); }
.band ::selection { background: var(--ink); color: var(--paper); }
.edge {
  position: absolute; inset: 6px 8px auto; display: flex; justify-content: space-between;
  font: 11px/1 var(--f-mono); pointer-events: none;
}

.cols { display: grid; gap: clamp(24px, 3vw, 40px); }
.cols-3 { grid-template-columns: 1fr 1fr 0.72fr; }
.cols-pillars { grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 7vw, 88px); }
.col { border-left: 1px solid currentColor; padding: 2px 0 2px 14px; }
.cols .col { border-color: var(--line); }
.band .cols .col { border-color: currentColor; }
.col-hex { border: 0; }
.hexblock { color: var(--teal); word-break: break-all; opacity: 0.85; }

/* Retro windows */
.win {
  display: block; background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); text-decoration: none;
}
.band .win { border-color: var(--ink); box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.28); }
.win-bar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 3px 7px; background: var(--paper); color: var(--ink);
  font: 11px/1.4 var(--f-mono); white-space: nowrap; overflow: hidden;
}
.win-body { display: block; padding: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border: 1px solid currentColor; border-radius: 0;
  font: 600 16px/1 var(--f-sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  background: transparent; color: inherit;
  transition: background-color 120ms, color 120ms, transform 80ms;
}
.btn:active { transform: translate(1px, 1px); }
.btn-solid { background: var(--teal); color: var(--ink); border-color: var(--teal); }
.btn-solid:hover { background: var(--pink); border-color: var(--pink); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn[disabled] { cursor: progress; opacity: 0.7; }

.big-link {
  font: 500 clamp(30px, 4.2vw, 60px)/1.1 var(--f-sans); letter-spacing: -0.045em;
  text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.16em;
  transition: color 120ms;
}
.big-link:hover { color: var(--teal); }

/* ---------- Hero ---------- */
.hero {
  position: relative; text-align: center;
  padding-block: clamp(40px, 6vw, 72px) clamp(80px, 11vw, 150px);
  display: flex; flex-direction: column; align-items: center;
}
.hexcol {
  position: absolute; left: var(--pad); top: 140px; bottom: 120px; overflow: hidden;
  writing-mode: vertical-rl; color: var(--mute); opacity: 0.6; word-break: break-all; max-height: 640px;
}
.win-news { width: min(320px, 100%); text-align: center; margin-bottom: clamp(48px, 8vw, 96px); transition: border-color 120ms; }
.win-news .win-body { font: 11px/1.7 var(--f-mono); padding: 10px 14px 12px; }
.win-news:hover { border-color: var(--teal); }
.win-news:hover u { color: var(--teal); }

.kicker { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; margin-bottom: clamp(24px, 3vw, 36px); }
.kicker .dots { width: clamp(40px, 9vw, 110px); border-bottom: 2px dotted var(--teal); transform: translateY(-3px); }
.hero h1 { max-width: 12.5ch; }
.hero .lead { max-width: 40ch; margin-top: clamp(28px, 3.5vw, 44px); color: #cfcbc3; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px clamp(32px, 5vw, 64px); margin-top: clamp(44px, 6vw, 72px); }

/* ---------- Desk (pixel desktop) ---------- */
.desk { padding-block: 56px; }
.desk-screen {
  position: relative; height: 580px; border: 1px solid var(--ink); overflow: hidden;
}
.dither { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.desk-tag { position: absolute; left: 10px; top: 10px; background: var(--ink); color: var(--paper); font: 11px/1 var(--f-mono); padding: 4px 6px; }
.desk .win { position: absolute; }
.w-eeg { left: 25%; top: 13%; width: min(400px, 42%); }
.w-hand { left: 4%; top: 25%; width: 190px; }
.w-clock { right: 3%; top: 7%; width: 200px; }
.w-life { right: 6%; bottom: 9%; width: 150px; }
.w-os { left: 5%; bottom: 7%; width: 220px; }

.eeg { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: stretch; }
.eeg-ch { display: grid; grid-template-rows: repeat(8, 1fr); color: var(--mute); line-height: 1; align-items: center; }
.eeg canvas, .life canvas { width: 100%; height: auto; image-rendering: pixelated; }
.hand { display: grid; justify-items: center; gap: 6px; }
.hand-px { width: 112px; color: var(--teal); }
.meter { display: flex; align-items: center; gap: 6px; width: 100%; }
.bar { flex: 1; height: 8px; border: 1px solid var(--paper); padding: 1px; }
.bar-fill { display: block; height: 100%; width: 62%; background: var(--pink); transition: width 300ms steps(6); }
.w-clock .win-body { font-size: 22px; line-height: 1.2; color: var(--teal); padding: 10px 12px; }
.w-clock .win-body small { display: block; font-size: 11px; color: var(--mute); }
.life { display: grid; gap: 6px; }
.life canvas { width: 100%; border: 1px solid var(--line); }
.os { display: flex; gap: 10px; align-items: center; }
.os-mark { width: 40px; flex: none; color: var(--paper); }

/* ---------- Areas ---------- */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.area {
  position: relative; padding: 28px 22px 26px; min-height: 380px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  transition: background-color 160ms;
}
.area:hover { background: var(--ink-2); }
.area-code { position: absolute; top: 12px; right: 14px; color: var(--mute); }
.area-px { width: 72px; color: var(--teal); margin-bottom: 36px; }
.area h3 { font-size: 26px; line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; }
.area p { color: #c9c5bd; font-size: 16px; line-height: 1.42; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 8px; }
.tags li { background: var(--ink-3); color: var(--mint); padding: 2px 6px; }

/* ---------- Method ---------- */
.band-pink .section, .band .section { padding-block: clamp(72px, 10vw, 130px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px); }
.step { border-left: 1px solid var(--ink); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 12px; }
.step-n { font-size: 22px; line-height: 1; }
.step h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1; font-weight: 500; letter-spacing: -0.045em; }
.step p { font-size: 16px; line-height: 1.42; max-width: 30ch; }
.step-bar { display: flex; gap: 3px; margin-top: auto; padding-top: 8px; }
.step-bar i { width: 14px; height: 14px; border: 1px solid var(--ink); }
.step-1 i:nth-child(-n+1), .step-2 i:nth-child(-n+2), .step-3 i:nth-child(-n+3), .step-4 i { background: var(--ink); }

/* ---------- Principles ---------- */
.principles .display-2 { max-width: 16ch; margin-inline: auto; }
.principles .label { color: var(--pink); }
.principles .cols-pillars .label { color: var(--mint); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: start; border-top: 1px solid var(--line); }
.contact-intro { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 22px; }
.contact-intro .label { margin-bottom: 0; }
.contact-intro .body-l { color: #cfcbc3; max-width: 34ch; }
.copybox { margin-top: 18px; border: 1px solid var(--line); padding: 16px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: space-between; }
.copy-mail { font: 500 clamp(20px, 2.1vw, 28px)/1.1 var(--f-sans); letter-spacing: -0.03em; color: var(--teal); text-decoration: none; overflow-wrap: anywhere; }
.copy-mail:hover { text-decoration: underline; }
[data-copy].is-copied { background: var(--mint); color: var(--ink); border-color: var(--mint); }

.win-form { border-color: var(--line); }
.form { display: grid; gap: 18px; padding: clamp(16px, 2.4vw, 28px); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > label { font: 11px/1.3 var(--f-mono); color: var(--paper); }
.opt { color: var(--mute); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--ink-2); color: var(--paper);
  border: 1px solid var(--line); border-radius: 0;
  font: 400 16px/1.35 var(--f-sans);
  transition: border-color 120ms, background-color 120ms;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--paper) 50%), linear-gradient(135deg, var(--paper) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { resize: vertical; min-height: 140px; }
input::placeholder, textarea::placeholder { color: #5f5c57; }
input:hover, select:hover, textarea:hover { border-color: rgba(241, 238, 232, 0.4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); background: #07110e; }
[aria-invalid="true"] { border-color: var(--pink); }
.hint { font-size: 13px; color: var(--mute); line-height: 1.35; }
.field-error, .form-error { font: 11px/1.5 var(--f-mono); color: var(--pink); }
.form-error { border: 1px solid var(--pink); padding: 10px 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: #cfcbc3; cursor: pointer; }
.check input {
  appearance: none; flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin-top: 1px;
  display: grid; place-content: center; cursor: pointer;
}
.check input::before { content: ""; width: 10px; height: 10px; background: var(--teal); transform: scale(0); transition: transform 90ms steps(2); }
.check input:checked { border-color: var(--teal); }
.check input:checked::before { transform: scale(1); }
.check a { color: var(--paper); }
.submit-row { display: flex; justify-content: flex-end; }
.when-busy { display: none; }
.htmx-request .when-idle { display: none; }
.htmx-request .when-busy { display: inline; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done { display: grid; justify-items: start; gap: 16px; padding: clamp(28px, 4vw, 48px); min-height: 420px; align-content: center; }
.done .label { color: var(--teal); margin: 0; }
.done-mark { width: 48px; color: var(--teal); }
.done strong { color: var(--teal); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.footer { padding-top: 56px; padding-bottom: 28px; overflow: hidden; }
.footer-word {
  display: flex; align-items: center; gap: 0.08em;
  font: 600 clamp(80px, 21vw, 330px)/0.8 var(--f-sans); letter-spacing: -0.07em;
  margin: 0 0 32px -0.04em;
}
.footer-mark { width: 0.62em; flex: none; }
.footer .px-a { fill: var(--ink); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--ink); padding-top: 14px; }
.small { font-size: 13px; line-height: 1.5; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Legal / 404 ---------- */
.legal .frame { text-align: left; }
.legal-date { color: var(--mute); margin-top: 16px; }
.legal-list { display: grid; border-top: 1px solid var(--line); margin-bottom: 56px; }
.legal-row { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.legal-row dt { margin: 0; color: var(--teal); }
.legal-row dd { max-width: 62ch; color: #d6d2ca; }
.notfound { display: grid; place-items: center; min-height: 70vh; }
.win-404 { width: min(520px, 100%); }
.win-404 .win-body { display: grid; gap: 18px; padding: 28px; }
.win-404 canvas { width: 100%; height: auto; image-rendering: pixelated; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .areas { grid-template-columns: repeat(2, 1fr); }
  .area { min-height: 320px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .col-hex { display: none; }
  .hexcol { display: none; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .desk-screen { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 44px 14px 14px; }
  .desk .win { position: relative; inset: auto; width: auto; }
  .w-eeg { grid-column: 1 / -1; }
  .w-clock { order: 1; }
  .w-os { grid-column: 1 / -1; order: 2; }
  .contact { grid-template-columns: 1fr; }
  .contact-intro { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cols-3, .cols-pillars, .grid-2 { grid-template-columns: 1fr; }
  .areas, .steps { grid-template-columns: 1fr; }
  .area { min-height: 0; }
  .area-px { margin-bottom: 16px; }
  .legal-row { grid-template-columns: 1fr; gap: 8px; }
  .desk-screen { grid-template-columns: 1fr; }
  .w-life { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}
