/* Ajar's pages. Paper and ink, one vermilion mark, the sign's own face.
   Tokens follow app/DESIGN.md; light is the panel, dark is the panel inverted. */

@font-face {
  font-family: "Ajar Panel";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/AjarPanel-400.ttf") format("truetype");
}
@font-face {
  font-family: "Ajar Panel";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/AjarPanel-500.ttf") format("truetype");
}

:root {
  --paper: #F2F1EC;
  --ink: #161616;
  --ink-soft: #67655F;
  --rule: #C9C7C0;
  --surface: #E9E8E2;
  --accent: #C8321E;
  --on-accent: #F2F1EC;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141414;
    --ink: #ECEAE4;
    --ink-soft: #9A988F;
    --rule: #3A3A38;
    --surface: #1E1E1D;
    --accent: #E2543F;
    --on-accent: #141414;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 "Ajar Panel", "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font: 15px/1.5 "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface); padding: 1px 6px; border-radius: 6px; }

header, main, footer { max-width: 680px; margin: 0 auto; padding: 0 24px; }

header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; padding-bottom: 24px;
}
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 500; font-size: 22px; letter-spacing: -0.01em; }
.mark img { width: 17px; height: 28px; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--ink-soft); font-size: 17px; padding: 8px 0; }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); border-bottom: 1.5px solid var(--ink); }

main { padding-top: 40px; padding-bottom: 64px; }
h1 { font-weight: 500; font-size: 40px; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 16px; }
h2 { font-weight: 500; font-size: 24px; line-height: 1.3; margin: 40px 0 8px; }
h3 { font-weight: 500; font-size: 19px; line-height: 1.4; margin: 24px 0 4px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 22px; }
.lead { font-size: 21px; line-height: 1.5; color: var(--ink); max-width: 36ch; }
.muted { color: var(--ink-soft); }
small, .caption { font-size: 15px; color: var(--ink-soft); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }

/* The eight words, laid out as the app's tiles. Static here: the words are the product. */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 24px 0; padding: 0; list-style: none; }
.tiles li {
  margin: 0; min-height: 64px; padding: 16px;
  border: 1.5px solid var(--ink-soft); border-radius: 14px;
  display: flex; align-items: center; font-size: 19px;
}
.tiles li.live { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }

/* The sign, as a card: the panel's 800 x 480 layout scaled to the column. */
.sign {
  position: relative; aspect-ratio: 5 / 3; width: 100%;
  border: 1.5px solid var(--ink-soft); border-radius: 14px; overflow: hidden;
  background: #F2F1EC; color: #161616;
  padding: 6% 7%;
  display: flex; flex-direction: column; justify-content: center;
}
.sign.ink { background: #161616; color: #F2F1EC; border-color: var(--ink-soft); }
.sign .owner { font-size: clamp(14px, 3vw, 20px); position: absolute; top: 6%; left: 7%; opacity: .85; }
.sign .word { font-weight: 500; font-size: clamp(34px, 12vw, 84px); line-height: 1.05; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.sign .note { font-size: clamp(16px, 4.2vw, 30px); margin: 0.35em 0 0; }
.sign .since { font-size: clamp(12px, 2.6vw, 18px); opacity: .7; margin: 0.6em 0 0; }
.sign .slit { position: absolute; left: 0; top: 0; width: 1.6%; height: 100%; background: var(--accent); }

footer {
  padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 20px;
}
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  a, nav a { transition: color 120ms ease-out; }
}
