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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh; display: flex; flex-direction: column;
}

/* ── SHARED LAYOUT VARIABLES ── */
:root {
  --navy: #0D1B2A;
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --gold-pale: #F5EDD6;
  --white: #ffffff;
  --off-white: #FAFAF8;
  --black: #0A0A0A;
  --gray-100: #F4F4F2;
  --gray-200: #E8E8E8;
  --gray-400: #ADADAA;
  --gray-600: #6B6B68;
  --gray-800: #2E2E2C;
  --bg: var(--white);
  --bg-alt: var(--off-white);
  --text-primary: var(--black);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --border: var(--gray-200);
  --nav-bg: rgba(255,255,255,0.92);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --radius-lg: 16px;
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
  --bg: var(--navy);
  --bg-alt: #0F2336;
  --text-primary: #F0EDE6;
  --text-secondary: #9BA8B4;
  --text-muted: #5A6A78;
  --border: #1E3248;
  --nav-bg: rgba(13,27,42,0.95);
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 120px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-text {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo-text span { color: var(--gold); font-style: italic; }
.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: flex; align-items: center;
  font-size: 14px; font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-right {
  display: flex; align-items: center; gap: 12px;
}
.btn-ghost {
  font-family: var(--sans);
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  background: none; border: none;
  padding: 8px 16px; border-radius: 8px;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--gray-100); }
[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,0.06); }

.btn-primary {
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  color: var(--navy);
  background: var(--gold);
  border: none; border-radius: 8px;
  padding: 9px 20px;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 36px; height: 36px;
  background: var(--gray-100); border: none;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  font-size: 16px;
  color: var(--text-primary);
}
[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,0.08); }
.theme-toggle:hover { background: var(--gray-200); transform: scale(1.05); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,0.12); }

/* ── MOBILE MENU ── */
.mobile-menu-btn {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 12px;
  color: var(--text-primary);
  z-index: 110;
}
.mobile-menu-btn svg { width: 24px; height: 24px; }

.mobile-nav {
  position: fixed;
  top: 120px; left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateY(-100%);
  opacity: 0; visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  z-index: 90;
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1; visibility: visible;
}
.mobile-nav .btn-ghost, .mobile-nav .btn-primary {
  width: 100%; text-align: center;
  padding: 14px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 24px 48px;
  background: var(--bg);
}
.footer-inner {
  max-width: 1160px; margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.footer-links {
  display: flex; flex-direction: column; gap: 12px; list-style: none;
  padding: 0; margin: 0;
}
.footer-links a {
  font-size: 14px; color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  text-align: center;
}
.footer-copy {
  font-size: 13px; color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-right .btn-ghost, .nav-right .btn-primary { display: none; }
  .mobile-menu-btn { display: block; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .footer-inner { text-align: center; }
  .footer-col .logo { justify-content: center; }
  .footer-links { align-items: center; }
}
