/* ============================================================
   Gilded Quay — Base / reset / typography primitives
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.58;
  background-image:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.45), transparent 55%),
    radial-gradient(100% 60% at 50% 100%, rgba(110, 98, 76, 0.10), transparent 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* paper grain — low-opacity fractal-noise overlay, multiply */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, picture, video { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  position: relative;
  background-image: linear-gradient(var(--gold-deep), var(--gold-deep));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 280ms var(--ease-out), color 280ms var(--ease-out);
}
a:hover {
  background-size: 100% 2px;
  color: var(--gold-deep);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

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

::selection {
  background: var(--champagne);
  color: var(--ink);
}

/* ---------- typography utility classes ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-block;
}

.script {
  font-family: var(--script);
  font-weight: 400;
  line-height: 0.9;
  color: var(--olive);
}

.lede {
  font-size: 1.32rem;
  color: var(--ink);
  font-style: italic;
}

.small {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--sepia);
}

.mono {
  font-family: var(--sans);
  letter-spacing: 0.08em;
}

.muted { color: var(--sepia); }
.ink   { color: var(--ink); }
.gold  { color: var(--gold-deep); }
.olive { color: var(--olive); }

/* ---------- focus ring (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- HTML hidden attribute must always win ---------- */
[hidden] { display: none !important; }

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