/* Glyphsmith site styles. One stylesheet for every page; colours come from the tokens below.
   Dark by default, light when the visitor's system asks for it. All text pairs pass WCAG AA (4.5:1). */
:root {
  --bg: #0f1117;        /* ink */
  --surface: #171a23;
  --raised: #1f2330;
  --border: #2c3242;    /* decorative only, never the sole cue */
  --text: #e6e8ef;
  --muted: #9aa1b3;
  --accent: #5ee0c8;    /* glass teal */
  --accent-ink: #0f1117;/* text on accent buttons */
  --amber: #f0b45a;     /* lead came, used sparingly for highlights */
  --glow: rgba(94, 224, 200, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --space: 8px;          /* spacing scale: multiples of 8 */
  --max: 1120px;
  --font: "Inter", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, "DejaVu Sans Mono", monospace;
  color-scheme: dark light;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f2; --surface: #ffffff; --raised: #eeece6; --border: #d6d3cb;
    --text: #1a1d26; --muted: #5a6070; --accent: #0a7060; --accent-ink: #ffffff;
    --amber: #9a5a00; --glow: rgba(10, 112, 96, 0.14);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font); text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 calc(var(--space) * 2); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 calc(var(--space) * 2); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

.wrap { width: min(100% - calc(var(--space) * 6), var(--max)); margin-inline: auto; }
section { padding-block: calc(var(--space) * 10); }
section + section { border-top: 1px solid var(--border); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: calc(var(--space) * 2); top: calc(var(--space) * 2); background: var(--surface); padding: var(--space) calc(var(--space) * 2); z-index: 10; }

/* header and nav */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--space) * 3); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--space); font-weight: 750; color: var(--text); text-decoration: none; letter-spacing: 0.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--amber)); }
.nav { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 3); list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* hero */
.hero { padding-block: calc(var(--space) * 14) calc(var(--space) * 10); background: radial-gradient(60% 50% at 70% 0%, var(--glow), transparent 70%); }
.hero h1 { max-width: 18ch; }
.eyebrow { display: inline-block; font: 600 0.8rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--amber); margin-bottom: calc(var(--space) * 2); }
.actions { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 2); margin-top: calc(var(--space) * 4); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: var(--space); padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 650; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: 0 0 0 4px var(--glow); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

/* cards and grids */
.grid { display: grid; gap: calc(var(--space) * 3); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: calc(var(--space) * 3); display: flex; flex-direction: column; gap: calc(var(--space) * 1.5); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .shot { border-radius: var(--radius-sm); border: 1px solid var(--border); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--raised); }
.card .more { margin-top: auto; font-weight: 600; }
.tag { align-self: flex-start; display: inline-block; font: 600 0.75rem/1 var(--mono); padding: 6px 8px; border-radius: 6px; background: var(--raised); color: var(--muted); }
.tag-live { color: var(--accent); }
.tag-soon { color: var(--amber); }

/* palette swatch strip, for theme pages */
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.swatches li { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--c); }

/* figures */
.figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--raised); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .6); }
.figure figcaption { padding: var(--space) calc(var(--space) * 2); font-size: .9rem; color: var(--muted); }

/* code */
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
:not(pre) > code { background: var(--raised); padding: 2px 6px; border-radius: 5px; }
pre { margin: 0 0 calc(var(--space) * 4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: calc(var(--space) * 2); overflow-x: auto; line-height: 1.5; }
.install { position: relative; }
.install pre { padding-right: 88px; }
.install button { position: absolute; top: 10px; right: 10px; font: 600 .8rem var(--font); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--raised); color: var(--text); cursor: pointer; }
.install button:hover { border-color: var(--accent); }

/* feature list */
.features { display: grid; gap: calc(var(--space) * 2); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; padding: 0; margin: 0; }
.features li { padding-left: calc(var(--space) * 3); position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }

/* coming-soon notice */
.notice { border: 1px dashed var(--amber); border-radius: var(--radius); padding: calc(var(--space) * 3); background: color-mix(in srgb, var(--amber) 8%, var(--surface)); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding-block: calc(var(--space) * 5); color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: calc(var(--space) * 2); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding-block: calc(var(--space) * 7); }
  .hero { padding-block: calc(var(--space) * 9) calc(var(--space) * 6); }
  .site-header .wrap { flex-direction: column; align-items: flex-start; padding-block: var(--space); gap: var(--space); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
