/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* librotenado website. Colours and type from the brand kit (librotenado/brand). Light and dark: the system setting,
   or the visitor's choice (data-theme on <html>, set by the switch in the header). */

@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("assets/fonts/AtkinsonHyperlegibleNext-Regular.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("assets/fonts/AtkinsonHyperlegibleNext-Italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("assets/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("assets/fonts/AtkinsonHyperlegibleMono-Regular.woff2") format("woff2"); }

:root {
  --bg: #FFFFFF;
  --surface: #F4F6FA;
  --text: #14213D;
  --muted: #4A5D70;
  --accent: #1F5FAD;
  --rule: #D5DCE5;
  --logo-ink: #14213D;
  --logo-accent: #1F5FAD;
  --logo-sub: #4A5D70;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1729; --surface: #14213D; --text: #E4E9F1; --muted: #A9B6C8; --accent: #7FB2F0; --rule: #26355A;
    --logo-ink: #F4F6FA; --logo-accent: #7FB2F0; --logo-sub: #A9B6C8;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0E1729; --surface: #14213D; --text: #E4E9F1; --muted: #A9B6C8; --accent: #7FB2F0; --rule: #26355A;
  --logo-ink: #F4F6FA; --logo-accent: #7FB2F0; --logo-sub: #A9B6C8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--sans); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--surface); padding: 1px 6px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* header */
header { border-bottom: 1px solid var(--rule); }
header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
header .home { display: block; line-height: 0; }
header .home svg { height: 42px; width: auto; }
nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--accent); }
/* colour scheme switch: system, light, dark – one click each */
.theme { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--rule); border-radius: 6px; }
.theme[hidden] { display: none; }
.theme button { appearance: none; display: grid; place-items: center; width: 30px; height: 28px; padding: 0; border: 0;
  border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { background: var(--surface); color: var(--accent); }
.theme button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* hero */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.hero .mark svg { width: 220px; height: 220px; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 40em; }
.tag { font-family: var(--mono); color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2em; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-block; padding: 11px 18px; border-radius: 6px; border: 1px solid var(--accent);
  text-decoration: none; font-weight: 600; }
.button.primary { background: var(--accent); color: var(--bg); }

/* sections */
section { padding: 64px 0; border-top: 1px solid var(--rule); }
section > .wrap > p { max-width: 46em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.cell { background: var(--surface); border-radius: 8px; padding: 20px 22px; }
.cell p { margin: 0; color: var(--muted); }
.cell h3 { margin-bottom: 0.4em; }

/* translations: formats around the model */
.formats { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; margin-top: 32px; }
.formats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.formats li { background: var(--surface); border-radius: 6px; padding: 8px 12px; font-size: 0.95rem; }
.formats li span { display: block; color: var(--muted); font-size: 0.82rem; }
.formats .core { text-align: center; padding: 24px 28px; border: 2px solid var(--accent); border-radius: 10px; }
.formats .core svg { width: 72px; height: 72px; display: block; margin: 0 auto 8px; }
.formats .core strong { display: block; }
.formats .core span { font-family: var(--mono); color: var(--muted); font-size: 0.82rem; }

/* status table */
table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; }
td.state { font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }
td.state.done { color: var(--accent); }
td.state.open { color: var(--muted); }

/* footer */
footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

.legal { padding: 64px 24px; }

@media (max-width: 760px) {
  header .wrap { flex-wrap: wrap; gap: 12px 16px; padding-top: 14px; padding-bottom: 14px; }
  header .home svg { height: 34px; }
  nav { margin-left: 0; order: 3; width: 100%; gap: 16px; }
  .theme { margin-left: auto; }
  .hero { padding: 48px 0; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .mark { display: none; }
  .formats { grid-template-columns: 1fr; }
  .formats .core { order: -1; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { border: none; padding: 2px 0; }
  tr { border-bottom: 1px solid var(--rule); padding: 10px 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
