/* zephyxlabs.com · concept J, "Shell × Darkroom": black, bone and one signal red.
   Every color is a token in :root. scripts/check.py checks each text/background pair
   against WCAG 2.2 AA and fails the build on any color written outside :root.
   No inline styles anywhere: the Content-Security-Policy is default-src 'self'. */

@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-wdth.e3a28eade2.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-400.5eb09b5ac0.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-400-italic.5a51946dff.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-wght.18be452724.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --black: #000000;
  --bone: #EDEBE6;
  --red: #FF4538;
  --grey-1: #C8CBD1;
  --grey-2: #8E939C;
  --grey-3: #7C818A;
  --reserved: #5C5F66;
  --term-bg: rgba(0, 0, 0, 0.92);
  --term-line: rgba(237, 235, 230, 0.22);
  --line: rgba(237, 235, 230, 0.18);
  --line-strong: rgba(237, 235, 230, 0.5);
  --line-faint: rgba(237, 235, 230, 0.12);
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --wide: "Archivo", "Arial Black", Impact, sans-serif;
  --max: 1400px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--black); color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--bone); font-family: var(--mono); font-size: 15px; line-height: 1.65; }
img, svg, canvas { max-width: 100%; }

a { color: var(--red); }
a:hover { color: var(--bone); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 20; padding: 10px 14px; background: var(--red); color: var(--black); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header { position: relative; z-index: 5; max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 28px; font-size: 12.5px; }
.page-home .site-header { position: absolute; top: 0; left: 0; right: 0; }
.brand { display: block; padding: 8px 0; }
.brand img { display: block; width: auto; height: 22px; }
.tagline { letter-spacing: 0.14em; color: var(--grey-3); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 22px; letter-spacing: 0.06em; }
.site-nav a { display: inline-block; padding: 8px 0; color: var(--bone); text-decoration: none; }
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.idx { color: var(--red); }

/* ── Hero: wordmark, live Z, terminal ───────────────────────────────── */

/* The hero fits the screen (up to the concept's 940 px), so the whole wordmark shows in the first view */
.hero { position: relative; height: clamp(800px, 100svh, 940px); overflow: hidden; background: var(--black); }
.wordmark { position: absolute; z-index: 1; left: 0; right: 0; bottom: -0.12em; margin: 0; text-align: center; font-family: var(--wide); font-weight: 900; font-stretch: 125%; font-size: min(18.5vw, 290px); line-height: 0.8; letter-spacing: -0.03em; color: var(--bone); white-space: nowrap; }
.hero-canvas { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; max-width: none; mix-blend-mode: difference; pointer-events: none; }
.hero-canvas.is-off { display: none; }
.hero-inner { position: relative; z-index: 3; max-width: var(--max); height: calc(100% - 15vw); margin: 0 auto; padding: 120px var(--gutter) 0; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; pointer-events: none; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.hero-line { margin: 0; max-width: 520px; font-family: var(--serif); font-size: clamp(34px, 3.4vw, 50px); line-height: 1.02; }
.hero-line em { color: var(--red); }
.fig { margin: 0; max-width: 300px; font-size: 11.5px; letter-spacing: 0.08em; line-height: 1.8; text-align: right; color: var(--grey-3); }
.fig-mode { color: var(--bone); }
.fig-try { color: var(--red); }
/* The box the Z is fitted into (home.js reads its size): right of the terminal, below the FIG label,
   and ending above the wordmark, so the Z never sits on the name */
.hero-stage { position: absolute; top: 150px; bottom: 0; left: max(45%, 640px); right: var(--gutter); }

.term { width: 100%; max-width: 560px; border: 1px solid var(--term-line); background: var(--term-bg); pointer-events: auto; }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line-faint); font-size: 11.5px; color: var(--grey-3); }
.term-out { height: 168px; overflow-y: auto; padding: 10px 14px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--grey-1); }
.term-out:focus-visible { outline-offset: -2px; }
.term-out a { color: var(--red); }
.term-out a:hover { color: var(--bone); }
.tl-w { color: var(--bone); }
.tl-d { color: var(--grey-2); }
.tl-r { color: var(--red); }
.term-form { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line-faint); }
.term-form:focus-within { outline: 2px solid var(--red); outline-offset: -2px; }
.term-prompt { color: var(--red); font-weight: 700; }
.term-form input { flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 0; background: transparent; border: 0; border-radius: 0; color: var(--bone); font: inherit; font-size: 14px; caret-color: var(--red); }
.term-form input:focus-visible { outline: none; }
.term-form input::placeholder { color: var(--grey-3); opacity: 1; }
.term-form button { min-height: 34px; padding: 0 12px; background: var(--red); color: var(--black); border: 0; border-radius: 0; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.term-form button:hover { background: var(--bone); }
.term-chips, .term-fallback { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.term-fallback { padding-top: 12px; border-top: 1px solid var(--line-faint); }
.term-chips button, .term-fallback a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 9px; background: transparent; color: var(--grey-1); border: 1px solid var(--line); border-radius: 0; font: inherit; font-size: 11.5px; text-decoration: none; cursor: pointer; }
.term-chips button:hover, .term-fallback a:hover { color: var(--bone); border-color: var(--red); }

/* ── Sections ───────────────────────────────────────────────────────── */

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sec { padding-top: 100px; padding-bottom: 40px; }
.sec-tight { padding-top: 48px; padding-bottom: 96px; }
.sec-about { padding-top: 130px; padding-bottom: 50px; }
.sec-contact { padding-top: 110px; padding-bottom: 120px; }
.cmd { margin: 0 0 22px; font-size: 13px; font-weight: 400; color: var(--grey-3); }
.p { color: var(--red); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); font-size: 12.5px; }
.sec-head .cmd { margin: 0; }
.head-note { color: var(--grey-3); letter-spacing: 0.08em; }
.display { margin: 0; max-width: 1180px; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.6vw, 84px); line-height: 1.02; }
.display em { color: var(--grey-2); }
.note { margin: 28px 0 0; max-width: 68ch; font-size: 13px; color: var(--grey-2); }
.more { margin: 28px 0 0; font-size: 13px; }
.more a { text-decoration: none; }

.spec { display: grid; grid-template-columns: 10ch 1fr; margin: 34px 0 0; font-size: 13.5px; line-height: 1.9; color: var(--grey-2); }
.spec dt, .spec dd { margin: 0; }
.spec-wide { grid-template-columns: 14ch 1fr; row-gap: 4px; }
.spec-wide dt { color: var(--grey-3); }
.spec-wide dd { color: var(--grey-1); }

/* The work index: one huge row per app */
.work-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px; padding: 34px 0; border-bottom: 1px solid var(--line); color: var(--bone); text-decoration: none; }
a.work-row:hover { color: var(--bone); }
a.work-row:hover .work-name { color: var(--red); }
.num { flex: 0 0 60px; font-size: 13px; color: var(--red); }
.work-name { flex: 1 1 420px; font-family: var(--wide); font-weight: 800; font-stretch: 112%; font-size: clamp(34px, 7.4vw, 112px); line-height: 0.9; letter-spacing: -0.02em; text-transform: uppercase; }
.work-desc { flex: 1 1 320px; font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.work-facts { display: block; margin-top: 8px; font-family: var(--mono); font-size: 12px; line-height: 1.7; letter-spacing: 0.04em; color: var(--grey-2); }
.work-facts .zero { color: var(--red); }
.row-reserved { color: var(--reserved); }
.row-reserved .num { color: var(--grey-3); }
.row-reserved .work-desc { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--grey-2); }
.is-small { padding: 26px 0; }
.is-small .work-name { font-size: clamp(30px, 4.6vw, 64px); }
.is-small .work-desc { font-family: var(--mono); font-size: 13px; color: var(--grey-1); }

/* The house rules, I. to III. */
.rules { margin: 0; padding: 0; list-style: none; }
.rule { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.rule-title { flex: 1 1 520px; font-family: var(--serif); font-size: clamp(36px, 4.6vw, 68px); line-height: 1; }
.rule-text { flex: 1 1 280px; font-size: 14px; color: var(--grey-2); }
.rules-compact .rule-title { font-size: clamp(30px, 3.4vw, 48px); }
.rules-compact .rule-text { color: var(--grey-1); }

/* The dated build log */
.log-grid { display: flex; flex-wrap: wrap; gap: 32px 80px; }
.log-intro { flex: 1 1 340px; }
.log-intro .cmd { margin-bottom: 18px; }
.serif-lg { margin: 0; max-width: 420px; font-family: var(--serif); font-size: 32px; line-height: 1.15; }
.serif-lg em { color: var(--grey-2); }
.log { flex: 1.5 1 560px; margin: 0; padding: 22px 24px; list-style: none; border-left: 2px solid var(--red); font-size: 13.5px; line-height: 2; color: var(--grey-1); }
.log li { display: grid; grid-template-columns: 12ch 12ch 1fr; }
.log time { color: var(--red); }
.log-tag { color: var(--grey-2); }

/* Contact */
.mail { margin: 0; font-weight: 400; }
.mail a { font-family: var(--serif); font-size: clamp(34px, 7vw, 108px); line-height: 1; color: var(--bone); text-decoration: none; overflow-wrap: anywhere; }
.mail a:hover { color: var(--red); }
.cursor { display: inline-block; width: 0.38em; height: 0.78em; margin-left: 0.08em; vertical-align: -0.06em; background: var(--red); }
.mail-note { margin: 18px 0 0; font-size: 13px; color: var(--grey-2); }
.mail-note a { color: var(--grey-1); }
.mail-note a:hover { color: var(--red); }

/* ── Inner pages ────────────────────────────────────────────────────── */

.page-head { padding-top: 64px; padding-bottom: 24px; }
.page-head .display { font-size: clamp(48px, 7vw, 108px); }
.lede { max-width: 640px; margin: 24px 0 0; font-size: 15px; color: var(--grey-1); }
.updated { margin: 20px 0 0; font-size: 12.5px; letter-spacing: 0.04em; color: var(--grey-3); }

.blocks { padding-bottom: 96px; }
.block { padding-top: 64px; }
.block .cmd { margin-bottom: 14px; }
.block h2 { margin: 0 0 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 56px); line-height: 1.05; }
.block p { max-width: 68ch; margin: 0 0 14px; color: var(--grey-1); }
.list { max-width: 68ch; margin: 0; padding-left: 2ch; color: var(--grey-1); list-style-type: "- "; }
.list li { margin: 6px 0; }

.app-card { padding: 34px 0 30px; border-bottom: 1px solid var(--line); }
.app-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px; }
.app-name { flex: 0 1 auto; margin: 0; font-family: var(--wide); font-weight: 800; font-stretch: 112%; font-size: clamp(34px, 7.4vw, 112px); line-height: 0.9; letter-spacing: -0.02em; text-transform: uppercase; }
.chip { align-self: center; padding: 4px 10px; border: 1px solid var(--red); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.app-tag { margin: 22px 0 0; font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.app-summary { max-width: 68ch; margin: 12px 0 0; color: var(--grey-1); }
.app-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 13px; }
.app-links a { display: inline-block; padding: 6px 0; }

.addr { display: grid; grid-template-columns: minmax(0, 28ch) 1fr; max-width: 980px; margin: 0; border-top: 1px solid var(--line-strong); }
.addr dt, .addr dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.addr dt a { text-decoration: none; }
.addr dd { color: var(--grey-1); }

.prose { max-width: 74ch; padding-bottom: 96px; color: var(--grey-1); }
.prose > :first-child { margin-top: 40px; }
.prose h2 { margin: 56px 0 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; color: var(--bone); }
.prose h2::before { content: "›"; content: "›" / ""; margin-right: 0.4em; font-family: var(--mono); font-size: 0.55em; vertical-align: 0.2em; color: var(--red); }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 2ch; list-style-type: "- "; }
.prose li { margin: 6px 0; }
.prose strong { font-weight: 700; color: var(--bone); }
.prose a, .block p a, .list a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.prose code { font: inherit; color: var(--bone); }
.prose .spec { margin-top: 18px; }
.app-block { margin: 0 0 32px; }
.app-block h3 { margin: 28px 0 0; font-size: 15px; font-weight: 700; color: var(--bone); }
.app-block p { margin-top: 18px; }
.operator { padding: 14px 20px; border-left: 2px solid var(--red); font-style: normal; line-height: 1.9; color: var(--bone); }
.placeholder { padding: 0 4px; outline: 1px dashed var(--red); outline-offset: 2px; color: var(--bone); }

.lost .err { margin: -10px 0 26px; font-size: 13px; color: var(--red); }
.go-list { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 96px; padding: 0; list-style: none; }
.go-list a { display: inline-block; padding: 8px 0; font-size: 14px; }

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--line); overflow: hidden; }
.footer-row { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 12px; color: var(--grey-3); }
.footer-row p { margin: 0; }
.footer-row a { color: var(--grey-1); text-decoration: none; }
.footer-row a:hover { color: var(--red); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-nav a { display: inline-block; padding: 6px 0; }
.banner { display: block; width: clamp(280px, 47.6vw, 700px); height: auto; margin: 0 auto 26px; }

/* ── Narrower screens ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .tagline { display: none; }
}

/* Below 1100 px there's no room for the Z beside the terminal, so the hero stacks:
   line, terminal, then the Z above the wordmark */
@media (max-width: 1099px) {
  .page-home .site-header { position: relative; }
  .hero { height: auto; }
  /* The bottom padding is the wordmark's visible height, so the stage ends above the name */
  .hero-inner { height: auto; padding: 28px var(--gutter) calc(18.5vw * 0.72 + 12px); justify-content: flex-start; }
  .fig { text-align: left; }
  .term { max-width: 640px; }
  .hero-stage { position: static; height: min(84vw, 380px); margin-top: 24px; }
}

@media (max-width: 760px) {
  .log { flex-basis: 100%; padding: 12px 0 12px 16px; }
  .log li { grid-template-columns: 12ch 1fr; padding: 6px 0; line-height: 1.6; }
  .log-msg { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .site-nav { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 28px; }
  .sec { padding-top: 64px; }
  .sec-about { padding-top: 72px; }
  .sec-contact { padding-top: 72px; padding-bottom: 80px; }
  .sec-tight { padding-top: 32px; }
  .page-head { padding-top: 40px; }
  .num { flex-basis: 100%; }
  .work-name, .app-name { font-size: 10vw; }
  .work-desc, .app-tag { font-size: 24px; }
  .rule-title { font-size: 34px; }
  .spec, .spec-wide { grid-template-columns: 1fr; }
  .spec dt { margin-top: 6px; color: var(--grey-3); }
  .addr { grid-template-columns: 1fr; }
  .addr dt { padding-bottom: 2px; border-bottom: 0; }
  .addr dd { padding-top: 0; }
}

/* Touch screens: 44 px targets, and 16 px input text so iOS doesn't zoom */
@media (pointer: coarse) {
  .site-nav a, .footer-nav a, .app-links a, .go-list a { padding: 12px 0; }
  .term-form input { min-height: 44px; font-size: 16px; }
  .term-form button, .term-chips button, .term-fallback a { min-height: 44px; }
}
