/* The riso portal. Three inks on bone paper: coral, cobalt, marigold, plus a
   near-black navy as the key ink. Flat colour, overprint by multiply, a
   keyline that sits a few pixels off register, and a grain over everything.
   Text lives only on solid fields: bone (ink), cobalt (bone), marigold (ink)
   and the coral threshold (ink). All pairs meet WCAG AA. */

:root {
  --coral: #ff4a55;
  --cobalt: #2f3fd9;
  --cobalt-deep: #2232b4;
  --cobalt-tint: #cfcbf2;
  --gold: #f5b31b;
  --bone: #f4ecdc;
  --bone-2: #ebe1cc;
  --ink: #1c1844;
  --ink-soft: #5a5680;
  --fire-text: #c4142f;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
  --gutter: clamp(16px, 5vw, 48px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-turn: cubic-bezier(.65, 0, .15, 1);
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 280ms ease-out both vt-out; }
::view-transition-new(root) { animation: 360ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bone); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; position: relative; min-height: 100dvh; overflow-x: clip;
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.55;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* the variant bar lives in the bottom 64px */
}
/* Paper grain, printed over everything. Absolute, not fixed, so scrolling
   never repaints the whole screen. */
body::after {
  content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none;
  mix-blend-mode: multiply; opacity: .34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
.field-gold :focus-visible, .field-coral :focus-visible { outline-color: var(--ink); }
a { color: var(--cobalt); text-decoration-color: color-mix(in srgb, var(--cobalt) 45%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1.5px; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: currentColor; }
img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1; letter-spacing: -.01em; margin: 0; text-wrap: balance; font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1; }
h2 { font-size: clamp(2rem, 6vw, 3rem); color: var(--cobalt); }
h3 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 1; }
strong { font-weight: 600; }

.label { font-family: var(--body); font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.wrap { width: min(100% - 2 * var(--gutter), 68rem); margin-inline: auto; }
.prose { max-width: var(--measure); }

/* ---------- masthead ---------- */
.mast { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; padding: 1.1rem 0 .4rem; }
.mast a { color: inherit; text-decoration: none; }
.wordmark { font-family: var(--display); font-size: 1.15rem; font-weight: 600; font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 1; letter-spacing: -.005em; white-space: nowrap; }
.wordmark:hover { color: var(--cobalt); }
.mast nav { display: flex; flex-wrap: wrap; gap: .2rem 1.25rem; }
.mast nav a { font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; padding: .35rem 0; border-bottom: 1.5px solid transparent; }
@media (max-width: 599px) { .mast nav { width: 100%; justify-content: space-between; gap: .2rem .5rem; } .mast nav a { font-size: .7rem; letter-spacing: .08em; padding: .55rem 0; } }
.mast nav a:hover, .mast nav a[aria-current="page"] { border-bottom-color: currentColor; }
.field-coral .mast, .field-coral .mast a { color: var(--ink); }
.field-cobalt .mast, .field-cobalt .mast a { color: var(--bone); }
.field-cobalt .wordmark:hover { color: var(--gold); }

/* ---------- fields (solid inks the text sits on) ---------- */
.field-coral { background: var(--coral); color: var(--ink); }
.field-cobalt { background: var(--cobalt); color: var(--bone); }
.field-cobalt h2, .field-cobalt h3 { color: var(--bone); }
.field-cobalt a { color: var(--bone); text-decoration-color: color-mix(in srgb, var(--gold) 70%, transparent); }
.field-cobalt a:hover { color: var(--gold); }
.field-cobalt ::selection { background: var(--gold); color: var(--ink); }
.field-gold { background: var(--gold); color: var(--ink); }
.field-gold h2, .field-gold a { color: var(--ink); }
.field-bone { background: var(--bone); }

/* ---------- threshold (home) ---------- */
.threshold { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.threshold .stage { display: grid; justify-items: center; align-content: center; gap: clamp(.6rem, 2vh, 1.4rem); padding: .5rem 0 3.5rem; text-align: center; }
.threshold .intro { display: grid; justify-items: center; gap: clamp(.6rem, 2vh, 1.4rem); }
@media (min-width: 900px) {
  .threshold .stage { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(2rem, 5vw, 5rem); text-align: left; padding: 1rem 0 3rem; }
  .threshold .intro { order: -1; justify-items: start; }
  .threshold .turn { text-align: left; }
  .threshold h1 { max-width: 8ch; }
}
.portal-btn {
  appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit;
  width: min(100%, 82vmin, 560px); aspect-ratio: 1; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none; border-radius: 50%;
}
.portal-btn svg { width: 100%; height: 100%; overflow: visible; }
.portal-btn:focus-visible { outline-offset: 10px; }
@media (min-width: 900px) { .portal-btn { width: min(84vh, 44vw, 680px); } }
.portal [class^="l-"] { transform-box: fill-box; transform-origin: center; }
.portal .l-ticks { transform: rotate(var(--r-ticks, 0deg)); }
.portal .l-hept { transform: rotate(var(--r-hept, -14deg)); }
.portal .l-waves { transform: rotate(var(--r-waves, 0deg)); }
.portal .l-knot { transform: rotate(var(--r-knot, 26deg)); }
.portal .l-stars { transform: rotate(var(--r-stars, 0deg)); }
.portal.is-turning [class^="l-"] { transition: transform 2.2s var(--ease-turn); }
.portal .tet { transform-box: fill-box; transform-origin: center; transition: transform 2.2s var(--ease-turn); }
.portal .hole { opacity: 0; transition: opacity 1.6s ease .6s; }
.portal.is-aligned .hole { opacity: 1; }
.portal.is-aligned .tet { transform: rotate(180deg); }
.portal .multiply { mix-blend-mode: multiply; }
.portal .misreg { transform: translate(5px, -4px); }

.threshold h1 { font-size: clamp(2.75rem, 11.5vw, 5.75rem); font-weight: 700; line-height: .92; letter-spacing: -.015em; text-transform: uppercase; max-width: 11ch; }
.threshold .line { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(1.25rem, 3.6vw, 1.75rem); line-height: 1.25; max-width: 24ch; margin: 0; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }
.threshold .whisper { margin: 0; font-weight: 600; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.turn { position: relative; min-height: 3.2em; margin-top: .4rem; display: grid; width: min(100%, 30rem); }
.turn > * { grid-area: 1 / 1; margin: 0; }
.turn .hint { font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; transition: opacity .6s; }
.turn .hint::before { content: "✴︎ "; }
.turn .hint::after { content: " ✴︎"; }
.turn .secret { font-family: var(--display); font-style: italic; font-size: clamp(1.15rem, 3.2vw, 1.5rem); line-height: 1.3; opacity: 0; transform: translateY(6px); transition: opacity 1.4s ease .9s, transform 1.4s var(--ease-out) .9s; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }
.turn.is-open .hint { opacity: 0; }
.turn.is-open .secret { opacity: 1; transform: none; }
.no-js .turn .hint { display: none; }
.no-js .turn .secret { opacity: 1; transform: none; }

/* ---------- sections on paper ---------- */
.sections { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.sect { display: grid; gap: 1.25rem 3rem; padding: clamp(2.5rem, 7vw, 5rem) 0; border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.sect:first-child { border-top: 0; padding-top: 0; }
.sect .mark { color: var(--coral); font-size: 1.5rem; line-height: 1; margin: 0 0 .5rem; font-family: var(--display); }
.sect h2 { margin-bottom: .8rem; }
.sect .stamp { width: clamp(84px, 14vw, 128px); height: auto; }
.lead, .sect .lead { font-family: var(--display); font-style: italic; font-size: clamp(1.25rem, 3.2vw, 1.6rem); line-height: 1.3; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; max-width: 28ch; }
.sect .go { display: inline-block; margin-top: .35rem; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: .15em; }
.sect .go::after { content: " →"; }
.sect .go:hover { color: var(--fire-text); }
.sect details { margin-top: .5rem; }
.sect summary { cursor: pointer; list-style: none; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); padding: .4rem 0; display: inline-block; }
.sect summary::-webkit-details-marker { display: none; }
.sect summary::before { content: "✴︎ "; color: var(--coral); }
.sect details[open] summary { color: var(--ink-soft); }
.sect details p { margin: .4rem 0 0; font-family: var(--display); font-style: italic; font-size: 1.2rem; font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }
@media (min-width: 760px) {
  .sect { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
  .sect .stamp { margin-top: .4rem; }
}

/* a full-bleed night band for EMBERS inside the home flow */
.band { padding: clamp(3rem, 8vw, 6rem) 0; margin-top: clamp(2.5rem, 7vw, 5rem); }
.band .sect { border-top: 0; padding: 0; }
.band .mark { color: var(--gold); }
.band .go { color: var(--bone); }
.band .go:hover { color: var(--gold); }
.band .lead { color: var(--bone); }

.words { padding: clamp(3rem, 8vw, 6rem) 0 2rem; }
.words h2 { font-size: clamp(2.4rem, 8vw, 4.25rem); color: var(--ink); max-width: 10ch; margin-bottom: 1rem; }
.words h2 em { font-style: normal; color: var(--fire-text); }
.contact { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.contact a { font-family: var(--display); font-size: 1.25rem; font-weight: 500; font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 1; color: var(--ink); text-decoration-color: var(--coral); }
.contact a:hover { color: var(--fire-text); }

/* ---------- footer ---------- */
.foot { padding: 2.5rem 0 1rem; border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem 2rem; }
.foot p { margin: 0; }
.foot .links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .92rem; }
.foot .links a { color: var(--ink); }
.foot .sign { font-family: var(--display), "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji"; font-style: italic; font-size: 1.15rem; font-variation-settings: "opsz" 24, "SOFT" 100, "WONK" 1; }
.field-cobalt .foot { border-top-color: color-mix(in srgb, var(--bone) 30%, transparent); }
.field-cobalt .foot .links a { color: var(--bone); }

/* ---------- sub-page headers ---------- */
.head { padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2rem, 6vw, 4rem); display: grid; gap: 1.25rem 3rem; align-items: center; }
.head h1 { font-size: clamp(3rem, 13vw, 7rem); font-weight: 700; line-height: .92; letter-spacing: -.02em; text-transform: uppercase; }
.head .lede { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(1.3rem, 3.8vw, 1.9rem); line-height: 1.25; margin: .9rem 0 0; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; max-width: 26ch; }
.head .sub { margin: 1rem 0 0; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.head .figure { width: min(100%, 64vmin, 420px); justify-self: center; }
@media (min-width: 820px) {
  .head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .head .figure { justify-self: end; }
}
.body { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.body h2 { margin-bottom: 1rem; }
.body + .body { border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.field-cobalt .body + .body { border-top-color: color-mix(in srgb, var(--bone) 30%, transparent); }
.genres { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.genres li + li::before { content: "✴︎"; margin-right: .9rem; color: var(--gold); }
.panel { background: var(--bone); color: var(--ink); padding: clamp(1.5rem, 4vw, 2.5rem); margin: 2rem 0 0; max-width: calc(var(--measure) + 5rem); }
.panel h2, .panel a { color: var(--cobalt); }

/* ---------- the hearth canvas (EMBERS) ---------- */
.hearth-wrap { position: relative; width: min(100%, 72vmin, 480px); aspect-ratio: 1; justify-self: center; touch-action: pan-y; }
.hearth-wrap svg, .hearth-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hearth-wrap.has-canvas svg { visibility: hidden; }
@media (min-width: 820px) { .hearth-wrap { justify-self: end; } }

/* ---------- volumes (NOT NOT PHILO) ---------- */
.volumes { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.volume { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: 1.5rem 0; border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.volume svg { width: 72px; height: 72px; }
.volume .n { font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fire-text); margin: 0 0 .3rem; }
.volume h3 { color: var(--cobalt); margin: 0 0 .5rem; }
.volume .q { font-family: var(--display); font-style: italic; font-size: 1.2rem; line-height: 1.3; margin: 0 0 .4rem; font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }
.volume p:last-child { margin: 0; color: var(--ink-soft); }
.volume.next { border-top-color: var(--gold); }
.volume.next .n { color: var(--cobalt); }

/* ---------- the field of tokens (events) ---------- */
.tokens { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem); }
.token { display: grid; grid-template-rows: auto auto; gap: .9rem; align-content: start; }
.token .shape { width: clamp(104px, 28vw, 150px); height: auto; }
.token .when { margin: 0 0 .2rem; font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fire-text); }
.token h3 { color: var(--cobalt); margin: 0 0 .35rem; text-wrap: pretty; }
.token .where { margin: 0 0 .4rem; font-size: .92rem; color: var(--ink-soft); }
.token p:last-child { margin: 0; text-wrap: pretty; }
.token { --key: var(--cobalt); --over: none; --glow: none; --glow-anim: none; }
.token.soon { --key: var(--ink); --over: var(--coral); --glow: var(--gold); --glow-anim: glow 4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .55; } }
.group { padding: clamp(2rem, 6vw, 4rem) 0; }
.group + .group { border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.group h2 { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.group h2 small { display: block; font-family: var(--body); font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-top: .6rem; font-variation-settings: normal; }
.events-intro { font-family: var(--display); font-style: italic; font-size: clamp(1.25rem, 3.4vw, 1.7rem); line-height: 1.3; max-width: 30ch; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }

/* ---------- motion ---------- */
.rise { animation: rise 1.1s var(--ease-out) both; }
.rise.d1 { animation-delay: .15s; } .rise.d2 { animation-delay: .3s; } .rise.d3 { animation-delay: .45s; } .rise.d4 { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.portal .l-stars use { animation: twinkle 5s ease-in-out infinite; }
.portal .l-stars use:nth-child(2) { animation-delay: -1.7s; }
.portal .l-stars use:nth-child(3) { animation-delay: -3.1s; }
.portal .l-stars use:nth-child(4) { animation-delay: -4.2s; }
@keyframes twinkle { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .portal .l-stars use { animation: none; }
  .token.soon { --glow-anim: none; }
  .portal.is-turning [class^="l-"], .portal .tet, .portal .hole, .turn .secret, .turn .hint { transition-duration: .01s; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- small page-specific pieces ---------- */
.wink { margin-top: 1rem; }
.wink summary { cursor: pointer; list-style: none; display: inline-block; font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--cobalt); font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1; }
.wink summary::-webkit-details-marker { display: none; }
.wink summary::before { content: "✴︎ "; color: var(--coral); font-style: normal; }
.wink p { margin: .3rem 0 0 1.6rem; font-family: var(--display); font-style: italic; font-size: 1.6rem; color: var(--fire-text); font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }
.venue { margin: 2rem 0 0; color: var(--ink-soft); }
.whisper-line { margin: 2.5rem 0 1.5rem; font-weight: 600; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.whisper-line::before { content: "✴︎ "; color: var(--coral); }
.go { display: inline-block; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: .15em; }
.go::after { content: " →"; }
.go:hover { color: var(--fire-text); }
.field-gold .head .lede { max-width: 30ch; }
