/* =========================================================================
   Greg Dillon | L.O.V.E.
   Design system: tokens, type, global elements, shared components.
   ========================================================================= */

/* ---------- Fonts (self-hosted from @fontsource) ---------- */
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Noto Serif JP'; src: url('/fonts/noto-serif-jp-103-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+6B66; }
@font-face { font-family: 'Noto Serif JP'; src: url('/fonts/noto-serif-jp-114-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+9053; }

/* ---------- Tokens ---------- */
:root {
  --night: #0E1219;
  --storm: #1B2330;
  --slate: #2C3544;
  --gold: #D8A548;
  --gold-bright: #F3C969;
  --ember: #E0782F;
  --harvest: #B98A3E;
  --wood: #5A3B24;
  --paper: #EFE6D2;
  --cream: #F8F3E8;
  --ink: #16130F;
  --gold-ink: #7A5418;          /* gold text that passes AA on paper */
  --muted: #B9B2A3;             /* secondary text on dark */
  --muted-ink: #4A4237;         /* secondary text on paper */

  --foil: linear-gradient(100deg, #8C6425 0%, #F3C969 28%, #C9912F 50%, #FFE3A1 70%, #A8772B 100%);
  --shine: linear-gradient(110deg, transparent 38%, rgba(255, 248, 225, 0.95) 50%, transparent 62%);

  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-jp: 'Noto Serif JP', serif;

  --fs-hero: clamp(3.5rem, 11vw, 10rem);
  --fs-h1: clamp(2.6rem, 6.4vw, 5.6rem);
  --fs-h2: clamp(2rem, 4.4vw, 3.7rem);
  --fs-h3: clamp(1.35rem, 2vw, 1.75rem);
  --fs-lead: clamp(1.28rem, 1.7vw, 1.6rem);
  --fs-body: clamp(1.14rem, 1.15vw, 1.28rem);
  --fs-small: 0.95rem;
  --fs-label: 0.78rem;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1280px;
  --section-y: clamp(5rem, 11vw, 10rem);
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  min-height: 100vh;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
img, picture, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: inherit; line-height: 1.1; overflow-wrap: break-word; }
p { overflow-wrap: break-word; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--night); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; border-radius: 4px; }
[data-theme="light"] :focus-visible, .paper :focus-visible { outline-color: var(--gold-ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 200;
  padding: 0.8rem 1.2rem; border-radius: 999px;
  background: var(--gold); color: var(--night);
  font: 600 0.95rem var(--font-ui);
  transform: translateY(-160%); transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: translateY(0); }
main:focus { outline: none; }
/* Clip sideways overshoot from slide-in reveals without creating a scroll container (sticky and pinning keep working). */
main, .footer { overflow-x: clip; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.paper {
  position: relative;
  background-color: var(--paper);
  color: var(--ink);
  background-image:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(90, 59, 36, 0.16) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .14  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  isolation: isolate;
}
.watermark {
  position: absolute; z-index: -1; right: clamp(0.5rem, 4vw, 4rem); top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl; white-space: nowrap;
  font-family: var(--font-jp); font-weight: 700;
  font-size: clamp(9rem, 22vw, 20rem); line-height: 1;
  color: var(--ink); opacity: 0.05;
  pointer-events: none; user-select: none;
}
.watermark--left { right: auto; left: clamp(0.5rem, 3vw, 3rem); }

/* Drifting sunset light */
.glow { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(70px); opacity: 0.55; z-index: 0; }
.glow--page { width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; right: -18vw; bottom: -40vw;
  background: radial-gradient(circle, rgba(224, 120, 47, 0.75), rgba(216, 165, 72, 0.35) 45%, transparent 70%);
  animation: drift 22s ease-in-out infinite alternate; }
.glow--footer { width: 70vw; height: 50vw; left: 15vw; top: -10vw;
  background: radial-gradient(circle, rgba(216, 165, 72, 0.45), rgba(224, 120, 47, 0.25) 45%, transparent 70%);
  animation: drift 26s ease-in-out infinite alternate; }
.glow--feature { width: 55vw; height: 55vw; left: -15vw; top: 10%;
  background: radial-gradient(circle, rgba(216, 165, 72, 0.3), rgba(224, 120, 47, 0.18) 45%, transparent 70%);
  animation: drift 30s ease-in-out infinite alternate-reverse; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4vw, -3vw, 0) scale(1.08); }
  100% { transform: translate3d(3vw, -6vw, 0) scale(0.96); }
}

/* Film grain */
.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- Typography ---------- */
.gold-foil, .gold-foil .char {
  background-image: var(--shine), var(--foil);
  background-size: 260% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.gold-foil.is-split { background: none; -webkit-text-fill-color: currentColor; color: var(--gold); }
.gold-foil.is-split .char { -webkit-text-fill-color: transparent; }
.gold-foil.is-shining, .gold-foil.is-shining .char, a:hover .gold-foil, .gold-foil:hover, .gold-foil:hover .char { animation: shine 1.4s var(--ease) both; }
@keyframes shine { from { background-position: 160% 0, 0 0; } to { background-position: -60% 0, 0 0; } }

.label, .eyebrow {
  font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-label);
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 1.1rem;
}
.paper .label, [data-theme="light"] .label { color: var(--gold-ink); }
.label--center { text-align: center; }
.section-title {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h2);
  letter-spacing: 0.01em; line-height: 1.08; margin-bottom: 1.4rem; text-wrap: balance;
}
.section-title--center { text-align: center; margin-inline: auto; max-width: 20ch; }
.lead { font-size: var(--fs-lead); line-height: 1.55; }
.lead--italic { font-style: italic; color: var(--gold-bright); }
.paper .lead--italic { color: var(--gold-ink); }
.section-intro { text-align: center; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-small); margin: -0.4rem auto 3rem; max-width: 46ch; }
.section-intro--dark { color: var(--muted-ink); }
.caption { font-family: var(--font-ui); font-size: 0.85rem; color: var(--muted); margin-top: 0.9rem; line-height: 1.5; }
.paper .caption { color: var(--muted-ink); }

/* Stance line under headings */
.ground-line {
  display: block; width: min(180px, 40%); height: 2px; margin: 0 0 2rem;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright) 60%, transparent);
  transform-origin: left center;
}
.ground-line--center { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-bright) 50%, var(--gold) 70%, transparent); transform-origin: center; }
.section-title--center + .ground-line { margin-inline: auto; transform-origin: center; }

/* ---------- Links ---------- */
.link-line {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-position: 50% 100%; background-repeat: no-repeat;
  padding-bottom: 2px; transition: background-size 0.45s var(--ease), color 0.3s;
}
.link-line:hover, .link-line:focus-visible { background-size: 100% 1px; color: var(--gold-bright); }
.paper .link-line:hover { color: var(--gold-ink); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font: 600 0.95rem var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-position: 50% 85%; background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease);
}
.link-arrow--light { color: var(--gold); }
.link-arrow svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease); }
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow:hover svg { transform: translateX(6px); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--gold); --btn-fg: var(--night);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  min-height: 52px; padding: 0.95rem 1.7rem; border-radius: 999px;
  font: 600 0.95rem var(--font-ui); letter-spacing: 0.06em; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: box-shadow 0.4s var(--ease), color 0.4s var(--ease), background-color 0.4s;
  will-change: auto;
}
.btn--sm { min-height: 44px; padding: 0.7rem 1.25rem; font-size: 0.85rem; }
.btn--primary { box-shadow: 0 10px 30px -12px rgba(216, 165, 72, 0.6); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 245, 215, 0.75) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease);
}
.btn--primary:hover { background: var(--gold-bright); box-shadow: 0 16px 40px -12px rgba(243, 201, 105, 0.75); }
.btn--primary:hover::before { transform: translateX(120%); }
.btn--secondary { --btn-bg: transparent; --btn-fg: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); }
.btn--secondary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease);
}
.btn--secondary:hover { color: var(--night); }
.btn--secondary:hover::after { transform: scaleY(1); }
.paper .btn--secondary { --btn-fg: var(--gold-ink); box-shadow: inset 0 0 0 1.5px var(--gold-ink); }
.paper .btn--secondary::after { background: var(--gold-ink); }
.paper .btn--secondary:hover { color: var(--cream); }
.btn__label { position: relative; }
.btn__arrow { position: relative; width: 1.1em; height: 1.1em; overflow: hidden; flex: none; }
.btn__arrow svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}
.btn__arrow svg:last-child { transform: translateX(-130%); }
.btn:hover .btn__arrow svg:first-child, a:hover > .btn .btn__arrow svg:first-child { transform: translateX(130%); }
.btn:hover .btn__arrow svg:last-child, a:hover > .btn .btn__arrow svg:last-child { transform: translateX(0); }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.55rem 1.2rem;
  border: 1px solid rgba(216, 165, 72, 0.4); border-radius: 999px;
  font: 500 0.85rem var(--font-ui); letter-spacing: 0.08em; color: var(--cream);
  transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.pill:hover { border-color: var(--gold); background: rgba(216, 165, 72, 0.12); color: var(--gold-bright); transform: translateY(-2px); }

/* ---------- Cards with cursor spotlight ---------- */
.card-spot {
  --mx: 50%; --my: 50%;
  position: relative; isolation: isolate;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(44, 53, 68, 0.55), rgba(27, 35, 48, 0.9));
  border: 1px solid rgba(216, 165, 72, 0.16);
  transition: translate 0.55s var(--ease), box-shadow 0.55s var(--ease), border-color 0.4s;
}
.card-spot::before {
  content: ""; position: absolute; inset: -1px; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(243, 201, 105, 0.95), rgba(216, 165, 72, 0.25) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s;
}
.card-spot::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(216, 165, 72, 0.1), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.card-spot:hover { translate: 0 -6px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(216, 165, 72, 0.25); }
.card-spot:hover::before, .card-spot:hover::after, .card-spot.is-near::before { opacity: 1; }
.paper .card-spot { background: linear-gradient(160deg, #F8F3E8, #F3EBDA); border-color: rgba(122, 84, 24, 0.2); }
.paper .card-spot::before { background: radial-gradient(240px circle at var(--mx) var(--my), rgba(185, 138, 62, 0.95), rgba(185, 138, 62, 0.2) 40%, transparent 70%); }
.paper .card-spot:hover { box-shadow: 0 30px 60px -30px rgba(90, 59, 36, 0.45); }

/* Images: scale inside frame with warm overlay */
.img-overlay, .arch__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(216, 165, 72, 0.05), rgba(224, 120, 47, 0.28));
  mix-blend-mode: soft-light; opacity: 0; transition: opacity 0.6s var(--ease);
}

/* ---------- Emblem ---------- */
.emblem { color: var(--gold); flex: none; }
.emblem__leg { transform-origin: 27px 33.5px; transform-box: view-box; transition: transform 0.5s var(--ease); }
a:hover .emblem__leg, .emblem--kicking .emblem__leg { transform: rotate(-16deg); }
.emblem--kicking .emblem__leg { animation: kick 1.8s var(--ease) infinite; }
@keyframes kick { 0%, 60%, 100% { transform: rotate(10deg); } 25% { transform: rotate(-22deg); } 40% { transform: rotate(-16deg); } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  transition: background-color 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled {
  background: rgba(14, 18, 25, 0.7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(216, 165, 72, 0.14);
}
.nav__inner { height: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 1.5rem; }
.nav__brand { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 44px; margin-right: auto; }
.nav__wordmark { font: 600 1.05rem var(--font-display); letter-spacing: 0.16em; color: var(--cream); white-space: nowrap; }
.nav__links ul { display: flex; gap: clamp(0.8rem, 1.4vw, 1.6rem); }
.nav__link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font: 500 0.86rem var(--font-ui); letter-spacing: 0.04em; color: rgba(248, 243, 232, 0.86);
  white-space: nowrap; transition: color 0.3s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: center; transition: transform 0.45s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--gold-bright); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link .char { display: inline-block; white-space: pre; transition: transform 0.35s var(--ease); transition-delay: calc(var(--i, 0) * 18ms); }
.nav__link:hover .char { transform: translateY(-2px); }
.nav__toggle { display: none; position: relative; width: 48px; height: 48px; border-radius: 50%; }
.nav__toggle-bar {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--cream);
  transition: transform 0.45s var(--ease), opacity 0.3s, top 0.45s var(--ease);
}
.nav__toggle-bar:nth-of-type(2) { top: 17px; }
.nav__toggle-bar:nth-of-type(3) { top: 23.5px; }
.nav__toggle-bar:nth-of-type(4) { top: 30px; left: 21px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-of-type(2) { top: 23.5px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-of-type(3) { opacity: 0; transform: scaleX(0); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-of-type(4) { top: 23.5px; left: 13px; transform: rotate(-45deg); }

@media (max-width: 1199px) {
  .nav__links ul { gap: 0.85rem; }
  .nav__link { font-size: 0.8rem; }
}
@media (max-width: 959px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
}
@media (min-width: 480px) and (max-width: 959px) { .nav__cta { display: inline-flex; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; overflow-y: auto; overscroll-behavior: contain;
  background: var(--night);
  padding: calc(var(--nav-h) + 1.5rem) var(--gutter) 2rem;
  display: flex; flex-direction: column;
}
.mobile-menu__bg-word {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg);
  font: 700 clamp(7rem, 40vw, 16rem) var(--font-display); color: var(--gold); opacity: 0.045; white-space: nowrap; pointer-events: none;
}
.mobile-menu__list { position: relative; display: grid; gap: 0.2rem; }
.mobile-menu__link {
  display: flex; align-items: baseline; gap: 0.9rem; padding-block: 0.45rem; min-height: 44px;
  font: 600 clamp(1.7rem, 7vw, 2.6rem) var(--font-display); line-height: 1.15; color: var(--cream);
  transition: color 0.3s;
}
.mobile-menu__link:hover, .mobile-menu__link.is-active { color: var(--gold-bright); }
.mobile-menu__num { font: 500 0.75rem var(--font-ui); letter-spacing: 0.14em; color: var(--gold); }
.mobile-menu__cta { position: relative; margin-top: 2rem; align-self: flex-start; }
.mobile-menu__contact { position: relative; margin-top: auto; padding-top: 2rem; font: 400 0.9rem var(--font-ui); color: var(--muted); }

/* ---------- Custom cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 180; pointer-events: none; }
  .cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; pointer-events: none; will-change: transform; }
  .cursor__dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--gold-bright); }
  .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(243, 201, 105, 0.7);
    display: grid; place-items: center;
    transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background-color 0.4s, border-color 0.4s, opacity 0.3s;
  }
  .cursor__label { font: 600 0.72rem var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--night); opacity: 0; transition: opacity 0.25s; }
  .cursor.has-label .cursor__ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--gold-bright); border-color: transparent; }
  .cursor.has-label .cursor__label { opacity: 1; }
  .cursor.has-label .cursor__dot { opacity: 0; }
  .cursor.is-link .cursor__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(243, 201, 105, 0.12); }
  .cursor.on-light { mix-blend-mode: difference; }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Preloader ---------- */
.preloader { display: none; }
.is-preloading .preloader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 190; background: var(--night);
}
.is-preloading body { overflow: hidden; }
.preloader__letters { display: flex; align-items: flex-start; gap: clamp(1rem, 5vw, 4rem); }
.preloader__item { position: relative; display: flex; flex-direction: column; align-items: center; opacity: 0; }
.preloader__letter { font: 700 clamp(3.4rem, 12vw, 8rem) var(--font-display); line-height: 1; }
.preloader__word { position: absolute; top: 100%; left: 50%; translate: -50% 0; font: 600 clamp(0.5rem, 1.4vw, 0.78rem) var(--font-ui); letter-spacing: clamp(0.06em, 0.5vw, 0.24em); color: var(--gold); margin-top: 0.8rem; white-space: nowrap; }

/* ---------- Page transition wipe ---------- */
.page-wipe {
  position: fixed; inset: 0; z-index: 185; pointer-events: none;
  background: linear-gradient(120deg, #A8772B, var(--gold) 40%, var(--gold-bright) 60%, #C9912F);
  display: grid; place-items: center;
  transform: scaleX(0); transform-origin: left center;
}
.is-arriving .page-wipe { transform: scaleX(1); }
.page-wipe__inner { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.page-wipe__emblem { color: var(--night); }
.page-wipe__mark { font: 700 clamp(2rem, 6vw, 4rem) var(--font-display); color: var(--night); opacity: 0.85; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; right: clamp(14px, 1.6vw, 28px); top: 50%; z-index: 90;
  height: min(46vh, 420px); width: 20px; transform: translateY(-50%);
  opacity: 0; transition: opacity 0.5s;
}
.scroll-progress.is-visible { opacity: 1; }
.scroll-progress__track { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(216, 165, 72, 0.22); }
.scroll-progress__fill { position: absolute; inset: 0; background: linear-gradient(var(--gold-bright), var(--gold)); transform-origin: top; transform: scaleY(0); }
.scroll-progress__notch {
  position: absolute; left: 50%; top: var(--at); transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 600 0.6rem var(--font-display); color: rgba(216, 165, 72, 0.55);
  background: var(--night); border: 1px solid rgba(216, 165, 72, 0.3);
  transition: color 0.4s, background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.scroll-progress__notch.is-lit { color: var(--night); background: var(--gold-bright); border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(243, 201, 105, 0.6); }
.top-progress { display: none; }
@media (max-width: 959px) {
  .scroll-progress { display: none; }
  .top-progress { display: block; position: fixed; inset: 0 0 auto; height: 2px; z-index: 101; pointer-events: none; }
  .top-progress__fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transform-origin: left; transform: scaleX(0); }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero, .love-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--nav-h) + clamp(4rem, 10vw, 8rem)) 0 clamp(4rem, 8vw, 6.5rem);
  background: radial-gradient(90% 80% at 80% 110%, rgba(224, 120, 47, 0.2), transparent 60%), var(--night);
}
.page-hero__watermark {
  position: absolute; right: 4vw; top: 50%; transform: translateY(-40%); z-index: -1;
  writing-mode: vertical-rl; white-space: nowrap; font: 700 clamp(8rem, 20vw, 17rem) var(--font-jp); line-height: 1;
  color: var(--gold); opacity: 0.05; pointer-events: none;
}
.page-hero__inner, .love-hero__inner { position: relative; z-index: 1; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.6rem; font: 500 0.8rem var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.8rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.6rem; color: var(--gold); }
.breadcrumb a { display: inline-block; padding-block: 0.6rem; }
.breadcrumb li[aria-current] { padding-block: 0.6rem; color: var(--cream); }
.page-hero__title { font: 700 var(--fs-h1) var(--font-display); line-height: 1.02; letter-spacing: 0.01em; max-width: 16ch; padding-bottom: 0.08em; margin-bottom: 1.6rem; }
.page-hero__intro { max-width: 58ch; font-size: var(--fs-lead); line-height: 1.55; color: rgba(248, 243, 232, 0.88); }

/* ---------- Arched portrait (home + about) ---------- */
.arch {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 999px 999px var(--radius) var(--radius);
  aspect-ratio: 4 / 5; background: var(--storm);
  box-shadow: 0 40px 80px -40px rgba(90, 59, 36, 0.55);
  outline: 1px solid rgba(122, 84, 24, 0.3); outline-offset: 10px;
}
.arch__inner { position: absolute; inset: -12% 0; }
.arch__inner picture, .arch__inner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.arch__inner img { transition: transform 1.1s var(--ease); }
.arch:hover .arch__inner img { transform: scale(1.05); }
.arch:hover .arch__overlay { opacity: 1; }

/* ---------- CSS 3D book (hero + book page, also the WebGL fallback) ---------- */
.book3d { position: relative; width: 100%; height: 100%; min-height: 420px; display: grid; place-items: center; touch-action: pan-y; }
.book3d__canvas { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s var(--ease); touch-action: pan-y; }
.book3d__canvas canvas { width: 100% !important; height: 100% !important; cursor: grab; }
.book3d__canvas canvas:active { cursor: grabbing; }
.book3d.is-webgl .book3d__canvas { opacity: 1; }
.book3d.is-webgl .cssbook { opacity: 0; visibility: hidden; transition: opacity 0.6s, visibility 0s 0.6s; }
.book3d__hint { position: absolute; bottom: 0.5rem; left: 50%; transform: translateX(-50%); font: 500 0.75rem var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.cssbook {
  --bw: clamp(210px, 26vw, 340px);
  --bh: calc(var(--bw) * 1.5);
  --bd: calc(var(--bw) * 0.15);
  position: relative; width: var(--bw); height: var(--bh);
  perspective: 1800px;
}
.book3d--feature .cssbook { --bw: clamp(200px, 24vw, 320px); }
.cssbook__rig {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(-26deg);
  transition: transform 0.9s var(--ease);
}
.cssbook:hover .cssbook__rig { transform: rotateX(2deg) rotateY(-14deg) translateZ(10px); }
.cssbook__face { position: absolute; backface-visibility: hidden; }
.cssbook__front { inset: 0; transform: translateZ(calc(var(--bd) / 2)); border-radius: 2px 5px 5px 2px; overflow: hidden; box-shadow: inset 4px 0 8px rgba(0, 0, 0, 0.35); }
.cssbook__front picture, .openbook__cover-front picture { display: block; width: 100%; height: 100%; }
.cssbook__front img { width: 100%; height: 100%; object-fit: cover; }
.cssbook__sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 236, 190, 0.28) 45%, transparent 60%);
  background-size: 250% 100%; background-position: 110% 0; transition: background-position 1.2s var(--ease);
}
.cssbook:hover .cssbook__sheen, .openbook:hover .cssbook__sheen { background-position: -40% 0; }
.cssbook__back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--bd) / 2)); background: #1B2330 url('/textures/back.webp') center / cover; border-radius: 5px 2px 2px 5px; }
.cssbook__spine {
  top: 0; height: 100%; width: var(--bd); left: calc((var(--bw) - var(--bd)) / 2);
  transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2));
  background: #1B2330 url('/textures/spine.webp') center / 100% 100%;
  border-radius: 3px;
}
.cssbook__edge {
  background: repeating-linear-gradient(90deg, #F4EDDC 0 1.5px, #E2D7BF 1.5px 2.5px);
}
.cssbook__edge--fore {
  top: 1.5%; height: 97%; width: calc(var(--bd) * 0.86);
  left: calc((var(--bw) - var(--bd) * 0.86) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--bw) / 2 - 3px));
}
.cssbook__edge--top, .cssbook__edge--bottom {
  left: 0; width: calc(var(--bw) - 4px); height: calc(var(--bd) * 0.86);
  top: calc((var(--bh) - var(--bd) * 0.86) / 2);
  background: repeating-linear-gradient(0deg, #F4EDDC 0 1.5px, #E2D7BF 1.5px 2.5px);
}
.cssbook__edge--top { transform: rotateX(90deg) translateZ(calc(var(--bh) / 2 - 3px)); }
.cssbook__edge--bottom { transform: rotateX(-90deg) translateZ(calc(var(--bh) / 2 - 3px)); }
.cssbook__shadow {
  position: absolute; left: -10%; right: -10%; bottom: -9%; height: 14%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(8px); transform: translateZ(-60px); z-index: -1;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: clamp(3rem, 6vw, 5rem); }
.timeline__rail { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: rgba(122, 84, 24, 0.18); }
.timeline__rail-fill { position: absolute; inset: 0; background: linear-gradient(var(--gold), var(--harvest)); transform-origin: top; transform: scaleY(0); }
.timeline__list { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.timeline__item { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(3rem, 7vw, 6rem); }
.timeline__item--left .timeline__card { grid-column: 1; }
.timeline__item--right .timeline__card { grid-column: 2; }
.timeline__dot {
  position: absolute; left: 50%; top: 2rem; width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--paper); border: 2px solid var(--gold); z-index: 1;
  box-shadow: 0 0 0 5px rgba(216, 165, 72, 0.15);
}
.timeline__card { padding: clamp(1.4rem, 2.5vw, 2rem); transform-style: preserve-3d; }
.timeline__year { font: 700 1.4rem var(--font-display); color: var(--gold-ink); margin-bottom: 0.3rem; }
.timeline__title { font: 600 1.15rem var(--font-ui); letter-spacing: 0.02em; margin-bottom: 0.5rem; color: var(--ink); }
.timeline__text { color: var(--muted-ink); line-height: 1.55; }
@media (max-width: 767px) {
  .timeline__rail { left: 10px; transform: none; }
  .timeline__item { grid-template-columns: 1fr; padding-left: 2.6rem; }
  .timeline__item--left .timeline__card, .timeline__item--right .timeline__card { grid-column: 1; }
  .timeline__dot { left: 11px; }
}

/* ---------- Speaking CTA ---------- */
.speak-cta__card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(216, 165, 72, 0.45);
  background: radial-gradient(80% 140% at 100% 100%, rgba(224, 120, 47, 0.18), transparent 60%), linear-gradient(160deg, var(--storm), #151b26);
}
.speak-cta__emblem { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(216, 165, 72, 0.4); }
.speak-cta__card:hover .emblem__leg { transform: rotate(-16deg); }
.speak-cta__title { font: 600 clamp(1.6rem, 3vw, 2.5rem) var(--font-display); line-height: 1.15; margin-bottom: 1rem; text-wrap: balance; }
.speak-cta__text p:last-child { color: rgba(248, 243, 232, 0.85); max-width: 56ch; }
@media (max-width: 959px) {
  .speak-cta__card { grid-template-columns: 1fr; text-align: left; }
  .speak-cta__emblem { width: 72px; height: 72px; }
}

/* ---------- Pull quote between sections ---------- */
.inline-quote { padding-block: clamp(3rem, 7vw, 6rem) 0; text-align: center; }
.inline-quote p {
  font: italic 400 clamp(1.7rem, 3.6vw, 3rem) var(--font-serif); line-height: 1.25;
  max-width: 28ch; margin-inline: auto; color: var(--gold-bright); text-wrap: balance;
}

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--night); overflow: hidden; }
.footer__cta { position: relative; padding-block: clamp(6rem, 13vw, 11rem); text-align: center; border-top: 1px solid rgba(216, 165, 72, 0.14); overflow: hidden; isolation: isolate; }
.footer__cta-inner { position: relative; z-index: 1; }
.footer__cta-title { font: 700 clamp(3rem, 10vw, 8.5rem) var(--font-display); line-height: 1; letter-spacing: 0.01em; padding-bottom: 0.08em; }
.footer__cta-sub { font: italic 400 var(--fs-lead) var(--font-serif); margin: 1.4rem auto 2.4rem; max-width: 34ch; color: rgba(248, 243, 232, 0.9); }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid rgba(216, 165, 72, 0.14);
}
.footer__brand { display: inline-flex; align-items: center; gap: 0.8rem; font: 700 1.8rem var(--font-display); color: var(--gold); min-height: 44px; }
.footer__tag { margin-top: 0.8rem; color: var(--muted); font-style: italic; }
.footer__heading { font: 600 var(--fs-label) var(--font-ui); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer__col li a { display: inline-block; padding-block: 0.55rem; font: 400 0.95rem var(--font-ui); color: rgba(248, 243, 232, 0.82); }
.footer__giant {
  font: 700 clamp(1.5rem, 8.4vw, 13rem) var(--font-display); line-height: 0.9; letter-spacing: 0.02em;
  text-align: center; white-space: nowrap; color: transparent;
  -webkit-text-stroke: 1px rgba(216, 165, 72, 0.35);
  padding-inline: var(--gutter); user-select: none;
}
.footer__giant .char { display: inline-block; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 2rem; font: 400 0.85rem var(--font-ui); color: var(--muted); }
.footer__top { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font: 600 0.8rem var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.footer__top svg { width: 34px; height: 34px; padding: 8px; border: 1px solid rgba(216, 165, 72, 0.5); border-radius: 50%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease), background 0.3s, color 0.3s; }
.footer__top:hover svg { transform: translateY(-4px); background: var(--gold); color: var(--night); }
@media (max-width: 959px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__col--brand { grid-column: 1 / -1; } }
@media (max-width: 479px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Initial animation states (only when motion is allowed and JS runs) ---------- */
.anim [data-reveal], .anim .next-cta__inner[data-reveal] { opacity: 0; transform: translateY(32px); }
.anim [data-split-words], .anim [data-split-lines], .anim [data-hero-title], .anim [data-split-reveal], .anim [data-scrub-words] { visibility: hidden; }
.anim [data-reveal-image] { clip-path: inset(100% 0 0 0); }
.anim [data-ground-line] { transform: scaleX(0); }
.anim [data-hero-fade] { opacity: 0; transform: translateY(24px); }
.anim .arch { clip-path: inset(100% 0 0 0 round 999px 999px var(--radius) var(--radius)); }

/* Split text helpers */
.split-line { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.char, .word { display: inline-block; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .grain { animation: none; }
  .glow { animation: none; }
  .card-spot:hover { translate: none; }
}
