/* Archaic Intel: site styles. Tokens mirror the brand system (Soot theme). */
:root {
  --surface-000: #0b0a08;
  --surface-100: #15120e;
  --surface-200: #1f1a14;
  --ink: #e8e1d3;
  --ink-muted: #9a8f7c;
  --hairline: #2a2419;
  --ember: #f2761b;
  --ochre: #b8732e;
  --earth: #3a2a1e;
  --static: #8a96a3;
  --static-faint: #2b3139;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 40px; --space-6: 64px; --space-7: 120px;
}

* { box-sizing: border-box; }
html { background: var(--surface-000); color-scheme: dark; }
body {
  margin: 0; min-height: 100vh;
  background: var(--surface-000); color: var(--ink);
  font-family: var(--font-mono); font-size: 15px; line-height: 24px;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---- readout chrome ---- */
.bar {
  position: relative; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--hairline);
}
.wm {
  font-weight: 600; font-size: 17px; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.wm .ai { color: var(--ember); }
.nav { display: flex; gap: var(--space-5); }
.nav a {
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase; line-height: 20px;
  color: var(--ink-muted); text-decoration: none; padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-color: var(--ember); }

.foot {
  position: relative; z-index: 10;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--hairline);
  font-size: 13px; line-height: 20px; color: var(--ink-muted);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ember); }

/* ---- type ---- */
.lab { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; line-height: 16px; color: var(--ink-muted); }
.display { font-family: var(--font-serif); font-weight: 500; font-size: 116px; line-height: 104px; letter-spacing: -.01em; margin: 0; }
.title { font-family: var(--font-serif); font-weight: 500; font-size: 36px; line-height: 40px; margin: 0; }
.incant { font-family: var(--font-serif); font-style: italic; font-size: 22px; line-height: 32px; margin: 0; }
.body p { margin: 0 0 var(--space-3); max-width: 64ch; }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: var(--space-5) 0; }

/* ---- page layout ---- */
main.page { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: var(--space-4) var(--space-5) var(--space-6); }
.hero { padding-top: var(--space-2); margin-bottom: var(--space-5); }
.hero .lab { margin-bottom: var(--space-3); }
.hero .display { margin-bottom: var(--space-3); }
.hero .incant { max-width: 560px; }
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .display { font-size: 64px; line-height: 60px; }
  .nav { gap: var(--space-3); }
  .nav a { font-size: 12px; letter-spacing: .12em; }
  .wm { font-size: 14px; }
}
@media (max-width: 560px) {
  .bar { flex-wrap: wrap; row-gap: var(--space-2); }
  .nav { width: 100%; justify-content: space-between; gap: 0; }
  .foot { flex-direction: column; gap: 4px; font-size: 12px; }
  main.page { padding: var(--space-3) var(--space-3) var(--space-6); }
  .hero { padding-top: var(--space-2); margin-bottom: var(--space-5); }
  .hero .incant { font-size: 20px; line-height: 28px; }
}

/* ---- artifact card ---- */
.card { border: 1px solid var(--hairline); background: var(--surface-100); text-decoration: none; color: inherit; display: block; }
.card:hover { border-color: var(--ember); }
.card .img { position: relative; aspect-ratio: 1; background: var(--earth); overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .id { position: absolute; top: var(--space-2); left: var(--space-2); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: var(--surface-000); border: 1px solid var(--hairline); padding: 2px 6px; }
.card .tag { display: flex; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.card .inner { padding: var(--space-3); }
.card .title { font-size: 28px; line-height: 32px; margin-bottom: var(--space-2); }
.card .incant { font-size: 18px; line-height: 26px; }

/* ---- frame (embeds) ---- */
.frame { border: 1px solid var(--hairline); background: var(--surface-100); padding: var(--space-2); }
.frame iframe { display: block; width: 100%; border: 0; background: var(--surface-000); }

/* ---- tracklist ---- */
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.tracks li { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--space-3); align-items: baseline; padding: var(--space-2) 0; border-bottom: 1px solid var(--hairline); }
.tracks .name { font-family: var(--font-serif); font-size: 22px; line-height: 28px; }
.tracks .meta { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); text-align: right; }
@media (max-width: 560px) { .tracks li { grid-template-columns: 40px 1fr; } .tracks .meta { grid-column: 2; text-align: left; } }

/* ---- buttons ---- */
.btn { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; line-height: 16px; padding: 10px 14px; border: 1px solid var(--ink-muted); color: var(--ink); text-decoration: none; background: transparent; cursor: pointer; }
.btn:hover { border-color: var(--ember); color: var(--ember); }
.btn.primary { border-color: var(--ember); }

/* ---- readout list (contact) ---- */
.rows { border-top: 1px solid var(--hairline); }
.rows a, .rows div { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline); text-decoration: none; }
.rows a:hover .val { color: var(--ember); }
.rows .val { font-family: var(--font-serif); font-size: 24px; line-height: 28px; }
@media (max-width: 560px) { .rows a, .rows div { grid-template-columns: 1fr; gap: var(--space-1); } }

/* ---- home ---- */
body.home { height: 100vh; overflow: hidden; }
body.home .bar { background: transparent; border-bottom-color: transparent; position: absolute; top: 0; left: 0; right: 0; }
body.home .foot { background: transparent; border-top-color: transparent; position: absolute; bottom: 0; left: 0; right: 0; }
.stage { position: fixed; inset: 0; z-index: 1; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* fall photo behind the fire: faint at the edges, a flashlight where the fireflies gather, dark around the fire */
.stage .fall {
  position: absolute; inset: 0;
  background: url(/img/fall.jpg) center 40% / cover no-repeat;
  background-image: image-set(url(/img/fall.avif) type("image/avif"), url(/img/fall.jpg) type("image/jpeg"));
  filter: saturate(1.6) brightness(.95) contrast(1.05);
}
.stage .fall.base { opacity: calc(.42 + var(--flash, 0) * .5); }
.stage .fall.spot {
  opacity: .75;
  -webkit-mask-image: radial-gradient(circle 240px at var(--spot-x, 50%) var(--spot-y, 30%), #000 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.12) 72%, transparent 100%);
          mask-image: radial-gradient(circle 240px at var(--spot-x, 50%) var(--spot-y, 30%), #000 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.12) 72%, transparent 100%);
}
.stage .night {
  position: absolute; inset: 0;
  opacity: calc(1 - var(--flash, 0) * .6);
  background:
    radial-gradient(ellipse 1050px 820px at var(--fire-x, 50%) var(--fire-y, 65%), rgba(11,10,8,1) 0%, rgba(11,10,8,.98) 18%, rgba(11,10,8,.92) 32%, rgba(11,10,8,.8) 46%, rgba(11,10,8,.64) 60%, rgba(11,10,8,.48) 74%, rgba(11,10,8,.36) 88%, rgba(11,10,8,.3) 100%),
    linear-gradient(rgba(20,20,24,.35), rgba(20,20,24,.35));
}
@media (max-width: 760px) {
  .stage .fall.spot { -webkit-mask-image: radial-gradient(circle 160px at var(--spot-x, 50%) var(--spot-y, 30%), #000 0%, rgba(0,0,0,.5) 45%, transparent 100%); mask-image: radial-gradient(circle 160px at var(--spot-x, 50%) var(--spot-y, 30%), #000 0%, rgba(0,0,0,.5) 45%, transparent 100%); }
  .stage .night { background: radial-gradient(ellipse 90vw 420px at var(--fire-x, 50%) var(--fire-y, 65%), rgba(11,10,8,1) 0%, rgba(11,10,8,.98) 40%, rgba(11,10,8,.88) 65%, rgba(11,10,8,.5) 100%), linear-gradient(rgba(20,20,24,.4), rgba(20,20,24,.4)); }
}
#fx { pointer-events: none; mix-blend-mode: screen; }
.home-line {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
  padding: 120px var(--space-3) calc(var(--space-6) + 12px);
  text-align: center; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,10,8,0) 0%, rgba(11,10,8,.72) 38%, rgba(11,10,8,.92) 100%);
}
.home-line .lab { margin-bottom: var(--space-3); opacity: .85; font-size: 14px; letter-spacing: .2em; }
.home-line .incant { position: relative; color: var(--ink); font-size: 38px; line-height: 48px; max-width: 900px; margin: 0 auto; text-shadow: 0 0 24px rgba(0,0,0,.9); }
.home-line .incant .ghost { visibility: hidden; }   /* reserves the final height so nothing above it shifts while typing */
.home-line .incant .live { position: absolute; inset: 0; }
.home-line .incant .caret { display: inline-block; width: 2px; height: .9em; background: var(--ember); margin-left: 4px; vertical-align: -0.1em; animation: blink 1s steps(1) infinite; }
.home-line .incant.done .caret { animation: none; opacity: 0; transition: opacity 1s 1.5s; }
.home-line .cta { opacity: 0; transition: opacity .8s ease; }
.home-line .cta.on { opacity: 1; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 760px) {
  .home-line { padding-bottom: calc(var(--space-6) + 28px); padding-top: 90px; }
  .home-line .incant { font-size: 26px; line-height: 34px; }
  .home-line .lab { font-size: 12px; }
}
.home-line .cta { pointer-events: auto; margin-top: var(--space-3); }
.home-line .cta .btn { border-color: var(--hairline); background: rgba(11,10,8,.5); }
.home-line .cta .btn:hover { border-color: var(--ember); }
@media (prefers-reduced-motion: reduce) { .stage { display: none; } body.home { background: radial-gradient(ellipse at 50% 70%, #2a1608 0%, var(--surface-000) 55%); } }

/* sticky footer on desktop */
@media (min-width: 561px) {
  body:not(.home) .foot { position: sticky; bottom: 0; background: var(--surface-000); }
  body.has-cart .foot { bottom: 64px; }
}

/* ---- store icons (music page row + footer) ---- */
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-5); margin: 0 0 var(--space-5); padding: var(--space-3) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.store { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--ink); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; line-height: 16px; transition: color .2s, opacity .2s; }
.store i { display: block; width: 22px; height: 22px; background: var(--brand, currentColor); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; transition: filter .2s; }
.store:hover { color: var(--ember); }
.store:hover i { filter: brightness(1.2); }
.store.soon { display: none; }   /* no URL in js/stores.js yet: hide rather than show a dead icon */
@media (max-width: 560px) { .stores { gap: var(--space-4); } .store span { display: none; } .store i { width: 26px; height: 26px; } }

/* footer: text left, icons centred, text right */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.foot > span:last-child { text-align: right; }
.foot-stores { display: flex; justify-content: center; gap: var(--space-2); }
.foot-stores .store { padding: 6px; }
.foot-stores .store i { width: 22px; height: 22px; }
@media (max-width: 560px) {
  .foot { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot > span:last-child { text-align: center; }
  .foot-stores { order: -1; margin-bottom: var(--space-1); gap: var(--space-1); }
  .foot-stores .store { padding: 10px; }          /* 44px tap targets */
  .foot-stores .store i { width: 24px; height: 24px; }
}

/* home on phones: lift the line, button and fire clear of the taller footer (icons + two lines) */
@media (max-width: 560px) {
  .home-line { padding-bottom: calc(var(--space-6) + 96px); }
}
