@font-face {
    font-family: "Fraunces";
    src: url("fonts/Fraunces-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --abyss: #020a13;
    --depth: #06182b;
    --twilight: #082b4b;
    --surface: #0a2239;
    --surface-high: #103451;
    --glow: #e9b958;
    --glow-deep: #d99b37;
    --pearl: #f3ead8;
    --paper: #f4ead6;
    --ink: #15202c;
    --mist: #b8c9d8;
    --aurora: #63e0c4;
    --line: rgba(243, 234, 216, 0.18);
    --serif: "Fraunces", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --content: 1180px;
}

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

html {
    scroll-behavior: smooth;
    background: var(--abyss);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--abyss);
    color: var(--pearl);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::selection,
body *::selection {
    color: var(--abyss);
    background: var(--glow);
}

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb {
    border: 3px solid var(--abyss);
    border-radius: 10px;
    background: #715f37;
}

img { max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

:focus-visible {
    outline: 3px solid var(--aurora);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 100;
    padding: .75rem 1rem;
    border-radius: 10px;
    color: var(--abyss);
    background: var(--pearl);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 2rem), 1240px);
    min-height: 68px;
    margin: .85rem auto 0;
    padding: .55rem .65rem .55rem .75rem;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: rgba(2, 10, 19, .88);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .28);
    backdrop-filter: saturate(1.3) blur(18px);
}

.brand-mark,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-height: 44px;
    font-family: var(--serif);
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
}
.brand-mark img,
.footer-brand img { border-radius: 10px; }

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(.65rem, 2vw, 1.6rem);
}
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--mist);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease;
}
.site-nav a:hover { color: var(--pearl); }
.site-nav .nav-action {
    padding: 0 1rem;
    border: 1px solid rgba(233, 185, 88, .44);
    border-radius: 999px;
    color: var(--glow);
    background: rgba(6, 24, 43, .58);
}
.site-nav .nav-action:hover { color: var(--abyss); background: var(--glow); }

.language-menu {
    position: relative;
    flex: 0 0 auto;
    color: var(--mist);
}
.language-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 68px;
    min-height: 44px;
    padding: 0 .7rem;
    border-radius: 999px;
    color: var(--mist);
    background: rgba(6, 24, 43, .68);
    box-shadow: inset 0 0 0 1px var(--line);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    list-style: none;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.language-menu > summary::-webkit-details-marker { display: none; }
.language-menu > summary::marker { content: ""; }
.language-menu > summary:hover,
.language-menu[open] > summary {
    color: var(--pearl);
    background: var(--surface-high);
    box-shadow: inset 0 0 0 1px rgba(233, 185, 88, .48);
}
.language-globe,
.language-chevron {
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.language-globe { width: 17px; height: 17px; }
.language-chevron {
    width: 12px;
    height: 12px;
    transition: transform .2s var(--ease-out);
}
.language-menu[open] .language-chevron { transform: rotate(180deg); }
.language-menu ul {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    z-index: 80;
    width: max-content;
    min-width: 12.5rem;
    max-height: min(25rem, calc(100vh - 6rem));
    margin: 0;
    padding: .45rem;
    overflow-y: auto;
    border-radius: 14px;
    background: #071b2e;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .48);
    list-style: none;
}
.language-menu li { margin: 0; }
.language-menu li + li { margin-top: .1rem; }
.language-menu li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .55rem .75rem;
    border-radius: 10px;
    color: var(--mist);
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s ease, background .15s ease;
}
.language-menu li a:hover { color: var(--pearl); background: var(--surface); }
.language-menu li[aria-current="true"] a { color: var(--glow); background: rgba(233, 185, 88, .1); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, .page-title { text-wrap: balance; }
h1, h2, h3 {
    font-family: var(--serif);
    font-variation-settings: "SOFT" 70, "WONK" 1;
}

.hero {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(2, 10, 19, .96) 0%, rgba(2, 10, 19, .78) 44%, rgba(2, 10, 19, .35) 72%, rgba(2, 10, 19, .64) 100%),
        linear-gradient(180deg, rgba(2, 10, 19, .2), rgba(2, 10, 19, .72)),
        url("images/library-factory.webp");
    background-position: center, center, center 48%;
    background-size: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, var(--abyss));
    pointer-events: none;
}

.hero-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: center;
    width: min(calc(100% - 3rem), var(--content));
    min-height: 100svh;
    margin: 0 auto;
    padding: 7.5rem 0 4rem;
}

.hero-copy { max-width: 680px; }
.availability {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 1.35rem;
    padding: .28rem .75rem;
    border: 1px solid rgba(233, 185, 88, .38);
    border-radius: 999px;
    color: var(--glow);
    background: rgba(2, 10, 19, .62);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.hero h1 {
    max-width: 11ch;
    margin-bottom: 1.4rem;
    font-size: clamp(3.2rem, 7.4vw, 6rem);
    font-weight: 580;
    line-height: .94;
    letter-spacing: -.035em;
}

.hero-lede {
    max-width: 62ch;
    margin-bottom: 2rem;
    color: #cfdae3;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.62;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem 1.35rem;
    align-items: center;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 54px;
    padding: .75rem 1.35rem;
    border: 0;
    border-radius: 14px;
    color: #17202a;
    background: var(--glow);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 2px 0 rgba(255, 255, 255, .28) inset;
    font-weight: 850;
    text-decoration: none;
    transition: transform .25s var(--ease-out), background .2s ease, box-shadow .25s ease;
}
.primary-action svg { width: 22px; height: 22px; fill: currentColor; }
.primary-action:hover {
    background: #f4c86f;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .38), 0 2px 0 rgba(255, 255, 255, .32) inset;
    transform: translateY(-2px);
}
.primary-action:active { transform: translateY(0); }

.text-action {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    color: var(--pearl);
    font-weight: 750;
    text-decoration-color: rgba(233, 185, 88, .6);
    text-decoration-thickness: 1px;
}
.text-action:hover { color: var(--glow); }

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1.4rem;
    margin: 2rem 0 0;
    padding: 0;
    color: var(--mist);
    list-style: none;
    font-size: .86rem;
    font-weight: 700;
}
.hero-facts li { position: relative; }
.hero-facts li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -.8rem;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--glow);
}

.hero-device {
    position: relative;
    justify-self: center;
    width: min(100%, 390px);
    perspective: 1000px;
}
.device-shell {
    position: relative;
    z-index: 2;
    overflow: hidden;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 52px;
    background: #050608;
    box-shadow: 0 38px 90px rgba(0, 0, 0, .56), 0 4px 18px rgba(0, 0, 0, .42);
    transform: rotateY(-5deg) rotateX(1deg);
}
.device-shell img {
    display: block;
    width: 100%;
    border-radius: 44px;
}
.device-island {
    position: absolute;
    z-index: 4;
    top: 20px;
    left: 50%;
    width: 34%;
    height: 3.4%;
    border-radius: 999px;
    background: #000;
    transform: translateX(-50%);
}
.device-glow {
    position: absolute;
    z-index: 1;
    right: 10%;
    bottom: -2%;
    width: 64%;
    height: 45%;
    border-radius: 50%;
    background: rgba(233, 185, 88, .24);
    filter: blur(54px);
}

.hero-atmosphere .star {
    position: absolute;
    z-index: 1;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--glow);
    box-shadow: 0 0 12px rgba(233, 185, 88, .82);
    animation: drift 7s ease-in-out infinite alternate;
}
.star-a { top: 18%; left: 7%; }
.star-b { top: 30%; left: 47%; animation-delay: -2s !important; }
.star-c { top: 16%; right: 11%; animation-delay: -4s !important; }
.star-d { top: 66%; left: 15%; animation-delay: -1s !important; }
.star-e { top: 76%; right: 38%; animation-delay: -3s !important; }
.star-f { top: 54%; right: 5%; animation-delay: -5s !important; }
@keyframes drift { to { transform: translate3d(8px, -16px, 0); opacity: .42; } }

.ritual,
.languages {
    padding: clamp(5rem, 10vw, 9rem) max(1.5rem, calc((100vw - var(--content)) / 2));
}

.section-heading {
    max-width: 720px;
    margin: 0 auto clamp(3.5rem, 7vw, 6rem);
    text-align: center;
}
.section-heading h2,
.reader-heading h2,
.privacy-copy h2,
.workshop h2,
.closing h2 {
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 5.6vw, 4.8rem);
    font-weight: 560;
    line-height: 1;
    letter-spacing: -.03em;
}
.section-heading p,
.reader-heading p,
.workshop-copy > p,
.privacy-copy > p,
.closing-copy > p {
    max-width: 65ch;
    margin-bottom: 0;
    color: var(--mist);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.ritual-line {
    position: relative;
    display: grid;
    gap: clamp(2.7rem, 6vw, 5.2rem);
    max-width: 920px;
    margin: 0 auto;
}
.ritual-line::before {
    content: "";
    position: absolute;
    top: 60px;
    bottom: 60px;
    left: 35px;
    width: 1px;
    background: linear-gradient(var(--glow), rgba(99, 224, 196, .25), rgba(243, 234, 216, .08));
}
.ritual-step {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: clamp(1.25rem, 4vw, 2.4rem);
    align-items: start;
}
.ritual-step:nth-child(2) { margin-left: clamp(0rem, 7vw, 7rem); }
.ritual-step:nth-child(3) { margin-left: clamp(0rem, 14vw, 14rem); }
.ritual-symbol {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: var(--glow);
    background: var(--depth);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .32);
}
.ritual-symbol svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ritual-step h3 {
    margin: -.2rem 0 .4rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 620;
}
.ritual-step p { max-width: 62ch; margin: 0; color: var(--mist); }

.workshop {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(330px, .65fr);
    gap: clamp(3rem, 9vw, 9rem);
    align-items: center;
    max-width: var(--content);
    margin: 0 auto;
    padding: clamp(5rem, 10vw, 9rem) 1.5rem;
}
.workshop-copy { max-width: 640px; }
.seed-group { margin-top: 2rem; }
.seed-group h3 {
    margin-bottom: .75rem;
    color: var(--pearl);
    font-family: var(--sans);
    font-size: .92rem;
    font-weight: 800;
}
.seed-options { display: flex; flex-wrap: wrap; gap: .6rem; }
.seed-option {
    min-height: 44px;
    padding: .55rem .85rem;
    border: 1px solid rgba(184, 201, 216, .25);
    border-radius: 999px;
    color: var(--mist);
    background: rgba(10, 34, 57, .72);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s var(--ease-out);
}
.seed-option:hover { color: var(--pearl); border-color: rgba(233, 185, 88, .54); transform: translateY(-1px); }
.seed-option.is-selected {
    border-color: var(--glow);
    color: var(--abyss);
    background: var(--glow);
}

.storybook-preview { position: relative; width: min(100%, 390px); justify-self: center; }
.storybook-cover {
    position: relative;
    z-index: 2;
    overflow: hidden;
    aspect-ratio: .72;
    border: 1px solid rgba(233, 185, 88, .55);
    border-radius: 14px 20px 20px 14px;
    background: var(--surface);
    box-shadow: -10px 18px 46px rgba(0, 0, 0, .42), inset 10px 0 16px rgba(0, 0, 0, .28);
    transform: rotate(1.5deg);
    transition: transform .55s var(--ease-out);
}
.storybook-preview:hover .storybook-cover { transform: rotate(0) translateY(-5px); }
.storybook-cover::before {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 0 auto 0 0;
    width: 18px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(255, 255, 255, .08), transparent);
}
.storybook-cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .22s ease, transform .8s var(--ease-out); }
.storybook-cover.is-changing img { opacity: .28; transform: scale(1.035); }
.cover-ink {
    position: absolute;
    z-index: 4;
    inset: auto 0 0;
    padding: 5rem 2rem 2rem;
    background: linear-gradient(transparent, rgba(2, 10, 19, .96) 58%);
    text-align: center;
}
.cover-ink span,
.cover-ink p {
    color: var(--glow);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.cover-ink h3 { margin: .55rem 0 .75rem; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: .98; }
.cover-ink p { margin: 0; color: var(--mist); letter-spacing: .05em; }
.cover-shadow {
    position: absolute;
    right: 5%;
    bottom: -22px;
    width: 84%;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    filter: blur(17px);
}

.reader {
    padding: clamp(5rem, 10vw, 9rem) 1.5rem;
    background: #07111e;
}
.reader-heading { max-width: 820px; margin: 0 auto 3.2rem; text-align: center; }
.open-book {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(100%, 1050px);
    min-height: 560px;
    margin: 0 auto;
    color: var(--ink);
    filter: drop-shadow(0 28px 32px rgba(0, 0, 0, .38));
}
.book-page {
    position: relative;
    overflow: hidden;
    background: var(--paper);
}
.book-page-art { border-radius: 18px 2px 2px 18px; }
.book-page-copy { border-radius: 2px 18px 18px 2px; }
.book-page-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .22s ease, transform .65s var(--ease-out);
}
.open-book.is-turning .book-page-art img { opacity: .45; transform: scale(1.03); }
.book-page-copy::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(62, 45, 25, .1), transparent 12%);
}
.page-copy-inner { padding: clamp(2.2rem, 5vw, 5rem); }
.page-title { margin-bottom: 1.3rem; color: #12314c; font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 620; line-height: 1.04; }
.page-copy-inner > p:last-child { max-width: 32ch; font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.32rem); line-height: 1.62; }
.page-number { position: absolute; right: 2rem; bottom: 1.4rem; color: #74808a; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.book-gutter {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 24px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .18), rgba(255, 255, 255, .16), rgba(0, 0, 0, .12));
    transform: translateX(-50%);
    pointer-events: none;
}
.page-turn {
    position: absolute;
    z-index: 7;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: .6rem .9rem;
    border: 0;
    border-radius: 999px;
    color: var(--pearl);
    background: #17324a;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
    cursor: pointer;
    font-weight: 800;
}
.page-turn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page-turn:hover { background: #23445f; }
.reader-note { margin: 1.25rem auto 0; color: #7f96aa; font-size: .78rem; text-align: center; }

.privacy-band {
    display: grid;
    grid-template-columns: minmax(300px, .75fr) minmax(0, 1fr);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: center;
    max-width: var(--content);
    margin: 0 auto;
    padding: clamp(5rem, 10vw, 9rem) 1.5rem;
}
.privacy-art {
    overflow: hidden;
    aspect-ratio: .78;
    border-radius: 180px 180px 18px 18px;
    box-shadow: 0 28px 58px rgba(0, 0, 0, .35);
}
.privacy-art img { width: 100%; height: 100%; object-fit: cover; }
.privacy-copy { max-width: 650px; }
.trust-list { margin: 2.2rem 0 1.5rem; }
.trust-list div {
    display: grid;
    grid-template-columns: minmax(150px, .42fr) 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}
.trust-list div:last-child { border-bottom: 1px solid var(--line); }
.trust-list dt { color: var(--pearl); font-weight: 820; }
.trust-list dd { margin: 0; color: var(--mist); }

.languages { padding-top: 4rem; }
.language-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.language-list li {
    padding: .7rem 1rem;
    border-bottom: 1px solid rgba(233, 185, 88, .42);
    color: var(--pearl);
    font-family: var(--serif);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 550;
}

.closing {
    position: relative;
    display: grid;
    grid-template-columns: minmax(230px, .6fr) minmax(0, 1fr);
    gap: clamp(2rem, 7vw, 6rem);
    align-items: center;
    width: min(calc(100% - 3rem), var(--content));
    min-height: 660px;
    margin: 3rem auto 8rem;
    overflow: hidden;
    border-radius: 18px;
    background: var(--twilight);
    box-shadow: 0 34px 70px rgba(0, 0, 0, .35);
}
.closing::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 10, 19, .05), rgba(2, 10, 19, .72));
}
.closing-character { align-self: stretch; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.closing-copy { position: relative; z-index: 2; max-width: 620px; padding: 3rem 3rem 3rem 0; }
.closing-copy .primary-action { margin-top: 1.3rem; }
.closing-note { display: block; margin-top: 1rem; color: var(--mist); font-size: .86rem; }

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.3rem 2rem;
    align-items: center;
    max-width: var(--content);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
    border-top: 1px solid var(--line);
    color: #8fa4b6;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: .7rem 1.35rem; justify-content: flex-end; }
.site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.site-footer nav a:hover { color: var(--pearl); }
.site-footer p, .site-footer small { margin: 0; }
.site-footer p { color: var(--glow); font-family: var(--serif); }
.site-footer small { text-align: right; }

.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(8px);
}
.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out);
}

/* Legal and support pages */
.legal-page { background: var(--depth); }
.legal-hero {
    padding: 9rem 1.5rem 4rem;
    background-image: linear-gradient(rgba(2, 10, 19, .58), rgba(6, 24, 43, .96)), url("images/library-factory.webp");
    background-position: center 32%;
    background-size: cover;
}
.legal-hero > div { max-width: 820px; margin: 0 auto; }
.legal-hero h1 { margin-bottom: .8rem; font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 580; line-height: 1; letter-spacing: -.035em; }
.legal-hero p { max-width: 62ch; margin: 0; color: var(--mist); font-size: 1.08rem; }
.legal-content { max-width: 820px; margin: 0 auto; padding: 4rem 1.5rem 7rem; }
.legal-content h2 { margin: 3rem 0 .8rem; font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 620; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { max-width: 72ch; color: #cad6e0; }
.legal-content li + li { margin-top: .55rem; }
.legal-content a { color: var(--glow); }
.legal-content .effective { color: #8fa4b6; font-size: .88rem; }
.support-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 2rem 0; }
.support-actions .primary-action { color: var(--abyss); }
.support-actions .secondary-action {
    display: inline-flex;
    align-items: center;
    min-height: 54px;
    padding: .75rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--pearl);
    text-decoration: none;
    font-weight: 800;
}
.support-actions .secondary-action:hover { border-color: var(--glow); }
.error-page { display: grid; place-items: center; min-height: 100svh; padding: 2rem; text-align: center; background-image: linear-gradient(rgba(2, 10, 19, .35), rgba(2, 10, 19, .9)), url("images/moonlit-path.webp"); background-size: cover; background-position: center; }
.error-page h1 { margin-bottom: .75rem; font-size: clamp(3rem, 10vw, 7rem); font-weight: 560; line-height: .9; }
.error-page p { max-width: 48ch; color: var(--mist); }

@media (max-width: 900px) {
    .hero-shell { grid-template-columns: 1fr .62fr; gap: 2rem; }
    .hero h1 { font-size: clamp(3rem, 7vw, 4.6rem); }
    .workshop { grid-template-columns: 1fr minmax(280px, .65fr); gap: 3rem; }
    .open-book { min-height: 480px; }
    .privacy-band { grid-template-columns: minmax(240px, .6fr) 1fr; gap: 3rem; }
}

@media (max-width: 720px) {
    .site-header { width: calc(100% - 1rem); margin-top: .5rem; }
    .brand-mark span { font-size: .98rem; }
    .site-nav { gap: .45rem; }
    .site-nav > a:not(.nav-action) { display: none; }
    .site-nav .nav-action { padding: 0 .75rem; font-size: .78rem; }

    .hero { min-height: auto; }
    .hero-shell { grid-template-columns: 1fr; padding-top: 8rem; text-align: center; }
    .hero-copy { margin: 0 auto; }
    .hero h1 { max-width: 12ch; margin-left: auto; margin-right: auto; font-size: clamp(3rem, 13vw, 4.6rem); }
    .hero-lede { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-facts { justify-content: center; }
    .hero-device { width: min(82vw, 360px); margin-top: 1rem; }
    .device-shell { transform: none; }

    .ritual-step:nth-child(2), .ritual-step:nth-child(3) { margin-left: 0; }

    .workshop { grid-template-columns: 1fr; text-align: center; }
    .workshop-copy { margin: 0 auto; }
    .seed-options { justify-content: center; }
    .storybook-preview { width: min(82vw, 390px); }

    .open-book { grid-template-columns: 1fr; min-height: 0; }
    .book-page-art { aspect-ratio: 1.45; border-radius: 16px 16px 0 0; }
    .book-page-copy { min-height: 400px; border-radius: 0 0 16px 16px; }
    .book-gutter { top: 42%; bottom: auto; left: 0; width: 100%; height: 18px; transform: none; background: linear-gradient(rgba(0, 0, 0, .16), rgba(255, 255, 255, .12), rgba(0, 0, 0, .08)); }

    .privacy-band { grid-template-columns: 1fr; }
    .privacy-art { width: min(76vw, 390px); margin: 0 auto; }
    .privacy-copy { margin: 0 auto; text-align: center; }
    .trust-list { text-align: left; }

    .closing { grid-template-columns: 1fr; min-height: 760px; text-align: center; }
    .closing::before { background: linear-gradient(180deg, transparent 20%, rgba(2, 10, 19, .88) 60%); }
    .closing-character { position: absolute; inset: 0; }
    .closing-copy { align-self: end; padding: 3rem 1.5rem; }
    .closing-copy > p { margin-left: auto; margin-right: auto; }

    .site-footer { grid-template-columns: 1fr; text-align: center; }
    .footer-brand, .site-footer nav { justify-content: center; }
    .site-footer small { text-align: center; }
}

@media (max-width: 480px) {
    .brand-mark span { display: none; }
    .language-menu > summary { min-width: 62px; padding: 0 .55rem; }
    .hero-shell { width: min(calc(100% - 2rem), var(--content)); }
    .hero-facts { flex-direction: column; gap: .25rem; }
    .hero-facts li::after { display: none; }
    .primary-action { width: 100%; }
    .hero-actions .text-action { width: auto; }
    .ritual-line::before { left: 27px; }
    .ritual-step { grid-template-columns: 56px 1fr; gap: 1rem; }
    .ritual-symbol { width: 56px; height: 56px; }
    .ritual-symbol svg { width: 30px; height: 30px; }
    .trust-list div { grid-template-columns: 1fr; gap: .25rem; }
}

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

@media (prefers-contrast: more) {
    :root { --mist: #d7e2eb; --line: rgba(243, 234, 216, .4); }
    .site-header.is-scrolled { background: rgba(2, 10, 19, .98); }
    .seed-option { border-color: #8ba2b6; }
}
