/* Hallmark · macrostructure: Marquee Hero (studied-DNA, emblematica) · tone: ritual, austere grey stage to ink nave · anchor hue: saffron */
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-var.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --stage: #dadada;
  --ink: #0b0b0d;
  --ink-2: #141417;
  --ash: #2a2a2e;
  --dim: #8a867e;
  --cream: #ede6d6;
  --saffron: #ffb21f;
  --violet: #8e6cff;
  --r: 24px;
  --col: min(1080px, 100% - 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --paper: #f6f4ef;
  --font: "Inter Tight", system-ui, sans-serif;
  --t1: rgba(255,255,255,.72);
  --t2: #55524c;
  --t3: rgba(20,20,23,.8);
  --t4: rgba(0,0,0,.28);
  --t5: rgba(0,0,0,.18);
  --t6: rgba(0,0,0,.45);
  --t7: rgba(0,0,0,.25);
  --t8: rgba(0,0,0,.5);
  --t9: #8a867e;
  --t10: #ff8a6b;
  --t11: #c9c2b2;
  --t12: rgba(0,0,0,.3);
  --t13: #4a4740;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { overflow-x: clip; scrollbar-color: var(--saffron) var(--ink); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 10px; border: 2px solid var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--cream);
  font: 400 18px/1.5 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--saffron); color: var(--ink); padding: 10px 16px; border-radius: 99px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 12px; padding: 18px 28px; pointer-events: none; mix-blend-mode: normal;
}
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: var(--ink); transition: color .3s; }
.brand img { border-radius: 10px; image-rendering: pixelated; }
body.on-ink .brand { color: var(--cream); }
.top-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 99px; border: 0; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.pill:hover { background: var(--ink); color: var(--cream); }
.pill:active { transform: scale(.97); }
.pill svg { width: 18px; height: 18px; fill: currentColor; }
.pill[disabled], .pill[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.pill-menu { justify-self: center; padding: 0 22px 0 16px; }
.dots { display: grid; grid-template-columns: 5px 5px; gap: 3px; transition: transform .4s var(--ease); }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-menu:hover .dots, .pill-menu[aria-expanded="true"] .dots { transform: rotate(45deg); }
.pill-ca { font-variant-numeric: tabular-nums; background: var(--t1); backdrop-filter: blur(8px); }
.pill-ca.is-empty { color: var(--t2); cursor: default; }
.pill-ca.is-empty:hover { background: var(--t1); color: var(--t2); }
.pill-buy, .pill-saffron { background: var(--saffron); color: var(--ink); }
.pill-buy:hover, .pill-saffron:hover { background: var(--cream); color: var(--ink); }
.pill-violet { background: var(--violet); color: var(--ink); }
.pill-violet:hover { background: var(--cream); }
.pill-cream { background: var(--cream); color: var(--ink); }
.pill-cream:hover { background: var(--saffron); color: var(--ink); }
.pill-ink { background: var(--ink); color: var(--cream); }
.pill-ink:hover { background: var(--saffron); color: var(--ink); }
.pill-line { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px var(--ash); }
.pill-line:hover { background: var(--cream); color: var(--ink); box-shadow: none; }
.ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); transition: background .2s, color .2s; }
.ico:hover { background: var(--ink); color: var(--cream); }
.ico svg { width: 18px; height: 18px; fill: currentColor; }
body.on-ink .ico, body.on-ink .pill-menu, body.on-ink .pill-phantom { background: var(--ink-2); color: var(--cream); }
body.on-ink .ico:hover, body.on-ink .pill-menu:hover, body.on-ink .pill-phantom:hover { background: var(--cream); color: var(--ink); }
body.on-ink .pill-ca { background: var(--t3); color: var(--cream); }
body.on-ink .pill-ca.is-empty { color: var(--dim); }

/* ---------- menu ---------- */
.menu { position: fixed; inset: 0; z-index: 45; background: var(--ink); display: flex; flex-direction: column; justify-content: center; padding: 120px max(28px, 8vw) 48px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { overflow: hidden; }
.menu a { display: inline-block; font-weight: 600; font-size: clamp(44px, 8vw, 120px); line-height: 1.02; letter-spacing: -0.04em; text-decoration: none; transform: translateY(105%); transition: transform .7s var(--ease), color .2s; }
.menu a:hover { color: var(--saffron); }
.menu.open a { transform: none; }
.menu.open li:nth-child(2) a { transition-delay: .06s; }
.menu.open li:nth-child(3) a { transition-delay: .12s; }
.menu.open li:nth-child(4) a { transition-delay: .18s; }
.menu-foot { color: var(--dim); margin-top: 40px; }
body.menu-on .brand { color: var(--cream); }

/* ---------- stage (hero) ---------- */
.stage { position: relative; height: 100vh; min-height: 640px; background: var(--stage); color: var(--ink); overflow: hidden; }
.cloud { position: absolute; inset: 0; }
.obj { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 22px 26px var(--t4)) drop-shadow(0 4px 6px var(--t5)); }
.obj canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.obj a { display: block; width: 100%; height: 100%; }
.obj.tile canvas { border-radius: 18%; }
.stage-copy { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; padding: 0 24px; }
.stage-title { margin: 0; text-align: center; font-weight: 600; font-size: clamp(46px, 7.4vw, 150px); line-height: .93; letter-spacing: -0.045em; max-width: 13ch; text-wrap: balance; position: relative; z-index: 2; }
.stage-title span { display: inline-block; }
.stage-foot { position: absolute; left: 28px; right: 28px; bottom: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px; font-weight: 600; font-size: 16px; z-index: 3; }
.stage-foot p { margin: 0; }
.stage-foot p:nth-child(2) { text-align: center; }
.stage-foot p:last-child { text-align: right; }
.stage-count b { font-variant-numeric: tabular-nums; }

/* ---------- the nave: the dark ground rises over the stage ---------- */
.nave { position: relative; z-index: 4; background: var(--ink); margin-top: -1px; padding: 18vh 0 12vh; }
.nave::before { content: ""; position: absolute; left: 0; right: 0; top: -14vh; height: 14vh; background: var(--ink); transform-origin: bottom; transform: scaleY(var(--rise, 0)); }
.scrub { width: var(--col); margin: 0 auto; font-weight: 600; font-size: clamp(30px, 4.4vw, 76px); line-height: 1.02; letter-spacing: -0.035em; text-align: center; text-wrap: balance; }
.scrub-2 { margin-top: 14vh; }
.scrub .w { color: var(--ash); transition: color .25s linear; }
.scrub .w.lit { color: var(--cream); }
.scrub mark { background: none; color: inherit; position: relative; white-space: nowrap; }
.scrub mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .1em; background: var(--saffron); transform-origin: left; transform: scaleX(var(--bar, 0)); }
.scrub mark:nth-of-type(2)::after { background: var(--violet); }

/* ---------- rites: a deck that lands card on card ---------- */
.rites { position: relative; height: 320vh; }
.rites-pin { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
.rite {
  position: absolute; width: min(1080px, calc(100% - 40px)); height: min(620px, calc(100vh - 140px)); border-radius: var(--r);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: clamp(24px, 4vw, 56px); color: var(--ink); will-change: transform;
  box-shadow: 0 30px 80px var(--t6);
}
.rite-vow { background: var(--saffron); }
.rite-wear { background: var(--violet); }
.rite-offer { background: var(--cream); }
.rite h2 { margin: 0 0 18px; font-weight: 600; font-size: clamp(44px, 6vw, 104px); line-height: .92; letter-spacing: -0.045em; }
.rite p { margin: 0; max-width: 30ch; font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; }
.rite-text { display: flex; flex-direction: column; justify-content: space-between; }
.rite-art { display: grid; place-items: center; min-height: 0; }
.rite-art canvas { width: min(100%, 420px); aspect-ratio: 1; border-radius: 50%; image-rendering: pixelated; box-shadow: 0 20px 40px var(--t7); }
.rite-beads { position: relative; }
.rite-beads canvas { border-radius: 22px; }
.rite-num { align-content: center; justify-items: start; }
.rite-num b { font-weight: 700; font-size: clamp(72px, 11vw, 200px); line-height: .9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.rite-num span { font-weight: 600; font-size: 20px; }

/* ---------- the hall of creeds ---------- */
.hall, .faces, .how, .wall, .ledger { width: var(--col); margin: 0 auto; padding: 14vh 0 0; position: relative; }
.big { margin: 0; font-weight: 600; font-size: clamp(44px, 6vw, 104px); line-height: .92; letter-spacing: -0.045em; }
.huge { margin: 0; font-weight: 600; font-size: clamp(56px, 10vw, 190px); line-height: .88; letter-spacing: -0.055em; text-align: center; }
.hall-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.tabs { display: flex; gap: 6px; background: var(--ink-2); border-radius: 99px; padding: 5px; }
.tabs button { border: 0; background: transparent; padding: 10px 18px; border-radius: 99px; font-weight: 600; cursor: pointer; color: var(--dim); transition: background .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--cream); color: var(--ink); }
.tabs button:hover { color: var(--cream); }
.tabs button[aria-selected="true"]:hover { color: var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ash); }
.row { border-bottom: 1px solid var(--ash); }
.row a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 22px; padding: 20px 4px; text-decoration: none; transition: transform .35s var(--ease), color .2s var(--ease); }
.row a:hover { transform: translateX(16px); color: var(--saffron); }
.row canvas { width: 64px; height: 64px; border-radius: 14px; image-rendering: pixelated; }
.row-name { font-weight: 600; font-size: clamp(26px, 3.2vw, 48px); letter-spacing: -0.035em; line-height: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name small { font-size: .45em; color: var(--dim); letter-spacing: 0; font-weight: 500; margin-left: 10px; }
.row-faith { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-faith span, .row-mkt span { display: block; color: var(--dim); font-weight: 400; font-size: 14px; }
.row-mkt { text-align: right; font-variant-numeric: tabular-nums; min-width: 110px; }
.empty { padding: 40px 0; color: var(--dim); font-size: 20px; max-width: 46ch; }
.hover-sigil { position: fixed; left: 0; top: 0; width: 220px; height: 220px; pointer-events: none; z-index: 30; opacity: 0; transform: translate(-50%, -50%) scale(.8) rotate(-6deg); transition: opacity .25s, transform .35s var(--ease); filter: drop-shadow(0 24px 30px var(--t8)); }
.hover-sigil.on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
.hover-sigil canvas { width: 100%; height: 100%; image-rendering: pixelated; border-radius: 26px; }
.raise { margin-top: 40px; }
.raise label { display: block; font-weight: 600; font-size: 20px; margin-bottom: 12px; }
.raise-row { display: flex; gap: 10px; }
.raise-row input { flex: 1; min-width: 0; }
input { height: 52px; padding: 0 18px; border-radius: 14px; border: 1.5px solid var(--ash); background: var(--ink-2); color: var(--cream); font-size: 17px; }
input::placeholder { color: var(--t9); }
input:focus { border-color: var(--saffron); outline: none; }
.note { color: var(--dim); font-size: 15px; margin: 12px 0 0; max-width: 62ch; }
.note.bad { color: var(--t10); }
.note.good { color: var(--saffron); }

/* ---------- faces ---------- */
.faces-row { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 14px; }
.face { width: 92px; text-align: center; font-size: 13px; color: var(--dim); }
.face img, .face canvas { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: var(--ink-2); box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--ash); }
.face.wearing img { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--saffron); }
.face span { display: block; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- found ---------- */
.found { padding: 18vh 24px 0; }
.found-grid { width: var(--col); margin: 56px auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.found-sigil { display: grid; justify-items: center; gap: 18px; }
.found-sigil canvas { width: min(100%, 420px); aspect-ratio: 1; border-radius: var(--r); image-rendering: pixelated; box-shadow: 0 30px 60px var(--t8); }
.found-form, .vow-form { display: grid; gap: 16px; }
.found-form label, .vow-form label { display: grid; gap: 8px; font-weight: 600; }
.found-form .pill, .vow-form .pill { height: 56px; font-size: 18px; }

/* ---------- how ---------- */
.how-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; margin-top: 48px; }
.how h3 { margin: 0 0 10px; font-weight: 600; font-size: 30px; letter-spacing: -0.03em; }
.how p { margin: 0; color: var(--t11); }

/* ---------- one creed ---------- */
.altar { background: var(--stage); color: var(--ink); min-height: 92vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 120px max(28px, 6vw) 60px; position: relative; }
.altar-sigil { justify-self: center; width: min(40vw, 520px); aspect-ratio: 1; animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 40px 40px var(--t12)); }
.altar-sigil canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.altar-title { margin: 0; font-weight: 600; font-size: clamp(56px, 8vw, 150px); line-height: .9; letter-spacing: -0.05em; overflow-wrap: normal; }
.altar-name { font-size: 22px; font-weight: 600; margin: 10px 0 28px; }
.altar-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px 40px; margin: 0; }
.altar-stats div { min-width: 0; }
.altar-stats dt { font-size: 14px; color: var(--t2); font-weight: 500; }
.altar-stats dd { margin: 2px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.altar .note { color: var(--t13); }
.altar-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.vow { padding: 16vh 24px 0; }
.vow-grid { width: var(--col); margin: 56px auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.vow-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vow-sign { display: grid; justify-items: center; gap: 18px; }
.vow-sign canvas { width: min(100%, 400px); aspect-ratio: 1; border-radius: 50%; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--ash); }
.vow-sign.done canvas { box-shadow: 0 0 0 4px var(--saffron), 0 30px 60px var(--t8); animation: consecrate 1.1s var(--ease); }
.vow-after { text-align: center; display: grid; gap: 14px; justify-items: center; }
.vow-code { margin: 0; font-weight: 600; font-size: 22px; }
.wall-grid { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 22px; }
.wall-grid .face { width: auto; }
.wall-grid .face img { width: 100%; height: auto; aspect-ratio: 1; }
.ledger-rows { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--ash); }
.ledger-rows li { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; gap: 18px; padding: 16px 4px; border-bottom: 1px solid var(--ash); font-variant-numeric: tabular-nums; }
.ledger-rows a { color: var(--saffron); }

/* ---------- footer, toast ---------- */
.foot { width: var(--col); margin: 22vh auto 0; padding: 48px 0 56px; border-top: 1px solid var(--ash); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; color: var(--dim); font-size: 15px; }
.foot img { border-radius: 12px; image-rendering: pixelated; }
.foot p { margin: 0; }
.foot a { margin-left: 16px; text-decoration: none; color: var(--cream); }
.foot a:hover { color: var(--saffron); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 140%); background: var(--cream); color: var(--ink); padding: 12px 20px; border-radius: 99px; font-weight: 600; z-index: 70; transition: transform .45s var(--ease); max-width: calc(100% - 40px); }
.toast.on { transform: translate(-50%, 0); }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes consecrate { 0% { transform: scale(.7) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.04) rotate(2deg); opacity: 1; } 100% { transform: none; } }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .top { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; }
  .pill-menu { position: fixed; right: 14px; bottom: 16px; z-index: 60; background: var(--ink); color: var(--cream); box-shadow: 0 10px 30px var(--t7); }
  .pill-menu[aria-expanded="true"] { background: var(--cream); color: var(--ink); }
  .brand-word { display: none; }
  .top-right { gap: 6px; }
  .pill { height: 40px; padding: 0 14px; font-size: 15px; }
  .ico { width: 40px; height: 40px; }
  #phantom-label { display: none; }
  .pill-phantom { padding: 0 11px; }
  .pill-ca { max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
  .stage-foot { grid-template-columns: minmax(0, 1fr); text-align: center; bottom: 18px; }
  .stage-foot p, .stage-foot p:nth-child(2), .stage-foot p:last-child { text-align: center; }
  .stage-foot p:first-child { display: none; }
  .rites { height: auto; }
  .rites-pin { position: static; height: auto; display: grid; gap: 18px; padding: 12vh 16px 0; }
  .rite { position: relative; height: auto; grid-template-columns: minmax(0, 1fr); transform: none !important; }
  .rite-art canvas { width: min(70vw, 300px); }
  .row a { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; }
  .row canvas { width: 52px; height: 52px; }
  .row-mkt { display: none; }
  .found-grid, .vow-grid, .how-cols, .altar { grid-template-columns: minmax(0, 1fr); }
  .altar { padding-top: 96px; text-align: left; }
  .altar-sigil { width: min(72vw, 360px); }
  .altar-stats { grid-template-columns: repeat(2, auto); }
  .raise-row { flex-direction: column; }
  .ledger-rows li { grid-template-columns: minmax(0, 1fr) auto; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot a { margin: 0 16px 0 0; }
}
@media (max-width: 420px) {
  .pill-ca { max-width: 96px; font-size: 13px; padding: 0 10px; }
  .pill-buy { padding: 0 12px; }
  .ico { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scrub .w { color: var(--cream); }
  .scrub mark::after { transform: none; }
  .menu a { transform: none; }
}

.pill:active, .ico:active, .tabs button:active { transform: translateY(1px); }
.pill[aria-disabled="true"], button:disabled { cursor: not-allowed; opacity: .6; }
