/* ==========================================================================
   McCormick, SC — design tokens
   ========================================================================== */
:root {
  --ink: #1C3B36;
  --gold: #C89A44;
  --clay: #A8552E;
  --parchment: #F3EEE1;
  --charcoal: #211D18;
  --mist: #DCE6E2;

  --font-display: "Fraunces", serif;
  --font-body: "Source Serif 4", serif;
  --font-mono: "IBM Plex Mono", monospace;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--parchment);
  line-height: 1.6;
  font-size: 1.0625rem;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

p {
  margin: 0 0 1.25em;
  max-width: 62ch;
}

a {
  color: inherit;
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(28, 59, 54, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--parchment);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logo span {
  color: var(--gold);
}

.site-nav {
  display: none;
  gap: 2rem;
}

.nav-link {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--parchment);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* ==========================================================================
   Mobile full-screen nav
   ========================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: var(--ink);
  visibility: hidden;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--parchment);
  text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  color: var(--gold);
}

.mobile-nav-foot {
  position: absolute;
  bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .mobile-nav {
    display: none;
  }
}

/* ==========================================================================
   Smooth scroll wrapper (desktop only — see js/main.js)
   ========================================================================== */
@media (min-width: 900px) {
  #smooth-wrapper {
    position: fixed;
    inset: 0;
    overflow: hidden;
  }
  #smooth-content {
    overflow: visible;
  }
}

/* ==========================================================================
   Panels
   ========================================================================== */
.panel {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.panel--light {
  background: var(--parchment);
  color: var(--charcoal);
}

.panel--dark {
  background: var(--ink);
  color: var(--parchment);
}

.panel--dark a {
  color: var(--gold);
}

.panel--dark a:hover {
  color: var(--parchment);
}

.panel--light a {
  color: var(--clay);
}

.panel--light a:hover {
  color: var(--ink);
}

.panel-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--ink);
  color: var(--parchment);
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.survey-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.mark-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-tag {
  font-size: 1.15rem;
  margin: 0 auto;
  color: var(--mist);
}

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 2;
}

.scroll-cue span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 32px;
  background: var(--gold);
}

/* ==========================================================================
   Ledger stats
   ========================================================================== */
.ledger-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.ledger-stat {
  border: 1px solid var(--clay);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--clay);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 4rem 1.5rem 2.5rem;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-note,
.footer-contact,
.footer-copyright {
  font-size: 0.8rem;
  color: var(--mist);
  margin: 0;
  max-width: 50ch;
}

.footer-contact a {
  color: var(--gold);
}

/* ==========================================================================
   Focus states
   ========================================================================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Cross-page transitions (progressive enhancement, Chromium browsers)
   ========================================================================== */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: 320ms ease-in both mccormick-fade-out;
  }
  ::view-transition-new(root) {
    animation: 380ms ease-out both mccormick-fade-in;
  }
}

@keyframes mccormick-fade-out {
  to { opacity: 0; }
}

@keyframes mccormick-fade-in {
  from { opacity: 0; }
}
