:root {
  --ink: #130c0a;
  --night: #1b100d;
  --wine: #6d0f23;
  --copper: #b66b32;
  --gold: #d9af67;
  --cream: #f2e7d3;
  --paper: #ead9bd;
  --muted: #b8a68d;
  --line: rgba(217, 175, 103, .24);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 70% 12%, rgba(146, 53, 24, .22), transparent 30rem),
    radial-gradient(circle at 0% 60%, rgba(109, 15, 35, .18), transparent 34rem),
    var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.015) 50%, transparent 50.2%);
  z-index: 10;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  z-index: 9;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; left: 1rem; top: -5rem; background: var(--gold); color: var(--ink); padding: .7rem 1rem; z-index: 100; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.1rem clamp(1.2rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(19, 12, 10, .82);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; width: max-content; }
.brand-mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 700 .75rem var(--serif); }
.brand-name { font-size: .72rem; letter-spacing: .22em; }
nav { display: flex; gap: 2rem; }
nav a { text-decoration: none; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
nav a:hover, nav a:focus-visible { color: var(--cream); }
.language-tools { justify-self: end; display: flex; align-items: center; gap: .55rem; }
.lang-switch, .all-languages { color: var(--gold); background: transparent; border: 1px solid var(--line); border-radius: 10rem; padding: .45rem .8rem; cursor: pointer; font-weight: 700; }
.all-languages { display: inline-flex; align-items: center; gap: .45rem; color: var(--cream); font-size: .72rem; letter-spacing: .06em; }
.all-languages span:first-child { color: var(--gold); font-size: 1rem; }
.lang-switch:hover, .all-languages:hover { border-color: var(--gold); }

.language-panel[hidden] { display: none; }
.language-panel { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.language-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(5,3,3,.82); backdrop-filter: blur(12px); cursor: default; }
.language-dialog { position: relative; width: min(42rem, 100%); padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid rgba(217,175,103,.42); background: linear-gradient(145deg, #24130f, #110a09); box-shadow: 0 40px 120px #000; text-align: center; }
.language-dialog h2 { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 1.2rem; }
.language-dialog > p:not(.eyebrow) { color: var(--muted); }
.language-close { position: absolute; right: 1rem; top: .7rem; border: 0; background: transparent; color: var(--cream); font-size: 2rem; cursor: pointer; }
.translate-frame { min-height: 4.5rem; display: flex; align-items: stretch; justify-content: center; gap: .7rem; margin: 2rem 0 1rem; padding: 1rem; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
#machineLanguage { min-width: min(25rem, 62vw); padding: .85rem 1rem; border: 1px solid var(--gold); border-radius: 2px; background: var(--cream); color: var(--ink); font: 600 1rem var(--sans); }
.translate-button { white-space: nowrap; }
.translation-fallback { display: inline-block; color: var(--gold); text-underline-offset: .25rem; margin-top: .7rem; }
.translation-note { font-size: .72rem; margin-top: 1.5rem; }
body.language-open { overflow: hidden; }

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  align-items: center;
  gap: 4rem;
  padding: 7rem clamp(1.2rem, 7vw, 8rem) 6rem;
  position: relative;
}

.eyebrow { color: var(--gold); letter-spacing: .28em; font-size: .7rem; font-weight: 700; margin: 0 0 1.4rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; margin: 0; }
h1 { font-size: clamp(3.2rem, 6.8vw, 7.5rem); letter-spacing: -.045em; max-width: 13ch; }
h1 em { color: var(--gold); font-weight: 400; }
.hero-lead { max-width: 42rem; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.28rem); margin: 2rem 0 2.4rem; }
.hero-actions { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 3.25rem; padding: .8rem 1.35rem; border-radius: 2px; text-decoration: none; border: 1px solid transparent; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--ink); background: linear-gradient(135deg, #f2d296, var(--copper)); box-shadow: 0 12px 36px rgba(182,107,50,.22); }
.button-ghost { border-color: rgba(242,231,211,.35); color: var(--cream); background: rgba(0,0,0,.1); }
.button-quiet { border-color: var(--line); color: var(--gold); background: transparent; }
.text-link { color: var(--cream); text-underline-offset: .35rem; text-decoration-color: var(--copper); }

.portal-wrap { position: relative; aspect-ratio: 1; width: min(42vw, 34rem); justify-self: center; display: grid; place-items: center; filter: drop-shadow(0 0 40px rgba(182,107,50,.16)); }
.portal { position: absolute; border-radius: 50%; }
.portal-outer { inset: 3%; border: 1px solid rgba(217,175,103,.45); animation: spin 35s linear infinite; }
.portal-outer::before, .portal-outer::after { content: "◆"; position: absolute; color: var(--gold); font-size: .65rem; left: 50%; transform: translateX(-50%); }
.portal-outer::before { top: -.45rem; }
.portal-outer::after { bottom: -.45rem; }
.portal-mid { inset: 16%; border: 1px dashed rgba(182,107,50,.4); animation: spinReverse 24s linear infinite; }
.portal-inner { inset: 28%; background: radial-gradient(circle, rgba(217,175,103,.3), rgba(109,15,35,.22) 44%, transparent 70%); border: 1px solid rgba(217,175,103,.7); box-shadow: inset 0 0 4rem rgba(182,107,50,.24), 0 0 3rem rgba(182,107,50,.18); }
.portal-glyph { font-family: var(--serif); font-size: clamp(5rem, 10vw, 9rem); color: var(--gold); text-shadow: 0 0 3rem rgba(217,175,103,.65); animation: pulse 3s ease-in-out infinite; }
.orbit { position: absolute; color: var(--muted); letter-spacing: .28em; font-size: .55rem; }
.orbit-one { top: 7%; left: 42%; }
.orbit-two { bottom: 15%; right: 3%; }
.orbit-three { bottom: 20%; left: 4%; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .74; } }

.threshold { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 clamp(1.2rem, 4vw, 4rem); }
.threshold div { display: flex; align-items: baseline; justify-content: center; gap: .8rem; padding: 1.6rem 1rem; border-right: 1px solid var(--line); }
.threshold div:last-child { border-right: 0; }
.threshold strong { font: 400 1.8rem var(--serif); color: var(--gold); }
.threshold span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .13em; }

.books-section { padding: 9rem clamp(1.2rem, 7vw, 8rem); }
.section-heading { margin-bottom: 5rem; }
h2 { font-size: clamp(2.7rem, 5.5vw, 6rem); letter-spacing: -.035em; }
.book { display: grid; grid-template-columns: minmax(280px, .74fr) minmax(0, 1.26fr); gap: clamp(2.5rem, 7vw, 8rem); align-items: center; padding: 6rem 0; border-top: 1px solid var(--line); }
.book:nth-of-type(3) .book-visual { order: 2; }
.book:nth-of-type(3) .book-copy { order: 1; }
.book-visual { position: relative; max-width: 29rem; margin-inline: auto; }
.book-visual img { width: 100%; display: block; aspect-ratio: 2/3; object-fit: cover; box-shadow: 0 35px 80px rgba(0,0,0,.52); }
.book-number { position: absolute; right: -1.8rem; top: -3rem; font: 400 clamp(5rem, 9vw, 9rem) var(--serif); color: rgba(217,175,103,.22); }
.book-copy { max-width: 42rem; }
.book-path { color: var(--copper); letter-spacing: .24em; font-size: .7rem; font-weight: 700; }
.book h3 { font-size: clamp(2.6rem, 4.5vw, 5.2rem); margin: .8rem 0 1.5rem; }
.book-copy > p:not(.book-path) { color: var(--muted); font-size: 1.1rem; }
.book ul { list-style: none; padding: 0; margin: 2rem 0 2.4rem; }
.book li { padding: .75rem 0 .75rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.book li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: .65rem; top: 1rem; }
.book-copper .book-path { color: #db8442; }
.book-wine .book-path { color: #c45a71; }

.oracle-section { padding: 9rem clamp(1.2rem, 7vw, 8rem); background: linear-gradient(155deg, #24110d, #100a09 58%, #220c13); border-block: 1px solid var(--line); }
.oracle-intro { text-align: center; max-width: 56rem; margin: 0 auto 4rem; }
.oracle-intro p:last-child { color: var(--muted); max-width: 42rem; margin: 1.6rem auto 0; }
.oracle-card { max-width: 56rem; margin: auto; padding: clamp(1.5rem, 5vw, 4rem); border: 1px solid rgba(217,175,103,.38); background: rgba(13,8,7,.72); box-shadow: 0 40px 100px rgba(0,0,0,.4); }
.oracle-progress { height: 2px; background: rgba(255,255,255,.08); margin-bottom: 3.5rem; }
.oracle-progress span { display: block; height: 100%; width: 33.333%; background: linear-gradient(90deg, var(--copper), var(--gold)); transition: width .35s ease; }
.step-label { color: var(--gold); letter-spacing: .22em; font-size: .68rem; font-weight: 700; }
.oracle-card h3 { font-size: clamp(2rem, 4vw, 3.8rem); margin: .9rem 0 2.4rem; }
.answers { display: grid; gap: .8rem; }
.answer { width: 100%; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--cream); padding: 1.15rem 1.25rem; cursor: pointer; font-size: 1rem; transition: border-color .2s, transform .2s, background .2s; }
.answer:hover, .answer:focus-visible { border-color: var(--gold); background: rgba(217,175,103,.07); transform: translateX(.35rem); }
.oracle-result { text-align: center; }
.result-symbol { color: var(--gold); font-size: 4rem; margin-top: .4rem; }
.oracle-result p { color: var(--muted); max-width: 38rem; margin-inline: auto; }
.oracle-result blockquote { font: italic 1.35rem/1.5 var(--serif); color: var(--paper); margin: 2rem auto; padding: 1.5rem; border-block: 1px solid var(--line); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.reset-link { width: 100%; border: 0; color: var(--muted); background: transparent; text-decoration: underline; text-underline-offset: .25rem; cursor: pointer; margin-top: .7rem; }

.manifesto { min-height: 75vh; display: grid; place-content: center; text-align: center; padding: 9rem clamp(1.2rem, 11vw, 12rem); position: relative; }
.manifesto-line { color: var(--gold); font-size: 2rem; }
.manifesto-quote { font: 400 clamp(2rem, 4.8vw, 5.2rem)/1.13 var(--serif); max-width: 25ch; margin: 2rem auto 3rem; }
.author-signature span { letter-spacing: .28em; color: var(--gold); font-size: .78rem; }
.author-signature p { color: var(--muted); }
.faq-section { padding: 8rem clamp(1.2rem, 11vw, 12rem); border-top: 1px solid var(--line); }
.faq-list { max-width: 62rem; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; position: relative; padding: 1.5rem 3rem 1.5rem 0; cursor: pointer; font: 400 clamp(1.25rem, 2vw, 1.7rem) var(--serif); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .3rem; color: var(--gold); font: 400 1.8rem var(--serif); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { max-width: 48rem; color: var(--muted); margin: 0; padding: 0 0 1.6rem; }
.final-cta { text-align: center; padding: 8rem 1.2rem 10rem; background: radial-gradient(circle at center, rgba(182,107,50,.13), transparent 30rem); }
.final-cta h2 { margin-bottom: 2.5rem; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1.2rem, 4vw, 4rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; letter-spacing: .08em; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); color: var(--ink); background: var(--cream); padding: .75rem 1rem; z-index: 50; transition: transform .25s ease; box-shadow: 0 10px 40px #000; }
.toast.show { transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }
.gift-section { margin: 5rem clamp(1.2rem, 4vw, 4rem) 0; padding: clamp(1.5rem, 5vw, 5rem); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, .65fr) 1.35fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; background: radial-gradient(ellipse at top left, rgba(182,107,50,.22), transparent 65%), #1b120e; }
.gift-image { max-width: 20rem; margin: auto; transform: rotate(-3deg); }
.gift-image img { display: block; width: 100%; height: auto; box-shadow: 0 25px 65px #0009; }
.gift-copy h2 { font-size: clamp(2.5rem, 4.5vw, 4.8rem); }
.gift-copy > p:not(.eyebrow) { max-width: 42rem; color: var(--muted); }
.gift-actions, .edition-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem; margin-block: 1.8rem; }
.gift-copy .gift-note { font-size: .8rem; }
.coming-section { text-align: center; padding: 5rem 1.5rem 7rem; border-top: 1px solid var(--line); }
.coming-section h2 { font-size: clamp(2.5rem, 4.5vw, 4.6rem); }
.coming-section > p:not(.eyebrow) { max-width: 42rem; margin: 1.5rem auto; color: var(--muted); }
.author-portrait { width: min(15rem, 55vw); height: auto; border-radius: 50%; margin: 0 auto 2rem; border: 1px solid var(--gold); }
.reveal { opacity: 1; transform: none; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
@media(max-width: 700px) { .gift-section { grid-template-columns: 1fr; } .gift-image { max-width: 14rem; } .gift-copy { min-width: 0; } .gift-actions .button { width: 100%; } .site-header { gap: .75rem; } }
@media(max-width: 900px) { .portal-wrap { display: none; } .hero { padding-bottom: 4rem; } }

/* Low-cost motion: transform and opacity only; decorative layers never take input. */
.magic-dust { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 11; }
.magic-dust i { position: absolute; left: calc(var(--n) * 8%); bottom: -2rem; width: 3px; height: 3px; border-radius: 50%; background: #f3d99a; box-shadow: 0 0 9px #e0a548; opacity: 0; animation: dust-rise calc(22s + var(--n) * 1.4s) linear infinite; animation-delay: calc(var(--n) * -3.8s); }
.magic-dust i:nth-child(1) { --n: 1; }.magic-dust i:nth-child(2) { --n: 2; }.magic-dust i:nth-child(3) { --n: 3; }.magic-dust i:nth-child(4) { --n: 4; }.magic-dust i:nth-child(5) { --n: 5; }.magic-dust i:nth-child(6) { --n: 6; }.magic-dust i:nth-child(7) { --n: 7; }.magic-dust i:nth-child(8) { --n: 8; }.magic-dust i:nth-child(9) { --n: 9; }.magic-dust i:nth-child(10) { --n: 10; }.magic-dust i:nth-child(11) { --n: 11; }.magic-dust i:nth-child(12) { --n: 12; }
@keyframes dust-rise { 0% { transform: translate3d(0,0,0); opacity: 0; } 15%,75% { opacity: .4; } 100% { transform: translate3d(35px,-110vh,0); opacity: 0; } }
.gift-image { animation: book-float 8s ease-in-out infinite; }
@keyframes book-float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.book-visual { transition: transform .7s ease; }
@media (hover: hover) { .book-visual:hover { transform: translateY(-8px) rotate(-1deg); } }
.button-primary { position: relative; overflow: hidden; }
.button-primary::after { content: ''; position: absolute; inset: -70% -60%; background: linear-gradient(100deg, transparent 40%, #fff5 50%, transparent 60%); transform: translateX(-75%) rotate(12deg); transition: transform .8s ease; pointer-events: none; }
.button-primary:hover::after, .button-primary:focus-visible::after { transform: translateX(75%) rotate(12deg); }
.coming-section::before { content: '✦'; display: block; color: var(--gold); font-size: 2.5rem; margin-bottom: 1.5rem; animation: pulse 5s ease-in-out infinite; }
body.motion-paused *, body.motion-paused *::before, body.motion-paused *::after { animation-play-state: paused !important; }
.book-detail { padding: 5rem clamp(1.2rem, 7vw, 8rem); max-width: 100rem; margin: auto; }
.detail-intro { display: grid; grid-template-columns: minmax(170px,.65fr) 1.35fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.detail-intro img { width: 100%; height: auto; max-width: 24rem; box-shadow: 0 20px 60px #0008; }
.detail-intro h1 { font-size: clamp(2.7rem, 5vw, 5.5rem); max-width: none; overflow-wrap: anywhere; }
.detail-subtitle { color: var(--gold); font-family: var(--serif); font-size: 1.3rem; }
.detail-intro p { color: var(--muted); }
.detail-reading { max-width: 48rem; margin: 5rem auto 0; font-size: 1.08rem; }
.detail-reading h2 { font-size: 2.3rem; margin: 3rem 0 1.4rem; }
.detail-reading h3 { font-size: 1.5rem; margin-top: 2rem; }
.detail-reading p, .detail-reading li { color: var(--muted); }
.detail-reading a { color: var(--gold); text-underline-offset: .2rem; }
@media(max-width: 700px) { .detail-intro { grid-template-columns: 1fr; } .detail-intro img { max-width: 15rem; margin: auto; } }
@media(max-width: 640px) { .magic-dust i:nth-child(n+7) { display: none; } }
@media(prefers-reduced-motion: reduce) { .magic-dust { display: none; } .gift-image, .coming-section::before { animation: none; } .book-visual:hover { transform: none; } .button-primary::after { display: none; } }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 4rem; }
  .portal-wrap { width: min(74vw, 26rem); margin-top: 1.5rem; }
  .hero-copy { text-align: center; }
  h1 { max-width: none; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .book { grid-template-columns: 1fr; }
  .book:nth-of-type(3) .book-visual, .book:nth-of-type(3) .book-copy { order: initial; }
  .book-copy { text-align: left; margin-inline: auto; }
}

@media (max-width: 640px) {
  .brand-name { display: none; }
  .all-languages span:last-child { display: none; }
  .all-languages { width: 2.35rem; height: 2.35rem; justify-content: center; padding: 0; }
  .translate-frame { flex-direction: column; }
  #machineLanguage { min-width: 0; width: 100%; }
  .threshold { grid-template-columns: 1fr; }
  .threshold div { border-right: 0; border-bottom: 1px solid var(--line); }
  .threshold div:last-child { border-bottom: 0; }
  .books-section, .oracle-section { padding-block: 6rem; }
  .book { padding: 4.5rem 0; }
  .book-number { right: -.4rem; }
  footer { flex-direction: column; text-align: center; }
}

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