/*
 * Design tokens. Every color, radius and shadow in the app comes from here,
 * so retheming means editing this file and nothing else.
 */

:root,
[data-profile-theme="light"] {
  color-scheme: light;

  /* Inside the app it's quiet and neutral, so people's photos and posts are the
     color. The green, earthy look is for the home page and sign-up only (earth.css). */
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-muted: #fafaf9;
  --surface-sunken: #ececea;
  --ink: #1c1c1e;
  --ink-soft: #52525b;
  --ink-faint: #8a8a93;
  --line: #e6e6e3;
  --line-strong: #d4d4d0;

  --accent: #1c1c1e;
  --accent-hover: #000000;
  --accent-ink: #ffffff;
  --accent-soft: #ececea;
  --accent-text: #1c1c1e;

  --success: #2d8553;
  --success-soft: #e0f1e7;
  --danger: #c43c3c;
  --danger-soft: #fae3e3;
  --love: #e0435f;

  --avatar-bg-l: 86%;
  --avatar-ink-l: 30%;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(20 20 22 / 0.06);
  --shadow: 0 1px 2px rgb(20 20 22 / 0.04), 0 6px 20px rgb(20 20 22 / 0.05);
  --shadow-lg: 0 18px 50px rgb(20 20 22 / 0.16);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  /* The top bar's own row, plus the feed row under it (feeds.css). Sticky offsets use the total. */
  --topbar-row: 64px;
  --feedbar-height: 46px;
  --topbar-height: calc(var(--topbar-row) + var(--feedbar-height));
  --tabbar-height: 64px;
  --content-width: 820px;
}

/*
 * The in-app themes people pick in Settings. js/theme-boot.js sets
 * data-theme on <html> (light, grey or dark; "match my device" resolves to
 * light or dark) before the page draws. Light is the default above.
 *
 * A profile with a background from the points shop brings its own light or
 * dark look (data-profile-theme on .shell, set by pages/profile.js), whatever
 * the visitor picked, so the owner's colours always read well.
 */

:root[data-theme="grey"] {
  color-scheme: dark;

  --bg: #26282c;
  --surface: #303237;
  --surface-muted: #34363b;
  --surface-sunken: #3b3e44;
  --ink: #ececee;
  --ink-soft: #b9bac0;
  --ink-faint: #8e9097;
  --line: #3e4147;
  --line-strong: #4c4f56;

  --accent: #ececee;
  --accent-hover: #ffffff;
  --accent-ink: #26282c;
  --accent-soft: #3e4147;
  --accent-text: #ececee;

  --success: #5cc287;
  --success-soft: #2b3c31;
  --danger: #f07070;
  --danger-soft: #4a2e2e;
  --love: #f2637c;

  --avatar-bg-l: 36%;
  --avatar-ink-l: 88%;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 6px 20px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 18px 50px rgb(0 0 0 / 0.45);
}

:root[data-theme="dark"],
[data-profile-theme="dark"] {
  color-scheme: dark;

  --bg: #111113;
  --surface: #1a1a1d;
  --surface-muted: #1e1e21;
  --surface-sunken: #242428;
  --ink: #f2f2f3;
  --ink-soft: #b4b4bb;
  --ink-faint: #85858d;
  --line: #2a2a2e;
  --line-strong: #3a3a3f;

  --accent: #f2f2f3;
  --accent-hover: #ffffff;
  --accent-ink: #111113;
  --accent-soft: #2a2a2e;
  --accent-text: #f2f2f3;

  --success: #5cc287;
  --success-soft: #1d3326;
  --danger: #f07070;
  --danger-soft: #3a1f1f;
  --love: #f2637c;

  --avatar-bg-l: 30%;
  --avatar-ink-l: 86%;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.35), 0 6px 20px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 18px 50px rgb(0 0 0 / 0.55);
}
