/* Memoria Aeterna — shared styles
   Design tokens live as CSS custom properties on :root so Tweaks can swap them. */

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

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --c-white: #FFFFFF;
  --c-cream: #F0E8D8;
  --c-cream-soft: #F8F2E5;
  --c-black: #1A1814;
  --c-black-soft: #2A2520;
  --c-gold: #B68A4C;
  --c-gold-soft: #C9A572;
  --c-gold-deep: #8C6A38;
  --c-navy: #0F1F38;
  --c-navy-deep: #08111F;

  /* derived (tweakable via gold-intensity) */
  --gold-mix: 1;
  --c-gold-line: rgba(182, 138, 76, calc(0.32 * var(--gold-mix)));
  --c-gold-line-strong: rgba(182, 138, 76, calc(0.6 * var(--gold-mix)));
  --c-gold-glow: rgba(201, 165, 114, calc(0.18 * var(--gold-mix)));

  /* type — defaults overridden by [data-font-pair] */
  --f-display: 'Cinzel', 'Trajan Pro', serif;
  --f-body: 'EB Garamond', 'Garamond', serif;
  --f-ui: 'Inter', -apple-system, system-ui, sans-serif;

  --container: 1080px;
  --container-narrow: 720px;
  --section-pad: 140px;
  --section-pad-sm: 88px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* font pairs (tweakable) */
:root[data-font-pair="cormorant"]   { --f-display: 'Cormorant SC', serif;       --f-body: 'Cormorant Garamond', serif; }
:root[data-font-pair="italian"]     { --f-display: 'Cinzel', serif;             --f-body: 'Cormorant Garamond', serif; }
:root[data-font-pair="editorial"]   { --f-display: 'Cormorant SC', serif;       --f-body: 'EB Garamond', serif; }

/* gold-intensity (tweakable) */
:root[data-gold="low"]  { --gold-mix: 0.65; }
:root[data-gold="high"] { --gold-mix: 1.35; }

/* ── reset / base ───────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  color: var(--c-black);
  background: var(--c-white);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body[data-bg="cream"]  { background: var(--c-cream-soft); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

::selection { background: var(--c-gold); color: var(--c-white); }

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  font-family: var(--f-ui);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-black);
  background: transparent;
  transition: background 0.6s var(--ease), color 0.6s var(--ease), backdrop-filter 0.6s var(--ease);
}
.nav.solid {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 0.5px solid var(--c-gold-line);
}
body[data-bg="cream"] .nav.solid {
  background: rgba(248, 242, 229, 0.92);
}
.nav.over-dark { color: var(--c-cream-soft); }
.nav.over-dark.solid { color: var(--c-black); }
.nav.over-dark:not(.solid) .nav-mark { filter: brightness(0) invert(1); }
.nav .footer-logo, .nav .nav-mark { transition: filter 0.6s var(--ease); }

.nav-wordmark {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.32em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-wordmark svg { width: 22px; height: auto; }
.nav-wordmark .ampersand { letter-spacing: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.4s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0.5px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--c-gold); }

/* ── layout primitives ──────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
.container.narrow { max-width: var(--container-narrow); }

.section {
  padding: var(--section-pad) 0;
}
.section.tight { padding: var(--section-pad-sm) 0; }
.section.dark { background: var(--c-navy-deep); color: var(--c-cream-soft); }

/* Tone classes: derived from body[data-bg] so the bg tweak actually flips
   the contrasting sections rather than overriding them with hardcoded color.
   In ALTERNATING mode, tone-contrast = opposite tone for visual rhythm.
   In pure white/cream modes, tone-contrast matches body so the whole page
   reads as one tone (which is what the user explicitly asked for). */
body[data-bg-mode="alternating"][data-bg="white"] .section.tone-contrast { background: var(--c-cream-soft); }
body[data-bg-mode="alternating"][data-bg="cream"] .section.tone-contrast { background: var(--c-white); }
body[data-bg="white"] .section.tone-flat { background: var(--c-white); }
body[data-bg="cream"] .section.tone-flat { background: var(--c-cream-soft); }

.section-mark {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--c-gold);
  text-align: center;
  margin-bottom: 28px;
  font-weight: 500;
}

/* ── typography ─────────────────────────────────────────────────────────── */
.display-1, h1.display {
  font-family: var(--f-display);
  font-size: clamp(48px, 6.5vw, 76px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}
.display-2, h2.display {
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0.015em;
  margin: 0 0 36px;
  text-wrap: balance;
}
.eyebrow {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin: 0 0 20px;
  font-weight: 500;
}
.lede {
  font-family: var(--f-body);
  font-size: 22px;
  line-height: 1.55;
  font-style: italic;
  color: var(--c-black-soft);
  text-wrap: pretty;
}
.body p {
  font-size: 18px;
  line-height: 1.75;
  margin: 0 0 1.1em;
  text-wrap: pretty;
}
.body p:last-child { margin-bottom: 0; }
.body.serif p { font-family: var(--f-body); }

.center { text-align: center; }
.center .body { max-width: 580px; margin: 0 auto; }

/* ── hero (γ — lighthouse landscape) ────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  color: var(--c-cream-soft);
  padding: 120px 24px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(182, 138, 76, 0.18), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(40, 70, 120, 0.45), transparent 70%),
    linear-gradient(180deg, var(--c-navy-deep) 0%, var(--c-navy) 55%, #1A2842 85%, #2B3A55 100%);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(240, 232, 216, 0.18), transparent 70%),
    radial-gradient(2px 2px at 18% 22%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 78% 18%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 42% 11%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 88% 38%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 12% 42%, rgba(255,255,255,0.35), transparent),
    radial-gradient(2px 2px at 62% 8%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 28% 6%, rgba(255,255,255,0.35), transparent);
  pointer-events: none;
}

/* THE lockup — full lighthouse + wordmark + Nº I, all in one PNG */
.hero-stack {
  position: relative;
  z-index: 4;
  width: clamp(320px, 56vw, 720px);
  margin-bottom: 56px;
}
.hero-lockup {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 80px rgba(0, 0, 0, 0.5));
}

/* Lamp glow — sits at the dome at the top of the lighthouse-in-lockup.
   The lighthouse in the lockup occupies the top ~52% of the image, and the
   lamp dome is at ~14% from the top of the lockup. */
.hero-lamp {
  position: absolute;
  z-index: 3;
  top: 14%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 220, 170, 0.28) 0%,
    rgba(255, 200, 130, 0.16) 20%,
    rgba(201, 165, 114, 0.08) 40%,
    transparent 70%);
  pointer-events: none;
  animation: lampPulse 5.5s ease-in-out infinite;
  filter: blur(8px);
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 760px;
}
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 24px;
  text-wrap: balance;
  color: var(--c-cream-soft);
}
.hero-wordmark {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: 0.32em;
  font-weight: 500;
  color: var(--c-cream-soft);
  margin: 0 0 14px;
}
.hero-sublabel {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--c-gold-soft);
  margin: 0 0 48px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.hero-sublabel::before,
.hero-sublabel::after {
  content: '';
  display: block;
  width: 32px;
  height: 0.5px;
  background: var(--c-gold-soft);
  opacity: 0.7;
}
.hero .sub {
  font-family: var(--f-body);
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--c-gold-soft);
  letter-spacing: 0.02em;
  margin: 0;
}
.hero-rule {
  width: 60px;
  height: 0.5px;
  background: var(--c-gold);
  margin: 28px auto;
  opacity: 0.7;
}
.hero-scroll {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-scroll-line {
  width: 0.5px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--c-gold-soft) 30%, var(--c-gold-soft) 70%, transparent);
  animation: scrollPulse 2.6s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* hero β — typography only, no lighthouse */
.hero[data-style="beta"] .hero-bg {
  background: var(--c-white);
}
.hero[data-style="beta"] .hero-bg::after { display: none; }
.hero[data-style="beta"] .hero-lockup,
.hero[data-style="beta"] .hero-lamp,
.hero[data-style="beta"] .beam { display: none; }
.hero[data-style="beta"] { color: var(--c-black); }
.hero[data-style="beta"] h1 { color: var(--c-black); }
.hero[data-style="beta"] .sub { color: var(--c-gold-deep); }

/* hero α — object-led (sapphire, lockup smaller, off-center) */
.hero[data-style="alpha"] .hero-bg {
  background:
    radial-gradient(ellipse 90% 60% at 70% 30%, rgba(182, 138, 76, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 70% at 50% 50%, rgba(40, 60, 100, 0.4), transparent 60%),
    linear-gradient(135deg, #0A0908 0%, #161412 50%, #1F1B16 100%);
}
.hero[data-style="alpha"] .hero-stack { width: clamp(220px, 36vw, 460px); opacity: 0.85; }

/* In pure white/cream modes, the hero adapts: light bg, dark lockup. */
body[data-bg-mode="white"] .hero .hero-bg { background: var(--c-white); }
body[data-bg-mode="cream"] .hero .hero-bg { background: var(--c-cream-soft); }
body[data-bg-mode="white"] .hero,
body[data-bg-mode="cream"] .hero { color: var(--c-black); }
body[data-bg-mode="white"] .hero-bg::after,
body[data-bg-mode="cream"] .hero-bg::after { display: none; }
body[data-bg-mode="white"] .hero h1,
body[data-bg-mode="cream"] .hero h1 { color: var(--c-black); }
body[data-bg-mode="white"] .hero .sub,
body[data-bg-mode="cream"] .hero .sub { color: var(--c-gold-deep); }
body[data-bg-mode="white"] .hero-lockup,
body[data-bg-mode="cream"] .hero-lockup { filter: drop-shadow(0 12px 60px rgba(0,0,0,0.12)); }
body[data-bg-mode="white"] .hero-scroll,
body[data-bg-mode="cream"] .hero-scroll { color: rgba(26,24,20,0.5); }
body[data-bg-mode="white"] .beam,
body[data-bg-mode="cream"] .beam { display: none; }
body[data-bg-mode="white"] .hero-lamp,
body[data-bg-mode="cream"] .hero-lamp { opacity: 0.55; }
body[data-bg-mode="white"] .nav.over-dark,
body[data-bg-mode="cream"] .nav.over-dark { color: var(--c-black); }
body[data-bg-mode="white"] .nav.over-dark:not(.solid) .nav-mark,
body[data-bg-mode="cream"] .nav.over-dark:not(.solid) .nav-mark { filter: none; }

/* lighthouse beam — emanates from the lamp (top of lighthouse) */
.beam {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: 200vw;
  height: 60vh;
  top: 8%;
  left: 50%;
  transform-origin: 0% 50%;
  transform: translate(0, -50%) rotate(0deg);
  opacity: 0;
}
.beam-ray {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 16vh;
  background: linear-gradient(90deg,
    rgba(255, 220, 160, 0.55) 0%,
    rgba(201, 165, 114, 0.3) 18%,
    rgba(201, 165, 114, 0.1) 45%,
    transparent 85%);
  transform: translateY(-50%);
  filter: blur(6px);
  clip-path: polygon(0 42%, 0 58%, 100% 95%, 100% 5%);
}
.beam.sweep {
  animation: beamSweep 4.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}
@keyframes beamSweep {
  0%   { opacity: 0; transform: translate(0, -50%) rotate(-65deg); }
  10%  { opacity: 0.95; }
  90%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(0, -50%) rotate(65deg); }
}
.beam.pulse {
  animation: beamPulse 7s ease-in-out infinite;
  transform: translate(0, -50%) rotate(-8deg);
}
@keyframes beamPulse {
  0%, 100% { opacity: 0; }
  45% { opacity: 0; }
  50% { opacity: 0.22; }
  55% { opacity: 0; }
}
@keyframes lampPulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

/* watermark lighthouse — large faded silhouette behind certain sections */
.section-watermark {
  position: relative;
  overflow: hidden;
}
.section-watermark::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(420px, 70vw, 720px);
  aspect-ratio: 319 / 285;
  transform: translate(-50%, -50%);
  background-image: url('images/lh.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}
body[data-bg="cream"] .section-watermark::before {
  background-image: url('images/lh.png');
  opacity: 0.05;
}
.section-watermark > * { position: relative; z-index: 1; }

/* Lighthouse silhouette images — use real <img> for max compatibility */
.lh-img {
  display: inline-block;
  height: auto;
  vertical-align: middle;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── ornament: lighthouse divider ───────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0 auto;
  max-width: 320px;
  padding: 56px 0;
  color: var(--c-gold);
  opacity: 0.7;
}
.divider .rule {
  flex: 1;
  height: 0.5px;
  background: var(--c-gold-line-strong);
}
.divider .lh-img,
.divider svg { width: 36px; height: auto; }

/* page intro / eyebrow header */
.page-intro {
  padding: 200px 0 80px;
  text-align: center;
}
.page-intro .eyebrow { color: var(--c-gold); }
.page-intro h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 500;
  margin: 0 0 24px;
  letter-spacing: 0.015em;
  text-wrap: balance;
}
.page-intro .lede {
  max-width: 620px;
  margin: 0 auto;
}

/* ── Curator's Notebook — closed Codex you click to open ────────────────── */
.notebook-stage {
  display: grid;
  grid-template-rows: auto 0fr;
  transition: grid-template-rows 0.9s var(--ease);
  max-width: 720px;
  margin: 64px auto 0;
}
.notebook-stage[data-open] {
  grid-template-rows: auto 1fr;
}

.notebook-cover {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease), filter 0.7s var(--ease);
  color: var(--c-cream-soft);
}
.notebook-frame {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url('images/moodboard-01-codex-closed.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 2px;
  position: relative;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.25),
    0 20px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.notebook-frame::before { content: none; }

/* Open/close hint as a quiet caption beneath, not on the cover */
.notebook-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  transition: color 0.4s var(--ease);
}
.notebook-action-line {
  display: block;
  width: 22px;
  height: 0.5px;
  background: var(--c-gold);
  opacity: 0.55;
}
.notebook-cover:hover { transform: translateY(-4px); }
.notebook-cover:hover + .notebook-action { color: var(--c-gold); }
.notebook-cover[aria-expanded="true"] + .notebook-action .notebook-action-label::before { content: 'Close'; }
.notebook-cover:not([aria-expanded="true"]) + .notebook-action .notebook-action-label::before { content: 'Open'; }

/* OPEN state: cover recedes (smaller, dimmer, slightly blurred). */
.notebook-stage[data-open] .notebook-cover {
  transform: scale(0.85) translateY(-12px);
  opacity: 0.45;
  filter: blur(0.5px);
}

.notebook-pages {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.7s var(--ease) 0.1s;
  display: grid;
  gap: 56px;
}
.notebook-stage[data-open] .notebook-pages {
  opacity: 1;
}
.notebook-pages-inner {
  position: relative;
  padding-top: 72px;
  display: grid;
  gap: 64px;
}
/* Lighthouse watermark behind the 3 quotes — only present once open.
   Sized to fill the height of the quotes stack, centered horizontally. */
.notebook-pages-inner::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 360px;
  height: 84%;
  background-image: url('images/lh.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}
.notebook-pages-inner > .quote {
  position: relative;
  z-index: 1;
}
.quote {
  max-width: 720px;
  margin: 0 auto 72px;
  text-align: center;
}
.quote:last-child { margin-bottom: 0; }
.quote-mark {
  font-family: var(--f-display);
  color: var(--c-gold);
  font-size: 40px;
  line-height: 1;
  margin-bottom: 16px;
}
.quote-text {
  font-family: var(--f-body);
  font-size: 24px;
  line-height: 1.5;
  font-style: italic;
  color: var(--c-black);
  margin: 0 0 22px;
  text-wrap: balance;
}
.quote-attr {
  font-family: var(--f-ui);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  font-weight: 400;
}

/* ── object page sections ───────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split > .media {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}
.split .text h2 { margin-bottom: 28px; }
.split .body { max-width: 460px; }

/* Real photography media slots — used on The Object page */
.media {
  position: relative;
  overflow: hidden;
  background: #15110D;
}
.media-photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-codex-open {
  aspect-ratio: 16 / 11;
  width: 100%;
}
.media-painting > img {
  /* Crop to the painting half (left side of the codex-open photo) */
  object-position: 18% center;
  transform: scale(1.7);
  transform-origin: 18% center;
}
.media-codex-closed { background: #1A1410; }

/* sapphire render */
.media-sapphire {
  background: radial-gradient(ellipse 80% 60% at 30% 30%, rgba(120, 160, 220, 0.35), transparent 60%),
              radial-gradient(ellipse 60% 80% at 80% 80%, rgba(60, 90, 150, 0.4), transparent 60%),
              linear-gradient(135deg, #0F1822 0%, #1A2840 50%, #0A1018 100%);
}
.media-sapphire::after {
  content: '';
  position: absolute;
  inset: 18% 14%;
  background: linear-gradient(135deg,
    rgba(180, 210, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.05) 30%,
    rgba(140, 180, 230, 0.12) 60%,
    rgba(255, 240, 200, 0.06) 100%);
  border: 0.5px solid rgba(200, 220, 255, 0.18);
  border-radius: 1px;
  box-shadow:
    inset 0 0 60px rgba(180, 210, 255, 0.1),
    0 0 80px rgba(120, 160, 220, 0.15);
}

/* engraving close-up */
.media-engrave {
  background: linear-gradient(180deg, #0F1822 0%, #08111F 100%);
}
.media-engrave::after {
  content: 'MEMORIA ÆTERNA';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: clamp(20px, 3vw, 36px);
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.25);
  filter: blur(0.4px);
}

/* codex exterior */
.media-codex {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, #2A2520 0%, #1A1614 70%, #0D0B09 100%);
}
.media-codex::after {
  content: '';
  position: absolute;
  inset: 12% 18%;
  background:
    radial-gradient(ellipse 50% 100% at 50% 50%, rgba(255, 220, 160, 0.05), transparent 60%),
    linear-gradient(135deg, #1F1814 0%, #2A1F18 50%, #15110D 100%);
  border-radius: 1px;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.6),
    0 20px 60px rgba(0, 0, 0, 0.4);
}

/* codex opened */
.media-codex-open {
  background: linear-gradient(180deg, #FAF6EC 0%, #E8DCC8 100%);
  aspect-ratio: 16 / 9;
}

/* artist panel */
.media-artist {
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(255, 220, 160, 0.18), transparent 70%),
    linear-gradient(180deg, #0F1F38 0%, #08111F 60%, #0A1428 100%);
}

/* certificate */
.media-certificate {
  background: linear-gradient(180deg, #FAF6EC 0%, #EFE5CF 100%);
  aspect-ratio: 5 / 7;
}

/* ── timeline (Commission) ──────────────────────────────────────────────── */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 26px;
  top: 14px;
  bottom: 14px;
  width: 0.5px;
  background: var(--c-gold-line-strong);
}
.timeline-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 36px;
  align-items: start;
  padding: 28px 0;
  position: relative;
}
.timeline-num {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--c-gold);
  background: var(--c-white);
  border: 0.5px solid var(--c-gold-line-strong);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
body[data-bg="cream"] .timeline-num { background: var(--c-cream-soft); }
.timeline-step h3 {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 500;
  margin: 12px 0 12px;
  letter-spacing: 0.01em;
}
.timeline-step p {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  color: var(--c-black-soft);
  max-width: 480px;
}

/* ── form ───────────────────────────────────────────────────────────────── */
.form {
  max-width: 520px;
  margin: 0 auto;
}
.form-field {
  margin-bottom: 28px;
}
.form-label {
  display: block;
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  margin-bottom: 10px;
  font-weight: 500;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: 18px;
  color: var(--c-black);
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--c-gold-line-strong);
  padding: 8px 0 12px;
  outline: none;
  transition: border-color 0.4s var(--ease);
  cursor: text;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--c-gold);
}
.form-textarea {
  resize: none;
  min-height: 90px;
  font-family: var(--f-body);
  line-height: 1.55;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23B68A4C' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 24px;
}

/* hold-to-send button */
.hold-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 56px;
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-black);
  background: transparent;
  border: 0.5px solid var(--c-gold);
  border-radius: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.4s var(--ease);
  margin-top: 12px;
  user-select: none;
}
.hold-btn .label { position: relative; z-index: 2; }
.hold-btn .fill {
  position: absolute;
  inset: 0;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.05s linear;
  z-index: 1;
}
.hold-btn[data-holding="true"] { color: var(--c-white); }
.hold-btn[data-holding="true"] .fill {
  transform: scaleX(1);
  transition: transform 1.05s linear;
}
.hold-btn .hint {
  display: block;
  font-family: var(--f-ui);
  font-size: 10px;
  letter-spacing: 0.22em;
  margin-top: 14px;
  color: var(--c-gold-deep);
  font-weight: 400;
  text-align: center;
  opacity: 0.7;
}

.form-note {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 16px;
  color: var(--c-black-soft);
  text-align: center;
  margin-top: 28px;
}

/* ── CTAs (soft, two-column) ────────────────────────────────────────────── */
.soft-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid var(--c-gold-line);
  border-bottom: 0.5px solid var(--c-gold-line);
  margin-top: 80px;
}
.soft-cta {
  padding: 56px 40px;
  text-align: center;
  font-family: var(--f-display);
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--c-black);
  border-left: 0.5px solid var(--c-gold-line);
  position: relative;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
.soft-cta:first-child { border-left: none; }
.soft-cta .arrow {
  display: inline-block;
  margin-left: 14px;
  transition: transform 0.5s var(--ease);
  color: var(--c-gold);
}
.soft-cta:hover { color: var(--c-gold-deep); }
.soft-cta:hover .arrow { transform: translateX(8px); }

/* ── ledger (Object page + footer) ──────────────────────────────────────── */
.ledger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.ledger-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 640px;
  padding: 22px 0;
  border-bottom: 0.5px solid var(--c-gold-line);
  font-family: var(--f-body);
  font-size: 17px;
}
.ledger-entry:last-child { border-bottom: none; }
.ledger-no {
  font-family: var(--f-display);
  color: var(--c-gold);
  font-size: 20px;
  letter-spacing: 0.06em;
  min-width: 56px;
  text-align: left;
}
.ledger-status {
  text-align: left;
  font-style: italic;
  color: var(--c-black-soft);
}
.ledger-meta {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  font-variant-numeric: tabular-nums;
}
.ledger-status .dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-gold);
  margin-right: 10px;
  vertical-align: middle;
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── transition trigger list (Section IV on home, also reusable) ────────── */
.trigger-list {
  list-style: none;
  padding: 0;
  margin: 36px auto 24px;
  max-width: 460px;
  display: grid;
  gap: 12px;
}
.trigger-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: baseline;
  text-align: left;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 18px;
  color: var(--c-black);
  padding: 8px 0;
  border-bottom: 0.5px solid var(--c-gold-line);
}
.trigger-list li:last-child { border-bottom: none; }
.trigger-mark {
  color: var(--c-gold);
  font-family: var(--f-display);
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

/* ── motto strip (above footer on every page) ───────────────────────────── */
.motto-strip {
  padding: 96px 0 64px;
  text-align: center;
  background: transparent;
}
.motto {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: 0.12em;
  color: var(--c-gold);
  margin: 0 0 14px;
  font-weight: 500;
  text-transform: none;
  font-style: italic;
}
.motto-translation {
  font-family: var(--f-body);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-black-soft);
  opacity: 0.55;
  margin: 0;
}
.motto-translation em { font-style: italic; font-variant: small-caps; letter-spacing: 0.06em; text-transform: none; }
body[data-bg-mode="cream"] .motto-strip,
body[data-bg="cream"] .motto-strip { background: transparent; }
.footer {
  background: var(--c-black);
  color: var(--c-cream-soft);
  padding: 88px 0 36px;
  text-align: center;
}
.footer-logo {
  margin: 0 auto 36px;
  width: 56px;
  opacity: 0.85;
}
.footer-ledger {
  font-family: var(--f-body);
  font-size: 16px;
  font-style: italic;
  margin: 0 0 14px;
  color: var(--c-cream-soft);
}
.footer-ledger .no {
  font-family: var(--f-display);
  font-style: normal;
  color: var(--c-gold-soft);
  letter-spacing: 0.06em;
}
.footer-locations {
  font-family: var(--f-ui);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.55);
  margin: 30px 0 56px;
}
.footer-rule {
  width: 60%;
  max-width: 480px;
  margin: 0 auto 24px;
  height: 0.5px;
  background: var(--c-gold-line-strong);
}
.footer-copy {
  font-family: var(--f-ui);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 232, 216, 0.35);
}

/* (custom cursor removed in favor of native pointer) */

/* ── fade-in on scroll ──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .nav { padding: 18px 24px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 10.5px; }
  .container { padding: 0 24px; }
  :root { --section-pad: 88px; --section-pad-sm: 56px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: 0; }
  .split > .media { aspect-ratio: 16 / 11; }
  .soft-ctas { grid-template-columns: 1fr; }
  .soft-cta { border-left: none; border-top: 0.5px solid var(--c-gold-line); }
  .soft-cta:first-child { border-top: none; }
  .timeline { padding-left: 0; }
  .timeline::before { left: 22px; }
  .timeline-step { grid-template-columns: 48px 1fr; gap: 24px; }
  .timeline-num { width: 44px; height: 44px; font-size: 20px; }
  .quote-text { font-size: 20px; }
  .ledger-entry { grid-template-columns: auto 1fr; }
  .ledger-meta { grid-column: 1 / -1; text-align: right; }
}
