/* 0x90.ch: one stylesheet for every page. No external fonts, no images, no scripts.
   Theme: dark by default, light via prefers-color-scheme. Motion is off under prefers-reduced-motion. */

:root {
  color-scheme: dark light;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #0a0614;
  --ink: #ede6f5;
  --dim: #a99bc0;
  --pink: #ff2e88;
  --teal: #35d6d0;
  --edge: #6a55a0;
  --edge-soft: #3a2d6b;
  --on-accent: #0a0614;
  --glow-pink: rgba(255, 46, 136, 0.16);
  --glow-teal: rgba(53, 214, 208, 0.12);
  --sun-a: rgba(255, 46, 136, 0.34);
  --sun-b: rgba(255, 46, 136, 0.26);
  --sun-c: rgba(155, 61, 191, 0.3);
  --sun-glow: rgba(255, 46, 136, 0.22);
  --grid-a: rgba(53, 214, 208, 0.6);
  --grid-b: rgba(255, 46, 136, 0.55);
  --bar-a: #ff2e88;
  --bar-b: #35d6d0;
  --g1: #ff2e88;
  --g2: #b86cd8;
  --g3: #35d6d0;
  --l1: #8c66c8;
  --l2: #7a5cb8;
  --l3: #5b4799;
  --l4: #44357a;
  --l5: #31265d;
  --card-glow: rgba(255, 46, 136, 0.14);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f3fb;
    --ink: #251c3a;
    --dim: #5b5075;
    --pink: #b0105a;
    --teal: #0a6f6c;
    --edge: #8a78b8;
    --edge-soft: #c9bde3;
    --on-accent: #1a1030;
    --glow-pink: rgba(255, 46, 136, 0.12);
    --glow-teal: rgba(53, 214, 208, 0.16);
    --sun-a: rgba(255, 46, 136, 0.3);
    --sun-b: rgba(255, 46, 136, 0.22);
    --sun-c: rgba(155, 61, 191, 0.26);
    --sun-glow: rgba(255, 46, 136, 0.18);
    --grid-a: rgba(10, 111, 108, 0.55);
    --grid-b: rgba(176, 16, 90, 0.4);
    --bar-a: #ff7ab3;
    --bar-b: #6fe6df;
    --g1: #d81b73;
    --g2: #7a4fc4;
    --g3: #0e8e8a;
    --l1: #8f5fd0;
    --l2: #a37ad8;
    --l3: #b693e0;
    --l4: #c8aee9;
    --l5: #dacbf1;
    --card-glow: rgba(176, 16, 90, 0.12);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.75;
  font-variant-ligatures: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex-grow: 1; width: 100%; }

a { color: var(--teal); text-underline-offset: 5px; }
a:hover { background: var(--teal); color: var(--bg); text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

h1, h2, h3, p, ul, ol { margin: 0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.narrow { max-width: 920px; }

/* gradient text with a plain-colour fallback */
.grad { color: var(--ink); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: linear-gradient(100deg, var(--g1), var(--g2), var(--g3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---------- panes (TUI boxes) ---------- */
.pane {
  position: relative;
  border: 1px solid var(--edge);
  padding: 44px clamp(24px, 5vw, 40px) 36px;
  min-width: 0;
}
.pane > .lab {
  position: absolute;
  top: -0.85em;
  left: 20px;
  background: var(--bg);
  padding: 0 10px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
}
.pane p, .pane li { max-width: 62ch; }
.pane--featured { border-color: var(--pink); box-shadow: 0 0 40px var(--card-glow); }
.pane--featured > .lab { color: var(--pink); }
.pane--ghost { border-style: dashed; border-color: var(--edge-soft); color: var(--dim); }
.pane--ghost > .lab { color: var(--dim); }

/* ---------- home: hero ---------- */
.hero { position: relative; height: clamp(380px, 43vw, 560px); overflow: hidden; }

.sun {
  position: absolute;
  left: 50%;
  top: 30px;
  width: clamp(240px, 30vw, 380px);
  height: clamp(240px, 30vw, 380px);
  transform: translateX(-50%);
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sun-a) 0%, var(--sun-b) 40%, var(--sun-c) 100%);
  box-shadow: 0 0 140px var(--sun-glow);
}
.sun::after {
  content: "";
  position: absolute;
  inset: 52% 0 0 0;
  background: repeating-linear-gradient(180deg, transparent 0 16px, var(--bg) 16px 24px);
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 230px;
  overflow: hidden;
  perspective: 320px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 48%, transparent 72%);
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 48%, transparent 72%);
}
.grid {
  position: absolute;
  left: -60%;
  width: 220%;
  top: 0;
  height: 420px;
  transform-origin: 50% 0;
  transform: rotateX(68deg);
  background-image:
    linear-gradient(var(--grid-a) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid-b) 2px, transparent 2px);
  background-size: 80px 80px, 80px 80px;
  animation: fly 2.4s linear infinite;
}
@keyframes fly { from { background-position: 0 0, 0 0; } to { background-position: 0 80px, 0 0; } }

.stage {
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(70px, 9.4vw, 120px);
  display: flex;
  justify-content: center;
  perspective: 1200px;
}
.slab {
  position: relative;
  width: max-content;
  transform-style: preserve-3d;
  transform: rotateY(-14deg) rotateX(6deg);
  animation: sway 10s ease-in-out infinite;
}
.slab pre {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(11px, 4.2vw, 26px);
  line-height: 1.12;
  font-weight: 700;
  white-space: pre;
}
.slab .back { position: absolute; left: 0; top: 0; }
.slab .l1 { color: var(--l1); transform: translateZ(-6px); }
.slab .l2 { color: var(--l2); transform: translateZ(-12px); }
.slab .l3 { color: var(--l3); transform: translateZ(-18px); }
.slab .l4 { color: var(--l4); transform: translateZ(-24px); }
.slab .l5 { color: var(--l5); transform: translateZ(-30px); }
.slab .front {
  color: var(--ink);
  filter: drop-shadow(0 0 12px var(--sun-glow));
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .slab .front {
    background: linear-gradient(100deg, var(--g1), var(--g2), var(--g3), var(--g2), var(--g1));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 7s linear infinite;
  }
}
@keyframes sway {
  0%, 100% { transform: rotateY(-26deg) rotateX(9deg); }
  50% { transform: rotateY(26deg) rotateX(-3deg); }
}
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 200% 0; } }

/* ---------- home: content ---------- */
.stack { display: flex; flex-direction: column; gap: 80px; padding-bottom: 96px; }
.intro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.intro h1 { font-size: clamp(24px, 6.2vw, 34px); font-weight: 700; line-height: 1.25; max-width: 18em; }
.intro p { color: var(--dim); max-width: 34em; }

.eyebrow { font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.apps { display: flex; flex-direction: column; gap: 32px; }
.cards { display: flex; flex-wrap: wrap; gap: 40px; }
.card { flex: 1 1 280px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 26px; line-height: 1.3; }
.card .tag { color: var(--pink); font-weight: 700; }
.card .state { color: var(--teal); font-weight: 700; }
.card .links { margin-top: 16px; font-size: 15px; display: flex; gap: 24px; }
.card--empty { align-items: center; justify-content: center; text-align: center; min-height: 220px; }

.info { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: 40px; }
.info h2 { margin-bottom: 8px; color: var(--teal); font-size: 14px; letter-spacing: 0.1em; font-weight: 400; }
.info .grow { flex: 1 1 260px; }

/* ---------- subpages ---------- */
.page { display: flex; flex-direction: column; gap: 64px; padding-top: 56px; padding-bottom: 96px; }
.crumb { font-size: 15px; color: var(--dim); }
.crumb a { font-weight: 700; }
.page-head { display: flex; flex-direction: column; gap: 20px; }
.page-head h1 { font-size: clamp(30px, 6.5vw, 44px); line-height: 1.15; font-weight: 700; }
.page-head p { color: var(--dim); max-width: 40em; }
.jump { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }

.pane h2.title { font-size: 28px; line-height: 1.3; margin-bottom: 8px; }
.pane h3 { font-size: 17px; color: var(--teal); margin-bottom: 4px; }
.pane .lead { color: var(--pink); font-weight: 700; margin-bottom: 24px; }
.pane ul { padding-left: 22px; display: flex; flex-direction: column; gap: 16px; }
.pane h3 + p { margin-bottom: 24px; }
.pane h3 + p:last-child { margin-bottom: 0; }
.note { border: 1px dashed var(--pink); padding: 20px 24px; font-size: 16px; }

.mail { font-size: clamp(20px, 5vw, 28px); font-weight: 700; overflow-wrap: anywhere; }
.faq { display: flex; flex-direction: column; gap: 24px; }
.faq h2 { font-size: 28px; line-height: 1.3; }
.faq .num { display: block; color: var(--dim); font-size: 14px; letter-spacing: 0.1em; }
details { border: 1px solid var(--edge); padding: 18px 24px; }
details[open] { border-color: var(--teal); }
summary { cursor: pointer; font-weight: 700; list-style: none; min-height: 28px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; color: var(--teal); }
details[open] summary::before { content: "- "; }
details p, details ol { margin: 14px 0 0; max-width: 62ch; }
details ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- status bar (footer / nav) ---------- */
.status {
  background: linear-gradient(100deg, var(--bar-a), var(--bar-b));
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
}
.status .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: baseline;
  padding-top: 10px;
  padding-bottom: 10px;
}
.status nav { display: contents; }
.status a { color: var(--on-accent); }
.status a:hover { background: var(--on-accent); color: var(--bg); }
.status a:focus-visible { outline-color: var(--on-accent); }
.status a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.status .mail-link { flex-grow: 1; text-align: right; }

/* ---------- glow behind subpage headers ---------- */
.glow-pink { background-image: radial-gradient(ellipse 700px 320px at 50% 0%, var(--glow-pink), transparent 70%); background-repeat: no-repeat; }
.glow-teal { background-image: radial-gradient(ellipse 700px 320px at 50% 0%, var(--glow-teal), transparent 70%); background-repeat: no-repeat; }

@media (prefers-reduced-motion: reduce) {
  .slab, .slab .front, .grid { animation: none; }
}
