/* Descried — shared stage styles, plus Rubedo. */

:root {
  --bone: #e6dfcf;
  --ash: #a39a8a;
  --dim: rgba(230, 223, 207, .58);
  --gold: #9a8350;
  --red: #9e2a20;
  --red-text: #c4473a;
  --ground: #0d0a09;
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: 'EB Garamond', Garamond, 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bone); text-decoration: none; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 1px solid rgba(230, 223, 207, .55);
  outline-offset: 3px;
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { position: relative; min-height: 100vh; overflow: hidden; }

/* the wall, tinted per stage */
.wall, .veil { position: absolute; inset: 0; }
.wall img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.stage-rubedo .wall { filter: brightness(.3) sepia(1) saturate(1.3) hue-rotate(-28deg) contrast(1.2); }
.stage-rubedo .veil { background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(13, 10, 9, .42), rgba(13, 10, 9, .8) 100%); }

main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 40px 150px;
}

.wordmark { position: absolute; right: 40px; bottom: 34px; width: 120px; height: auto; opacity: .38; }

/* ---- the stage menu (corner numeral) ---- */

.stg {
  position: absolute;
  z-index: 3;
  left: 22px;
  top: 12px;
  min-width: 250px;
  padding: 8px 18px 14px;
}
.stg[open] { background: rgba(10, 8, 7, .93); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.stg summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  width: max-content;
  font-variant: small-caps;
  letter-spacing: .3em;
  font-size: 15px;
  color: rgba(230, 223, 207, .42);
}
.stg summary::-webkit-details-marker { display: none; }
.stg summary:hover { color: var(--bone); }
.stg .stg-name { letter-spacing: .24em; }
.stg summary .mark-glyph { color: rgba(154, 131, 80, .85); stroke-width: 1.7; }
.stg .chev { transition: transform .2s ease; }
.stg[open] .chev { transform: rotate(180deg); }
.stg ol {
  list-style: none;
  margin: 4px 0 0 1px;
  padding: 0 0 0 2px;
  border-left: 1px solid rgba(154, 131, 80, .32);
}
.stg li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding-left: 16px;
  font-variant: small-caps;
  letter-spacing: .24em;
  font-size: 17px;
  color: var(--dim);
}
.stg li a:hover, .stg li a[aria-current] { color: var(--bone); }
.stg li a[aria-current]::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--gold);
}
.stg-n { width: 34px; }
.stg li .mark-glyph { color: var(--gold); stroke-width: 1.6; }
.mark-glyph g { stroke-width: inherit; }

.dot-new { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.dot-new[hidden] { display: none; }

/* ---- Rubedo ---- */

.stage-glyph { color: var(--red); stroke-width: 2.6; }
.stage-glyph g { stroke-width: inherit; }

.frags {
  list-style: none;
  margin: 90px 0 0;
  padding: 0;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 96px;
}
.frag {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  column-gap: 28px;
  align-items: start;
}
.num {
  position: relative;
  justify-self: start;
  font-size: 30px;
  line-height: 1;
  color: var(--red-text);
  font-variant: small-caps;
  letter-spacing: .06em;
}
.num .dot-new { position: absolute; right: -11px; top: 0; width: 7px; height: 7px; }

.body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.label { font-variant: small-caps; letter-spacing: .26em; font-size: 14px; color: var(--ash); }
.quote { margin: 0; font-style: italic; font-size: 36px; line-height: 1.25; }
.caption { margin: 0; font-style: italic; font-size: 18px; color: #cfc6b4; }
.art { display: block; width: 420px; max-width: 100%; height: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }

/* sound: the native player without script, the drawn one with it */
.native { width: 100%; max-width: 480px; }
.player { display: none; align-items: center; gap: 18px; min-height: 64px; }
.js .native { display: none; }
.js .player { display: flex; }
.play {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(230, 223, 207, .5);
  background: none;
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.play:hover { border-color: var(--bone); }
.play .i-pause, .play.playing .i-play { display: none; }
.play.playing .i-pause { display: block; }
.wave { flex: 1 1 auto; height: 48px; min-width: 0; cursor: pointer; }
.wave .bars rect { fill: rgba(230, 223, 207, .4); }
.wave .bars-played rect { fill: var(--bone); }
.time {
  flex: none;
  min-width: 3.4em;
  text-align: right;
  font-variant: small-caps;
  font-variant-numeric: tabular-nums;
  letter-spacing: .14em;
  font-size: 14px;
  color: var(--ash);
}

.sealed { display: flex; align-items: center; gap: 22px; }
.sealed img { flex: none; display: block; width: 104px; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); }
.sealed-text { display: flex; flex-direction: column; gap: 4px; }
.until { font-style: italic; font-size: 20px; color: #cfc6b4; }

.empty { margin: 120px 0 0; font-style: italic; color: var(--ash); }

.begin {
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  min-height: 44px;
  font-variant: small-caps;
  letter-spacing: .42em;
  padding-left: .42em;
  font-size: 16px;
  color: rgba(230, 223, 207, .66);
}
.begin .thread { width: 1px; height: 22px; background: linear-gradient(0deg, rgba(230, 223, 207, .5), rgba(230, 223, 207, 0)); }

/* ---- Nigredo (the threshold) ---- */

.stage-nigredo, .stage-nigredo .page { background: #080706; }
.stage-nigredo .page { min-height: 100vh; min-height: 100svh; }
.stage-nigredo .wall { filter: brightness(.3) sepia(.9) saturate(.8) hue-rotate(-12deg) contrast(1.15); }
.stage-nigredo .wall img { object-position: 50% 50%; }
.stage-nigredo .veil { background: radial-gradient(ellipse 46% 60% at 50% 46%, rgba(8, 7, 6, .1) 0%, rgba(8, 7, 6, .62) 60%, #080706 100%); }

.threshold { min-height: 100vh; min-height: 100svh; justify-content: center; gap: 20px; padding: 76px 20px 104px; }
.rings { position: relative; display: block; width: min(640px, 92vw, 72vh); aspect-ratio: 1; border-radius: 50%; }
.rings:hover img, .rings:focus-visible img { filter: brightness(1.08) drop-shadow(0 0 18px rgba(230, 223, 207, .12)); }
.rings img { transition: filter .4s ease; }
.rings svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-outer { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .55; }
.ring-dots { fill: none; stroke: var(--gold); stroke-width: .8; stroke-dasharray: 1.5 7; opacity: .6; }
.ring-point { fill: var(--red); }
.rings img { position: absolute; left: 50%; top: 50%; width: 67%; height: auto; transform: translate(-50%, -50%); }
.t-rot { animation: t-rot 300s linear infinite; transform-box: view-box; transform-origin: 50% 50%; }
.t-breathe { animation: t-breathe 9s ease-in-out infinite; }
@keyframes t-rot { to { transform: rotate(360deg); } }
@keyframes t-breathe { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
.wordmark-center { left: 50%; right: auto; transform: translateX(-50%); width: 150px; }

/* ---- Albedo (the links) ---- */

.stage-albedo { --wash: .28; }
.stage-albedo, .stage-albedo .page { background: #14110e; }
.stage-albedo .page { min-height: 100vh; min-height: 100svh; }
.stage-albedo .wall { filter: brightness(var(--wash)) grayscale(.7) sepia(.35) contrast(1.1); }
.stage-albedo .wall img { object-position: 50% 50%; }
.stage-albedo .veil { background: radial-gradient(ellipse 55% 65% at 50% 42%, rgba(20, 17, 14, .25) 0%, rgba(20, 17, 14, .7) 65%, #14110e 100%); }

.hub { padding: 70px 40px 110px; }
.hub-seal { display: block; width: 170px; height: auto; opacity: .92; }
.thread-in { display: block; margin-top: 22px; width: 1px; height: 36px; background: linear-gradient(180deg, rgba(230, 223, 207, 0), rgba(230, 223, 207, .4)); }
.links { margin-top: 10px; width: 100%; max-width: 560px; }
.links ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(230, 223, 207, .16); }
.links li { border-bottom: 1px solid rgba(230, 223, 207, .16); }
.links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 62px; padding: 0 6px; }
.link-name { font-size: 30px; line-height: 1; }
.link-note { font-variant: small-caps; letter-spacing: .22em; font-size: 15px; color: var(--ash); white-space: nowrap; }
.links a:hover .link-note { color: var(--bone); }
.hub .descend { margin-top: 44px; }

/* ---- Citrinitas ---- */

.stage-citrinitas, .stage-citrinitas .page { background: #0f0d0b; }
.stage-citrinitas .wall { filter: brightness(.4) sepia(.9) saturate(.8) hue-rotate(-12deg) contrast(1.15); }
.stage-citrinitas .wall img { object-position: 50% 0; }
.stage-citrinitas .veil { background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(15, 13, 11, .38), rgba(15, 13, 11, .7) 100%); }
.stage-citrinitas .stage-glyph { color: var(--gold); stroke-width: 2.5; }

.works { gap: 190px; padding-bottom: 150px; }
.work { display: flex; flex-direction: column; align-items: center; gap: 92px; }
.work .frame { position: relative; width: 460px; height: 460px; }
.work-wide .frame { width: 1120px; max-width: 100%; height: auto; aspect-ratio: 3.2; }
.work .glow { position: absolute; inset: -14%; background: radial-gradient(circle, rgba(var(--glow), .16) 0%, rgba(var(--glow), 0) 60%); }
.work-wide .glow { inset: -28% 0; background: radial-gradient(ellipse 55% 60% at 50% 50%, rgba(var(--glow), .14) 0%, rgba(var(--glow), 0) 70%); }
.work .ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 124%;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: visible;
  fill: none;
  stroke: var(--gold);
}
.work-wide .ring { width: auto; height: 170%; }
.work .ring circle { stroke-width: .7; opacity: .85; }
.work .ring .dots { stroke-width: .5; stroke-dasharray: 1 4; opacity: .5; }
.cover-link { position: relative; display: block; width: 100%; height: 100%; }
.cover-link:hover img { filter: brightness(1.06); }
.work .frame img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.work-text { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rubric { font-variant: small-caps; letter-spacing: .3em; font-size: 14px; color: var(--gold); }
.work-title { font-size: 34px; line-height: 1.05; }
.work-link { min-height: 44px; display: flex; align-items: center; font-variant: small-caps; letter-spacing: .26em; font-size: 15px; color: var(--ash); }
.work-link:hover { color: var(--bone); }
.work-note { min-height: 44px; display: flex; align-items: center; font-style: italic; font-size: 17px; color: var(--ash); }

.descend, .open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  min-height: 44px;
  font-variant: small-caps;
  letter-spacing: .42em;
  padding-left: .42em;
  font-size: 16px;
  color: rgba(230, 223, 207, .66);
}
.open { font-size: 17px; gap: 12px; color: rgba(230, 223, 207, .72); }
.descend .thread, .open .thread { width: 1px; height: 22px; background: linear-gradient(180deg, rgba(230, 223, 207, .5), rgba(230, 223, 207, 0)); }

/* ---- phone ---- */

@media (max-width: 759px) {
  main { padding: 112px 20px 120px; }
  .wordmark { right: 20px; bottom: 22px; width: 96px; }

  .stg { left: 0; right: 0; top: 0; min-width: 0; padding: 8px 20px 16px; }
  .stg[open] { background: #0c0a08; border-bottom: 1px solid rgba(230, 223, 207, .14); box-shadow: 0 24px 50px rgba(0, 0, 0, .7); }
  .stg li a { min-height: 48px; }

  .stage-glyph { display: none; }
  .frags { margin-top: 0; gap: 64px; }
  .frag { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
  .num { font-size: 24px; }
  .quote { font-size: 26px; }
  .art { width: 296px; }
  .player { gap: 14px; }
  .sealed img { width: 84px; }
  .begin { margin-top: 80px; }

  .works { padding-top: 100px; gap: 96px; }
  .work { gap: 64px; }
  .work .frame { width: 260px; height: 260px; }
  .work-wide .frame { width: 350px; height: auto; }
  .work-title { font-size: 26px; }

  .threshold { padding: 70px 20px 96px; }
  .stage-nigredo .veil { background: radial-gradient(ellipse 80% 55% at 50% 44%, rgba(8, 7, 6, .1) 0%, rgba(8, 7, 6, .62) 60%, #080706 100%); }
  .stage-nigredo .wall { filter: brightness(.34) sepia(.9) saturate(.8) hue-rotate(-12deg) contrast(1.15); }
  .wordmark-center { width: 130px; bottom: 26px; }

  .stage-albedo { --wash: .42; }
  .hub { padding: 48px 20px 100px; }
  .hub-seal { width: 124px; }
  .thread-in { margin-top: 14px; }
  .links a { min-height: 52px; }
  .link-name { font-size: 24px; }
  .hub .descend { margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .t-rot, .t-breathe { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stg .chev { transition: none; }
}
