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

:root {
  --bg: #f5f1eb;
  --bg-alt: #ebe5db;
  --bg-elevated: #ffffff;
  --text: #1a1f2e;
  --text-secondary: #4a4f5e;
  --text-tertiary: #7a7f8e;
  --accent: #8b6f4e;
  --accent-hover: #a3845e;
  --accent-subtle: rgba(139, 111, 78, 0.08);
  --border: rgba(26, 31, 46, 0.10);
  --border-strong: rgba(26, 31, 46, 0.20);
  --card-bg: rgba(26, 31, 46, 0.03);
  --dark-surface: #1a1f2e;
  --dark-surface-text: #f5f1eb;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --max-w: 1200px;
  --px: clamp(24px, 5vw, 80px);
}


html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

/* Utility classes */
.container { max-width: var(--max-w); margin: 0 auto; padding-left: var(--px); padding-right: var(--px); }
.section { padding-top: clamp(80px, 12vh, 140px); padding-bottom: clamp(80px, 12vh, 140px); }
.section-sm { padding-top: clamp(48px, 6vh, 80px); padding-bottom: clamp(48px, 6vh, 80px); }

/* Dark band sections */
.dark-band {
  background: var(--dark-surface);
  color: var(--dark-surface-text);
}
.dark-band .text-secondary { color: rgba(245, 241, 235, 0.6); }
.dark-band .text-tertiary { color: rgba(245, 241, 235, 0.4); }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Accent band */
.accent-glow {
  background: linear-gradient(135deg, oklch(0.35 0.08 60) 0%, oklch(0.22 0.04 250) 100%);
  color: #f5f1eb;
}

/* Shimmer line */
.accent-line {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  border: none;
}

/* Animations */
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ticker-track {
  display: flex; gap: 48px; animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Nav */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 var(--px); height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.site-nav.scrolled {
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--border);
}
.site-nav .nav-brand {
  font-family: var(--serif); font-size: 22px; font-weight: 400;
  letter-spacing: -0.02em; color: var(--text); text-decoration: none;
}
.desktop-nav {
  display: flex; gap: 2px; align-items: center;
}
.desktop-nav a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500; padding: 6px 10px;
  border-radius: 6px; transition: color 0.2s, background 0.2s;
}
.desktop-nav a:hover {
  color: var(--accent); background: var(--accent-subtle);
}
.theme-toggle {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); margin-left: 6px;
  font-size: 14px; transition: border-color 0.2s;
}
.mobile-burger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 24px; cursor: pointer; padding: 8px;
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  padding: 80px var(--px) 40px; display: none; flex-direction: column; gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text); font-size: 20px; padding: 12px 0;
  border-bottom: 1px solid var(--border); text-decoration: none;
}
.mobile-menu .theme-toggle-mobile {
  margin-top: 16px; background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; color: var(--text); cursor: pointer;
  font-family: var(--sans); font-size: 15px;
}
@media (max-width: 900px) {
  .desktop-nav { display: none !important; }
  .mobile-burger { display: flex !important; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 48px 40px; margin-bottom: 48px;
}
.footer-col-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: var(--text-secondary); font-size: 14px; text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 16px;
}

/* Shared component styles */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.section-label.light { color: var(--accent-hover); }
.section-heading {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15; font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: 48px; text-wrap: balance;
}

/* Hover card effect */
.hover-card {
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.hover-card:hover {
  transform: translateY(-3px);
}

/* CTA buttons */
.btn-primary {
  display: inline-block; padding: 14px 32px;
  background: var(--accent); color: var(--bg); border-radius: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  color: var(--bg);
}
.btn-secondary {
  display: inline-block; padding: 14px 32px;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: 8px; font-size: 15px; font-weight: 500; text-decoration: none;
  color: var(--text);
}
.btn-secondary.dark {
  color: var(--dark-surface-text);
  border-color: rgba(245,241,235,0.2);
}

/* Form styles */
.form-label {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  display: block; margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 14px 16px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: var(--sans); font-size: 15px;
  outline: none; transition: border-color 0.2s;
}
.form-input:focus {
  border-color: var(--accent);
}
.form-select {
  appearance: none; cursor: pointer;
}

/* Legal tabs */
.legal-tab {
  padding: 10px 20px; background: none;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-secondary); font-family: var(--sans);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.legal-tab.active {
  background: var(--card-bg); color: var(--text);
}
.legal-tab-content { display: none; }
.legal-tab-content.active { display: block; }
