/* The pages' own layout: the home's turn and sections, the world pages'
   heroes and sections, the events page. The orrery, the world windows and
   the orbit traces are in orrery.css; the apertures in apertures.css.
   Nothing here redefines a --pal-*, --code-* or --w-* token. */

/* ---------- home: the opener is orrery.css; only the turn (the secret) is here ---------- */
/* The secret comes in over the last .6 s of the emblem's stop and goes over
   the first .6 s of the resume, on mirrored curves; hidden, it leaves the
   accessibility tree, and orrery.js writes it afresh on each stop so it is
   announced. With scripts off it is simply there. */
.turn { position: relative; min-height: 3.4em; display: grid; width: min(100%, 30rem); }
.turn > * { grid-area: 1 / 1; margin: 0; }
.turn .secret { color: var(--e-hint); font-size: clamp(1.15rem, 3.2vw, 1.5rem); opacity: 0; transform: translateY(6px); visibility: hidden;
  transition: opacity .6s cubic-bezier(.8, 0, .8, .3), transform .6s cubic-bezier(.8, 0, .8, .3), visibility 0s .6s; }
.is-stopped .turn .secret { opacity: 1; transform: none; visibility: visible;
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1) 1s, transform .6s cubic-bezier(.2, .7, .2, 1) 1s, visibility 0s 1s; }
html:not(.js) .turn .secret { opacity: 1; transform: none; visibility: visible; }

/* ---------- home: sections ---------- */
/* the hints speak in the voice (5.8:1 on the beige) */
.tuesdays .cta { margin: 1.1rem 0 .4rem; color: var(--pal-voice); }
.tuesdays details.reveal summary { color: var(--pal-voice); }
.tuesdays .sigil-stage { display: none; }
@media (min-width: 760px) {
  .tuesdays { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 1.5rem 3rem; align-items: center; }
  .tuesdays .sect-head { grid-column: 1; }
  .tuesdays .prose { grid-column: 1; }
  .tuesdays .sigil-stage { display: grid; place-items: center; grid-column: 2; grid-row: 1 / span 2; }
  .tuesdays .sigil-stage .nts-sigil { width: min(100%, 16rem); height: auto; aspect-ratio: 1; }
}
.words { padding: clamp(3rem, 8vw, 6rem) 0; position: relative; overflow: hidden; }
.words .wrap { position: relative; }
.words-grid { display: grid; gap: 1.5rem 3rem; }
.words h2 { font-size: clamp(2.4rem, 8vw, 4.5rem); line-height: .98; }
.words .prose p { font-size: 1.05rem; }
.words .contact { font-family: var(--font-display); font-weight: 500; font-variation-settings: var(--fraunces-small); font-size: 1.25rem; line-height: 1.5; }
.words .contact a { text-decoration-color: color-mix(in srgb, var(--pal-ink) 40%, transparent); }
.words-star { position: absolute; right: -2rem; bottom: -3rem; width: clamp(9rem, 22vw, 16rem); opacity: .55; pointer-events: none; }
@media (min-width: 760px) { .words-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
#yet-to-come .after { margin: 1.5rem 0 0; }
/* the words band in the colour code: a plywood plate (the ledger's black
   one is in apertures.css). Its selection and focus follow the plate, not
   the bands' shared defaults. */
#words { --band-bg: var(--pal-plywood); --band-fg: var(--pal-ink); }
#words ::selection { background: var(--w-selection); color: var(--w-selection-fg); }
#words :focus-visible { outline-color: var(--w-fg); }

/* ---------- world pages: the hero ---------- */
.hero { padding: clamp(var(--hero-top), 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1.5rem; }
/* the hero's lines each sit on one line at every width: their sizes are the
   role's size, capped to fit the text column (a size container, so cqi is its
   width). One track as wide as the title, so the label's band under it is too;
   the punchline may be wider and does not widen it. Each text's `--fit` is the
   container's width divided by the text's width in em, so the text just fills
   the column: measured on the copy and the face as they are, and to be
   measured again when either changes. */
.hero-text { display: grid; gap: .6rem; }
.hero-text p { margin: 0; }
:is(.embers-hero, .philo-hero, .intersect-hero) .hero-text { container-type: inline-size; grid-template-columns: max-content; }
:is(.embers-hero, .philo-hero, .intersect-hero) .hero-text > * { white-space: nowrap; }
:is(.embers-hero, .philo-hero, .intersect-hero) .hero-text > .incant { width: 0; min-width: 100%; }
/* the label: a solid band the width of the title, its text spread across it;
   narrow, the container query below swaps it for the short form */
.embers-hero .embers-label, .intersect-hero .label, .philo-hero .label { justify-self: stretch; padding: .3em .6em; line-height: 1.2; text-align-last: justify; font-size: min(.85rem, var(--fit)); }
.label-short { display: none; }
.label-short abbr { text-decoration: none; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; min-height: calc(100svh - var(--bar-h)); column-gap: clamp(2rem, 5vw, 5rem); }
  .hero .entity { order: 2; }
}
/* one entity column for every world: the same width and place, so the orbit
   trace and the figure in it sit in the same spot on each page */
.hero .entity { width: min(100%, var(--entity-w)); margin-inline: auto; }

/* EMBERS */
.embers-hero h1.embers-display { --fit: 16cqi; font-size: min(7rem, var(--fit)); }
.embers-hero .embers-label { background: var(--embers-fire); color: var(--embers-night); --fit: 2.49cqi; }
/* each world's hero label inverts the page's selection colours (the world's, or the palette's before the world colours apply), which are the band's own; the short form is covered too */
.embers-hero .embers-label::selection, .embers-hero .embers-label ::selection { background: var(--embers-night); color: var(--embers-cream); }
.embers-hero .incant { --fit: 6.18cqi; font-size: min(clamp(1.25rem, 3.4vw, 1.75rem), var(--fit)); }
/* the landing is the hearth's field: its lines fill the whole hero, edge to
   edge, while the solid keeps the stage's place and size (the canvas's
   data-anchor), in the same entity column and ring as the other worlds. The
   hero spans the page and pads itself to the wrap, so the text keeps its
   column; the canvas lies under everything in it, and only the words take
   pointer events, so a drag anywhere else turns the solid. */
.embers-hero.wrap { position: relative; isolation: isolate; width: 100%; padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2); }
.embers-hero > .nts-hearth { position: absolute; inset: 0; z-index: -1; }
.embers-hero > .nts-hearth-live { z-index: -1; }
.embers-hero .entity, .embers-hero .hero-text { pointer-events: none; }
.embers-hero .hero-text > * { pointer-events: auto; }
.embers-body .genres { margin: 1.25rem 0; }
.embers-summon { --band-bg: var(--embers-fire); --band-fg: #0b0709; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.embers-summon .embers-display { font-size: clamp(1.6rem, 6.4vw, 3.6rem); line-height: 1.05; letter-spacing: 0; max-width: 20ch; text-shadow: none; color: inherit; }
.embers-summon ::selection { background: #0b0709; color: var(--embers-cream); }
.embers-venues .prose p { font-size: 1.1rem; }

/* NOT NOT PHILO */
.philo-hero .stack { display: grid; justify-items: start; }
.philo-hero h1 { margin: .4rem 0 0; }
.philo-hero .philo-key { --fit: 15.4cqi; font-size: min(5.5rem, var(--fit)); }
.philo-hero .label { position: relative; background: var(--philo-red); color: #fff; letter-spacing: .2em; --fit: 2.96cqi; }
.philo-hero .label::selection, .philo-hero .label ::selection { background: #fff; color: var(--philo-red); }
/* the poster's charcoal plate, printed off register (as .philo-bar) */
.philo-hero .label::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--philo-shadow); transform: translate(calc(-1 * var(--philo-off)), calc(-1 * var(--philo-off))); }
:is(.philo-hero .incant, .world[data-world="philo"] .incant) { font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.philo-hero .incant { --fit: 5.49cqi; font-size: min(1.75rem, var(--fit)); }
/* the figure's caption hangs out of flow, a line under the figure's lowest cube
   (inside the entity box's lower part), so the ring centres on the figure as in
   the other worlds; stacked, the title keeps its distance below the box */
@media (max-width: 899px) { .philo-hero .entity { margin-bottom: 1rem; } }
.philo-salon .prose p:first-of-type { font-size: 1.1rem; }
.philo-next { --band-bg: var(--philo-ink); --band-fg: var(--philo-ground); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.philo-next h2 { font-family: var(--font-flyer); font-variation-settings: normal; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(2rem, 7vw, 3.6rem); margin-bottom: 1rem; }
.philo-next .prose { font-size: 1.1rem; }
.philo-next .prose a { color: inherit; }
.philo-venue { color: var(--w-muted); margin-top: 1rem; font-size: .95rem; }

/* INTERSECT */
.intersect-hero { text-align: left; }
/* the title is IM Fell, the one place it lives; the prompt before it stays mono */
.intersect-hero .hero-text { --fit: 14.1cqi; --title: min(5rem, var(--fit)); }
:is(.intersect-hero h1, .world[data-world="intersect"] h2) { text-transform: uppercase; letter-spacing: .02em; line-height: .95; }
.intersect-hero h1 { font-size: var(--title); }
:is(.intersect-hero h1, .world[data-world="intersect"] h2) .x { font-family: var(--font-mono); font-weight: 500; color: var(--intersect-fire-key); }
.intersect-hero .label { background: var(--w-fg); color: var(--w-bg); letter-spacing: .22em; --fit: 2.52cqi; }
.intersect-hero .label::selection, .intersect-hero .label ::selection { background: var(--w-bg); color: var(--w-fg); }
.intersect-hero .incant { --fit: 5.63cqi; font-size: min(2rem, var(--fit)); }
/* label and punchline start under the I, not the prompt: .815 is the prompt's
   width plus its space, in em of the title (measured, like the --fit factors) */
.intersect-hero .label, .intersect-hero .incant { margin-left: calc(.815 * var(--title)); }
/* narrow, the label gives way to the short form, set from the left, and its text is fitted again;
   after the worlds' rules so its --fit wins */
@container (width < 30rem) {
  .label-long { display: none; }
  .label-short { display: inline; }
  .embers-hero .embers-label, .intersect-hero .label, .philo-hero .label { text-align-last: auto; }
  .embers-hero .embers-label { --fit: 4.44cqi; }
  .intersect-hero .label { --fit: 4.42cqi; }
  .philo-hero .label { --fit: 5.18cqi; }
}
.intersect-body .prose p { font-size: 1.15rem; }
.intersect-whisper { font-family: var(--font-intersect); font-style: italic; color: var(--w-muted); font-size: 1.25rem; margin: 1.5rem 0 0; }
.intersect-link { font-family: var(--font-mono); font-size: .9rem; margin-top: 1rem; }

/* EVENTS */
.events-hero { min-height: 0; padding-bottom: 1rem; }
.events-hero .entity { display: none; }
@media (min-width: 900px) { .events-hero { min-height: 0; } .events-hero .entity { display: block; } }
.events-hero h1 { font-size: clamp(3rem, 14vw, 7rem); line-height: .9; }
.events-hero .lede { max-width: 32ch; }
.events-hero .sigils { display: flex; gap: .9rem; margin-top: .5rem; }
.events-hero .sigils .nts-sigil { width: 2rem; height: 2rem; }
.events-key { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .85rem; color: var(--w-muted); }
.events-key li { display: inline-flex; align-items: center; gap: .45rem; }
.events-key .nts-sigil { width: 1.2rem; height: 1.2rem; }
