/* style.css — StableCompass design tokens + component styles
   Tokens sourced from the StableCompass Brand & Design System Guide v1.0 */

:root,
[data-theme='light'] {
  /* Surfaces (warm parchment) */
  --color-bg: #f4f2ed;
  --color-surface: #f7f5f0;
  --color-surface-2: #faf9f6;
  --color-surface-offset: #efecea;
  --color-surface-offset-2: #e8e5e0;
  --color-surface-dynamic: #e0ddd8;
  --color-divider: #d8d5cf;
  --color-border: #cdc9c2;

  /* Text (warm ink) */
  --color-text: #1f1d17;
  --color-text-muted: #6b6960;
  --color-text-faint: #b0ada6;
  --color-text-inverse: #f5f4f0;

  /* Primary Accent (Forest Green) */
  --color-primary: #2d6a4f;
  --color-primary-hover: #1f4f3a;
  --color-primary-active: #163627;
  --color-primary-highlight: #d4e8df;

  /* Status: Warning */
  --color-warning: #a05c00;
  --color-warning-highlight: #f0e2c8;

  /* Status: Success */
  --color-success: #3a7d44;
  --color-success-highlight: #d2e8d6;

  /* Status: Info */
  --color-blue: #2d5f8a;
  --color-blue-highlight: #ccdae8;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-expand: 240ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows (warm-toned) */
  --shadow-sm: 0 1px 2px oklch(0.18 0.02 80 / 0.06);
  --shadow-md: 0 3px 10px oklch(0.18 0.02 80 / 0.08), 0 1px 2px oklch(0.18 0.02 80 / 0.05);
  --shadow-lg: 0 10px 28px oklch(0.18 0.02 80 / 0.12), 0 2px 6px oklch(0.18 0.02 80 / 0.07);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #181714;
  --color-surface: #1e1c19;
  --color-surface-2: #242220;
  --color-surface-offset: #1b1a17;
  --color-surface-offset-2: #211f1c;
  --color-surface-dynamic: #2e2c29;
  --color-divider: #2a2825;
  --color-border: #363330;

  --color-text: #d8d5cf;
  --color-text-muted: #7a776f;
  --color-text-faint: #524f4a;
  --color-text-inverse: #1f1d17;

  --color-primary: #52a87a;
  --color-primary-hover: #3d8d62;
  --color-primary-active: #2d7050;
  --color-primary-highlight: #243530;

  --color-warning: #d4820a;
  --color-warning-highlight: #3d3020;

  --color-success: #5cb86a;
  --color-success-highlight: #243028;

  --color-blue: #5a90c2;
  --color-blue-highlight: #202d38;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 3px 10px oklch(0 0 0 / 0.35), 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-lg: 0 10px 28px oklch(0 0 0 / 0.45), 0 2px 6px oklch(0 0 0 / 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #181714;
    --color-surface: #1e1c19;
    --color-surface-2: #242220;
    --color-surface-offset: #1b1a17;
    --color-surface-offset-2: #211f1c;
    --color-surface-dynamic: #2e2c29;
    --color-divider: #2a2825;
    --color-border: #363330;
    --color-text: #d8d5cf;
    --color-text-muted: #7a776f;
    --color-text-faint: #524f4a;
    --color-text-inverse: #1f1d17;
    --color-primary: #52a87a;
    --color-primary-hover: #3d8d62;
    --color-primary-active: #2d7050;
    --color-primary-highlight: #243530;
    --color-warning: #d4820a;
    --color-warning-highlight: #3d3020;
    --color-success: #5cb86a;
    --color-success-highlight: #243028;
    --color-blue: #5a90c2;
    --color-blue-highlight: #202d38;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 3px 10px oklch(0 0 0 / 0.35), 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-lg: 0 10px 28px oklch(0 0 0 / 0.45), 0 2px 6px oklch(0 0 0 / 0.25);
  }
}

/* ── Type scale ─────────────────────────────────────────────────── */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.28vw, 1rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 0.98rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.05rem + 1vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --text-3xl: clamp(2.25rem, 1.4rem + 3.5vw, 3.75rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ── Layout helpers ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-10));
}

.wrap--narrow {
  max-width: var(--content-default);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.brand svg {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.lang-toggle button {
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  line-height: 1;
}

.lang-toggle button:hover {
  color: var(--color-text);
}

.lang-toggle button.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.lang-toggle button.active:hover {
  color: var(--color-text-inverse);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ── Badge ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3) 6px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(var(--space-20), 12vw, var(--space-32)) clamp(var(--space-16), 8vw, var(--space-24));
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.hero p.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
}

.hero-mark {
  width: 56px;
  height: 56px;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

/* ── Section headings ───────────────────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  color: var(--color-text);
  max-width: 36ch;
}

/* ── About: asymmetric two column ──────────────────────────────── */
.about {
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: start;
}

.about-copy p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-top: var(--space-4);
}

.about-copy p + p {
  margin-top: var(--space-4);
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.about-list-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.about-list-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-list-item h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
}

.about-list-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ── Audiences: asymmetric 2-card layout (wide + narrow) ────────── */
.audiences-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.card ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.card li svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq {
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.faq-list {
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-interactive);
}

.faq-item[open] summary svg {
  transform: rotate(180deg);
}

.faq-item p {
  padding-bottom: var(--space-5);
  padding-right: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 68ch;
}

/* ── Launch callout ─────────────────────────────────────────────── */
.launch {
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}

.launch-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: center;
}

.launch-mark {
  width: 72px;
  height: 72px;
  color: var(--color-primary);
}

.launch h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.launch p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 60ch;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  padding-block: var(--space-10);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-8);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}

.footer-brand svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.footer-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .audiences-grid {
    grid-template-columns: 1fr;
  }
  .launch-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }
}
