/* Tokens. Screens use these, never a raw value. Paper is the default theme, Night the toggle. */
@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('../fonts/eb-garamond.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* colour: Paper */
  --ground: #F6F4EF;
  --surface: #FFFFFF;
  --raised: #ECE9E1;
  --ink: #111111;
  --ink-55: rgba(17, 17, 17, 0.55);
  --ink-20: rgba(17, 17, 17, 0.20);
  --ink-08: rgba(17, 17, 17, 0.08);
  --accent: #E2412B;
  --accent-ink: #FFFFFF;
  --dot: rgba(17, 17, 17, 0.18);
  --ghost: rgba(17, 17, 17, 0.22);
  --fill: #111111;            /* the ink shape and filled controls */
  --fill-ink: #F6F4EF;        /* text on the fill */

  /* type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --t-meta: 13px;
  --t-body: 15px;
  --t-row: 17px;
  --t-title: 22px;
  --t-hero: 28px;
  --t-display: 40px;
  --w-regular: 500;
  --w-bold: 700;

  /* spacing, radius, hits */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --r-card: 12px; --r-chip: 999px; --r-thumb: 8px;
  --hit: 44px;

  /* motion */
  --ease-spring: cubic-bezier(0.2, 0.9, 0.3, 1);
  --dur-fast: 160ms;
  --dur-move: 400ms;
  --dur-in: 1200ms;

  /* layout */
  --gutter: 20px;
  --max: 560px;
  --dock: 120px;              /* height of the docked ink shape on the phone */
}

:root[data-theme='night'] {
  --ground: #0E0E0F;
  --surface: #161617;
  --raised: #222224;
  --ink: #F1EDE4;
  --ink-55: rgba(241, 237, 228, 0.58);
  --ink-20: rgba(241, 237, 228, 0.22);
  --ink-08: rgba(241, 237, 228, 0.09);
  --accent: #FF5A3C;
  --accent-ink: #0E0E0F;
  --dot: rgba(241, 237, 228, 0.20);
  --ghost: rgba(241, 237, 228, 0.26);
  --fill: #F1EDE4;
  --fill-ink: #0E0E0F;
}

/* Orrery: the Aleph theme Dan picked, as a variant site. Umber night, brass, ivory; the dot grid becomes hairline rings. */
:root[data-theme='orrery'] {
  --ground: #0E0A07;
  --surface: #16100B;
  --raised: #22180F;
  --ink: #F1E7D1;
  --ink-55: rgba(241, 231, 209, 0.58);
  --ink-20: rgba(198, 160, 98, 0.32);
  --ink-08: rgba(198, 160, 98, 0.10);
  --accent: #E6B551;
  --accent-ink: #0E0A07;
  --dot: rgba(198, 160, 98, 0.14);
  --ghost: rgba(198, 160, 98, 0.45);
  --fill: #C39D5E;
  --fill-ink: #0E0A07;
  --brass: #C39D5E;
  --brass-hi: #EAD096;
  --brass-lo: #7C6239;
  --ember: #E4573B;
  --verd: #72B8A0;
  --font-display: 'Cormorant', 'Fraunces', Georgia, serif;
  --font-text: 'EB Garamond', Georgia, serif;
  --t-body: 17px;
  --t-row: 18px;
  --t-display: 44px;
  --mute: #948570;
  --faint: #625645;
  --edge: rgba(198, 160, 98, 0.32);
}
:root[data-theme='orrery'] .display { font-weight: 600; letter-spacing: -0.005em; font-variation-settings: normal; }
:root[data-theme='orrery'] .title { font-family: var(--font-display); font-weight: 600; }

/* Blue: futuristic neon grid variant. Abyssal obsidian, electric cyan, ice white, signal amber. */
:root[data-theme='blue'] {
  --ground: #030710;
  --surface: #071120;
  --raised: #0C1B33;
  --ink: #E6F6FF;
  --ink-55: rgba(176, 224, 255, 0.58);
  --ink-20: rgba(0, 229, 255, 0.24);
  --ink-08: rgba(0, 229, 255, 0.09);
  --accent: #00E5FF;
  --accent-ink: #030710;
  --dot: rgba(0, 229, 255, 0.14);
  --ghost: rgba(255, 154, 46, 0.55);
  --fill: #00E5FF;
  --fill-ink: #030710;
  --cyan: #00E5FF;
  --cyan-hi: #A8F9FF;
  --cyan-lo: rgba(0, 229, 255, 0.30);
  --cyan-dim: rgba(0, 229, 255, 0.12);
  --amber: #FF9A2E;
  --ice: #E6F6FF;
  --mute: #6E98BA;
  --faint: #3A5D7C;
  --edge: rgba(0, 229, 255, 0.28);
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-display: 38px;
}
:root[data-theme='blue'] .display { font-weight: 600; letter-spacing: -0.03em; font-variation-settings: normal; }
:root[data-theme='blue'] .title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }

/* Steampunk: Victorian industrial brass, copper conduits, furnace embers, riveted iron, and gauge dials. */
:root[data-theme='steampunk'] {
  --ground: #120D09;
  --surface: #1C1510;
  --raised: #281F17;
  --ink: #F7EAD0;
  --ink-55: rgba(247, 234, 208, 0.60);
  --ink-20: rgba(212, 160, 84, 0.30);
  --ink-08: rgba(212, 160, 84, 0.12);
  --accent: #E58332;
  --accent-ink: #120D09;
  --dot: rgba(212, 160, 84, 0.15);
  --ghost: rgba(212, 160, 84, 0.45);
  --fill: #D4A054;
  --fill-ink: #120D09;
  --brass: #C89947;
  --brass-hi: #F5D386;
  --brass-lo: #785822;
  --copper: #B85B32;
  --copper-hi: #E27B4D;
  --copper-lo: #662E14;
  --iron: #201A16;
  --iron-rim: #3D322B;
  --amber: #FF9B26;
  --amber-glow: rgba(255, 155, 38, 0.35);
  --verdigris: #4F9380;
  --steam: rgba(245, 238, 225, 0.85);
  --ember: #D94625;
  --edge: rgba(212, 160, 84, 0.34);
  --mute: #A69076;
  --faint: #695745;
  --font-display: 'Fraunces', 'Cormorant', Georgia, serif;
  --font-text: 'EB Garamond', Georgia, serif;
  --t-body: 16px;
  --t-row: 18px;
  --t-display: 42px;
}
:root[data-theme='steampunk'] .display { font-weight: 700; letter-spacing: -0.01em; font-variation-settings: normal; }
:root[data-theme='steampunk'] .title { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.02em; }

/* Nautical: 1700s minimalist nautical chart. Warm antique parchment, deep Admiralty navy ink, antique brass accents. */
:root[data-theme='nautical'] {
  --ground: #F3EAD4;
  --surface: #F6EEDD;
  --raised: #EAE0C8;
  --ink: #15283E;
  --ink-55: rgba(21, 40, 62, 0.65);
  --ink-20: rgba(21, 40, 62, 0.22);
  --ink-08: rgba(21, 40, 62, 0.08);
  --accent: #9A7234;
  --accent-ink: #FAF5E8;
  --dot: rgba(21, 40, 62, 0.14);
  --ghost: rgba(154, 114, 52, 0.55);
  --fill: #2B4B70;
  --fill-ink: #FAF6EC;
  --navy: #15283E;
  --brass: #9A7234;
  --brass-hi: #B88B44;
  --brass-lo: rgba(154, 114, 52, 0.36);
  --chart-line: rgba(21, 40, 62, 0.14);
  --font-display: 'EB Garamond', 'Fraunces', Georgia, serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-body: 15px;
  --t-row: 16px;
  --t-display: 38px;
}
:root[data-theme='nautical'] .display { font-weight: 700; letter-spacing: -0.01em; font-variation-settings: normal; }
:root[data-theme='nautical'] .title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.005em; }

@media (min-width: 900px) {
  :root { --t-display: 64px; --t-hero: 40px; --gutter: 32px; }
  :root[data-theme='orrery'] { --t-display: 68px; }
  :root[data-theme='blue'] { --t-display: 56px; }
  :root[data-theme='steampunk'] { --t-display: 62px; }
  :root[data-theme='nautical'] { --t-display: 46px; }
}
