:root {
  --ink: #060404;
  --bone: #f1e9e3;
  --muted: #b9aaa3;
  --red: #df0500;
  --red-text: #ff3b2f;
  --gutter: clamp(16px, 5vw, 64px);
  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.history-navigation { scroll-behavior: auto; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--mono); font-size: 15px; line-height: 1.55;
  overflow-x: hidden;
}
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; }
em { font-style: italic; color: var(--red-text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 1; pointer-events: none; }

.s-bar {
  position: fixed; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
  background: rgb(6 4 4 / .96); border-bottom: 1px solid rgb(241 233 227 / .1);
}
.s-bar > a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.s-bar img { height: 18px; width: auto; display: block; }
.s-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.s-sound {
  display: inline-flex; align-items: center; text-decoration: none;
  min-height: 44px; padding: 0 14px; border: 1px solid rgb(241 233 227 / .3); border-radius: 999px;
  background: rgb(6 4 4 / .5); color: var(--bone);
  font: 700 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
}
.s-sound[aria-pressed="true"] { border-color: var(--red); color: #fff; background: var(--red); }

main { position: relative; z-index: 2; }
.state {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(100px, 12vh, 150px) var(--gutter) 100px;
  scroll-margin-top: 0;
}
.j-visual { display: none; }
html.signal-staged .j-visual { display: block; width: 100%; height: clamp(160px, 30svh, 360px); margin-bottom: 40px; flex: 0 0 auto; }
/* Reading surfaces sit below the animation; full-strength particles keep their own space. */
.s-text { max-width: 700px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.s-label { margin: 0; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.s-line {
  margin: 0; font-family: var(--display); font-weight: 500;
  font-size: clamp(40px, 5.3vw, 72px); line-height: 1.07; letter-spacing: -.025em;
  text-wrap: balance; overflow-wrap: anywhere;
}
h1.s-line { font-size: clamp(52px, 7.5vw, 110px); }
.s-line em { font-weight: 700; }
.j-body { margin: 0; max-width: 48ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.85; }
.j-muted { color: var(--muted); }
.j-actions { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; margin-top: 12px; }
.j-link { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; color: var(--bone); font-size: 13px; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.j-link:hover { color: var(--red-text); }
a.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 20px; text-decoration: none; line-height: 1.6; }
.j-skip { position: fixed; left: 16px; top: 12px; transform: translateY(-150%); z-index: 10000; padding: 14px; background: var(--bone); color: var(--ink); }
.j-skip:focus { transform: none; }
.j-arrival .s-text { max-width: 820px; }
.j-map { display: flex; flex-wrap: wrap; gap: 16px 36px; margin-top: clamp(40px, 7vh, 80px); }
.j-map a { display: flex; gap: 10px; align-items: center; min-height: 44px; color: var(--bone); text-decoration: none; font-size: 12px; }
.j-map a span { color: var(--muted); font-size: 10px; }
.j-map a:hover, .j-map a[aria-current="step"] { color: var(--red-text); }
.j-layout { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.j-art { margin: 0; min-width: 0; scroll-margin-top: 110px; }
.j-art > a { display: block; }
.j-art img { display: block; width: 100%; height: auto; }
.j-art figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; }
.j-art figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bone); text-underline-offset: 5px; }
.j-art figcaption a:hover { color: var(--red-text); }
.j-encounter { background: transparent; }
.j-reflection .s-text { max-width: 750px; }
.j-pause { margin-block: 16px; padding-left: 24px; border-left: 1px solid var(--red); display: grid; gap: 16px; }
.j-question { margin: 0; max-width: 30ch; font: 500 clamp(26px, 3vw, 36px)/1.4 var(--display); }
.j-form { gap: 40px; background: transparent; }
.j-form .j-visual { margin-bottom: 0; }
.j-studies { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 4vw, 64px); max-width: 1020px; }
.j-studies img { height: clamp(190px, 35vw, 410px); object-fit: contain; background: var(--ink); }
.j-form-end { max-width: 1000px; display: grid; gap: 20px; }
.j-form-end .j-link { display: inline; }
.j-form-end > .j-next { display: inline-flex; }
.j-paths { margin-block: 12px; border-top: 1px solid rgb(241 233 227 / .2); }
.j-paths a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid rgb(241 233 227 / .2); color: var(--bone); text-decoration: none; font-size: 13px; min-height: 60px; }
.j-paths a > span:first-child { font: 500 26px/1.2 var(--display); }
.j-paths a:hover { color: var(--red-text); }
.j-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 20px 32px; padding: 24px var(--gutter) 100px; border-top: 1px solid rgb(241 233 227 / .15); background: var(--ink); font-size: 12px; }
.j-foot a { display: inline-flex; min-height: 44px; align-items: center; color: var(--bone); text-underline-offset: 4px; }
.j-foot p { margin: 0; align-self: center; color: var(--muted); }
.j-progress { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px var(--gutter) max(8px, env(safe-area-inset-bottom)); min-height: 60px; background: rgb(6 4 4 / .96); border-top: 1px solid rgb(241 233 227 / .15); font-size: 11px; }
#journey-position { color: var(--muted); }
/* Figma Simple Design System / Pagination Next: 8px gap, 8/12px padding,
   adapted to EKSTAZ's pill controls and a 44px minimum touch target. */
#journey-next { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid rgb(241 233 227 / .3); border-radius: 999px; color: var(--bone); text-decoration: none; }
#journey-next:hover { background: rgb(241 233 227 / .08); border-color: var(--red-text); }

.s-join { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.s-join input[type="email"] {
  min-height: 54px; width: 100%; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgb(241 233 227 / .35); background: rgb(6 4 4 / .7); color: var(--bone);
  font: 16px var(--mono);
}
.s-join input[type="email"]::placeholder { color: #8d7f79; }
.s-btn {
  min-height: 54px; max-width: 100%; padding: 12px 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--red); color: #fff;
  font: 700 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
}
.s-btn:hover:not(:disabled) { background: #c80500; }
.s-btn:disabled { opacity: .6; cursor: progress; }
.s-btn-ghost { background: transparent; color: var(--bone); border: 1px solid rgb(241 233 227 / .35); }
.s-btn-ghost:hover:not(:disabled) { background: transparent; border-color: var(--red-text); color: var(--bone); }
.s-more { margin: 4px 0 0; font-size: 13px; }
.s-piece { pointer-events: auto; }
.s-more a { color: var(--bone); }
.s-more a:hover { color: var(--red-text); }
.s-status { margin: 0; color: var(--muted); font-size: 13px; min-height: 1.6em; }

.s-card {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto;
  padding: 18px; border: 1px solid rgb(241 233 227 / .15); background: var(--ink); color: var(--bone);
}
.s-card::backdrop { background: rgb(0 0 0 / .78); }
.s-card .s-label { margin-bottom: 12px; }
#card-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
#mark-link {
  display: block; width: 100%; min-height: 44px; margin-top: 12px; padding: 10px;
  border: 1px solid rgb(241 233 227 / .35); border-radius: 999px;
  background: var(--ink); color: var(--bone); font: 16px/1.5 var(--mono);
}
#sigil { display: block; width: 100%; height: auto; }
.s-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.s-card-actions .s-btn { flex: 1 1 auto; min-height: 46px; padding: 0 18px; }

.s-noscript { position: relative; z-index: 3; padding: 120px var(--gutter); }

@media (max-width: 600px) {
  .s-bar { flex-wrap: wrap; gap: 6px; }
  .state { padding-top: 125px; scroll-margin-top: 0; }
  .s-text { gap: 18px; }
  html.signal-staged .j-visual { height: clamp(150px, 25svh, 250px); margin-bottom: 28px; }
  .j-form .j-visual { margin-bottom: 0; }
  .j-map { gap: 6px 24px; }
  .j-map a { flex: 1 1 40%; }
  .j-studies { grid-template-columns: 1fr; gap: 32px; }
  .j-studies img { height: auto; max-height: 380px; }
  .j-art figcaption { font-size: 11px; }
  .j-progress { gap: 10px; font-size: 10px; }
  #journey-position { max-width: 50%; }
  #journey-next { max-width: 50%; text-align: right; line-height: 1.6; }
  .s-nav { margin-left: auto; gap: 6px; }
  .s-sound { padding-inline: 10px; font-size: 10px; letter-spacing: .1em; }
}
@media (min-width: 900px) {
  .j-layout { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); }
  .j-reflection .s-text, .j-expression .s-text, .state-join .s-text { margin-left: 10vw; }
  .j-form-end { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
}
@media (max-height: 500px) {
  html.signal-staged .j-visual { height: 100px; margin-bottom: 24px; }
}
@media (min-width: 760px) {
  .s-join { grid-template-columns: 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
  .s-cue { animation: none; }
}

/* One fade through ink, shared with the work and magazine pages. */
@view-transition { navigation: none; }
html::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: #060404; opacity: 0; animation: ekstaz-arrive .9s ease both;
}
html.leaving::after { animation: none; opacity: 1; transition: opacity .4s ease; }
@keyframes ekstaz-arrive { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html::after, html.leaving::after { animation: none; transition: none; opacity: 0; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
