/*
 * DiffuseMind Design System v2 — Site-wide Stylesheet
 * Source of truth: homepage (EB Garamond + DM Sans editorial design)
 * Shared by: Homepage, Synthesis, Feedback Confirm, Feedback Opt-out
 */

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

/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors */
  --ink: #0a0a0a;
  --ink-secondary: #3a3a3a;
  --ink-muted: #6b6b6b;
  --ink-faint: #999;
  --surface: #fafaf8;
  --surface-warm: #f5f4f0;
  --rule: #d4d0c8;
  --rule-light: #e8e5dd;
  --accent: #1a3a5c;
  --accent-deep: #0f2740;

  /* Status colors */
  --success: #16a34a;
  --error: #dc2626;
  --warning: #d97706;
  --neutral: #6b7280;

  /* Typography */
  --serif: 'EB Garamond', 'Georgia', serif;
  --sans: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* Layout */
  --container-width: 720px;

  /* Backward-compat aliases (used in synthesis inline styles) */
  --border: var(--rule);
  --text-tertiary: var(--ink-muted);
  --foreground-secondary: var(--ink-secondary);
  --card-bg: var(--surface-warm);
  --background: var(--surface);
  --foreground: var(--ink);
  --text-link: var(--accent);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --ink: #e8e5dd;
  --ink-secondary: #c4c0b8;
  --ink-muted: #8a8680;
  --ink-faint: #6b6760;
  --surface: #141310;
  --surface-warm: #1a1915;
  --rule: #2e2c28;
  --rule-light: #232220;
  --accent: #5a8ab5;
  --accent-deep: #7aaad0;

  --success: #4ade80;
  --error: #f87171;
  --warning: #fbbf24;
  --neutral: #9ca3af;

  --border: var(--rule);
  --text-tertiary: var(--ink-muted);
  --foreground-secondary: var(--ink-secondary);
  --card-bg: var(--surface-warm);
  --background: var(--surface);
  --foreground: var(--ink);
  --text-link: var(--accent);
}

/* ===== BASE TYPOGRAPHY ===== */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

h1 { font-size: 2.8rem; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  color: var(--ink-secondary);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--accent-deep); }

strong { color: var(--ink); }

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

/* ===== HEADER ===== */
.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-light);
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover { color: var(--ink); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--ink); }

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-muted);
  padding: 4px 8px;
  transition: color 0.2s;
  line-height: 1;
}

.theme-toggle:hover { color: var(--ink); }

/* ===== FOOTER ===== */
.site-footer {
  padding: 40px 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

.footer-contact a {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.footer-contact a:hover { color: var(--ink-muted); }

/* ===== HOMEPAGE — HERO ===== */
.hero {
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--rule-light);
}

.hero h1 {
  max-width: 600px;
}

.hero-sub {
  margin-top: 28px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 540px;
}

.hero-qualifier {
  margin-top: 40px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ===== HOMEPAGE — VALUE SECTIONS ===== */
.value-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule-light);
}

.value-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.value-headline {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 16px;
}

.value-body {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-secondary);
  max-width: 580px;
}

/* ===== HOMEPAGE — DELIVERABLES ===== */
.deliverables {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule-light);
}

.deliverables-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 36px;
}

.deliverable-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--rule-light);
  align-items: baseline;
}

.deliverable-item:last-child { padding-bottom: 0; }

.deliverable-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.deliverable-desc {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-secondary);
}

/* ===== HOMEPAGE — AUDIENCE ===== */
.audience {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule-light);
}

.audience-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 28px;
}

.audience-text {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  max-width: 580px;
  font-style: italic;
}

/* ===== HOMEPAGE — CTA ===== */
.cta-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--rule-light);
}

.cta-headline {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 12px;
}

.cta-sub {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-muted);
  margin-bottom: 36px;
}

.cta-form {
  display: flex;
  gap: 0;
  max-width: 480px;
}

.cta-input {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--sans);
  font-size: 0.88rem;
  border: 1px solid var(--rule);
  border-right: none;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.cta-input::placeholder { color: var(--ink-faint); font-weight: 300; }
.cta-input:focus { border-color: var(--accent); }

.cta-button {
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--accent-deep);
  border: 1px solid var(--accent-deep);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.cta-button:hover { background: var(--accent); }

.cta-note {
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }

  .hero { padding: 60px 0 50px; }
  .hero-sub { font-size: 0.95rem; }

  .deliverable-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cta-form { flex-direction: column; }
  .cta-input { border-right: 1px solid var(--rule); border-bottom: none; }
  .cta-button { text-align: center; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }

  .audience-text { font-size: 1.2rem; }
}
