:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --surface-tinted: #f1f4f8;
  --text: #111827;
  --text-muted: #526071;
  --border: #e3e8ef;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.06);
  --radius: 14px;
}

body.theme-paper {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-tinted: #f3efe8;
  --text: #1c1917;
  --text-muted: #57534e;
  --border: #e7e2da;
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-soft: #fef3c7;
}

body.theme-sage {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-tinted: #eaf1ec;
  --text: #12211a;
  --text-muted: #4b6156;
  --border: #dce6df;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #ccfbf1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.palette-picker {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.tone-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tone-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.94rem;
  padding: 11px 18px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.86rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  transition: all 0.15s ease;
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: 84px 0 64px;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 4.5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-sub {
  margin: 0 auto 30px;
  max-width: 600px;
  font-size: 1.08rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-bar {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-tinted {
  background: var(--surface-tinted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  letter-spacing: -0.02em;
}

.filter-group {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.filter-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

.card.hidden {
  display: none;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.year {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 6px;
}

/* Principles */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.principle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.principle-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.principle h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.principle p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.contact-copy p {
  color: var(--text-muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.86rem;
  font-weight: 500;
}

.form-row input,
.form-row textarea {
  font: inherit;
  font-size: 0.94rem;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.form-status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--accent);
  min-height: 1.2em;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 780px) {
  .nav-links,
  .palette-picker {
    display: none;
  }

  .stats-bar,
  .cards-grid,
  .principles-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}
