@font-face { font-family: "Plex Sans"; src: url(assets/fonts/plex-sans-var.woff2) format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(assets/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(assets/fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
/* Dark is the default. app.js sets data-theme before first paint; without
   script the page follows the system. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F0D0A; --fg: #EBE6DC; --muted: #A69D8D; --faint: #918770;
  --hair: rgba(232,214,176,.085); --hair-soft: rgba(232,214,176,.045); --hair-strong: rgba(232,214,176,.16);
  --primary: #C3A56A; --striker: #5A4128;
  --box-top: #3A3328; --box-left: #1C1914; --box-right: #2A251D; --box-edge: rgba(232,214,176,.3); --tray: #15120E; --stick: #C9A877;
  --sans: "Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { color-scheme: light; --bg: #F5F1E7; --fg: #1C1813; --muted: #5F5A4C; --faint: #6C6352;
    --hair: rgba(120,96,44,.12); --hair-soft: rgba(120,96,44,.055); --hair-strong: rgba(120,96,44,.22); --primary: #9A7B3F; --striker: #8C6A43;
    --box-top: #EFE9DC; --box-left: #CFC6AF; --box-right: #DED6C3; --box-edge: rgba(120,96,44,.4); --tray: #C4BAA2; --stick: #B8925B; }
}
:root[data-theme="light"] { color-scheme: light; --bg: #F5F1E7; --fg: #1C1813; --muted: #5F5A4C; --faint: #6C6352;
  --hair: rgba(120,96,44,.12); --hair-soft: rgba(120,96,44,.055); --hair-strong: rgba(120,96,44,.22); --primary: #9A7B3F; --striker: #8C6A43;
  --box-top: #EFE9DC; --box-left: #CFC6AF; --box-right: #DED6C3; --box-edge: rgba(120,96,44,.4); --tray: #C4BAA2; --stick: #B8925B; }
body { transition: background-color 240ms ease-out, color 240ms ease-out; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/20px var(--sans); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; min-height: 100dvh; display: flex; flex-direction: column; }
@media (max-width: 640px) { .wrap { padding-inline: 16px; } }
header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 20px; border-bottom: 1px solid var(--hair-soft); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.brand .mark { width: 30px; height: auto; }
.mark .top { fill: var(--box-top); } .mark .left { fill: var(--box-left); } .mark .right { fill: var(--box-right); }
.mark .tray { fill: var(--tray); } .mark .strike { fill: var(--striker); stroke: none; }
.mark path { stroke: var(--box-edge); stroke-width: .6; stroke-linejoin: round; transition: fill 240ms ease-out; }
.mark .stick { stroke: var(--stick); stroke-width: 1.4; stroke-linecap: round; } .mark .head { fill: var(--primary); }
.brand b { font-weight: 600; letter-spacing: -.01em; }

/* The matchbox switch */
.match { border: 0; background: none; padding: 0; margin: -4px -6px; cursor: pointer; color: var(--faint); display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.match:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.match svg { overflow: visible; }
.match .sleeve { fill: var(--bg); stroke: currentColor; stroke-width: 2.5; transition: fill 240ms ease-out; }
.match .striker { stroke: none; }
.match .grit { fill: var(--striker); }
.match .drawer { transform-box: view-box; }
.match .drawer rect { fill: var(--bg); stroke: currentColor; stroke-width: 2; }
.match .m { transform-box: view-box; transform-origin: 0 0; }
.match .stick { stroke: #C9A877; stroke-width: 3; stroke-linecap: round; }
.match .head { fill: #9E3B24; }
.match .flame { transform-box: fill-box; transform-origin: 0% 50%; }
.match .fire { fill: #E8822E; }
.match .core { fill: #FFD27A; }
.match .lit .fire, .match .lit .core { animation: flicker 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 50%; }
.match .lit .core { animation-duration: 1.1s; }
@keyframes flicker { 0%,100% { transform: scale(1,1) } 25% { transform: scale(1.06,.92) } 50% { transform: scale(.95,1.06) } 75% { transform: scale(1.04,.96) } }
.match .halo { opacity: 0; transition: opacity 240ms ease-out; }
.match .lit .halo { opacity: 1; animation: halo 1.6s ease-in-out infinite; }
@keyframes halo { 50% { opacity: .75 } }
.match .glow-in { stop-color: #E8822E; stop-opacity: .45; }
.match .glow-out { stop-color: #E8822E; stop-opacity: 0; }
.match .spark { opacity: 0; transform-box: fill-box; transform-origin: center; stroke: #FFD27A; stroke-width: 1.6; stroke-linecap: round; }
.match .smoke { opacity: 0; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; transform-box: fill-box; }
.match:hover .sleeve { stroke: var(--primary); }
main { flex: 1; display: grid; align-content: center; gap: 20px; padding-block: 64px; max-width: 980px; }
.micro { font: 500 11px/16px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.micro.lead { color: var(--primary); }
h1 { margin: 0; font-size: clamp(40px, 6vw, 66px); line-height: 1.05; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.sub { margin: 0; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.35; color: var(--muted); max-width: 46ch; }
.motto { margin: 12px 0 0; color: var(--muted); font-style: italic; }
a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 4px; transition: text-decoration-color 180ms ease-out; }
a:hover { text-decoration-color: var(--primary); }
.go { display: inline-flex; gap: 8px; align-items: baseline; text-decoration: none; justify-self: start; }
.go b { font-weight: 500; text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 4px; transition: text-decoration-color 180ms ease-out; }
.go:hover b { text-decoration-color: var(--primary); }
.go span { color: var(--faint); transition: transform 180ms ease-out, color 180ms ease-out; }
.go:hover span { transform: translateX(3px); color: var(--primary); }
footer { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--hair-soft); color: var(--faint); font-size: 12px; line-height: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
footer a { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
