@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

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

/* Fluid root font size.
   Drives EVERY rem-based value in the design system so layout and type scale
   together from phones to 4K monitors without breakpoint cliffs.
   Tuned so common desktops (1440-1920) sit around 16-17px root and only true
   4K hits the 20px ceiling. Earlier curve was too steep and broke nav layouts
   on standard 1920x1080 monitors with a chat sidebar reducing effective width. */
html {
  font-size: clamp(15px, 0.20vw + 13.5px, 20px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 var(--space-4) 0;
  color: var(--cream-bright);
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: 0.10em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); letter-spacing: 0.06em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-4) 0; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--cream-bright); }

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

::selection {
  background: var(--wine-primary);
  color: var(--cream-bright);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--border-gold);
  border-radius: var(--r-sm);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--wine-primary);
  color: var(--cream-bright);
  padding: var(--space-3) var(--space-5);
  z-index: 9999;
}
.skip-link:focus { left: 0; }

/* Visually hidden but still readable by screen readers and search engines */
.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;
}

/* Layout helpers */
.container {
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.prose {
  max-width: var(--max-w-prose);
  margin: 0 auto;
}

.section {
  padding: var(--space-12) 0;
  position: relative;
}

.section--mist {
  background: linear-gradient(180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-primary) 100%);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin: 0 0 var(--space-3) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-3);
}

.divider-gold {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-primary) 50%,
    transparent 100%);
  margin: var(--space-6) auto;
  max-width: 480px;
}

.text-cream  { color: var(--cream-bright); }
.text-gold   { color: var(--gold-bright); }
.text-wine   { color: var(--wine-bright); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

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