/* Based Agent: design tokens and base rules.
   Fonts are self-hosted subsets (latin). No CDN. */

@font-face {
  font-family: "BAGENT Han";
  src: url("assets/fonts/bagent-han-display.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Creepster";
  src: url("assets/fonts/bagent-display-creepster.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/bagent-text-inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/bagent-text-inter-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/bagent-text-inter-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("assets/fonts/bagent-mono-spacemono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --board: #0A0A0B;
  --panel: #131315;
  --bone: #F2EFE6;
  --muted: #9C978A;
  --line: #26262A;
  --amber: #FFB000;

  --font-board: "Creepster", "BAGENT Han", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-text: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", "DejaVu Sans Mono", monospace;

  --row-pad: 14px;
  --tap-min: 48px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

body {
  font-synthesis: none;
  margin: 0;
  background: var(--board);
  color: var(--bone);
  font-family: var(--font-text);
  line-height: 1.5;
}

/* Every enabled control shows it can be used. */
a, button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* Motion on this site, per the operator's direction of 2026-11-03:
   feedback for real changes, a living mascot, gentle reveals. Loops are
   limited to the mascot bob and the current phase marker. Reduced
   motion turns everything off entirely. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Shared chrome: layout, header, nav, footer ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 64px; }

header.site { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; border-bottom: 2px solid var(--line); padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { display: block; width: 52px; height: 52px; }
.mascot { animation: bob 3.6s ease-in-out infinite; transition: transform 0.25s ease; }
.mascot:hover { transform: rotate(-5deg) scale(1.06); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.brand .name { font-family: var(--font-board); font-weight: 800; font-size: 34px; letter-spacing: 0.5px; text-transform: uppercase; line-height: 1.05; }
.brand .name span { color: var(--muted); font-weight: 700; }
.flap { background: var(--amber); color: var(--board); font-family: var(--font-board); font-weight: 700; font-size: 19px; letter-spacing: 1px; padding: 8px 14px; text-transform: uppercase; transform-origin: top center; }
.flap.flip { animation: flipIn 0.45s ease; }
@keyframes flipIn { 0% { transform: rotateX(80deg); opacity: 0.4; } 100% { transform: rotateX(0); opacity: 1; } }

nav { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 13px 6px; display: inline-block; border-bottom: 2px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
nav a:hover { color: var(--bone); border-bottom-color: var(--muted); }
nav a.active { color: var(--bone); border-bottom-color: var(--bone); }
nav a.nav-social { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--bone); font-weight: 700; }
nav a.nav-social svg { display: block; transition: transform 0.2s ease; }
nav a.nav-social:hover { border-bottom-color: var(--bone); }
nav a.nav-social:hover svg { transform: scale(1.2) rotate(-4deg); }

h1 { font-family: var(--font-board); font-weight: 800; font-size: 38px; line-height: 1.12; margin: 34px 0 8px; max-width: 22ch; }
h2 { font-family: var(--font-board); text-transform: uppercase; font-size: 24px; letter-spacing: 1px; margin: 42px 0 6px; }
.lead { color: var(--muted); font-size: 17px; max-width: 68ch; margin: 0 0 6px; }
.lead strong { color: var(--bone); }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
td.phase { font-family: var(--font-board); font-weight: 700; text-transform: uppercase; white-space: nowrap; }
td.status { font-family: var(--font-board); font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.phase-live { border: 2px solid var(--bone); color: var(--bone); padding: 1px 7px; }
.pulsing { animation: softPulse 2.4s ease-in-out infinite; }
@keyframes softPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.mono { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
td.addr { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.empty { color: var(--muted); padding: 14px 4px; border-bottom: 2px solid var(--line); }

footer { border-top: 2px solid var(--line); margin-top: 48px; padding-top: 18px; color: var(--muted); font-size: 14px; }
footer a { color: var(--bone); }
footer a:hover { text-decoration: underline; }

button { transition: background 0.15s ease, transform 0.1s ease; }
button:active { transform: translateY(1px); }

/* Scroll reveal: armed by JS only, so content is never hidden without it. */
html.armed .reveal { opacity: 0; transform: translateY(10px); }
html.armed .reveal.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }

@media (max-width: 640px) {
  .brand .name { font-size: 26px; }
  h1 { font-size: 30px; }
  td.phase, td.status { white-space: normal; }
}
