/* ========= MeetingMind — Design System ========= */
:root {
  /* Type */
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Light theme — warm neutrals à la Linear/Vercel */
  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --bg-sunken: #f4f4f2;
  --surface: #ffffff;
  --border: rgba(15, 17, 21, 0.08);
  --border-strong: rgba(15, 17, 21, 0.16);
  --text: #0f1115;
  --text-muted: #5b606b;
  --text-subtle: #8a8f99;
  --accent: oklch(0.62 0.17 258);          /* indigo-ish */
  --accent-hover: oklch(0.56 0.18 258);
  --accent-soft: oklch(0.96 0.03 258);
  --accent-fg: #ffffff;
  --success: oklch(0.65 0.14 155);
  --warn: oklch(0.72 0.14 75);
  --danger: oklch(0.62 0.19 25);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.04), 0 1px 1px rgba(15, 17, 21, 0.03);
  --shadow: 0 4px 14px -4px rgba(15, 17, 21, 0.08), 0 2px 4px rgba(15, 17, 21, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 17, 21, 0.18), 0 8px 16px -8px rgba(15, 17, 21, 0.08);

  --container: 1180px;
}

[data-theme="dark"] {
  --bg: #0a0b0d;
  --bg-elev: #111316;
  --bg-sunken: #08090b;
  --surface: #111316;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --text-muted: #9aa0ad;
  --text-subtle: #6b707b;
  --accent: oklch(0.72 0.16 258);
  --accent-hover: oklch(0.78 0.16 258);
  --accent-soft: oklch(0.28 0.07 258);
  --accent-fg: #0a0b0d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.01em;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-fg); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text); color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: var(--accent-fg); }
.btn-secondary {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-sunken); }
.btn-ghost { color: var(--text-muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); background: var(--bg-sunken); }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ----- Nav ----- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  font-family: var(--font-mono);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link { padding: 8px 12px; border-radius: 8px; color: var(--text-muted); font-size: 14px; }
.nav-link:hover { color: var(--text); background: var(--bg-sunken); }
.nav-cta { display: flex; gap: 8px; align-items: center; }

/* ----- Type ----- */
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; margin: 0; font-weight: 600; }
h1 { font-size: clamp(40px, 6vw, 68px); }
h2 { font-size: clamp(28px, 3.5vw, 42px); }
h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-elev);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.lead { font-size: 19px; color: var(--text-muted); line-height: 1.55; max-width: 580px; }

/* ----- Cards ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card-hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

/* ----- Inputs ----- */
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 10px 12px; font-size: 14px;
  transition: border-color 120ms, box-shadow 120ms;
}
.input:focus, .textarea:focus, .select:focus {
  outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; font-family: var(--font-mono); font-size: 13px; }

/* ----- Badge ----- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-sunken); color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 500;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ----- Utilities ----- */
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: var(--font-mono); }
.divider { height: 1px; background: var(--border); }
.grid { display: grid; }
.flex { display: flex; }

/* Subtle grid background helper */
.bg-grid {
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}

/* ----- Spinner ----- */
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Density variants (driven by Tweaks) ----- */
[data-density="cozy"] {
  --pad-section: 96px;
}
[data-density="compact"] {
  --pad-section: 64px;
}
section.section { padding-block: var(--pad-section, 96px); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }
::-webkit-scrollbar-track { background: transparent; }
