/* Mato Design System — colors, type, tokens
 * Source of truth: CLAUDE.md in alexanderradahl/mato-website repo + index.html inline CSS
 * (Live at https://heymato.com)
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&family=DM+Mono:wght@400;500&family=Space+Mono&display=swap');

:root {
  /* ─────────── Palette (from website DESIGN.md) ─────────── */
  --cream:        #FAF7F2;   /* primary page background */
  --cream-dark:   #F0EBE1;   /* section backgrounds */
  --cream-2:      #FCFAF8;   /* subtle surface / scrolled nav bg */
  --paper:        #F7F3EE;   /* shows + pricing section bg */

  --coral:        #E9654A;   /* PRIMARY brand coral — logo mark, italic serif, app accent */
  --coral-cta:    #F07068;   /* Marketing CTA / hero glow variant (slightly pinker) */
  --coral-deep:   #D94F47;   /* hover fill on coral */
  --coral-soft:   #F28B77;   /* eyebrows, numbered markers */
  --coral-glow:   rgba(233, 101, 74, 0.15);
  --coral-figma:  #E9654A;   /* alias — italic serif emphasis inside headings */
  --coral-app:    #E9654A;   /* alias — back-compat */
  --coral-border: rgba(233, 101, 74, 0.55); /* default hover border for cards/rows/chips */

  --ink:          #1A1A1A;   /* primary text, dark sections */
  --black:        #111111;
  --gray-900:     #2A2A2A;
  --gray-800:     #262626;   /* dark card fills */
  --gray-700:     #404040;   /* dark card borders */
  --gray-600:     #525252;   /* secondary text */
  --gray-500:     #737373;
  --gray-400:     #999999;
  --gray-300:     #a3a3a3;
  --gray-250:     #BBBBBB;
  --gray-200:     #D5D5D5;
  --gray-180:     #d4d4d4;
  --gray-150:     #ECE7DF;   /* hairline borders */
  --gray-140:     #ECE7DF;
  --gray-100:     #EEEEEE;
  --white:        #FFFFFF;

  --green:        #2DB84B;   /* success metrics */
  --green-deep:   #16A335;   /* italic stat numbers */
  --green-soft:   rgba(45, 184, 75, 0.1);
  --success-bg:   #F3FEF1;   /* "Active" status badge fill */
  --success-fg:   #246315;   /* "Active" status badge text */

  /* ─────────── Semantic surfaces ─────────── */
  --bg:           var(--cream);
  --bg-section:   var(--paper);          /* shows / pricing bg */
  --bg-dark:      var(--ink);
  --bg-elev:      var(--white);
  --border:       var(--gray-150);       /* #ECE7DF — hairlines on cards */
  --border-dark:  var(--gray-700);
  --fg:           var(--ink);
  --fg-muted:     var(--gray-600);       /* #525252 */
  --fg-soft:      var(--gray-500);       /* #737373 */
  --fg-inverse:   var(--cream);

  /* ─────────── Type families ─────────── */
  --font-display: 'Instrument Serif', Georgia, serif;     /* headings, hero, eye-candy numbers */
  --font-body:    'DM Sans', -apple-system, sans-serif;   /* everything UI */
  --font-mono:    'DM Mono', 'SF Mono', monospace;        /* eyebrows, timestamps, meta */
  --font-mono-alt:'Space Mono', monospace;                /* tiny metric labels */

  /* Convenience */
  --font-sans:    var(--font-body);

  /* ─────────── Spacing (from site) ─────────── */
  --space-xs:   0.5rem;   /*  8px */
  --space-sm:   1rem;     /* 16px */
  --space-md:   2rem;     /* 32px */
  --space-lg:   4rem;     /* 64px */
  --space-xl:   6rem;     /* 96px */

  --max-w:        1280px;
  --max-w-narrow: 900px;
  --max-w-content: 1200px;

  /* ─────────── Radii ─────────── */
  --r-base: 10px;    /* app base radius (0.625rem) — Tailwind config */
  --r-sm:   8px;     /* nav CTA, small buttons */
  --r-md:   12px;    /* show cards */
  --r-lg:   16px;    /* marketing cards, pricing, player */
  --r-xl:   20px;    /* large math cols */
  --r-pill: 100px;   /* primary pill CTAs, savings badge */
  --r-full: 9999px;

  /* ─────────── Shadows — opacity 0.05 per DESIGN.md ─────────── */
  --shadow-xs:   0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-sm:   0 1px 3px 0 rgba(0,0,0,0.05);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg:   0 6px 18px rgba(0,0,0,0.18);
  --shadow-xl:   0 12px 40px rgba(0,0,0,0.06);
  --shadow-coral:0 8px 30px rgba(240,112,104,0.3);

  /* ─────────── Motion ─────────── */
  --ease-soft:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    0.15s;
  --dur-med:     0.35s;
  --dur-slow:    0.8s;
}

/* ─────────── Reset ─────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); color: var(--ink); background: var(--cream); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--coral); color: var(--white); }

/* ─────────── Typography scale (site-accurate) ─────────── */

/* H1 — hero display, serif */
.t-h1 {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 5.8vw, 5rem);   /* 54–80px */
  line-height: 1.08;                       /* room for italic descenders */
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--ink);
  padding-bottom: 0.1em;
}
.t-h1 em { font-style: italic; color: var(--coral); }

/* H2 — section heading, serif, 48px */
.t-h2 {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -1px;
  font-weight: 400;
  color: var(--ink);
}
.t-h2 em { font-style: italic; color: var(--coral-figma); letter-spacing: -1.5px; }

/* H3 — card title / subsection, 30px serif */
.t-h3 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 30px;
  letter-spacing: -1px;
  font-weight: 400;
  color: var(--ink);
}
.t-h3 em { font-style: italic; color: var(--coral-figma); }

/* Card heading in UI — DM Sans 18/500 */
.t-card-title {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 27px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
}

/* Body — 14/20 is the dominant body size on the site */
.t-body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--fg-muted);
}

/* Body-lg — 16/24 on hero subtext and bigger intros */
.t-body-lg {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--fg-muted);
}
.t-body-lg strong { color: var(--ink); font-weight: 600; }

/* Eyebrow — mono, uppercase, coral (14px on site; 12px for mini use) */
.t-eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;            /* 1.4px */
  text-transform: uppercase;
  font-weight: 400;
  color: var(--coral-soft);
}

.t-eyebrow--sm {
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* Mono meta — timestamps, tags (10px) */
.t-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-300);
}

/* Serif stat — the italic green numbers */
.t-stat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -1.5px;
  color: var(--green-deep);
}

/* ─────────── Button patterns ─────────── */

/* Pill primary (marketing) — ink → coral on hover */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: var(--cream);
  padding: 1rem 2.25rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none; cursor: pointer;
  transition: all var(--dur-med) var(--ease-soft);
}
.btn-primary:hover {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-coral);
}

/* Hero variant — ink rectangle 8px radius (more button-y) */
.btn-primary--rect {
  background: #171717;
  color: #FAFAFA;
  border-radius: var(--r-sm);
  min-height: 40px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
}
.btn-primary--rect:hover {
  background: #252525;
  box-shadow: var(--shadow-lg);
  transform: none;
}

/* Outline secondary — transparent, 1px sand border */
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #D5CEC3;
  box-shadow: var(--shadow-xs);
  color: #171717;
  padding: 0.5rem 1.5rem;
  min-height: 40px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 1rem;
  transition: all var(--dur-fast) ease;
  cursor: pointer;
}
.btn-secondary:hover {
  color: #171717;
  border-color: #BDBDBD;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* Nav pill */
.nav-cta {
  background: var(--ink);
  color: var(--cream);
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex; align-items: center;
  transition: background var(--dur-fast) ease;
}
.nav-cta:hover { background: #2a2a2a; color: var(--cream); }

/* ─────────── Card patterns ─────────── */

/* Default light card — white / 1px sand / 16px radius */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}

/* Dark card — used in talent + math sections */
.card--dark {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  color: var(--cream);
}

/* Section patterns */
.section-dark {
  background: var(--ink);
  color: var(--cream);
}

/* Logo mark — used inline everywhere */
.logo {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
/* Brand blob — the canonical organic shape (NOT a circle).
   Uses assets/circle.svg via relative path from this CSS file. */
.logo .dot,
.brand .dot,
.blob {
  flex-shrink: 0;
  display: inline-block;
  width: 11px; height: 11px;
  background: url("assets/circle.svg") center / contain no-repeat;
}
/* Cream variant for dark backgrounds */
.dark .logo .dot,
.dark .brand .dot,
.dark .blob,
.blob--cream {
  background: url("assets/circle-cream.svg") center / contain no-repeat;
}
.logo--lg { font-size: 2rem; }
.logo--lg .dot { width: 18px; height: 18px; }

/* Animated recording dot */
.recording-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--coral);
  border-radius: 50%;
  animation: pulse-recording 2s infinite;
}
@keyframes pulse-recording {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
