/* david.design tokens. Direction B: the SNACKS discipline (type floor,
   content in ink and metadata in gray, one accent, rules not shadows)
   with its own identity: warm off-white ground, butter as the single
   accent, blue only for links. Dark theme designed, not inverted. */

/* Snacks house fonts, self-hosted: DDC Hardware for labels and lockups,
   Geomanist for everything else. Same files as snacksdesign.com. */
@font-face { font-family: "DDC Hardware"; src: url("/fonts/DDCHardware-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geomanist"; src: url("/fonts/Geomanist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geomanist"; src: url("/fonts/Geomanist-Regular-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geomanist"; src: url("/fonts/Geomanist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geomanist"; src: url("/fonts/Geomanist-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* The Snacks house system, mirrored from snacksdesign.com: cool off-white
     ground, ink, rules not shadows, and red as the one accent. */
  --bg: #F6F6F8;
  --surface: #FFFFFF;
  --fg: #252525;
  --muted: rgba(37, 37, 37, 0.65);
  --rule: rgba(37, 37, 37, 0.14);
  --rule-strong: rgba(37, 37, 37, 0.34);
  --accent: #E73E3E;          /* Snacks red: the one accent */
  --accent-ink: #FFFFFF;      /* text on the accent */
  --accent-deep: #C8302F;     /* the accent under SMALL white type: 5:1, where the brand red is 4:1 */
  --wash: #FBEAEA;            /* pale red for blocks */
  --link: #3354A5;            /* Snacks blue, links only */
  --red: #E73E3E;             /* the SNACKS letters, and the accent */

  /* Feedback */
  --ok: #3aa35b;
  --ok-ink: #ffffff;

  /* The office game, the David sprite, and the portal diagram read these
     at runtime (getComputedStyle), so retheming here rethemes them too. */
  --skin: #f2cfae;
  --hair: #1f1a17;            /* black; the deck runs light so it reads */
  --hair-2: #4a4440;          /* the sheen along the top */
  --paper: #ffffff;
  --desk: #e9e2d3;
  --desk-edge: #c9bfab;
  --chair: #4f586a;
  --chair-dark: #3a4150;
  --wood: #b98a5c;
  --wood-edge: #8f6a45;
  --glass: rgba(150, 195, 235, 0.12);
  --glass-frame: rgba(120, 165, 210, 0.65);
  --monitor: #2f3542;
  --screen: #cfe3ff;
  --plant: #5fa86a;
  --plant-2: #7cc286;
  --pot: #c9855a;
  --counter: #dfe6ee;
  --counter-edge: #b8c4d2;
  --door: #7b8794;
  --bezel: #141416;           /* the phone frame */
  --bezel-2: #1f1f1f;
  --trivia-yellow: #F4C820;   /* Snacks Trivia brand, for its logo only */
  --swirl-pink: #E667AE;      /* Snacks Swirl brand, for its logo only */
  --meta-blue: #0866FF;       /* David's tee in the Meta office, nothing else */

  --display: "Geomanist", -apple-system, BlinkMacSystemFont, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --body: "Geomanist", -apple-system, BlinkMacSystemFont, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --label: "DDC Hardware", ui-sans-serif, system-ui, sans-serif;   /* eyebrows, tags, lockups */
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Snacks Slides reads these names */
  --ddc: var(--label);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1b1d;
    --surface: #232325;
    --fg: #f1eee6;
    --muted: rgba(241, 238, 230, 0.62);
    --rule: rgba(241, 238, 230, 0.16);
    --rule-strong: rgba(241, 238, 230, 0.38);
    --accent: #ff5a5a;
    --accent-ink: #1b1b1d;
    --wash: #3a2323;
    --link: #93aaeb;
    --red: #ff5a5a;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1b1d;
  --surface: #232325;
  --fg: #f1eee6;
  --muted: rgba(241, 238, 230, 0.62);
  --rule: rgba(241, 238, 230, 0.16);
  --rule-strong: rgba(241, 238, 230, 0.38);
  --accent: #ff5a5a;
  --accent-ink: #1b1b1d;
  --wash: #3a2323;
  --link: #93aaeb;
  --red: #ff5a5a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover, a:focus-visible { border-bottom-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-family: var(--label); font-weight: 400; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; max-width: 62ch; }
.muted { color: var(--muted); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

/* header */
.mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.mast nav { display: flex; gap: 22px; font-size: 14px; font-weight: 500; }
.mast nav a { color: var(--fg); }
.mast nav a[aria-current] { border-bottom-color: var(--accent); border-bottom-width: 2px; }

/* the wordmark: "david" + a physical dot + "design" */
.wordmark {
  display: inline-flex; align-items: baseline;
  font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: var(--fg);
  border: 0;
}
.wordmark .dot {
  display: inline-block; width: 0.34em; height: 0.34em; margin: 0 0.06em; border-radius: 50%;
  background: var(--accent); transform-origin: 50% 100%; will-change: transform; position: relative;
}
.wordmark .dot canvas { position: absolute; inset: -12%; width: 124%; height: 124%; display: block; pointer-events: none; }
.wordmark .dot.is-face { background: transparent; }
.wordmark.big { font-size: clamp(56px, 11vw, 132px); line-height: 0.95; letter-spacing: -0.045em; }

/* hero */
.hero { padding: 48px 0 40px; border-bottom: 1px solid var(--rule); }
.hero .lede {
  margin-top: 26px; max-width: 30ch;
  font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.18; letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero .lede em { font-style: normal; background: var(--accent-deep); color: var(--accent-ink); padding: .1em .14em .06em; margin: 0 -.04em; border-radius: .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .sub { margin-top: 18px; font-size: 17px; color: var(--muted); max-width: 58ch; }

/* sections */
section { padding: 36px 0; border-bottom: 1px solid var(--rule); }
section h2 { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 18px; }

.chapters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 720px) { .chapters { grid-template-columns: repeat(2, 1fr); } }
.chapters > div { border-top: 2px solid var(--rule-strong); padding-top: 10px; font-size: 15px; line-height: 1.4; }
.chapters > div:last-child { border-top-color: var(--accent); }
.chapters .eyebrow { display: block; margin-bottom: 6px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--fg); }
.card:hover { border-color: var(--rule-strong); }
.card h3 { font-size: 20px; }
.card p { font-size: 14.5px; color: var(--muted); }
.card .stat { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; color: var(--fg); margin-top: auto; padding-top: 10px; }
.card .stat::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 0; }
.card .soon { color: var(--muted); font-weight: 500; }
.card .soon::before { background: var(--rule-strong); }

.contact { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; }
.contact a { color: var(--fg); }
.contact a::after { content: " \2197"; color: var(--muted); }
.contact a.mail::after { content: none; }

footer { padding: 28px 0 48px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer .snacks { color: var(--red); font-family: var(--display); font-weight: 800; letter-spacing: 0.02em; }

@media (prefers-reduced-motion: reduce) { .wordmark .dot { transform: none !important; } }
