/* Talisman home: the one link. Extends styles.css and artists.css.
   The poem, the world, the practical possibilities, then the invitation.
   Tokens come from styles.css :root; none are redeclared. */

/* overflow-x: hidden on html and body makes body its own scroller, which stops the world
   stage from sticking. clip trims the same overflow without creating a scroller. */
html, body { overflow-x: clip; }

/* styles.css puts translateZ(0) on body as a GPU hint. Any transform there turns body into the
   containing block for position: fixed, so the bar scrolled away and the opening layer grew as
   tall as the page. */
body { transform: none; }

/* Navigation and anchor offsets live in shell.css. */
.home-offer { max-width: 48ch; margin: var(--space-lg) auto 0; padding: 0 var(--space-sm); text-align: center; }
.home-offer h1 { font-size: clamp(1.15rem, 2.8vw, 1.5rem); font-weight: var(--weight-light); line-height: 1.3; text-wrap: balance; color: #fff; margin-bottom: var(--space-sm); }
.home-offer .home-call { font-size: clamp(1.15rem, 2.8vw, 1.5rem); font-weight: var(--weight-light); line-height: 1.4; text-wrap: balance; color: #fff; margin-bottom: var(--space-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-offer p { font-size: var(--text-sm); line-height: 1.75; color: rgba(255, 255, 255, 0.75); }
.home-offer .home-beta { margin-top: var(--space-sm); font-size: var(--text-xs); }
.home-beta a { color: var(--color-turquoise); text-underline-offset: 4px; }

/* ---- The story ------------------------------------------------------------ */

.home-story { font-family: var(--font-mono); }

.beat {
    max-width: 1060px;
    margin: 0 auto;
    padding: var(--space-2xl) 0;
}

/* Text remains laid out and readable before enhancement. The scroll renderer
   changes opacity only; a reveal never changes the document geometry. */
.reveal { opacity: 1; }

/* ---- The moment: its own screen before the worlds, and its answer after -------- */

.scene-intro {
    max-width: 1060px;
    margin: 0 auto;
    padding: clamp(48px, 8svh, 96px) var(--space-sm);
    text-align: center;
}
.scene-intro h2 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: var(--weight-thin);
    line-height: 1.2;
    color: #fff;
    text-wrap: balance;
}
.scene-title-link, .scene-title-link:visited { color: #f2f4f8; text-decoration: none; }
.scene-title-link > span { display: inline-block; font-size: 0.5em; color: #d4dce5; vertical-align: middle; }
.scene-title-link:hover { color: #d4dce5; }
.scene-title-link:focus-visible,
.platform-tool-link:focus-visible { outline: 1px solid var(--color-turquoise); outline-offset: 8px; }
.platform-tool-link { display: block; padding: 12px 4px; color: inherit; text-decoration: none; }
.platform-tool-link:hover h3 { color: var(--color-turquoise); }
.feat--one-place li:focus-within { opacity: 1 !important; transform: none !important; }
.scene-connections {
    display: block;
    width: min(100%, 720px);
    height: auto;
    margin: 0 auto clamp(24px, 4svh, 48px);
    overflow: visible;
    color: #d4dce5;
}
.scene-threads {
    stroke-width: 1.5;
    opacity: 0.65;
    stroke-dasharray: 1;
    stroke-dashoffset: var(--connection-gap, 0);
}
.scene-lights { color: var(--color-connection); filter: drop-shadow(0 0 5px rgba(121, 214, 163, 0.35)); }
.scene-intro p {
    max-width: 48ch;
    margin: var(--space-md) auto 0;
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    font-weight: var(--weight-light);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    text-wrap: balance;
}

.home-promises { max-width: 1000px; margin: 0 auto; padding: 0 0 clamp(56px, 9svh, 100px); }
.home-promises-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px 24px; margin: 0; padding: 0; list-style: none; }
.home-promises-grid > li { grid-column: span 2; min-width: 0; text-align: center; }
.promise-link { display: block; height: 100%; padding: 20px 8px; text-decoration: none; color: #f2f4f8; }
.promise-link:focus-visible { outline: 1px solid var(--color-turquoise); outline-offset: 4px; }
.home-promises-grid > li:focus-within { opacity: 1 !important; transform: none !important; }
.promise-mark { display: flex; align-items: center; justify-content: center; height: 44px; margin-bottom: 20px; color: var(--promise-colour); }
.promise-number { font-size: 2.8rem; font-weight: var(--weight-thin); line-height: 1; }
.promise-mark svg { display: block; }
[data-promise="not-for-profit"] { --promise-colour: var(--color-key); }
[data-promise="share"] { --promise-colour: var(--color-connection); }
[data-promise="earnings"] { --promise-colour: var(--color-key); }
[data-promise="privacy"] { --promise-colour: var(--color-lilac); }
[data-promise="network"] { --promise-colour: var(--color-sky); }
[data-promise="align"] { --promise-colour: var(--color-turquoise); }
.promise-link h3 { font-size: clamp(1rem, 2vw, 1.2rem); font-weight: var(--weight-normal); line-height: 1.45; color: #f2f4f8; }
.promise-link p { margin: 10px auto 0; max-width: 33ch; font-size: var(--text-xs); line-height: 1.75; color: rgba(255,255,255,0.62); }
.promise-link:hover h3 { color: var(--promise-colour); }
#align-world { scroll-margin-top: 56px; }
@media (max-width: 640px) {
    .home-promises-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .home-promises-grid > li { grid-column: span 1; }
    .home-promises-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .promise-link { padding-inline: 0; }
}

.moment {
    min-height: 60svh;
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    text-align: center;
    padding: clamp(48px, 8svh, 96px) var(--space-sm);
}
.moment-copy { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); width: 100%; }
.moment-text { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.moment-title {
    font-size: clamp(2.2rem, 6.4vw, 4.6rem);
    font-weight: var(--weight-thin);
    line-height: 1.1;
    color: #fff;
}
.moment-line {
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    font-weight: var(--weight-light);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 36ch;
}
.moment--close { min-height: 46svh; }
.moment--close .moment-title { max-width: 24ch; font-size: clamp(1.8rem, 4.5vw, 3.2rem); line-height: 1.25; }
.moment-emphasis { color: var(--color-lilac); }
.moment-actions { margin-top: var(--space-sm); }
.moment-actions .invitation-link { white-space: normal; }

/* ---- Beat 3: the world ----------------------------------------------------- */

.world {
    position: relative;
    height: 490svh;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.world-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #000;
}

.world-title {
    position: absolute;
    z-index: 3;
    top: calc(var(--site-bar-height, 60px) + 3svh);
    left: 0;
    right: 0;
    padding: 0 var(--space-sm);
    text-align: center;
    font-size: var(--text-xs);
    font-weight: var(--weight-normal);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.scene {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: none;
}
.scene.is-active { opacity: 1; }
.scene--introduction { display: grid; place-items: center; padding: 96px 24px; }
.world-introduction { max-width: 760px; text-align: center; }
.world-introduction h2 {
    font-size: clamp(2.2rem, 6.4vw, 4.6rem);
    font-weight: var(--weight-thin);
    line-height: 1.1;
    color: #fff;
    text-wrap: balance;
}
.world-introduction p {
    max-width: 36ch;
    margin: 24px auto 0;
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
}
.world-introduction .world-preview-note {
    font-size: var(--text-xs);
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.4);
}
.has-js .scene { pointer-events: none; }
.has-js .scene.is-active { pointer-events: auto; }
.scene svg { width: 100%; height: 100%; display: block; }

.scene-caption {
    position: absolute;
    z-index: 2;
    top: calc(var(--site-bar-height, 60px) + 9svh);
    left: 0;
    right: 0;
    padding: 0 var(--space-sm);
    text-align: center;
    font-size: clamp(1.6rem, 4.6vw, 2.9rem);
    font-weight: var(--weight-thin);
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
    opacity: 1;
}
.scene.is-active .scene-caption { opacity: 1; transform: none; }
.scene-caption { max-width: 26ch; margin-inline: auto; line-height: 1.15; text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3); }
.scene-caption > span { font-weight: var(--weight-thin); color: rgba(255, 255, 255, 0.3); transition: color 0.5s; }
/* The unlock: once the world meets the condition, what it opens lights up. */
.scene.is-open .scene-caption > span, html:not(.has-js) .scene-caption > span { color: var(--color-turquoise); }
.scene-art { shape-rendering: geometricPrecision; }
/* Four friends start apart and walk together; once they meet they light. */
.friends circle { transform: translateX(calc((1 - var(--moment-progress, 1)) * var(--dx))); transition: fill 0.5s; }
.scene--friends.is-open .friends { fill: var(--color-turquoise); }
.rain, .rain::after {
    position: absolute;
    inset: -10% -15%;
    pointer-events: none;
    transform: skewX(-12deg);
    background: repeating-linear-gradient(90deg, rgba(190, 210, 230, 0.42) 0 1px, transparent 1px 41px);
    -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 28px, transparent 28px 96px);
    mask-image: repeating-linear-gradient(180deg, #000 0 28px, transparent 28px 96px);
    animation: world-rain 0.65s linear infinite;
}
.rain { opacity: var(--rain-left, 0); }
.rain::after {
    content: '';
    inset: 0;
    transform: none;
    opacity: 0.65;
    background: repeating-linear-gradient(90deg, transparent 0 19px, rgba(190, 210, 230, 0.3) 19px 20px, transparent 20px 67px);
    -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 18px, transparent 18px 131px);
    mask-image: repeating-linear-gradient(180deg, #000 0 18px, transparent 18px 131px);
    animation: world-rain-far 0.95s linear infinite;
}
@keyframes world-rain { to { -webkit-mask-position: 0 96px; mask-position: 0 96px; } }
@keyframes world-rain-far { to { -webkit-mask-position: 0 131px; mask-position: 0 131px; } }
.garden-leaf { opacity: calc(1 - var(--rain-left, 0)); }

/* The forest: the moon climbs over the pines. */
/* The moon waxes from a crescent to full as its shadow slides away. */
.scene--forest .moon-shadow { transform: translateX(calc(-28px - var(--moment-progress, 1) * 84px)); }
.scene--forest .stars { animation: home-twinkle 4s ease-in-out infinite; }
@keyframes home-twinkle { 50% { opacity: 0.55; } }

/* Sunset is a single disc crossing a ruled horizon. */
.scene--beach .sun { transform: translateY(calc(var(--moment-progress, 1) * 100px)); }
.scene--beach .shimmer rect { animation: home-shimmer 2.6s ease-in-out infinite; }
.scene--beach .shimmer rect:nth-child(2n) { animation-delay: 0.9s; }
.scene--beach .shimmer rect:nth-child(3n) { animation-delay: 1.7s; }
@keyframes home-shimmer { 50% { opacity: 0.08; } }
.scene--beach .foam { animation: home-foam 5s ease-in-out infinite; }
@keyframes home-foam { 50% { transform: translateY(5px); opacity: 0.5; } }

.release-card {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: calc(3.5vh + 44px);
    width: min(calc(100vw - 32px), 380px);
    display: flex;
    gap: 14px;
    padding: 14px;
    background: rgba(6, 10, 14, 0.91);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transform: translate(-50%, 0);
}
.rc-art { flex: none; width: 76px; height: 76px; object-fit: cover; }
.rc-art--ticket { clip-path: polygon(0 0,100% 0,100% 40%,90% 50%,100% 60%,100% 100%,0 100%,0 60%,10% 50%,0 40%); }
.rc-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rc-title { font-size: var(--text-sm); color: #fff; margin-bottom: 2px; }
.rc-artist { font-size: 0.72rem; color: rgba(255, 255, 255, 0.75); margin-bottom: 5px; }
.rc-state { display: grid; margin-top: auto; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.rc-state > span { grid-area: 1 / 1; transition: opacity 0.5s; }
.rc-locked { color: rgba(255, 255, 255, 0.45); }
.rc-open { color: var(--color-turquoise); opacity: 0; }
.rc-open::before { content: '● '; }
.scene.is-open .rc-locked, html:not(.has-js) .rc-locked { opacity: 0; }
.scene.is-open .rc-open, html:not(.has-js) .rc-open { opacity: 1; }
.world-example-note { position: absolute; z-index: 3; bottom: 12px; left: 24px; right: 24px; margin: 0; text-align: center; font-size: 0.68rem; line-height: 1.5; color: rgba(255, 255, 255, 0.7); }
html:not(.has-js) .world-example-note { position: static; padding: 16px; }
html:not(.has-js) .world .release-card { position: relative; left: auto; bottom: auto; transform: none; margin: 0 auto; }

/* Decorative loops only run in the world that is on screen. */
.has-js .scene *, .has-js .rain, .has-js .rain::after { animation-play-state: paused; }
.has-js .world.is-visible .scene.is-active *,
.has-js .world.is-visible .scene.is-active .rain::after { animation-play-state: running; }

.world-dots {
    position: absolute;
    z-index: 3;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.world-dots li { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transition: background 0.4s; }
.world-stage[data-scene="0"] .world-dots li:nth-child(1),
.world-stage[data-scene="1"] .world-dots li:nth-child(2),
.world-stage[data-scene="2"] .world-dots li:nth-child(3),
.world-stage[data-scene="3"] .world-dots li:nth-child(4),
.world-stage[data-scene="4"] .world-dots li:nth-child(5) { background: #fff; }

.night-stars { opacity: calc(0.2 + var(--moment-progress, 1) * 0.8); }
.night-constellation { opacity: calc(var(--moment-progress, 1) * 0.45); }


/* The app's pyramid has a fixed square before enhancement, so WebGL never
   changes the scroll geometry. No continuous animation runs off-screen. */
.align-preview { width: min(100%, 340px); margin: -44px auto -12px; }
@media (max-height: 700px) {
    .align-preview { width: min(58vw, 220px); margin-top: -24px; }
    .scene--introduction .world-introduction h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
}
.align-preview-stage { position: relative; width: 100%; aspect-ratio: 1; }
.align-preview-fallback, .align-preview-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.align-preview-canvas { opacity: 0; }
.has-pyramid .align-preview-canvas { opacity: 1; }
.has-pyramid .align-preview-fallback { visibility: hidden; }

/* ---- Beat 4: the poem, then the way in ---------------------------------- */

.featured-alignments { padding: 32px var(--space-sm); }
.featured-alignments[hidden] { display: none; }
.featured-alignments > h2 {
    margin: 0 0 24px;
    font-size: var(--text-sm);
    font-weight: var(--weight-normal);
    color: rgba(255, 255, 255, 0.8);
}
.featured-alignments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.featured-alignments-grid a { display: flex; gap: 16px; color: inherit; text-decoration: none; }
.featured-alignments-grid img { width: 64px; height: 64px; object-fit: cover; flex-shrink: 0; background: rgba(255, 255, 255, 0.04); }
.featured-alignments-grid h3 { margin: 0 0 4px; font-size: var(--text-sm); font-weight: var(--weight-normal); color: #fff; }
.featured-alignments-grid p, .featured-alignments-note { font-size: var(--text-xs); line-height: 1.6; color: rgba(255, 255, 255, 0.65); }
.featured-alignments-grid p { margin: 0; }
.featured-alignments-grid p:last-child { margin-top: 8px; color: var(--color-turquoise); }
.featured-alignments-grid a:hover h3 { color: var(--color-turquoise); }
.featured-alignments-grid a:focus-visible { outline: 1px solid var(--color-turquoise); outline-offset: 6px; }
.featured-alignments-note { margin: 24px 0 0; }
.featured-alignments-more { margin: 24px 0 0; padding: 0 0 3px; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.25); font-family: inherit; cursor: pointer; }
@media (max-width: 760px) {
    .featured-alignments-grid { grid-template-columns: 1fr; }
}

.catalogue-picks { text-align: center; }
.catalogue-picks > h2 {
    margin: 0 0 var(--space-lg);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: var(--weight-thin);
    color: #fff;
}
.catalogue-picks-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 24px;
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: left;
}
.catalogue-picks-grid li { min-width: 0; }
.catalogue-picks-grid a { display: block; color: inherit; text-decoration: none; }
.catalogue-picks-grid a:focus-visible { outline: 1px solid var(--color-turquoise); outline-offset: 8px; }
.catalogue-picks-grid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
}
.catalogue-picks-grid h3 {
    margin: 16px 0 6px;
    font-size: var(--text-sm);
    font-weight: var(--weight-normal);
    line-height: 1.5;
    color: #fff;
}
.catalogue-picks-grid a:hover h3 { color: var(--color-turquoise); }
.catalogue-picks-grid p, .catalogue-picks-note {
    font-size: var(--text-xs);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}
.catalogue-picks-note { margin: var(--space-lg) 0 0; }
@media (max-width: 640px) {
    .catalogue-picks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
}

.beat-poem { text-align: center; padding-bottom: var(--space-xl); }

.poem p {
    margin: 0 0 1.6rem;
    font-size: clamp(1.05rem, 2.6vw, 1.35rem);
    font-weight: var(--weight-light);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}
.poem .line { display: block; }
.poem-turn { color: #fff !important; }

.ending { max-width: 560px; margin: var(--space-xl) auto 0; }
.ending-welcome {
    font-size: clamp(1.3rem, 3.4vw, 1.75rem);
    font-weight: var(--weight-thin);
    color: #fff;
    margin-bottom: var(--space-md);
}
.ending-note { font-size: var(--text-sm); line-height: 1.7; color: rgba(255, 255, 255, 0.65); margin-bottom: var(--space-md); }

.ending-primary {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    font-size: var(--text-sm);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-turquoise);
    text-decoration: none;
    border: 1px solid rgba(64, 224, 208, 0.6);
    background: rgba(64, 224, 208, 0.08);
    transition: var(--transition);
}
.ending-primary:hover, .ending-primary:focus-visible { background: rgba(64, 224, 208, 0.18); color: #5ffbf1; }

.setup { margin-top: var(--space-md); padding-top: var(--space-md); font-size: var(--text-sm); color: rgba(255, 255, 255, 0.75); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.setup .setup-title { color: #fff; margin-bottom: var(--space-xs); }
.setup p { margin: var(--space-sm) auto; max-width: 42ch; line-height: 1.7; }

/* ---- The thesis: three lines, with their full space reserved ---------------- */

.thesis {
    min-height: 78svh;
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    padding: var(--space-xl) 0;
}
.t-line {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(1.9rem, 5.6vw, 3.8rem);
    font-weight: var(--weight-thin);
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.62);
    min-height: 1.25em;
}
/* The mark closes the opening: logo, wordmark, and the way in, which leads down into the page. */
.t-mark { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: var(--space-lg); }
.t-logo { display: block; width: clamp(150px, 28vh, 300px); height: auto; filter: drop-shadow(0 0 18px rgba(147, 51, 234, 0.5)); }
.t-word-mark { display: block; width: clamp(200px, 50vw, 440px); height: auto; margin-top: var(--space-md); }
.t-enter { display: inline-block; margin-top: var(--space-md); text-decoration: none; cursor: pointer; }
.t-enter::after { content: '↓'; display: block; margin-top: 0.4em; font-size: 0.6em; letter-spacing: 0; }
/* The machine breaks once: the word carries two colourless ghosts of itself, unseen until
   home.js tears them sideways through slices of it, just before the cut. */
.t-glitch { position: relative; display: inline-block; }
.t-glitch::before, .t-glitch::after {
    content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.t-glitch::before { color: #fff; }
.t-glitch::after { color: rgba(255, 255, 255, 0.5); }
/* Read as a page, the cards stand in a stack. Played, they take turns in one place, centred
   on the screen, so the reader meets one thought at a time. The logo card is big. */
.t-lines { display: contents; }
.thesis.is-typing .t-lines { display: grid; place-items: center; min-height: 52svh; }
.thesis.is-typing .t-lines:not([data-stack]) > * { grid-area: 1 / 1; }
.thesis.is-typing .t-lines:not([data-stack]) .t-mark { margin-top: 0; }
/* The intro: the whole poem alone on the mesh, the screen's height, under no bar (the section pulls
   up over the body's bar padding). The lines float a little and glimmer, as the ritual line does. */
.thesis:has(.t-lines[data-stack]) {
    gap: 0.3rem;
    min-height: 100svh;
    margin-top: calc(-1 * var(--site-bar-height, 60px));
    padding: var(--space-lg) 0;
}
.thesis.is-typing .t-lines[data-stack] { gap: 0.3rem; align-content: center; }
.t-lines[data-stack] .t-line {
    font-size: clamp(1rem, 1.9vw, 1.45rem);
    line-height: 1.3;
    min-height: 1.3em;
    color: rgba(255, 255, 255, 0.8);
    animation: t-float 9s ease-in-out infinite, t-glimmer 6s ease-in-out infinite;
}
.t-lines[data-stack] .t-line:nth-child(3n + 2) { animation-delay: -3s, -2.5s; }
.t-lines[data-stack] .t-line:nth-child(3n + 3) { animation-delay: -6s, -4.2s; }
.t-lines[data-stack] .t-stanza { margin-top: 0.7em; }
.t-lines[data-stack] .t-enter { margin: var(--space-lg) auto 0; text-align: center; }
@keyframes t-float { 50% { transform: translateY(-4px); } }
@keyframes t-glimmer {
    0%, 100% { opacity: 0.8; text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
    50% { opacity: 1; text-shadow: 0 0 14px rgba(192, 132, 252, 0.55), 0 0 30px rgba(64, 224, 208, 0.25); }
}
/* The bar waits until the intro has been read. */
.site-bar { transition: opacity 0.6s ease, transform 0.6s ease; }
body.intro-on .site-bar { opacity: 0; transform: translateY(-100%); pointer-events: none; }
/* The mark sits above the poem, small: the poem is the opening, the mark signs it. */
.thesis:has(.t-lines[data-stack]) .t-mark { margin: 0 0 var(--space-md); }
.thesis:has(.t-lines[data-stack]) .t-logo { width: clamp(80px, 11vh, 110px); }
.thesis:has(.t-lines[data-stack]) .t-word-mark { width: clamp(140px, 26vw, 220px); margin-top: var(--space-xs); }
.thesis:has(.t-lines[data-stack]) .thesis-more { margin-top: var(--space-md); }
.thesis:has(.t-lines[data-stack]) .t-enter { font-size: var(--text-xl); margin-top: var(--space-md); }
@media (prefers-reduced-motion: reduce) {
    .t-lines[data-stack] .t-line { animation: none; }
}
/* Words are boxes so a line wraps between them and a word can rise as one. Letters stay inline,
   keeping their kerning; only a melting word's letters become boxes, so they can come apart. */
.t-word, .t-melt { display: inline-block; }
.t-melt .t-char { display: inline-block; }
.t-lit { color: #fff; }
/* Where a line will begin: a sliver for the waiting cursor to stand on. */
.t-lead { display: inline-block; width: 0.04em; height: 1em; vertical-align: -0.12em; }
.thesis-more {
    align-self: center;
    margin-top: var(--space-md);
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 3px;
    transition: opacity 0.9s ease-out, color 0.3s;
}
.thesis-more:hover, .thesis-more:focus-visible { color: var(--color-turquoise); border-bottom-color: var(--color-turquoise); }

/* ---- The manifesto: the poem's voice carried on, not a document ----------- */

.manifesto { max-width: 44rem; margin: 0 auto; padding: 0 0 var(--space-2xl); }
.manifesto[hidden] { display: none; }

.m-title {
    font-size: var(--text-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-turquoise);
    margin-bottom: var(--space-md);
    min-height: 1.4em;
}
.m-head {
    font-size: clamp(1.5rem, 3.6vw, 2.3rem);
    font-weight: var(--weight-thin);
    color: #fff;
    margin: var(--space-xl) 0 var(--space-sm);
    min-height: 1.2em;
}
.m-p {
    font-size: clamp(1.02rem, 1.8vw, 1.25rem);
    font-weight: var(--weight-light);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-md);
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}
.m-p a { color: var(--color-turquoise); text-decoration: none; }
.m-p a:hover, .m-p a:focus-visible { color: var(--color-white); }
.m-strong {
    font-size: clamp(1.7rem, 4.4vw, 2.8rem);
    font-weight: var(--weight-thin);
    color: #fff;
    margin: var(--space-lg) 0;
    min-height: 1.2em;
}
.m-quote {
    font-size: clamp(1.2rem, 2.8vw, 1.75rem);
    font-weight: var(--weight-thin);
    line-height: 1.45;
    color: #d4dce5;
    border-left: 2px solid #d4dce5;
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
    min-height: 1.45em;
}
/* The manifesto closes on the same line the mark opens with, at the same size, centred. */
.m-seal.ritual {
    display: block;
    margin: var(--space-2xl) auto 0;
    text-align: center;
    min-height: 1.4em;
}
.world-more {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 3.5vh;
    transform: translateX(-50%);
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 3px;
    white-space: nowrap;
}
.world-more:hover, .world-more:focus-visible { color: var(--color-turquoise); border-bottom-color: var(--color-turquoise); }

/* ---- The essentials: listening, network and connected tools ------------------------------------------ */

.feat {
    max-width: 1060px;
    min-height: 56svh;
    margin: 0 auto;
    padding: clamp(48px, 7svh, 80px) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}
.feat-label {
    font-size: var(--text-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-turquoise);
    margin-bottom: var(--space-sm);
}
.feat-title {
    font-size: clamp(1.8rem, 4.6vw, 3rem);
    font-weight: var(--weight-thin);
    line-height: 1.15;
    color: #fff;
    margin-bottom: var(--space-sm);
}
.feat-body {
    font-size: var(--text-base);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
    max-width: 46ch;
    margin-bottom: var(--space-md);
}
.feat-note { max-width: 54ch; font-size: var(--text-sm); line-height: 1.7; color: rgba(255, 255, 255, 0.62); margin-bottom: var(--space-md); }
.feat-more {
    display: inline-block;
    margin: 0 var(--space-md) var(--space-xs) 0;
    font-size: var(--text-xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 3px;
}
.feat-more:hover, .feat-more:focus-visible { color: var(--color-turquoise); border-bottom-color: var(--color-turquoise); }
.feat-visual { display: flex; justify-content: center; }

/* Two clear listening choices, without a simulated balance or comparison chart. */
.listening-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); width: 100%; text-align: center; }
.listening-choices > div { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: var(--space-md); }
.listening-choices svg { display: block; margin: 0 auto var(--space-sm); color: #d4dce5; }
.listening-choices > div:first-child svg { color: var(--color-sky); }
.listening-choices > div:last-child svg { color: var(--color-key); }
.listening-choices h3 { margin-bottom: var(--space-xs); font-size: var(--text-lg); font-weight: var(--weight-light); }
.listening-choices p { font-size: var(--text-sm); line-height: 1.8; color: rgba(255, 255, 255, 0.65); }
.feat--one-place { display: block; min-height: auto; text-align: center; }
.feat--one-place .platform-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 720px;
    margin: 0 auto var(--space-xl);
    gap: clamp(36px, 6vw, 64px) 16px;
}
.feat--one-place .platform-tools svg { width: 48px; height: 48px; }
.platform-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px 32px; margin-top: var(--space-md); }
.platform-links .feat-more { margin: 0; }
.platform-principles { margin: var(--space-md) auto 0; font-size: var(--text-xs); line-height: 2; color: rgba(255, 255, 255, 0.6); }
.platform-principles a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.platform-principles a:hover, .platform-principles a:focus-visible { color: var(--color-turquoise); }

/* Substrate: no drawing of its own. The page's network (mesh-animation.js's fixed canvas) has
   floated behind everything so far; here it comes forward and becomes the example. */
.feat--mesh { grid-template-columns: 1fr; }
#mesh-canvas { transition: opacity 1.4s ease-out, filter 1.4s ease-out !important; }
.mesh-forward #mesh-canvas { filter: brightness(2.6) saturate(1.3) drop-shadow(0 0 6px rgba(200, 212, 226, 0.5)) !important; }

/* ---- The haze: a soft pool of dark behind each block of text ---------------------
   The network (mesh-animation.js's fixed canvas, z-index -1) floats behind the whole page, and
   its lines cut through the type. Each text block gets a pseudo-element behind it: a translucent
   black that also blurs what lies beneath, feathered to nothing at its edges by a mask, so there is
   no box, only a dimming where the words are. Short, centred blocks use an ellipse; tall columns
   a rectangle with soft sides. The pool is sized by the text: fit-content where the block would
   otherwise span the row. In the Substrate beat the network is the example, so the pool stays on
   the words and the lit network shows all around them. */

.thesis, .scene-intro, .moment,
.manifesto, .feat-text, .listening-choices, .feat--one-place, .featured-alignments, .catalogue-picks, .poem, .ending {
    position: relative;
    isolation: isolate;
    --haze-depth: 0.74;
    --haze-blur: 12px;
}
.poem { width: fit-content; max-width: min(100%, 44ch); margin: 0 auto; text-align: center; }

.thesis::before, .scene-intro::before, .moment::before,
.manifesto::before, .feat-text::before, .listening-choices::before, .feat--one-place::before,
.featured-alignments::before, .catalogue-picks::before, .poem::before, .ending::before {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    background: rgba(0, 0, 0, var(--haze-depth));
    -webkit-backdrop-filter: blur(var(--haze-blur));
    backdrop-filter: blur(var(--haze-blur));
    transition: background 1.4s ease-out;
}

/* Centred headlines: one ellipse, densest where the lines sit, gone by the section's edge. */
.thesis::before, .scene-intro::before, .moment::before {
    inset: 0;
    -webkit-mask-image: radial-gradient(ellipse 58% 36% at 50% var(--haze-centre, 50%), #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 58% 36% at 50% var(--haze-centre, 50%), #000 35%, transparent 100%);
}
/* The hexagon sits above the words here; the pool centres on the words. */
.scene-intro { --haze-centre: 70%; }

/* Columns of reading: a rectangle a little larger than the text, with feathered sides. */
.manifesto::before, .feat-text::before, .listening-choices::before, .feat--one-place::before,
.featured-alignments::before, .catalogue-picks::before, .poem::before, .ending::before {
    inset: -2.5rem -3.5rem;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5rem, #000 calc(100% - 5rem), transparent),
                        linear-gradient(to bottom, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
    mask-image: linear-gradient(to right, transparent, #000 5rem, #000 calc(100% - 5rem), transparent),
                linear-gradient(to bottom, transparent, #000 4rem, #000 calc(100% - 4rem), transparent);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
/* Icons and artwork carry their own weight; their blocks need less dimming than running text. */
.feat--one-place, .featured-alignments, .catalogue-picks { --haze-depth: 0.5; }
.manifesto::before { inset: -3rem -4rem; }
/* While the network is lit as the example, the words need a deeper pool to stay readable. */
.mesh-forward .feat--mesh .feat-text { --haze-depth: 0.88; }

/* ---- Phones ---------------------------------------------------------------- */

@media (max-width: 640px) {
    .beat { padding: var(--space-xl) 0; }
    /* The canvas is already blurred 2px on phones; a lighter blur keeps the network animating smoothly. */
    .thesis, .scene-intro, .moment,
    .manifesto, .feat-text, .listening-choices, .feat--one-place, .catalogue-picks, .poem, .ending { --haze-blur: 4px; }
    .manifesto::before, .feat-text::before, .listening-choices::before, .feat--one-place::before,
    .catalogue-picks::before, .poem::before, .ending::before {
        inset: -1.5rem -1rem;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent),
                            linear-gradient(to bottom, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
        mask-image: linear-gradient(to right, transparent, #000 2rem, #000 calc(100% - 2rem), transparent),
                    linear-gradient(to bottom, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
    }
    .world-title { top: calc(56px + 2vh); }
    .scene-caption { top: calc(56px + 7vh); }
    .home-bar.is-docked { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
    .home-bar.is-docked::-webkit-scrollbar { display: none; }
    .world-dots { right: 10px; }
    .feat { grid-template-columns: 1fr; gap: var(--space-md); min-height: auto; padding: var(--space-xl) 0; }
    .thesis { min-height: 74svh; padding: var(--space-lg) 0; }
    .moment { min-height: 52svh; }
    .moment--close { min-height: 42svh; }
}

/* Without enhancement, every example remains readable in ordinary document flow. */
html:not(.has-js) .world { height: auto; }
html:not(.has-js) .world .world-stage { position: relative; height: auto; }
html:not(.has-js) .world .world-title { position: relative; top: auto; padding: var(--space-md) var(--space-sm); }
html:not(.has-js) .world .scene { position: relative; height: 85svh; opacity: 1; }
html:not(.has-js) .world .scene-caption { opacity: 1; }
html:not(.has-js) .world .world-dots { display: none; }
html:not(.has-js) .world .world-more { position: relative; bottom: auto; left: auto; transform: none; display: table; margin: var(--space-sm) auto var(--space-md); white-space: normal; text-align: center; }

/* ---- Reduced motion: every scene, still, one after another ---------------- */

@media (prefers-reduced-motion: reduce) {
    .home-bar { opacity: 1 !important; visibility: visible !important; }
    .has-js .reveal { opacity: 1; transform: none; transition: none; }
    .world { height: auto; }
    .world-stage { position: relative; height: auto; }
    .world-title { position: relative; top: auto; padding: var(--space-md) var(--space-sm); }
    .scene { position: relative; height: 80vh; opacity: 1; transition: none; }
    .scene *, .rain { animation: none !important; transition: none !important; }
    .scene .scene-caption { opacity: 1; }
    .scene--forest .moon-shadow, .friends circle { transform: none; }
    .scene--forest .moon-shadow { display: none; }
    .scene--beach .sun { transform: translateY(100px); }
    .world-dots { display: none; }
    .world-example-note { position: static; padding: 16px; }
    .world-more { position: relative; left: auto; bottom: auto; transform: none; display: inline-block; margin: 0 var(--space-sm) var(--space-sm); }
}

/* Short copy shares the prism's scene clock; it does not add another scroll track. */
.world-introduction .align-preview { width: min(100%, 260px); margin: -24px auto 0; }
.world-introduction .align-intro-copy { max-width: 42ch; margin-top: 16px; font-size: clamp(0.875rem, 1.5vw, 1rem); line-height: 1.7; }
[data-promise="tours"] { --promise-colour: var(--color-sky); }
[data-promise="messages"] { --promise-colour: var(--color-connection); }
[data-promise="community"] { --promise-colour: var(--color-lilac); }
.promise-more { margin: var(--space-lg) 0 0; text-align: center; }
@media (max-width: 640px), (max-height: 700px) {
    .world-introduction .align-preview { width: min(46vw, 180px); }
    .world-introduction h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
    .world-introduction .align-intro-copy { margin-top: 12px; font-size: 0.875rem; }
}
