/* Sturdybits design tokens and base styles, shared by the storefront (site/) and every app (products/*).
   Token names are brand-neutral, so a rebrand or an app sub-brand is a change to this file only. */

@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@500;600;700&family=Figtree:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");

:root {
  --bg: #F7F8FC;
  --fg: #16213B;
  --primary: #2453C8;       /* links, standard buttons, focus: AA as text on --bg and --surface */
  --on-primary: #FFFFFF;
  --pop: #FFB703;           /* amber: the tick tile, the full stop, marks and main calls to action. Fills only, never text */
  --on-pop: #16213B;
  --hero: #1B2A4A;          /* navy bands */
  --on-hero: #FFFFFF;
  --on-hero-muted: #C9D3E8;
  --accent: #2EC4B6;
  --accent-ink: #0B7A6B;
  --muted: #56627A;
  --surface: #FFFFFF;
  --line: #DDE3EE;
  --highlight: #FFE58F;
  --highlight-ink: #16213B;
  --danger: #B42335;
  --ok: #0B7A55;

  --font-display: "Rubik", "Segoe UI", system-ui, sans-serif;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: 2.2rem;
  --step-4: clamp(2.5rem, 6.5vw, 4.2rem);

  --radius-s: 10px;
  --radius-m: 16px;
  --gutter: 16px;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1424; --fg: #EAF0FA; --primary: #8DB0FF; --on-primary: #0E1424; --hero: #16223D; --accent-ink: #6FE0CC;
    --muted: #A5B1C7; --surface: #161F35; --line: #28324B; --danger: #FF8A95; --ok: #6FE0B0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1424; --fg: #EAF0FA; --primary: #8DB0FF; --on-primary: #0E1424; --hero: #16223D; --accent-ink: #6FE0CC;
  --muted: #A5B1C7; --surface: #161F35; --line: #28324B; --danger: #FF8A95; --ok: #6FE0B0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
small, .muted { color: var(--muted); }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.72em 1.25em;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 700; text-decoration: none; line-height: 1.2;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--primary); }
.btn.quiet { border-color: var(--line); background: var(--surface); color: var(--fg); font-weight: 600; }
/* The main call to action on a page: amber, like the tick tile. */
.btn.pop { border-color: var(--pop); background: var(--pop); color: var(--on-pop); }

/* Price chip: a small amber tile marks the one number that matters. */
.price {
  display: inline-flex; align-items: center; gap: 0.45em;
  padding: 0.5em 1em 0.5em 0.8em;
  border-radius: 12px;
  background: var(--surface); color: var(--fg);
  border: 2px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1;
}
.price::before { content: ""; width: 0.6em; height: 0.6em; flex: none; border-radius: 0.16em; background: var(--pop); }
.price .per { font-family: var(--font); font-weight: 600; font-size: 0.75em; color: var(--muted); }

.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Wordmark: lowercase "sturdybits" with an amber tile as the full stop.
   Use: <span class="wordmark">sturdybits<span class="stop"></span></span> */
.wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; color: var(--fg); white-space: nowrap; line-height: 1; }
.wordmark .stop { display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.05em; border-radius: 0.05em; background: var(--pop); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
