@font-face { font-family: "Tiny5"; src: url("../fonts/tiny5-v4-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-v9-latin-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-v9-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-v9-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-v9-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-v9-latin-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Krona One"; src: url("../fonts/krona-one-v15-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/space-mono-v17-latin-regular.woff2") format("woff2"); font-display: swap; }

:root {
  --void: #0B0716; --violet: #7A3CFF; --pink: #FF5FC8; --teal: #4FF0E0; --lilac: #C9A8FF; --ink: #F6F0FF;
  --grey: #D4D0D8; --grey-hi: #FFFFFF; --grey-lo: #8A8494; --grey-dk: #3B3645; --bar-a: #8D5BFF; --bar-b: #FF5FC8;
  --text-dim: #DDD0F7;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --edge: 48px; --container: 1600px;
  --display: "Tiny5", "Figtree", system-ui, sans-serif;
  --head: "Krona One", "Figtree", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--void); color-scheme: dark; }
body { margin: 0; background: var(--void); color: var(--ink); font: 400 18px/1.5 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the first screen: the void ---------- */
.stage { position: relative; min-height: max(100svh, 760px); overflow: hidden; isolation: isolate; }
.stage .void { position: absolute; inset: 0; z-index: -2; }
.stage .void img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 100%; }
.stage .void::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,7,22,.82) 0%, rgba(11,7,22,.55) 30%, rgba(11,7,22,0) 48%); }
.shimmer { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255,95,200,.10) 45%, rgba(79,240,224,.10) 55%, transparent 70%); background-size: 300% 100%; mix-blend-mode: screen; animation: shimmer 14s linear infinite; pointer-events: none; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

.top { position: relative; max-width: var(--container); margin: 0 auto; padding: var(--s4) var(--edge) 0; display: flex; align-items: center; gap: var(--s4); }
.nav { display: flex; gap: var(--s4); }
.nav a { font: 400 18px/1 var(--head); letter-spacing: .5px; text-decoration: none; color: var(--ink); padding: 10px 0; }
.nav a[aria-current="page"] { text-decoration: underline 3px var(--pink); text-underline-offset: 10px; }
.nav a:hover { color: var(--teal); }

.hero { position: relative; max-width: var(--container); margin: 0 auto; padding: var(--s4) var(--edge) var(--s5); display: grid; grid-template-columns: minmax(440px, 540px) 1fr; gap: var(--s5); align-items: start; }
.copy { position: relative; z-index: 2; padding-top: var(--s2); }
.name { font: 400 128px/1 var(--display); margin: 0 0 var(--s3); letter-spacing: 0; color: #fff; text-shadow: -1px 0 0 var(--pink), 1px 0 0 var(--teal); -webkit-font-smoothing: none; font-smooth: never; }
.headline { font: 400 30px/1.3 var(--head); letter-spacing: -.5px; margin: 0 0 var(--s3); color: #fff; max-width: 15em; }
.headline em { font-style: normal; color: var(--teal); }
.lede { margin: 0 0 var(--s3); max-width: 30em; color: var(--ink); font-size: 19px; line-height: 1.6; }
.lede b { color: #fff; font-weight: 700; }
.actions { display: flex; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 1.3em; border-radius: 0; border: 3px solid var(--ink); background: transparent; font: 700 18px/1 var(--text); cursor: pointer; text-decoration: none; transition: transform .12s ease-out, background .12s; }
.btn:active { transform: translateY(2px); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #1A0716; }
.btn.primary:hover { background: #ff7fd4; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn[disabled] { opacity: 1; background: #4a3f5c; border-color: #4a3f5c; color: #b9b0c8; cursor: not-allowed; }

/* ---------- Windows 98 dialogs (two on the first screen, no more) ---------- */
.dlg { background: var(--grey); color: #15101E; border: 2px solid; border-color: var(--grey-hi) var(--grey-dk) var(--grey-dk) var(--grey-hi); box-shadow: 1px 1px 0 #000, 0 18px 50px rgba(0,0,0,.45); }
.dlg-bar { display: flex; align-items: center; min-height: 36px; padding: 8px 16px; background: linear-gradient(90deg, var(--bar-a), var(--bar-b)); color: #fff; font: 700 16px/1 var(--text); letter-spacing: .2px; }
.dlg-bar .title { flex: 1; }
.dlg-bar .tag { font: 600 16px/1 var(--text); opacity: .95; }
.dlg-body { padding: var(--s2) var(--s2) var(--s2); }
.bevel { background: var(--grey); border: 2px solid; border-color: var(--grey-hi) var(--grey-dk) var(--grey-dk) var(--grey-hi); box-shadow: inset -1px -1px 0 var(--grey-lo), inset 1px 1px 0 #ececf0; color: #15101E; font: 700 16px/1 var(--text); min-height: 48px; padding: 0 1.3em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.bevel:active { border-color: var(--grey-dk) var(--grey-hi) var(--grey-hi) var(--grey-dk); box-shadow: inset 1px 1px 0 var(--grey-lo); }
.bevel img { width: 20px; height: 20px; }
.bevel[aria-disabled="true"] { color: #4a4554; cursor: default; }
.bevel.copy { background: var(--pink); color: #1A0716; border-color: #ffb3e6 #a8337f #a8337f #ffb3e6; box-shadow: inset -1px -1px 0 #c94a9c, inset 1px 1px 0 #ffd0ee; min-width: 112px; }
.bevel.copy:hover { background: #ff7fd4; }
.sunken { background: #fff; border: 2px solid; border-color: var(--grey-lo) var(--grey-hi) var(--grey-hi) var(--grey-lo); box-shadow: inset 1px 1px 0 #000; }

.contract { max-width: 500px; }
.ca-row { display: flex; gap: var(--s1); margin-bottom: var(--s2); }
.ca { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; padding: 0 16px; font: 400 16px/1.2 var(--mono); color: #15101E; user-select: all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca.empty { font: 500 16px/1.2 var(--text); color: #4a4554; user-select: text; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); }

/* ---------- the board ---------- */
.table { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.board { position: relative; aspect-ratio: 1536 / 1024; width: 100%; max-width: min(1040px, calc((100svh - 380px) * 1.5)); min-width: 560px; margin: 0 auto; }
.board .glass { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.lens { position: absolute; border-radius: 50%; background-repeat: no-repeat; pointer-events: none; mix-blend-mode: screen; transition: filter .3s; }
.lens.lit { filter: brightness(1.45) saturate(1.4) drop-shadow(0 0 6px rgba(255,255,255,.8)); }
.planchette { position: absolute; width: 16%; height: auto; pointer-events: none; mix-blend-mode: screen; transform: translate(-50%, -39.7%); }
.cube { position: absolute; width: 2.6%; transform: translate(-50%, -50%); mix-blend-mode: screen; pointer-events: none; animation: cube 7s ease-out forwards; }
@keyframes cube { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.6); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } }
.spot { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); background: transparent; border: 0; padding: 0; cursor: default; }
.aiming .spot { cursor: pointer; }
.aiming .spot:hover, .spot.chosen { box-shadow: 0 0 0 3px var(--teal), 0 0 24px 6px rgba(79,240,224,.45); }
.ring { position: absolute; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--pink), 0 0 34px 12px rgba(255,95,200,.75); pointer-events: none; opacity: 0; transition: opacity .25s; }
.ring.aim { transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--teal), 0 0 22px 6px rgba(79,240,224,.55); }
.ring.on { opacity: 1; }

/* the seance dialog floats over the board's top edge */
.seance { position: relative; width: min(600px, 100%); z-index: 3; }
.cells { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; min-height: 92px; padding: 20px 24px; font: 400 40px/1 var(--display); color: #15101E; }
.cells > span { display: grid; place-items: end center; height: 1.1em; border-bottom: 3px solid #e2dcec; }
.cells > .letter { border-bottom-color: #15101E; }
.cells > .caret { border-bottom-color: var(--pink); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { border-bottom-color: #e2dcec; } }
.cell { display: inline-grid; place-items: center; width: 64px; height: 64px; font: 400 40px/1 var(--display); color: #15101E; }
.letter { display: inline-block; }
.letter.new { animation: drop .36s steps(4) both; }
@keyframes drop { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.hold { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); font: 600 16px/1.3 var(--text); color: #2a2433; min-height: 24px; }
.pips { display: flex; gap: 4px; }
.pip { width: 16px; height: 16px; background: #fff; border: 2px solid; border-color: var(--grey-lo) var(--grey-hi) var(--grey-hi) var(--grey-lo); }
.pip.on { background: var(--pink); }
.status { margin-top: var(--s1); font: 500 16px/1.45 var(--text); color: #2a2433; min-height: 44px; }
.status b { color: #15101E; }

/* the pull controls take the place of the intro (the same slot, so nothing else moves) */
.swap { display: grid; margin-bottom: var(--s3); }
.swap > * { grid-area: 1 / 1; }
.swap .pull { visibility: hidden; }
.swap.pulling .intro { visibility: hidden; }
.swap.pulling .pull { visibility: visible; }
.intro .actions { margin-bottom: 0; }
.pull-line { margin: 0 0 var(--s2); min-height: 54px; font: 500 18px/1.5 var(--text); }
.pull-line b { color: var(--teal); font-weight: 700; }
.chips { display: flex; gap: var(--s1); margin: 0 0 var(--s2); flex-wrap: wrap; }
.chip { min-height: 48px; padding: 12px 18px; font-size: 16px; border-width: 2px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #15101E; border-color: var(--ink); }
.pull-row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.wallets { display: contents; }
.wallets .btn img { width: 22px; height: 22px; margin-right: 10px; }
.wallets .note { font-size: 16px; color: var(--text-dim); }

/* ---------- below the fold ---------- */
.section { max-width: var(--container); margin: 0 auto; padding: var(--s7) var(--edge) 0; }
.section:last-of-type { padding-bottom: var(--s7); }
.sh { font: 400 34px/1.2 var(--head); letter-spacing: -.5px; margin: 0 0 var(--s1); color: #fff; }
.sub { margin: 0 0 var(--s4); color: var(--text-dim); max-width: 44em; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.step { position: relative; padding-top: var(--s3); }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pink); }
.step .k { font: 400 30px/1.1 var(--head); color: var(--teal); margin-bottom: var(--s1); }
.step h3 { font: 700 20px/1.25 var(--text); margin: 0 0 var(--s1); }
.step p { margin: 0; color: var(--text-dim); font-size: 17px; }
.rows { width: 100%; border-collapse: collapse; font-size: 17px; }
.rows th { text-align: left; font: 600 16px/1.3 var(--text); color: var(--lilac); padding: 12px 24px; border-bottom: 1px solid rgba(201,168,255,.35); }
.rows td { padding: 16px 24px; border-bottom: 1px solid rgba(201,168,255,.18); vertical-align: top; }
.rows .word { font: 400 22px/1 var(--head); color: #fff; letter-spacing: 1px; padding-left: 28px; padding-right: 28px; }
.rows .medium { color: var(--text-dim); font-style: italic; }
.rows a { color: var(--teal); }
.note { color: var(--text-dim); font-size: 16px; }

/* ---------- a written letter, an ending ---------- */
.spot.flare { animation: flare 1.4s ease-out; }
@keyframes flare { 0% { box-shadow: 0 0 0 0 rgba(255,95,200,0), 0 0 0 0 rgba(255,95,200,0); } 20% { box-shadow: 0 0 0 4px var(--pink), 0 0 60px 24px rgba(255,95,200,.75); } 100% { box-shadow: 0 0 0 30px rgba(255,95,200,0), 0 0 90px 40px rgba(255,95,200,0); } }
.flyer { position: fixed; z-index: 50; pointer-events: none; font: 400 48px/1 var(--display); color: #fff; text-shadow: -3px 0 0 var(--pink), 3px 0 0 var(--teal), 0 0 24px rgba(255,95,200,.8); }
.board.end-yes .glass { animation: endyes 2.4s ease-out; }
.board.end-bye .glass { animation: endbye 2.4s ease-out; }
@keyframes endyes { 0% { filter: none; } 15% { filter: brightness(1.9) saturate(1.6) hue-rotate(-40deg); } 100% { filter: none; } }
@keyframes endbye { 0% { filter: none; } 20% { filter: brightness(.35) grayscale(.6); } 100% { filter: none; } }

/* whose hands: the picture and the live table */
.whose { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s5); align-items: center; }
.whose-pic img { width: 100%; height: auto; border: 2px solid rgba(201,168,255,.35); }
.whose .rows .addr { font-family: var(--mono); font-size: 16px; }
.whose .rows .hn { color: var(--teal); font-weight: 700; }
.whose .rows th.num, .whose .rows td.num { text-align: right; }
.whose .note { margin: var(--s2) 0 0; min-height: 1.5em; }

/* ---------- widths ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); gap: var(--s4); }
  .board { min-width: 0; }
  .name { font-size: 96px; }
  .headline { font-size: 26px; }
}
@media (max-width: 920px) {
  :root { --edge: 24px; }
  .stage { min-height: 0; }
  .board { min-width: 0; max-width: none; }
  .stage .void img { object-position: 50% 100%; }
  .stage .void::after { background: linear-gradient(180deg, rgba(11,7,22,.65) 0%, rgba(11,7,22,0) 40%); }
  .top { padding-top: var(--s3); }
  .nav { gap: var(--s3); }
  .nav a { font-size: 16px; }
  .hero { display: flex; flex-direction: column; gap: 0; padding-top: var(--s3); }
  .copy { display: contents; }
  .name { order: 1; font-size: 64px; margin-bottom: var(--s2); }
  .headline { order: 2; font-size: 21px; margin-bottom: var(--s3); }
  .table { order: 3; padding-top: 0; width: 100%; margin-bottom: var(--s3); display: flex; flex-direction: column-reverse; gap: var(--s2); }
  .seance { width: 100%; }
  .board { max-width: none; }
  .swap { order: 4; }
  .actions .btn { flex: 1 1 0; }
  .contract { order: 6; max-width: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cells { min-height: 64px; font-size: 32px; gap: 4px; padding: 16px 16px; }
}
@media (max-width: 1100px) {
  .whose { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .rows .hide-s { display: none; }
}
@media (max-width: 360px) {
  .cells { font-size: 24px; gap: 3px; padding: 14px 16px; }
  .links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer, .cube, .letter.new, .cells .caret, .spot.flare, .board .glass { animation: none; }
  .lens { transition: none; }
}
@media (max-width: 920px) {
  .hero > *, .copy > * { min-width: 0; max-width: 100%; }
  .contract { width: 100%; }
  .ca-row > .bevel, .links .bevel { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 360px) {
  .ca.empty { font-size: 16px; padding: 0 16px; }
  .ca-row { flex-wrap: wrap; }
  .ca-row .ca { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .rows td, .rows th { padding-left: 12px; padding-right: 12px; }
  .rows .word { padding-left: 12px; padding-right: 12px; font-size: 22px; }
}
.ca.empty { white-space: normal; padding: 10px 16px; line-height: 1.3; }
@media (max-width: 520px) {
  .rows td, .rows th { padding-left: 18px; padding-right: 18px; }
  .rows .word { padding-left: 22px; padding-right: 22px; }
  .rows .num-s { display: none; }
}
