/* ════════════════════════════════════════════════════════════════════
   MSCON Design — shared chrome + theme
   ════════════════════════════════════════════════════════════════════ */

/* ── Theme tokens ──────────────────────────────────────────────────── */
:root {
  --bg:           #050a14;
  --surface:      #0a1220;
  --text:         #ffffffe5;
  --text-muted:   #ffffff99;
  --text-dim:     #ffffff4d;
  --accent:       #2a8a82;
  --accent-soft:  #2a8a8233;
  --accent-hover: #34a89e;
  --border:       #ffffff14;
  --border-strong:#ffffff26;

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg:           #f4f1ea;
  --surface:      #ebe6da;
  --text:         #2a2520;
  --text-muted:   #2a252099;
  --text-dim:     #2a25204d;
  --accent:       #1f6d66;
  --accent-soft:  #1f6d6622;
  --accent-hover: #2a8a82;
  --border:       #2a252014;
  --border-strong:#2a252026;
}

/* Per spec — theme transitions */
html, body, * {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* ── Reset + base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Lenis required styles */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ── Shared header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 96px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px 0 12px;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
}
.site-header[data-transparent="true"] {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header .brand {
  display: inline-flex; align-items: center;
  height: 100%;
  padding-left: 12px;
}
.site-header .brand-logo {
  height: 88px;
  width: auto;
}
.site-header .brand-wordmark {
  font-family: var(--serif);
  font-size: 22px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.22em;
  padding-left: 4px;
}

.site-nav {
  display: flex; align-items: center; gap: 28px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.site-nav .nav-link {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 0;
  position: relative;
  transition: color 0.3s var(--ease);
}
[data-theme="light"] .site-nav .nav-link {
  color: rgba(42, 37, 32, 0.9);
}
[data-theme="light"] .site-header[data-transparent="true"] .nav-link {
  color: rgba(255, 255, 255, 0.9);
}
.site-nav .nav-link:hover { color: var(--accent); }
.site-nav .nav-link.active,
[data-theme="light"] .site-nav .nav-link.active,
[data-theme="light"] .site-header[data-transparent="true"] .nav-link.active {
  color: var(--accent);
}
.site-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
}

.header-actions {
  display: flex; align-items: center; gap: 8px;
}

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon {
  position: absolute;
  display: inline-flex;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.theme-toggle { position: relative; }
[data-theme="dark"] .theme-icon-sun {
  opacity: 1; transform: rotate(0) scale(1);
}
[data-theme="dark"] .theme-icon-moon {
  opacity: 0; transform: rotate(-90deg) scale(0.6);
}
[data-theme="light"] .theme-icon-sun {
  opacity: 0; transform: rotate(90deg) scale(0.6);
}
[data-theme="light"] .theme-icon-moon {
  opacity: 1; transform: rotate(0) scale(1);
}

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
}
.menu-toggle:hover { color: var(--accent); }

@media (max-width: 880px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ── Mobile menu overlay ───────────────────────────────────────────── */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 250;
  padding: 96px 32px 48px;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.mobile-menu.open {
  opacity: 1; pointer-events: auto; transform: none;
}
.mobile-menu .menu-close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer;
}
.mobile-menu .menu-close:hover { color: var(--accent); }
.mobile-nav {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 20px;
}
.mobile-nav .mobile-nav-link {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.mobile-nav .mobile-nav-link.active { color: var(--accent); }
.mobile-nav .mobile-nav-link:hover { color: var(--accent); }
.theme-toggle-mobile {
  margin-top: auto;
  width: auto !important; height: auto !important;
  align-self: flex-start;
  padding: 14px 18px !important;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

/* ── Shared footer ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 64px 8vw 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 56px;
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .footer-logo { height: 32px; width: auto; }
.footer-brand .footer-wordmark {
  font-family: var(--serif);
  font-size: 22px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.2em;
}
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted);
}
.footer-nav { gap: 10px; }
.footer-nav a {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
}
.footer-nav a:hover { color: var(--accent); }
.footer-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-muted);
  gap: 8px;
}
.footer-meta a:hover { color: var(--accent); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px;
  gap: 20px;
}
.footer-copy {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.footer-social a:hover { color: var(--accent); background: var(--accent-soft); }

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer-col { align-items: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Common page hero band ─────────────────────────────────────────── */
.page-hero {
  padding: 160px 8vw 72px;
  background: var(--bg);
  position: relative;
}
.page-eyebrow {
  font-family: var(--sans);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 22px;
}
.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--text);
  max-width: 900px;
  margin: 0;
}
.page-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--text-muted);
  max-width: 720px;
  margin-top: 18px;
  line-height: 1.4;
}

/* ── Common buttons ────────────────────────────────────────────────── */
.btn-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  background: transparent;
  text-decoration: none;
}
.btn-pill:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-text {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}
.btn-text:hover { border-bottom-color: var(--accent); }

/* ── Common section helpers ────────────────────────────────────────── */
.section {
  padding: 100px 8vw;
  background: var(--bg);
}
.section-eyebrow {
  font-family: var(--sans);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.005em;
}

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html, body, * { transition: none !important; animation-duration: 0.001ms !important; }
}
