/* Grimoire's website: the same midnight library as the app (deep violet inks and gold foil, vellum by day, Fraunces and Figtree). */
@font-face { font-family: 'Fraunces Variable'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations'); }
@font-face { font-family: 'Fraunces Variable'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('fonts/fraunces-latin-wght-italic.woff2') format('woff2-variations'); }
@font-face { font-family: 'Figtree Variable'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('fonts/figtree-latin-wght-normal.woff2') format('woff2-variations'); }

:root {
  color-scheme: dark;
  --display: 'Fraunces Variable', Fraunces, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --body: 'Figtree Variable', Figtree, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --bg: #0e0c1c; --panel: #17142e; --raised: #221e42; --sunken: #0a0814; --line: #2b2650; --line-strong: #413b72;
  --ink: #ede8f8; --ink2: #c5bedd; --muted: #988fb8; --accent: #e4b95a; --accent-hi: #f6d78e; --accent-text: #f6d78e; --accent-ink: #1b1306; --accent-soft: rgba(228, 185, 90, .13); --accent-line: rgba(228, 185, 90, .42);
  --wm-a: #fff3c9; --wm-b: #dcae4c;
  --glow-a: rgba(122, 102, 240, .18); --glow-b: rgba(111, 220, 185, .05); --shadow: 0 30px 60px -24px rgba(0, 0, 0, .9), 0 6px 14px rgba(0, 0, 0, .45); --header: rgba(14, 12, 28, .84);
}
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --bg: #f1ede4; --panel: #faf7f0; --raised: #e9e3d4; --sunken: #fffdf8; --line: #d8d0bd; --line-strong: #bdb298;
    --ink: #1e1a33; --ink2: #4a4467; --muted: #6e6889; --accent: #c99a30; --accent-hi: #dcaf47; --accent-text: #7a5410; --accent-ink: #1d1405; --accent-soft: rgba(185, 133, 42, .12); --accent-line: rgba(160, 112, 24, .5);
    --wm-a: #b88418; --wm-b: #6b4608;
    --glow-a: rgba(110, 90, 220, .14); --glow-b: rgba(201, 154, 48, .1); --shadow: 0 30px 60px -28px rgba(50, 40, 100, .45), 0 6px 14px rgba(50, 40, 100, .12); --header: rgba(241, 237, 228, .87); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* (a styled button would otherwise ignore the attribute) */
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; background: radial-gradient(1100px 600px at 12% -10%, var(--glow-a), transparent 62%), radial-gradient(800px 480px at 100% 0, var(--glow-b), transparent 58%), var(--bg); background-attachment: fixed; }
::selection { background: var(--accent-line); }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }

/* the bar runs the full width of the page even though its contents sit in the column */
header.top { position: sticky; top: 0; z-index: 5; margin: 0 -24px; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--header); box-shadow: 0 0 0 100vmax var(--header); clip-path: inset(0 -100vmax); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
header.top::after { content: ''; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 1px; background: var(--line); }
header.top .brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
header.top .brand img { width: 40px; height: 40px; filter: drop-shadow(0 2px 10px rgba(154, 134, 255, .4)); }
header.top .brand strong { font: 650 27px/1 var(--display); letter-spacing: -.01em; padding-bottom: 2px; background: linear-gradient(180deg, var(--wm-a), var(--wm-b)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
header.top nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 15px; font-weight: 600; }
header.top nav a { padding: 6px 14px; color: var(--muted); text-decoration: none; border-radius: 999px; }
header.top nav a:hover { color: var(--ink); background: var(--accent-soft); }

.hero { padding: 54px 0 20px; display: grid; gap: 40px 56px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 980px) { .hero { grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr); padding-top: 64px; } }
.hero .kicker { margin: 0 0 14px; font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); display: flex; align-items: center; gap: 10px; }
.hero .kicker::before { content: ''; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.hero h1 { font-size: clamp(34px, 3.7vw, 50px); margin: 0 0 18px; font-variation-settings: 'opsz' 144, 'SOFT' 60; }
.hero h1 em { display: block; font-style: italic; color: var(--accent-text); font-weight: 500; }
.hero p.lead { font-size: 20px; line-height: 1.55; color: var(--ink2); max-width: 34em; margin: 0; }
.hero figure { margin: 0; position: relative; }
.hero figure::before { content: ''; position: absolute; inset: 8% -6% -10%; background: radial-gradient(closest-side, var(--accent-line), transparent 72%); opacity: .55; filter: blur(30px); z-index: -1; }
.hero figure img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: stretch; }
.btn { display: inline-flex; flex-direction: column; justify-content: center; padding: 12px 22px; border-radius: 14px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, var(--raised), var(--panel)); color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.25; transition: transform .15s, border-color .15s, box-shadow .15s; }
.btn small { font-weight: 500; color: var(--muted); font-size: 13px; }
.btn:hover { color: var(--ink); border-color: var(--accent-line); transform: translateY(-1px); }
.btn.primary { color: var(--accent-ink); border-color: transparent; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 12px 28px -12px var(--accent-line); text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary small { color: inherit; opacity: .8; }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.06); }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

section { padding: 44px 0 12px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 22px; font-variation-settings: 'opsz' 96, 'SOFT' 50; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { position: relative; background: linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel) 88%, var(--bg))); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 22px; box-shadow: 0 1px 0 rgba(235, 228, 255, .05) inset; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.card h3::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.card p { margin: 0; color: var(--ink2); font-size: 15.5px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: start; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-strong); display: block; box-shadow: var(--shadow); }
.shots figcaption { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
.shots .wide { grid-column: 1 / -1; }
code, kbd { font-variant-ligatures: none; overflow-wrap: anywhere; background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font: 14px var(--mono); color: var(--ink2); }
ol, ul { padding-left: 1.3em; } li { margin: 7px 0; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; margin: 10px 0; }
details[open] { border-color: var(--line-strong); }
summary { cursor: pointer; font-weight: 700; }
footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0 48px; color: var(--muted); font-size: 14.5px; }
footer p { margin: 8px 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
