/*
  Pudding design tokens for public web surfaces (marketing + shop).
  Values mirror pudding-app/src/client/src/index.css @theme block.
  Source of truth lives there — keep this in sync by deliberate copy.
*/

:root {
  /* Brand */
  --coral: #E8734A;
  --coral-hover: #D4653F;

  /* Neutrals */
  --near-black: #1E1E2E;
  --off-white: #FAF7F2;
  --mid-grey: #6B6B7B;
  --light-grey: #E8E6E1;
  --hover: #F0ECE3;
  --white: #FFFFFF;

  /* Semantic — base tints */
  --positive: #2D9F6F;
  --negative: #D94452;
  --caution: #E09035;
  --info: #4A8FCC;

  /* Semantic — accessible text colors on light backgrounds (WCAG AA). Mirror
     pudding-app's `*-deep` tokens. Use these whenever a semantic color appears
     as text on the off-white canvas. */
  --positive-deep: #247F59;
  --negative-deep: #C83F4B;
  --caution-deep: #9D6525;
  --info-deep: #3D75A7;

  /* Surfaces — raised cards sit on top of the off-white canvas. */
  --canvas-raised: #FFFFFF;
  --border-subtle: #E8E6E1;

  /* Shadow ramp mirrors pudding-app. Use L1 for resting cards, L2 on hover. */
  --shadow-l1: 0 1px 2px rgba(30, 30, 46, 0.04);
  --shadow-l2: 0 4px 12px rgba(30, 30, 46, 0.06);

  /* Type scale. Display + H1 + H2 use clamp() so they breathe on widescreen
     and tighten on phones. App UI keeps fixed rem (see pudding-app/index.css). */
  --text-display: clamp(2.25rem, 2vw + 1.5rem, 3.5rem);
  --text-h1: clamp(1.75rem, 1vw + 1.25rem, 2.5rem);
  --text-h2: clamp(1.375rem, 0.5vw + 1.125rem, 1.75rem);
  --text-body: 16px;
  --text-body-lg: 18px;
  --text-small: 14px;
  --text-label: 12px;

  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug: 1.3;
  --lh-normal: 1.4;
  --lh-relaxed: 1.6;

  /* Spacing (8pt grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* Layout */
  --container-narrow: 720px;
  --container-wide: 1024px;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Fonts. Geist is Vercel's open replacement for Inter — humanist sans without
     the AI-monoculture stigma. General Sans handles display only.
     JetBrains Mono carries numerics and the DP-panel headline. */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'General Sans', 'Geist', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--near-black);
  background: var(--off-white);
  line-height: var(--lh-relaxed);
  font-size: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Focus ring matches pudding-app: 2px off-white inner + 2px coral 40% outer. */
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--off-white), 0 0 0 4px rgba(232, 115, 74, 0.4);
}

/* Wordmark — identical treatment across every surface.
   SVG logo replaces text wordmark. Height drives sizing; width auto. */
.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.wordmark img {
  height: 32px;
  width: auto;
  display: block;
}

.wordmark--lg img {
  height: 40px;
}

/* Display heading utility — General Sans with tight tracking. */
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Editorial primitives shared across marketing pages. */

.coral-rule {
  height: 2px;
  width: 64px;
  background: var(--coral);
  border: 0;
}

.label {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 600;
  color: var(--coral);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* === Shared shell: header, main, footer === */

.site-header {
  height: var(--header-height);
  background: var(--off-white);
  border-bottom: 1px solid var(--light-grey);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
}

.site-header__inner {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--near-black);
  text-decoration: none;
  transition: color 0.15s ease-out;
}

.site-nav a:hover { color: var(--mid-grey); }

.site-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.site-footer {
  background: var(--off-white);
  border-top: 1px solid var(--light-grey);
  padding: var(--space-8) var(--space-6);
  margin-top: var(--space-16);
}

.site-footer__inner {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Wordmark + tagline read as one block: tight 4px gap, then standard
   spacing to whatever follows. Hierarchy via gap, not equal padding. */
.site-footer__col--lede {
  gap: var(--space-1);
}

.site-footer__tagline {
  font-size: var(--text-label);
  color: var(--mid-grey);
  line-height: var(--lh-normal);
  max-width: 280px;
}

.site-footer__heading {
  font-size: var(--text-label);
  font-weight: 500;
  color: var(--near-black);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.site-footer a {
  font-size: var(--text-label);
  color: var(--mid-grey);
  text-decoration: none;
  transition: color 0.15s ease-out;
}

.site-footer a:hover { color: var(--near-black); }

.site-footer__legal {
  font-size: var(--text-label);
  color: var(--mid-grey);
  line-height: var(--lh-normal);
}

/* === Buttons === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-body);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease-out, background-color 0.15s ease-out;
  white-space: nowrap;
}

.btn--primary {
  background: var(--coral);
  color: var(--white);
}

.btn--primary:hover { background: var(--coral-hover); }

.btn--secondary {
  background: transparent;
  color: var(--near-black);
  border-color: var(--light-grey);
}

.btn--secondary:hover { border-color: var(--mid-grey); }

/* === Mobile === */

@media (max-width: 640px) {
  .site-header { padding: 0 var(--space-4); }
  .site-header__inner { gap: var(--space-4); }
  .site-nav { gap: var(--space-4); }
  .site-footer { padding: var(--space-6) var(--space-4); }
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}
