/* Phinder Lamplight tokens. Adapted from the design-system source without external font imports. */

:root {
  color-scheme: dark;

  --bg-base: #0a0a0a;
  --bg-elev-1: #131210;
  --bg-elev-2: #1b1916;
  --bg-elev-3: #24211c;
  --bg-inset: #060605;

  --border-faint: #1f1d19;
  --border: #2a2722;
  --border-strong: #3a362f;

  --fg-1: #f5f1e8;
  /* Secondary greys brightened per the 2026-07-06 design drop for
     readability; the rest of the dark palette is the lamplight canon. */
  --fg-2: #b6b0a4;
  --fg-3: #8d877b;
  --fg-4: #4a463f;

  --accent: #f5a524;
  --accent-hi: #ffb84d;
  --accent-lo: #c47e10;
  --accent-ink: #0a0a0a;
  --accent-glow: rgba(245, 165, 36, 0.18);
  --accent-faint: rgba(245, 165, 36, 0.08);

  --nav-bg: rgba(10, 10, 10, 0.78);
  /* RGB triplets for canvas drawing (the atlas composes its own alpha). */
  --canvas-fg: 245, 241, 232;
  --canvas-accent: 245, 165, 36;
  --canvas-accent-lo: 196, 126, 16;

  --status-ok: #a8a39a;
  --status-warn: var(--accent);
  --status-danger: #d97757;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-28: 28px;
  --fs-32: 32px;
  --fs-40: 40px;
  --fs-56: 56px;

  --tracking-tight: 0;
  --tracking-snug: 0;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-mono: 0.01em;

  --lh-display: 1.02;
  --lh-heading: 1.12;
  --lh-body: 1.55;
  --lh-tight: 1.25;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 16px;
  --r-5: 24px;
  --r-full: 999px;

  --shadow-1: 0 1px 0 0 rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.5);
  --shadow-3: 0 24px 56px -16px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 0 0 1px var(--accent-glow), 0 8px 32px -8px var(--accent-glow);
  --ring-focus: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --dur-quick: 120ms;
  --dur-base: 200ms;
  --dur-slow: 400ms;
  --dur-slower: 700ms;
}

/* Light theme ("Swedish summer"): warm paper with the amber darkened to
   hold WCAG AA in bright conditions. Palette from the 2026-07-06 Claude
   Design drop. The inline head script resolves data-theme before paint
   (stored preference, else prefers-color-scheme), so dark stays the
   no-attribute default and this block is the single light source. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg-base: #f7f4ec;
  --bg-elev-1: #fffdf8;
  --bg-elev-2: #f0ece1;
  --bg-elev-3: #e8e3d5;
  --bg-inset: #efebe0;

  --border-faint: #e6e1d3;
  --border: #d7d1c1;
  --border-strong: #bcb4a1;

  --fg-1: #231f19;
  --fg-2: #544f46;
  --fg-3: #6f6a5e;
  --fg-4: #a29b8d;

  --accent: #9a6206;
  --accent-hi: #7d4f04;
  --accent-lo: #b57708;
  --accent-ink: #fffdf8;
  --accent-glow: rgba(154, 98, 6, 0.2);
  --accent-faint: rgba(154, 98, 6, 0.07);

  --status-ok: #544f46;
  --status-danger: #b34a2b;

  --nav-bg: rgba(247, 244, 236, 0.75);
  --canvas-fg: 35, 31, 25;
  --canvas-accent: 154, 98, 6;
  --canvas-accent-lo: 181, 119, 8;

  --shadow-1: 0 1px 2px rgba(35, 31, 25, 0.06);
  --shadow-2: 0 8px 24px -8px rgba(35, 31, 25, 0.12), 0 2px 6px rgba(35, 31, 25, 0.06);
  --shadow-3: 0 24px 56px -16px rgba(35, 31, 25, 0.18), 0 4px 12px rgba(35, 31, 25, 0.08);
  --shadow-accent: 0 0 0 1px rgba(154, 98, 6, 0.35), 0 4px 16px rgba(154, 98, 6, 0.16);
  --ring-focus: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent);
}

.phinder-surface {
  background: var(--bg-base);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.t-h3 {
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--fs-20);
  font-weight: 500;
  letter-spacing: var(--tracking-snug);
  line-height: var(--lh-tight);
}

.t-h4 {
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 500;
  line-height: var(--lh-tight);
}

.t-body {
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: var(--lh-body);
}

.t-small {
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 400;
  line-height: 1.5;
}

.t-caption {
  color: var(--fg-3);
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  font-weight: 400;
  line-height: 1.45;
}

.t-eyebrow,
.t-eyebrow-mute {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.t-eyebrow {
  color: var(--accent);
}

.t-eyebrow-mute {
  color: var(--fg-3);
}

.t-mono {
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 400;
  letter-spacing: var(--tracking-mono);
}

.t-link {
  border-bottom: 1px solid var(--border-strong);
  color: var(--fg-1);
  text-decoration: none;
  transition:
    border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

.t-link:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
