/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* spezado – one page. Colours from spezado/brand/generate.py: deep-sea petrol and copper bronze as equals, paper in
   light mode, night in dark mode. Light or dark follows the system unless the visitor picks one (theme.js sets
   data-theme on <html>). Headings in Domitian (bundled, OFL-1.1), body text in the system font – nothing is loaded
   from elsewhere. */

@font-face { font-family: "Domitian"; src: url("assets/fonts/Domitian-Roman.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Domitian"; src: url("assets/fonts/Domitian-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Domitian"; src: url("assets/fonts/Domitian-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #F4EEE8;        /* paper */
  --surface: #FFFFFF;
  --text: #0A2C33;      /* ink */
  --muted: #4E6266;
  --accent: #985A34;    /* copper bronze */
  --on-accent: #F4EEE8;
  --line: rgba(10, 44, 51, 0.14);
  --serif: "Domitian", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* dark: chosen by the visitor, or by the system when nothing is chosen (the two blocks must stay the same) */
:root[data-theme="dark"] {
  --bg: #071F25;      /* night */
  --surface: #0D2A31;
  --text: #F4EEE8;
  --muted: #9FB2B4;
  --accent: #D59A70;  /* copper bronze light */
  --on-accent: #071F25;
  --line: rgba(244, 238, 232, 0.14);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071F25;
    --surface: #0D2A31;
    --text: #F4EEE8;
    --muted: #9FB2B4;
    --accent: #D59A70;
    --on-accent: #071F25;
    --line: rgba(244, 238, 232, 0.14);
    color-scheme: dark;
  }
}

/* artwork for light and dark – one of each pair is shown */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark { display: inline; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* header */
header { padding: 20px 0; border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
header .home { display: block; line-height: 0; }
header .home img { height: 44px; width: auto; }
header .right { display: flex; align-items: center; gap: 28px; }
nav { display: flex; gap: 26px; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }

/* theme switch: system, light, dark */
.theme { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.theme[hidden] { display: none; }
.theme button { appearance: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 0 0 1px var(--line); }
.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: 88px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: center; }
.kicker { font: italic 400 22px/1.3 var(--serif); color: var(--accent); margin: 0 0 14px; }
.hero h1 { font: 700 clamp(40px, 6vw, 68px)/1.08 var(--serif); margin: 0 0 26px; letter-spacing: -0.01em; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 0 32px; max-width: 34em; }
.hero p strong { color: var(--text); }
.hero .mark { justify-self: center; }
.hero .mark img { width: 100%; max-width: 300px; height: auto; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-block; padding: 11px 20px; border: 1px solid var(--line); border-radius: 6px; font: 600 15px var(--sans); color: var(--text); background: var(--surface); text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button:hover { border-color: var(--accent); }

/* sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
section h2 { font: 700 34px/1.2 var(--serif); margin: 0 0 18px; }
.lead { color: var(--muted); max-width: 44em; margin: 0 0 32px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.cell h3 { margin: 0 0 8px; font: 700 21px/1.25 var(--serif); }
.cell p { margin: 0; color: var(--muted); font-size: 16px; }

/* state */
.steps { list-style: none; margin: 0 0 20px; padding: 0; border-left: 2px solid var(--line); }
.steps li { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0 12px 26px; }
.steps li::before { content: ""; position: absolute; left: -7px; top: 21px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.steps li.now::before { background: var(--accent); border-color: var(--accent); }
.steps .name { font: 700 19px var(--serif); }
.steps .what { color: var(--muted); }
.note { color: var(--muted); font-size: 15px; margin: 0; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* 404 */
.page { padding-top: 56px; padding-bottom: 80px; }
.page > * { max-width: 760px; }
.page h1 { font: 700 40px var(--serif); margin: 0 0 20px; }
.page p { color: var(--muted); }

@media (max-width: 760px) {
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero .mark { order: -1; justify-self: start; }
  .hero .mark img { max-width: 120px; }
  nav { display: none; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 1fr; gap: 2px; }
}
