:root {
  --navy: #0B1B2B;
  --navy-2: #142a42;
  --ivory: #F5F1EA;
  --gold: #B08D57;
  --gold-2: #c9a571;
  --graphite: #1F2933;
  --muted: #5b6670;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: var(--graphite);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: 'Fraunces', 'Times New Roman', serif; font-optical-sizing: auto; }
.bg-navy { background-color: var(--navy); }
.bg-navy-2 { background-color: var(--navy-2); }
.bg-ivory { background-color: var(--ivory); }
.text-navy { color: var(--navy); }
.text-ivory { color: var(--ivory); }
.text-gold { color: var(--gold); }
.text-graphite { color: var(--graphite); }
.text-muted { color: var(--muted); }
.border-gold { border-color: var(--gold); }
.bg-gold { background-color: var(--gold); }

/* Nav scroll-state */
.nav { transition: background-color 200ms ease, border-color 200ms ease, backdrop-filter 200ms ease; }
.nav.is-scrolled { background-color: rgba(11, 27, 43, 0.92); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid rgba(176, 141, 87, 0.25); }

/* Subtle grain on hero */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.06;
  background-image: radial-gradient(rgba(255,255,255,0.8) 1px, transparent 1px);
  background-size: 3px 3px; mix-blend-mode: overlay;
}

/* Form success state */
.form-success { display: none; }
.form-submitted .form-fields { display: none; }
.form-submitted .form-success { display: block; }

/* Gold underline link */
.link-gold { position: relative; color: var(--gold); }
.link-gold::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--gold); transform: scaleX(0.3); transform-origin: left; transition: transform 250ms ease;
}
.link-gold:hover::after { transform: scaleX(1); }

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Scroll offset so fixed nav doesn't cover anchor targets */
html { scroll-padding-top: 5rem; }

/* Skip link — visible only on focus */
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--gold); color: var(--navy); padding: 0.5rem 1rem;
  border-radius: 9999px; font-weight: 600; text-decoration: none;
  transition: top 150ms ease;
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--navy); outline-offset: 2px; }

/* Focus-visible ring for interactive elements */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ivory), 0 0 0 4px var(--navy);
  border-radius: 4px;
}

/* Darker gold for small text on ivory backgrounds */
.text-gold-dark { color: #7d6131; }

/* Visually-hidden utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
