/* Design tokens. Values transcribed from the mockup. Light on :root, dark and compact density
   on the #whoyou root element (the server sets data-appearance / data-density from prefs). */

:root {
  color-scheme: light;
  --font: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* surfaces and ink */
  --paper: #f7f8f4;
  --surface: #fff;
  --ink: #18211c;
  --muted: #646e66;
  --line: #dfe4dc;
  --soft: #edf0e9;
  --hero: #e7ecdf;
  --accent: #d5e6bb;
  --fun: #eee9f3;
  --on-accent: #1a281d;

  /* brand accents */
  --brand-dot: #788e64;
  --hero-accent: #5b7051;
  --saved: #6b824f;
  --primary-hover: #354837;
  --focus: #67864d;
  --fun-symbol: #857b9a;
  --error-bg: #f4dcd6;
  --error-ink: #4a1d16;

  /* photos stay on white in both themes */
  --photo-bg: #fff;
  --photo-line: #eaede8;
  --photo-line-hover: #b9c3b1;
  --thumb-line: #e0e5db;
  --missing-ink: #5e665c;
  --zoom-hint-bg: #ffffffed;
  --zoom-hint-ink: #253327;
  --hero-art-bg: #493e32;

  /* footer (always dark) */
  --footer-bg: #19241d;
  --footer-ink: #eaf0e6;
  --footer-muted: #acb9aa;
  --footer-link: #d9e1d4;
  --footer-line: #3a473c;
  --footer-brand: #c7d8b6;
  --footer-focus: #d5e6bb;

  /* overlays */
  --backdrop: #101a156e;
  --shadow-dialog: 0 18px 100px #0003;
  --shadow-pop: 0 12px 40px #0002;

  /* radii */
  --radius-pill: 100px;
  --radius-hero: 20px;
  --radius-dialog: 20px;
  --radius-banner: 16px;
  --radius-guide: 14px;
  --radius-card: 13px;
  --radius-panel: 10px;
  --radius-field: 9px;
  --radius-control: 8px;
  --radius-thumb: 7px;

  /* layout */
  --container: 1320px;
  --gutter: 48px;
  --header-offset: 110px;
  --grid-cols: 4;
  --grid-gap: 30px 21px;
}

[data-appearance=dark] {
  color-scheme: dark;
  --paper: #141916;
  --surface: #1d241f;
  --ink: #eef2eb;
  --muted: #b0bbae;
  --line: #364238;
  --soft: #252e27;
  --hero: #233022;
  --accent: #d5e6bb;
  --fun: #2b2532;
  --hero-accent: #d5e6bb;
  --error-bg: #3a2420;
  --error-ink: #f4dcd6;
}

[data-density=compact] { --grid-cols: 5; }

@media (max-width: 1150px) {
  :root { --gutter: 32px; --grid-gap: 26px 17px; }
}

@media (max-width: 900px) {
  :root, [data-density] { --grid-cols: 3; }
}

@media (max-width: 650px) {
  :root { --gutter: 20px; --grid-gap: 24px 13px; --header-offset: 147px; }
  :root, [data-density] { --grid-cols: 2; }
}

@media (max-width: 420px) {
  :root { --gutter: 16px; }
}
