/* ============================================================
   The Third Book of the Dead: stijl afgeleid van de kaft
   Kleuren: nachtblauw-zwart van de rug, goud van de poort,
   perkament van de titel, blauw licht van de ziel.
   ============================================================ */

@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --night: #0f1219;       /* rug van de kaft */
  --tomb: #161a23;        /* diepere panelen */
  --umber: #2a231c;       /* aarde van de tempelscène */
  --gold: #cfa95c;        /* licht uit de poort */
  --gold-dim: #86734c;    /* verweerd goud */
  --bone: #ede4cf;        /* titelletters */
  --ash: #b4ac9a;         /* lopende tekst, tweede niveau */
  --spirit: #a9cdf0;      /* blauw licht van de figuur */

  --display: "Cinzel", "Trajan Pro", "Cormorant SC", Georgia, serif;
  --text: "EB Garamond", "Garamond", "Iowan Old Style", Georgia, serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
  background: var(--night);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--text);
  font-size: clamp(1.125rem, 0.4vw + 1.02rem, 1.25rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-weight: 500;
  font-size: clamp(1.75rem, 3.2vw + 0.6rem, 2.6rem);
  margin-bottom: 1.2em;
  text-align: center;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }

a { color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: var(--bone); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--bone);
  color: var(--night);
  font-family: var(--display);
  text-decoration: none;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

.measure { max-width: var(--measure); margin-inline: auto; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn--gold {
  background: linear-gradient(180deg, #e0bd71 0%, var(--gold) 55%, #a8843f 100%);
  color: #16120b;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 0 28px rgba(207,169,92,.22);
}
.btn--gold:hover { color: #16120b; box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 0 42px rgba(207,169,92,.45); }
.btn--ghost { background: transparent; color: var(--bone); border-color: rgba(207,169,92,.55); }
.btn--ghost:hover { color: var(--bone); background: rgba(207,169,92,.1); }
.btn--large { min-height: 3.5rem; padding-inline: 2.2rem; font-size: 1.05rem; }

/* ============================================================
   HERO: de poort
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100svh, 62rem);
  display: grid;
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  overflow: hidden;
  background:
    radial-gradient(ellipse 38% 55% at 72% 50%, rgba(207,169,92,.22), transparent 70%),
    linear-gradient(180deg, rgba(15,18,25,.55) 0%, rgba(15,18,25,.85) 70%, var(--night) 100%),
    url("/img/texture-hero.webp") center / cover no-repeat,
    var(--night);
}

.hero__inner {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.6rem, 5.4vw + 0.8rem, 4.9rem);
  color: var(--bone);
  text-shadow: 0 2px 30px rgba(0,0,0,.6);
}

.hero__subtitle {
  font-style: italic;
  color: var(--ash);
  font-size: clamp(1.15rem, 0.8vw + 1rem, 1.4rem);
  line-height: 1.45;
  max-width: 30rem;
  margin: 1.1rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--gold-dim);
}

.hero__author {
  margin: 1.2rem 0 0;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.hero__author span { color: var(--bone); }

.hero__lead {
  margin: 2rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.2rem, 0.6vw + 1.05rem, 1.4rem);
  line-height: 1.5;
  color: var(--bone);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero__book { margin: 0; justify-self: center; width: min(100%, 26.25rem); }

.book {
  position: relative;
  transform: perspective(1400px) rotateY(-9deg);
  transform-origin: left center;
  box-shadow:
    -1px 0 0 rgba(255,255,255,.08),
    18px 26px 50px rgba(0,0,0,.65),
    0 0 90px rgba(207,169,92,.18);
}
.book::before {
  /* de rug: een donkere band aan de linkerkant, zoals een echt boek */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4.5%;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(255,255,255,.06) 60%, rgba(0,0,0,.2));
  pointer-events: none;
}
.book img { width: 100%; }

/* Het ene bewegende moment: de kaft komt op uit het licht */
@media (prefers-reduced-motion: no-preference) {
  .book { animation: emerge 1.8s cubic-bezier(.2,.7,.2,1) both; }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 30% 45% at 72% 50%, rgba(255,236,190,.35), transparent 70%);
    animation: flare 2.4s ease-out both;
    pointer-events: none;
  }
}
@keyframes emerge {
  from { opacity: 0; filter: brightness(2.2) blur(6px); transform: perspective(1400px) rotateY(-9deg) translateY(12px) scale(.97); }
  to   { opacity: 1; filter: none; transform: perspective(1400px) rotateY(-9deg); }
}
@keyframes flare { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================
   INTRO
   ============================================================ */
.intro {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  background: linear-gradient(180deg, var(--night), var(--tomb));
}
.intro p { color: var(--ash); }
.intro p strong { color: var(--bone); font-weight: 500; }
.intro__reveal {
  font-style: italic;
  color: var(--bone) !important;
  font-size: 1.12em;
  line-height: 1.55;
  margin-top: 2rem;
  padding-left: 1.2rem;
  border-left: 1px solid var(--gold);
}

/* ============================================================
   TRAILER: de gouden poort als kader
   ============================================================ */
.trailer {
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) clamp(4rem, 8vw, 6rem);
  background: var(--tomb);
  text-align: center;
}
.trailer__sun {
  width: min(100%, 44rem);
  margin: 0 auto -0.5rem;
  -webkit-mask-image: radial-gradient(ellipse 50% 70% at 50% 45%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 70% at 50% 45%, #000 55%, transparent 100%);
}

.portal { max-width: 58rem; margin-inline: auto; }

.portal__frame {
  position: relative;
  padding: clamp(0.5rem, 1.4vw, 0.9rem);
  border: 1px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(207,169,92,.14), rgba(207,169,92,.03)),
    var(--night);
  box-shadow: 0 0 0 4px var(--night), 0 0 0 5px var(--gold-dim), 0 0 80px rgba(207,169,92,.18);
}
/* hoekornamenten */
.portal__frame::before,
.portal__frame::after {
  content: "";
  position: absolute;
  width: 1.4rem; height: 1.4rem;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.portal__frame::before { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.portal__frame::after  { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }

.portal__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 45% 70% at 50% 60%, rgba(207,169,92,.28), transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)),
    url("/img/texture.webp") center / cover no-repeat;
}
.portal__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.portal__play {
  width: clamp(4rem, 9vw, 5.5rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  filter: drop-shadow(0 0 18px rgba(207,169,92,.5));
  transition: color .25s ease, transform .25s ease;
}
.portal__play svg { width: 100%; height: 100%; }
.portal__play:hover:not(:disabled) { color: var(--bone); transform: scale(1.05); }
.portal__play:disabled { cursor: default; opacity: .75; }

.portal__status {
  margin: 0;
  padding-inline: 1rem;
  font-style: italic;
  color: var(--bone);
  font-size: clamp(1rem, 1vw + 0.8rem, 1.2rem);
}
.portal.is-ready .portal__status { display: none; }

.trailer__privacy {
  margin: 1.8rem auto 0;
  max-width: 32rem;
  font-size: 0.95rem;
  color: var(--ash);
}

/* ============================================================
   INHOUD: inscripties tussen gouden lijnen
   ============================================================ */
.inside {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(42,35,28,.9), transparent 70%),
    var(--night);
}
.inside__grid {
  max-width: 64rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: clamp(2.2rem, 4vw, 3.2rem);
}
.inscription {
  padding-left: 1.4rem;
  border-left: 1px solid var(--gold-dim);
}
.inscription h3 {
  font-size: clamp(1.15rem, 0.6vw + 1rem, 1.35rem);
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.inscription p { margin: 0; color: var(--ash); }

/* ============================================================
   CITAAT met de lichtfiguur van de achterkant
   ============================================================ */
.witness {
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
  background: #0b0d13;
  text-align: center;
}
.witness__spirit {
  width: min(100%, 30rem);
  margin: 0 auto -3rem;
  -webkit-mask-image: radial-gradient(ellipse 45% 50% at 50% 42%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 45% 50% at 50% 42%, #000 40%, transparent 100%);
}
.witness__quote { position: relative; margin: 0 auto; max-width: 40rem; }
.witness__quote p {
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw + 0.9rem, 2.35rem);
  line-height: 1.3;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(169,205,240,.25);
}
.witness__quote footer {
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--spirit);
}
.witness__quote cite { font-style: normal; }

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  background: var(--tomb);
}
.faq details { border-top: 1px solid rgba(134,115,76,.5); }
.faq details:last-of-type { border-bottom: 1px solid rgba(134,115,76,.5); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 500;
  font-size: 1.12em;
  color: var(--bone);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--gold);
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--gold); }
.faq details p { color: var(--ash); padding-bottom: 0.4rem; }

/* ============================================================
   KOPEN
   ============================================================ */
.buy {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  background:
    radial-gradient(ellipse 50% 60% at 30% 50%, rgba(207,169,92,.16), transparent 70%),
    linear-gradient(180deg, var(--tomb), var(--umber));
}
.buy__inner {
  max-width: 56rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.buy__cover { box-shadow: 14px 20px 40px rgba(0,0,0,.6), 0 0 60px rgba(207,169,92,.15); }
.buy h2 { text-align: left; margin-bottom: 0.6em; }
.buy p { color: var(--ash); max-width: 28rem; }
.buy .btn { margin-top: 0.8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 3rem var(--gutter) calc(3rem + env(safe-area-inset-bottom, 0px));
  background: #0b0d13;
  text-align: center;
  color: var(--ash);
  font-size: 0.95rem;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer__sun {
  width: min(70%, 22rem);
  margin: 0 auto 1.2rem;
  opacity: .8;
  -webkit-mask-image: radial-gradient(ellipse 50% 70% at 50% 45%, #000 50%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 70% at 50% 45%, #000 50%, transparent 100%);
}
.site-footer__name { font-family: var(--display); color: var(--gold); letter-spacing: .06em; }
.site-footer__privacy { font-style: italic; }

/* ============================================================
   MOBIEL
   ============================================================ */
@media (max-width: 899px) {
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__book { order: -1; width: min(64vw, 20rem); }
  .book { transform: none; }
  .hero__subtitle, .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes emerge {
      from { opacity: 0; filter: brightness(2.2) blur(6px); transform: translateY(12px) scale(.97); }
      to   { opacity: 1; filter: none; transform: none; }
    }
    .hero::after { background: radial-gradient(ellipse 50% 30% at 50% 22%, rgba(255,236,190,.35), transparent 70%); }
  }
  .hero { background:
    radial-gradient(ellipse 60% 30% at 50% 22%, rgba(207,169,92,.22), transparent 70%),
    linear-gradient(180deg, rgba(15,18,25,.55) 0%, rgba(15,18,25,.85) 70%, var(--night) 100%),
    url("/img/texture-hero.webp") center / cover no-repeat,
    var(--night); }
}

@media (max-width: 699px) {
  .inside__grid { grid-template-columns: 1fr; }
  .buy__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .buy__cover { width: min(60vw, 14rem); }
  .buy h2 { text-align: center; }
  .buy p { margin-inline: auto; }
  .btn { width: 100%; max-width: 22rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.notfound p { margin-top: 1.5rem; }
