/* annuo.ai: shared styles for index.html, placeholder.html and privacy.html.
   Tokens follow brand v0.1.1 (brand/assets/tokens.css, brand/STYLE-GUIDE.html).
   Fonts are self-hosted (fonts/, SIL OFL 1.1) so the page makes no third-party requests. */

@font-face {
  font-family: "Annuo Sans";
  src: url("fonts/InstrumentSans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Annuo Mono";
  src: url("fonts/JetBrainsMono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #F4F4FA;
  --ink: #14151F;
  --muted: #5E6070;
  --rule: #DEDEEA;
  --brand: #3D3AE0;
  --on-brand: #FFFFFF;
  --focus: #3D3AE0;

  /* The illustration panel is dark in both themes, so it always uses the dark-mode variants. */
  --night: #0E0F13;
  --night-rule: #24272E;
  --night-ink: #ECEDF0;
  --night-text: #A9ADB6;
  --night-dim: #8A8E98;
  --night-brand: #8F8CFF;
  --night-held: #F08A68;
  --night-clean: #5FBFA5;

  --sans: "Annuo Sans", "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Annuo Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E0F13;
    --ink: #ECEDF0;
    --muted: #9CA0AA;
    --rule: #24272E;
    --brand: #8F8CFF;
    --on-brand: #0E0F13;
    --focus: #8F8CFF;
    --night: #07080B;
  }
}
:root[data-theme="dark"] {
  --paper: #0E0F13;
  --ink: #ECEDF0;
  --muted: #9CA0AA;
  --rule: #24272E;
  --brand: #8F8CFF;
  --on-brand: #0E0F13;
  --focus: #8F8CFF;
  --night: #07080B;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

/* Wordmark: lowercase "annuo." with a squircle period (logo only).
   Light master 700 / -3%; reversed master on dark 630 / -2.5%. */
.wm {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
}
.wm .p {
  display: inline-block;
  width: .19em; height: .19em;
  background: var(--brand);
  border-radius: .055em;
  margin-left: .04em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm { font-weight: 630; letter-spacing: -0.025em; }
}
:root[data-theme="dark"] .wm { font-weight: 630; letter-spacing: -0.025em; }

/* ---------- index.html: the split hero ---------- */

.split {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "head panel"
    "copy panel"
    "foot panel";
}
.split > header { grid-area: head; padding: 32px 56px 0; }
.split > main { grid-area: copy; padding: 0 56px; display: flex; align-items: center; }
.split > footer { grid-area: foot; padding: 0 56px 28px; }
.split > .panel { grid-area: panel; }

.split header .wm { font-size: 30px; }

.copy { max-width: 38rem; padding: 48px 0; }
.copy h1 {
  font: 600 clamp(40px, 4.3vw, 64px)/1.04 var(--sans);
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.copy p { margin: 0 0 32px; font-size: 19px; color: var(--muted); max-width: 31rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 var(--sans);
  padding: 13px 18px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 44px;
}
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--muted); }

.split footer { font-size: 14px; color: var(--muted); display: flex; gap: 8px 20px; flex-wrap: wrap; }
.split footer a { color: var(--muted); }
.split footer a:hover { color: var(--ink); }

/* The drawn panel. Text only, set in mono, so it reads as an illustration, never as the console. */
.panel {
  background-color: var(--night);
  background-image: radial-gradient(rgba(236, 237, 240, .07) 1px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--night-text);
  border-left: 1px solid var(--night-rule);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(24px, 5vw, 72px);
  margin: 0;
  min-width: 0;
}
.panel .frame { margin: 0 auto; width: max-content; max-width: 100%; }
.panel pre {
  margin: 0;
  font: 400 14px/1.75 var(--mono);
  color: var(--night-text);
  white-space: pre;
  overflow-x: auto;
}
.panel .t { color: var(--night-dim); }
.panel .ok { color: var(--night-clean); }
.panel .held { color: var(--night-held); }
.panel .pp { color: var(--night-brand); }
.panel .hi { color: var(--night-ink); }
.panel .rc { color: var(--night-ink); }
.panel .rc .t { color: var(--night-dim); }

.panel .foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  margin-top: 20px;
  font: 400 12.5px/1.4 var(--mono);
  color: var(--night-dim);
}
.panel .foot button {
  font: 500 12.5px/1 var(--mono);
  color: var(--night-ink);
  background: transparent;
  border: 1px solid var(--night-dim);
  border-radius: 8px;
  width: 32px; height: 32px; padding: 0;
  display: inline-grid; place-items: center;
  cursor: pointer;
}
.panel .foot button svg { fill: currentColor; }
.panel .foot .i-play { display: none; }
.panel.paused .foot .i-play { display: block; }
.panel.paused .foot .i-pause { display: none; }
.panel .foot button:hover { border-color: var(--night-ink); }
.panel .foot button:focus-visible { outline-color: var(--night-brand); }
.panel .foot button[hidden] { display: none; }

/* Motion: only when the script runs and the visitor has not asked for less motion. */
.panel.anim .l { opacity: 0; transform: translateY(4px); }
.panel.anim .l.on { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
.panel.anim .wait.on .dots { animation: breathe 1.6s ease-in-out infinite; }
.panel.paused .wait.on .dots { animation-play-state: paused; }
.panel.anim.fading .l.on { opacity: 0; transition: opacity .7s ease; }
.panel.anim .wait.done .dots { animation: none; opacity: 1; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .panel.anim .l { opacity: 1; transform: none; }
  .panel.anim .wait .dots { animation: none; }
}

/* Tablet and phone: stack, paper first, then the drawn panel, then the footer. */
@media (max-width: 900px) {
  .split {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas: "head" "copy" "panel" "foot";
  }
  .split > header { padding: 24px 24px 0; }
  .split > main { padding: 0 24px; }
  .split > footer { padding: 24px; }
  .split header .wm { font-size: 26px; }
  .copy { padding: 56px 0 48px; }
  .copy p { font-size: 18px; }
  .panel { border-left: 0; padding: 40px 24px 28px; }
}
@media (max-width: 480px) {
  .split > header, .split > main, .split > footer { padding-left: 16px; padding-right: 16px; }
  .copy { padding: 44px 0 40px; }
  .copy h1 { font-size: 40px; }
  .panel { padding: 32px 16px 24px; }
  .panel pre { font-size: 12px; line-height: 1.7; }
}

/* ---------- placeholder.html: one screen ---------- */

.holding {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 24px;
}
.holding main {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  max-width: 44rem; width: 100%; margin: 0 auto; padding: 64px 0;
}
.holding .wm { font-size: clamp(56px, 10vw, 104px); margin: 0; }
.holding .line {
  margin: 28px 0 36px;
  font: 500 clamp(22px, 3vw, 30px)/1.25 var(--sans);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.holding footer {
  max-width: 44rem; width: 100%; margin: 0 auto; padding: 0 0 28px;
  font-size: 14px; color: var(--muted);
  display: flex; gap: 8px 20px; flex-wrap: wrap;
}
.holding footer a { color: var(--muted); }
.holding footer a:hover { color: var(--ink); }

/* ---------- privacy.html ---------- */

.legal { max-width: 40rem; margin: 0 auto; padding: 48px 24px 48px; line-height: 1.6; }
.legal .wm { font-size: 26px; }
.legal h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 32px 0 4px; }
.legal h2 { font-size: 1.15rem; margin: 32px 0 8px; }
.legal .meta { color: var(--muted); margin: 0 0 32px; }
@media (max-width: 480px) {
  .legal { padding-left: 16px; padding-right: 16px; }
  .holding { padding: 0 16px; }
}
