:root {
  --beige: #f4ead9;
  --beige-deep: #eadcc3;
  --card: #fbf5ea;
  --ink: #2b1d12;
  --ink-2: #5a4636;
  --ink-3: #9a8572;
  --rule: #dccbb0;

  --orange: #e8621a;
  --orange-hi: #ffa45c;
  --orange-lo: #b8460c;

  --font-primary: "Cormorant", "Times New Roman", serif;
  --font-secondary: "Hanken Grotesk", system-ui, sans-serif;
  --font-tertiary: "Newsreader", Georgia, serif;
  --font-display: "Antonio", "Oswald", sans-serif;
  --font-logo: "Josefin Sans", "Futura", sans-serif;

  --hh: 56px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html { height: 100%; scroll-behavior: smooth; }
body { font-family: var(--font-tertiary); font-weight: 300; line-height: 1.75; color: var(--ink); background: var(--beige); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Wrapper ---------- */
.wrapper { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: clip; isolation: isolate; }

/* Home is a single, non-scrolling screen: hero fills whatever space the footer leaves. */
html:has(body.is-home) { overflow: hidden; overscroll-behavior: none; }
body.is-home { overflow: hidden; overscroll-behavior: none; }
.is-home .wrapper { height: 100vh; height: 100dvh; min-height: 0; }
.is-home .hero { flex: 1; min-height: 0; }

.bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #000; pointer-events: none; }
body.is-home { background: #000; color: var(--beige); } /* matches .bg so overscroll never flashes beige */
.bg__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.bg__video.is-ready { opacity: 1; }
.bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0000 30%, #000 100%); }
.bg__grain { position: absolute; inset: 0; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- Header ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 10; }
.is-inner .header { background: #f4ead9e6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.header__inner { max-width: 1440px; height: var(--hh); margin: 0 auto; padding: 0 24px; display: flex; justify-content: center; align-items: center; }
.logo { padding: 8px 8px 8px calc(8px + .14em); font-family: var(--font-logo); font-weight: 400; font-size: 22px; letter-spacing: .14em; line-height: 1; transition: color .3s; }
.logo:hover { color: var(--orange); }

/* ---------- Hero (home) ---------- */
.hero { display: flex; align-items: flex-end; padding: 96px 0 56px; }
.hero__inner { width: 100%; max-width: 1392px; margin: 0 auto; padding: 0 32px; }
.hero__eyebrow { margin-bottom: 12px; font: 400 clamp(13px, 1.2vw, 15px)/1.4 var(--font-secondary); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); animation: fadeUp 1.2s var(--ease-out) both; }
.is-home .hero__eyebrow { color: #f4ead9cc; }
.hero__title { min-width: 0; padding: .06em 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(40px, 11vw, 96px); line-height: .95; letter-spacing: .005em; text-transform: uppercase;
  background: linear-gradient(100deg, var(--orange-lo) 0%, var(--orange) 30%, var(--orange-hi) 45%, var(--orange) 60%, var(--orange-lo) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s ease-in-out infinite, fadeUp 1.4s var(--ease-out) both; }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.hero__cta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(16px, 2.5vw, 32px); max-width: 100%; }
.hero__arrow { width: clamp(44px, 6vw, 80px); color: var(--orange); animation: fadeUp 1.4s .2s var(--ease-out) both; transition: right .5s var(--ease-out), color .3s; }
.hero__cta:hover .hero__arrow { color: var(--orange-lo); }
.hero__arrow::before { top: 6px; border-top-width: 2px; }
.hero__arrow::after { top: 2px; right: 2px; width: 9px; height: 9px; border-width: 2px 2px 0 0; }

.arrow-long { position: relative; right: 0; display: inline-block; flex: none; width: 50px; height: 15px; transition: right .5s var(--ease-out); }
.arrow-long::before { content: ""; position: absolute; left: 0; right: 1px; top: 7px; border-top: 1px solid currentColor; }
.arrow-long::after { content: ""; position: absolute; right: 1px; top: 4px; width: 6px; height: 6px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
a:hover .arrow-long { right: -8px; }
.arrow-long--back { width: 30px; transform: scaleX(-1); }
a.back:hover .arrow-long { right: 0; }

/* ---------- Footer ---------- */
.footer { position: relative; font: 300 13px var(--font-secondary); color: var(--ink-2); }
.footer__inner { max-width: 1440px; margin: 0 auto; padding: 24px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__links a:hover { color: var(--orange); }
.is-home .footer { color: #f4ead9b3; }
.is-inner .footer { border-top: 1px solid var(--rule); margin-top: auto; }

/* ---------- Inner pages ---------- */
.container { max-width: 1392px; margin: 0 auto; padding: 0 32px; }
.page-hero { padding: calc(var(--hh) + 72px) 0 40px; }
.page-hero__eyebrow { margin-bottom: 14px; font: 300 13px/1.4 var(--font-secondary); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-lo); animation: fadeUp 1.2s var(--ease-out) both; }
.page-hero__title { font-family: var(--font-primary); font-weight: 400; font-size: clamp(44px, 7vw, 96px); line-height: 1; letter-spacing: -.01em; animation: fadeUp 1.2s var(--ease-out) both; }
.page-hero__title--legal { max-width: 16ch; font-size: clamp(40px, 5.5vw, 76px); }
.page-hero__lede.legal { max-width: 760px; display: flex; flex-direction: column; gap: 16px; font-size: 17px; }
.page-hero__lede { max-width: 640px; margin-top: 24px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--ink-2); animation: fadeUp 1.2s .1s var(--ease-out) both; }
.section { padding: 24px 0 96px; }
.back { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px; padding: 9px 18px 9px 14px; border: 1px solid var(--rule); border-radius: 999px; font: 300 13px var(--font-secondary); letter-spacing: .04em; transition: border-color .3s, background .3s, gap .5s var(--ease-out); }
.back:hover { border-color: var(--orange); background: var(--card); gap: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: var(--orange-lo); }

.prose { max-width: 760px; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.legal h2 { margin-top: 28px; font-family: var(--font-primary); font-weight: 500; font-size: clamp(24px, 2vw, 30px); line-height: 1.2; color: var(--ink); scroll-margin-top: calc(var(--hh) + 24px); }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin-top: 12px; font: 400 15px/1.4 var(--font-secondary); letter-spacing: .02em; color: var(--ink); scroll-margin-top: calc(var(--hh) + 24px); }
.legal ul { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; list-style: disc; }
.legal strong { font-weight: 400; color: var(--ink); }
.legal__caps { font-size: 14px; line-height: 1.6; letter-spacing: .01em; color: var(--ink); }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); transition: color .3s; }
.legal a:hover { color: var(--orange-lo); }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 72px; align-items: start; }
.toc { position: sticky; top: calc(var(--hh) + 24px); max-height: calc(100vh - var(--hh) - 48px); overflow-y: auto; scrollbar-width: thin; }
.toc__label { display: block; margin-bottom: 16px; font: 300 13px/1.4 var(--font-secondary); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-lo); list-style: none; pointer-events: none; }
.toc__label::-webkit-details-marker { display: none; }
.toc__list { display: flex; flex-direction: column; list-style: none; border-left: 1px solid var(--rule); }
.toc__list a { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 1px solid transparent; font: 300 14px/1.4 var(--font-secondary); color: var(--ink-3); transition: color .3s, border-color .3s; }
.toc__list a:hover { color: var(--ink); border-left-color: var(--orange); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; max-height: none; padding: 16px 20px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
  .toc__label { margin: 0; pointer-events: auto; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .toc__label::after { content: "+"; font-size: 20px; line-height: 1; color: var(--ink-2); }
  .toc[open] .toc__label::after { content: "\2212"; }
  .toc[open] .toc__list { margin-top: 16px; }
}
@media (max-width: 600px) {
  .container, .hero__inner { padding: 0 16px; }
  .footer__inner { padding: 16px; font-size: 12px; }
  .hero { padding-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
