/* ============================================================
   The Queen — base primitives (shared contract)
   Reuse these classes as-is; page-specific layout lives in
   css/queen.css instead.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-1);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

::selection { background: var(--purple); color: #fff; }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: rgba(12,53,42,.25); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* ---- layout ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* capped at --s-8: two adjacent sections' paddings stack, so a 12rem max
   produced ~24rem voids that read as missing content rather than air */
.section { padding-block: clamp(var(--s-6), 7vw, var(--s-8)); }

/* ---- typography primitives ---- */
.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;      /* Cormorant needs more leading than a grotesk */
  letter-spacing: 0;
}
.loud {
  font-family: var(--loud);
  font-weight: 700;
  line-height: 1.12;
}
.display em, .italic { font-style: italic; font-family: var(--serif); }

.eyebrow {
  font-family: var(--body);
  font-size: var(--fs-0);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--purple-ink);
}

/* recurring motif: museum "plate" caption under a paired image —
   the signature move ported from the 5 Roles gallery pattern */
.plate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35em var(--s-2);
  font-family: var(--body);
  font-size: var(--fs-0);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray);
  padding-top: var(--s-2);
  border-top: var(--line-thin);
  margin-top: var(--s-2);
}
/* nowrap only on the short catalogue number — long titles must wrap,
   otherwise their min-content width inflates grid tracks and forces
   horizontal overflow on small screens */
.plate__num { color: var(--purple-ink); font-weight: 700; font-family: var(--mono); letter-spacing: 0; white-space: nowrap; }
.plate__title { font-weight: 600; color: var(--ink); min-width: 0; }

/* framed media panel — images hang like canvases; also the
   overflow:hidden container data-parallax/data-scale scrub inside */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--r);
}
.frame > img, .frame > video {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2, .6rem);
  min-height: 52px;
  padding: .9em 2.2em;
  font-family: var(--body);
  font-size: var(--fs-1);
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 999px;
  transition: background .28s cubic-bezier(.22,1,.36,1), color .28s cubic-bezier(.22,1,.36,1),
              border-color .28s cubic-bezier(.22,1,.36,1), transform .28s cubic-bezier(.22,1,.36,1);
}
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--purple); transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid rgba(12,53,42,.3); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--purple { background: var(--purple); color: #fff; }
.btn--purple:hover { background: var(--purple-ink); transform: translateY(-2px); }

/* ---- motion hooks (main.js animates these; hidden only when JS present,
   so content is never invisible without JS) ---- */
.js [data-reveal] { opacity: 0; transform: translateY(36px); will-change: opacity, transform; }
[data-split] .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.js [data-split] .word > span { display: inline-block; transform: translateY(110%); }
html:not(.js) [data-split] .word > span { display: inline-block; }

.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: var(--s-6, 4rem); will-change: transform; }

/* ---- a11y ---- */
.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;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-split] .word > span { transform: none !important; }
}
