@font-face { font-family: "Archivo Black"; src: url("../fonts/ArchivoBlack.ttf") format("truetype"); font-weight: 400; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-500.ttf") format("truetype"); font-weight: 500; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-700.ttf") format("truetype"); font-weight: 700; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono.ttf") format("truetype"); font-weight: 400; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-Bold.ttf") format("truetype"); font-weight: 700; }

:root {
  --paper: #f4efe6;
  --paper2: #ede6d8;
  --ink: #14161a;
  --cobalt: #2438ff;
  --faint: #5a5c62;
  --grid: rgba(36, 56, 255, 0.07);
  --line: #14161a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Space Grotesk", sans-serif;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px, 42px 42px, auto;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: "Space Mono", monospace; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* header: plate frame bar */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--line);
}
header.site .bar {
  display: flex; align-items: center; gap: 14px;
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
}
header.site img.mark { width: 42px; height: 42px; display: block; }
header.site .word { font-family: "Archivo Black", sans-serif; font-size: 19px; letter-spacing: 0.5px; color: var(--ink); }
header.site nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
header.site nav a {
  font-family: "Space Mono", monospace; font-size: 13px; font-weight: 700;
  color: var(--ink); text-transform: uppercase; letter-spacing: 0.5px;
}
header.site nav a:hover { color: var(--cobalt); text-decoration: none; }
header.site .xchip {
  margin-left: 14px; display: inline-flex; align-items: center; gap: 9px;
  border: 2px solid var(--line); padding: 0 13px 0 6px; height: 42px;
  font-family: "Space Mono", monospace; font-weight: 700; font-size: 13px;
  color: var(--ink); background: var(--paper); white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
header.site .xchip .xbox {
  background: var(--ink); color: var(--paper); font-family: "Archivo Black", sans-serif;
  font-size: 14px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
header.site .xchip:hover { text-decoration: none; border-color: var(--cobalt); color: var(--cobalt); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
header.site .xchip:hover .xbox { background: var(--cobalt); }
@media (max-width: 720px) {
  header.site .bar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; column-gap: 10px; row-gap: 10px; padding: 10px 14px;
  }
  header.site .bar > a:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
  header.site img.mark { width: 36px; height: 36px; flex: none; }
  header.site .word { font-size: 16px; letter-spacing: 0; white-space: nowrap; }
  header.site .xchip { grid-column: 2; grid-row: 1; margin-left: 0; font-size: 12px; height: 36px; padding: 0 11px 0 5px; }
  header.site .xchip .xbox { width: 24px; height: 24px; font-size: 12px; }
  header.site nav {
    grid-column: 1 / -1; grid-row: 2; width: 100%; margin-left: 0; flex-wrap: nowrap;
    overflow-x: auto; gap: 18px; padding-bottom: 4px; scrollbar-width: none;
  }
  header.site nav::-webkit-scrollbar { display: none; }
  header.site nav a { font-size: 12px; white-space: nowrap; }
}
@media (max-width: 470px) {
  header.site .word { font-size: 15px; }
  header.site .xchip { font-size: 11px; }
}
@media (max-width: 380px) {
  header.site .xchip { padding: 0 5px; }
  header.site .xchip .xhandle { display: none; }
}

/* generic plate panel */
.plate { border: 3px solid var(--line); background: var(--paper); }
.plate .cap {
  font-family: "Space Mono", monospace; font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--faint);
}
h1.display, h2.display {
  font-family: "Archivo Black", sans-serif; line-height: 1.02;
  text-transform: uppercase; letter-spacing: 0.2px;
}
h1.display { font-size: clamp(40px, 8vw, 84px); }
h2.display { font-size: clamp(28px, 5vw, 46px); margin-bottom: 14px; }
.blue { color: var(--cobalt); }
section.block { padding: 56px 0 8px; }
section.block p { max-width: 720px; margin-bottom: 12px; font-size: 17px; }
table.spec { width: 100%; border-collapse: collapse; margin: 18px 0 8px; font-size: 15px; }
table.spec th, table.spec td { border: 2px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.spec th { font-family: "Space Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; background: var(--paper2); }
ul.rules { margin: 10px 0 10px 22px; }
ul.rules li { margin-bottom: 8px; max-width: 720px; }
.btn {
  display: inline-block; font-family: "Space Mono", monospace; font-weight: 700;
  font-size: 14px; letter-spacing: 0.5px; padding: 12px 22px;
  border: 3px solid var(--line); color: var(--ink); background: var(--paper);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.blue { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chip {
  display: inline-block; font-family: "Space Mono", monospace; font-size: 12px; font-weight: 700;
  border: 2px solid var(--line); padding: 5px 12px; letter-spacing: 0.5px; text-transform: uppercase;
}
.chip.blue { border-color: var(--cobalt); color: var(--cobalt); }

/* footer: ink plate, mobile first */
footer.site { margin-top: 72px; background: var(--ink); color: var(--paper); overflow: hidden; }
footer.site .ftop {
  max-width: 1180px; margin: 0 auto; padding: 24px 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: #9aa0aa;
}
footer.site .ftop a { color: var(--paper); font-weight: 700; border: 2px solid rgba(244, 239, 230, 0.5); padding: 6px 12px; }
footer.site .ftop a:hover { color: #aab4ff; border-color: #aab4ff; text-decoration: none; }
footer.site .fmark {
  font-family: "Archivo Black", sans-serif; line-height: 0.95; white-space: nowrap;
  font-size: 13.2vw; color: transparent; -webkit-text-stroke: 2px rgba(244, 239, 230, 0.32);
  max-width: 1180px; margin: 8px auto 0; padding: 0 20px; user-select: none;
}
@media (min-width: 1180px) { footer.site .fmark { font-size: 124px; } }
footer.site .cols {
  max-width: 1180px; margin: 24px auto 0; padding: 28px 20px 26px;
  border-top: 1px dashed rgba(244, 239, 230, 0.3);
  display: grid; grid-template-columns: 1fr; gap: 30px;
}
footer.site h4 { font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #9aa0aa; margin-bottom: 6px; }
footer.site .cols a {
  color: var(--paper); display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 16px; border-bottom: 1px solid rgba(244, 239, 230, 0.13);
}
footer.site .cols a::before { content: ""; width: 7px; height: 7px; flex: none; background: rgba(244, 239, 230, 0.4); transition: background 0.15s ease; }
footer.site .cols a:hover { color: #aab4ff; text-decoration: none; }
footer.site .cols a:hover::before { background: var(--cobalt); }
footer.site .brand { font-family: "Archivo Black", sans-serif; font-size: 22px; margin-bottom: 10px; }
footer.site .fine { max-width: 1180px; margin: 0 auto; padding: 4px 20px 30px; font-family: "Space Mono", monospace; font-size: 12px; color: #9aa0aa; line-height: 1.7; }
@media (min-width: 821px) {
  footer.site .cols { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
  footer.site .cols a { padding: 6px 0; font-size: 15px; border-bottom: none; }
}

/* ---- mobile-first hardening + smooth motion, every page ---- */
html { scroll-behavior: smooth; }
.mono { overflow-wrap: anywhere; }
table.spec td, table.spec th, table.spec td a { overflow-wrap: anywhere; }
main.wrap { animation: pagein .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes pagein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1); }
.rv.in { opacity: 1; transform: none; }
a, .btn { transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .15s ease; }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  section.block { padding-top: 36px; }
  table.spec { font-size: 14px; }
  table.spec th, table.spec td { padding: 8px 9px; }
  table.spec th { font-size: 11px; letter-spacing: 0.6px; }
  h1.display { font-size: clamp(34px, 11vw, 84px); }
  h2.display { font-size: clamp(24px, 7.5vw, 46px); }
  ul.rules { margin-left: 18px; }
  p, li { overflow-wrap: break-word; }
}
/* ---- smooth v6: easing system, entrances, micro-interactions ---- */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }
::selection { background: var(--cobalt); color: var(--paper); }
* { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
header.site { animation: pagein .6s var(--ease) both; }
footer.site { animation: pagein .6s var(--ease) .08s both; }
.rv { transition: opacity .9s var(--ease), transform .9s var(--ease); }
a, .btn { transition: color .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease); }
.btn:active { transform: scale(.97); }
header.site nav a { position: relative; padding-bottom: 3px; }
header.site nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--cobalt); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
header.site nav a:hover::after { transform: scaleX(1); }
header.site .xchip { transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease); }
footer.site .cols a { transition: color .3s var(--ease), transform .3s var(--ease); }
footer.site .cols a:hover { transform: translateX(3px); }
footer.site .cols a:hover::before { background: var(--cobalt); }
table.spec tr { transition: background-color .25s var(--ease); }
table.spec tbody tr:hover { background: rgba(36, 56, 255, 0.045); }
img { transition: opacity .4s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  main.wrap, header.site, footer.site { animation: none; }
  header.site nav a::after { transition: none; }
}
