/* =============================================================================
   smalltalk — shared design system
   Canonical source: smalltalk_app WEBSITE_DESIGN_BRIEF.md + Figma qWLHYx9fnPjyZwHtFYZ88m.
   Fonts self-hosted (privacy-first, no runtime Google Fonts). Do not hot-link.

   CTA rule (do not invert): primary = Violet fill + WHITE text; Pastel-Orange is an
   accent only, always with Deep-Navy text — never the main CTA, never white on it.
   Cyan is a layered surface only: navy headings + white cards on top; never white
   text directly on Cyan.
   ============================================================================= */

/* ---- Self-hosted variable fonts ---------------------------------------------
   Latin + Latin-Ext subset (keeps French accents for Canada). Weight axis kept,
   so every weight comes from one file. */
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ---------------------------------------------------------- */
:root {
  /* Primitives */
  --violet: #7467FF;
  --pastel-orange: #FFC067;
  --cyan: #67F2FF;
  --watermelon: #FF4B68;
  --paper-white: #F8F9FA;
  --light-green: #6EEB83;
  --deep-navy: #071921;
  --soft-charcoal: #363636;
  --slate-navy: #4A606D;
  --red: #D62828;

  /* Opacity tints (deliberate tokens, not ad-hoc alphas) */
  --violet-15: rgba(116, 103, 255, 0.15);
  --cyan-15: rgba(103, 242, 255, 0.15);
  --pastel-orange-15: rgba(255, 192, 103, 0.15);
  --watermelon-15: rgba(255, 75, 104, 0.15);
  --red-15: rgba(214, 40, 40, 0.15);
  --deep-navy-10: rgba(7, 25, 33, 0.10);
  --slate-navy-10: rgba(74, 96, 109, 0.10);
  --light-green-20: rgba(110, 235, 131, 0.20);

  /* Neutral greys (quiet surfaces / hairlines) */
  --grey-muted: #F2F2F2;
  --grey-card: #F5F5F5;
  --hairline: #E5E5E5;

  /* Semantic roles */
  --surface: var(--paper-white);
  --surface-container: var(--cyan);
  --brand-primary: var(--violet);
  --accent: var(--pastel-orange);
  --text-primary: var(--deep-navy);
  --text-secondary: var(--slate-navy);
  --success: var(--light-green);
  --success-text: #16A34A;
  --error: var(--red);
  --priority: var(--watermelon);

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 10px 20px rgba(0, 0, 0, 0.05);   /* app reference shadow */
  --shadow-card: 0 4px 16px rgba(7, 25, 33, 0.06);
  --shadow-cta: 0 6px 18px var(--violet-15);
  --shadow-modal: 0 20px 60px rgba(7, 25, 33, 0.25);

  /* Type */
  --font-head: "Outfit", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  /* Layout */
  --wrap-max: 1080px;
  --measure: 640px;   /* comfortable reading width for prose */
  --gutter: 24px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--violet); }

/* ---- Typography ------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text-primary); line-height: 1.15; }
h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 700; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 17px; font-weight: 600; }

.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-secondary); line-height: 1.5; }
.muted { color: var(--text-secondary); }
.eyebrow { font-weight: 600; font-size: 14px; letter-spacing: 0.02em; color: var(--violet); text-transform: none; }

/* ---- Layout ----------------------------------------------------------------- */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.stack > * + * { margin-top: 16px; }
.measure { max-width: var(--measure); }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  min-height: 44px;
  padding: 15px 28px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* Primary = violet fill + white text */
.btn-primary { background: var(--violet); color: #fff; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: #6153f5; }

/* Accent = pastel-orange + navy text (secondary only — never the main CTA) */
.btn-accent { background: var(--pastel-orange); color: var(--deep-navy); }

/* Ghost = white card button */
.btn-ghost { background: #fff; color: var(--deep-navy); box-shadow: var(--shadow-card); }

.btn-block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { background: #C7CCCF; color: #fff; pointer-events: none; box-shadow: none; }

/* ---- Cards ------------------------------------------------------------------ */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.card-soft { box-shadow: var(--shadow-soft); }

/* ---- Badges / pills --------------------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--cyan-15);
  color: var(--deep-navy);
}
.badge-violet { background: var(--violet-15); }
.badge-accent { background: var(--pastel-orange-15); }

/* ---- Cyan feature surface (layered: white cards sit on top) ------------------
   Never place white text or long body copy directly on cyan — use a white card. */
.surface-cyan {
  background: var(--cyan);
  border-radius: var(--radius-xl);
  padding: 48px var(--gutter);
}
.surface-cyan h1, .surface-cyan h2, .surface-cyan h3 { color: var(--deep-navy); }

/* ---- Header / footer -------------------------------------------------------- */
.site-header { padding: 24px 0; }
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  color: var(--violet);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--slate-navy-10);
  padding: 32px 0 48px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 32px;
}
.site-footer a { color: var(--text-secondary); }

/* ---- Utilities -------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
