/* ==========================================================================
   Four Buckets — shared shell styles
   Loaded by both /index.html and /rmd-calculator/index.html.
   Only contains styles common to every page (reset, palette, body, nav,
   footer, base typography). Page-specific styles stay inline on each page.
   ========================================================================== */

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

:root {
  --navy:   #0d1b2a;
  --navy2:  #112236;
  --teal:   #0d9488;
  --teal2:  #14b8a6;
  --gold:   #d4a832;
  --gold2:  #f0c040;
  --cream:  #faf6ee;
  --slate:  #64748b;
  --light:  #f1f5f9;
  --white:  #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
}

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── Typography helper ── */
.serif { font-family: 'Playfair Display', serif; }

/* ── Top nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: rgba(13,27,42,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo span { color: var(--gold); }

nav a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--white); }
nav a[aria-current="page"] { color: var(--white); }

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--teal2) !important; }

/* ── Footer ── */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

footer a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
}
footer a:hover { color: rgba(255,255,255,0.6); }

/* ── Reusable fade-in keyframe ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive (nav + footer pieces only; pages add their own) ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; }
  nav .nav-links { gap: 0.9rem !important; }
  nav .nav-links a:not(.nav-cta) { font-size: 0.8rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
