/* Squeakchain: the look every page shares.
   The idea: a night shift control room. One dark wall, glowing scan lines, readouts in a mono face.
   Colours follow a thermal camera from cold violet to hot cream. The site is dark only, on purpose. */

@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #06040C;
  --bg-2: #0A0613;
  --panel: #0F0A1B;
  --panel-2: #160E26;
  --line: #251739;
  --line-2: #3B2557;
  --ink: #F3ECF9;
  --ink-2: #CFC4E0;
  --muted: #9A8EB2;
  --faint: #655B7E;
  --cream: #FFF4D6;
  --amber: #FFD36B;
  --orange: #FF8A24;
  --ember: #F2602A;
  --rose: #D23A4E;
  --magenta: #A0246A;
  --violet: #5B0F6E;
  --deep: #2A0A47;
  --cyan: #3FE6FF;
  --pink: #FF4FD8;
  --rec: #FF3B3B;
  --ok: #4FE3A1;
  --iron: linear-gradient(180deg, var(--cream) 0%, var(--amber) 24%, var(--orange) 50%, var(--rose) 78%, var(--magenta) 100%);
  --f-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --wrap: 1180px;
  --gut: clamp(18px, 4vw, 40px);
  --r: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(91, 15, 110, .38), transparent 62%),
    radial-gradient(900px 520px at 6% 12%, rgba(42, 10, 71, .5), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.62 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* faint carrier lines across the whole wall */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(150, 100, 230, .045) 0 1px, transparent 1px 7px);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--orange); color: #1A0A02; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(40px, 6.4vw, 82px); line-height: .98; letter-spacing: -.025em; }
h2 { font-weight: 600; font-size: clamp(28px, 3.7vw, 46px); line-height: 1.06; letter-spacing: -.02em; }
h3 { font-weight: 600; font-size: 19px; line-height: 1.25; letter-spacing: -.005em; }
p { margin: 0; }
.lede { font-size: clamp(16px, 1.45vw, 19px); color: var(--ink-2); max-width: 58ch; }
.small { font-size: 14px; color: var(--muted); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.gap-top { margin-top: 22px; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }

/* Headline text made of glowing scan lines. Each line of a heading gets its own span so the colours run per line. */
.scan {
  display: inline-block;
  background: var(--iron);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 .058em, transparent .058em .086em);
  mask-image: repeating-linear-gradient(180deg, #000 0 .058em, transparent .058em .086em);
  filter: drop-shadow(0 0 .2em rgba(255, 138, 36, .42));
  padding-bottom: .08em;
}

/* Small readout label with a status light */
.label {
  font: 500 11.5px/1.2 var(--f-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.led { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--faint); box-shadow: 0 0 0 3px rgba(255, 255, 255, .04); }
.led.rec { background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: blink 1.6s steps(1) infinite; }
.led.ok { background: var(--ok); box-shadow: 0 0 10px rgba(79, 227, 161, .8); }
.led.hot { background: var(--orange); box-shadow: 0 0 10px rgba(255, 138, 36, .9); }
@keyframes blink { 50% { opacity: .18; } }

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--f-display);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), border-color .25s, filter .25s, background-color .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-hot {
  color: #1A0A02;
  background: linear-gradient(180deg, #FFDF8E 0%, var(--amber) 22%, var(--orange) 66%, var(--ember) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 214, .45), 0 10px 34px -10px rgba(255, 138, 36, .7);
}
/* scan lines printed over the hot button, and a light that sweeps across on hover */
.btn-hot::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(60, 10, 0, .16) 0 1px, transparent 1px 3px); pointer-events: none; }
.btn::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.btn:hover:not(:disabled)::before { animation: sweep .7s var(--ease); }
@keyframes sweep { 0% { left: -60%; opacity: 0; } 20% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
.btn-hot:hover:not(:disabled) { filter: brightness(1.06); box-shadow: inset 0 0 0 1px rgba(255, 244, 214, .6), 0 14px 44px -8px rgba(255, 138, 36, .9); }
.btn-line { color: var(--ink); background: rgba(255, 255, 255, .025); border-color: var(--line-2); }
.btn-line:hover:not(:disabled) { border-color: var(--orange); box-shadow: 0 0 0 1px rgba(255, 138, 36, .25), 0 0 30px -8px rgba(255, 138, 36, .55); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 7px; }
.btn-xs { padding: 7px 11px; font-size: 12.5px; border-radius: 6px; }
.link { color: var(--amber); text-decoration: none; background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.link:hover { background-size: 100% 1px; }

/* Panels: the monitors on the wall */
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background-color: var(--panel);
  background-image: linear-gradient(180deg, rgba(34, 21, 58, .55), rgba(12, 8, 22, .2));
}
/* four corner marks, like a viewfinder */
.hud {
  --c: rgba(255, 138, 36, .85);
  background-image:
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(180deg, rgba(34, 21, 58, .55), rgba(12, 8, 22, .2));
  background-repeat: no-repeat;
  background-size: 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px, auto;
  background-position: 7px 7px, 7px 7px, calc(100% - 7px) 7px, calc(100% - 7px) 7px, 7px calc(100% - 7px), 7px calc(100% - 7px), calc(100% - 7px) calc(100% - 7px), calc(100% - 7px) calc(100% - 7px), 0 0;
}
/* a light that follows the pointer along the edge of a panel */
.torch { --mx: 50%; --my: 50%; }
.torch::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(255, 190, 110, .95), rgba(255, 138, 36, .35) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.torch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(255, 138, 36, .09), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.torch:hover::before, .torch:hover::after { opacity: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  justify-self: start;
}
.chip.hot { color: #1A0A02; background: var(--amber); border-color: var(--amber); }
.chip.ok { color: var(--ok); border-color: rgba(79, 227, 161, .45); }
.chip.dim { color: var(--faint); border-color: var(--line); }

/* The top bar */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.stuck { background: rgba(6, 4, 12, .72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 700 16px/1 var(--f-display); letter-spacing: .14em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 22px -4px rgba(255, 138, 36, .7); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 9px 12px; border-radius: 7px; text-decoration: none; font: 500 14px/1 var(--f-display); color: var(--ink-2); transition: color .2s, background-color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--ink-2); text-decoration: none; transition: border-color .2s, color .2s; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }
@media (max-width: 880px) {
  .nav-links { display: none; position: absolute; top: 68px; left: var(--gut); right: var(--gut); flex-direction: column; align-items: stretch; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(12, 8, 22, .97); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 12px; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 420px) { .brand span { display: none; } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 44px; margin-top: 40px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.foot p { color: var(--muted); font-size: 13.5px; max-width: 62ch; }
.foot p + p { margin-top: 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: flex-start; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.foot-links a:hover { color: var(--amber); }


/* Tiers. Anything inside an element with one of these classes can use var(--tier). */
.t-gold { --tier: #FFD36B; }
.t-silver { --tier: #CDD8EC; }
.t-bronze { --tier: #E2925C; }
.t-member { --tier: #7E7399; }
.chip.tier { color: var(--tier); border-color: color-mix(in srgb, var(--tier) 55%, transparent); background: color-mix(in srgb, var(--tier) 8%, transparent); }
.chip.tier small { font: inherit; color: var(--muted); letter-spacing: .08em; }

/* A member's picture: their X picture drawn in scan lines, framed in the colour of their tier */
.face { position: relative; border-radius: 8px; background: #000; box-shadow: 0 0 0 1px var(--tier, var(--line-2)), 0 0 40px -10px color-mix(in srgb, var(--tier, var(--orange)) 80%, transparent); }
.face img { display: block; width: 100%; height: 100%; border-radius: inherit; }

/* Badge tiles and board rows, on the home page and in early access */
.emblem { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); background: rgba(5, 3, 10, .7); display: grid; place-items: center; position: relative; overflow: hidden; }
.emblem svg { width: 78%; height: 78%; }
.rows { display: grid; gap: 6px; }
.brow { display: grid; grid-template-columns: 30px 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px 7px 8px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, .02); }
.brow.you { border-color: var(--amber); background: rgba(255, 138, 36, .07); }
.brow .rk { font: 700 13px/1 var(--f-mono); color: var(--muted); text-align: center; }
.brow.t-gold .rk { color: var(--tier); }
.brow img { width: 38px; height: 38px; border-radius: 6px; background: #000; box-shadow: 0 0 0 1px var(--tier, var(--line-2)); }
.brow .who { display: grid; gap: 4px; min-width: 0; }
.brow .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.brow .who small { font: 500 9.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.brow .sd { font: 700 14px/1 var(--f-mono); color: var(--cream); font-variant-numeric: tabular-nums; }
.brow .sd small { color: var(--muted); font-weight: 500; margin-left: 5px; font-size: 10.5px; letter-spacing: .1em; }
/* the label that opens each tier in a list */
.tier-head { display: flex; align-items: center; gap: 9px; padding: 8px 4px 2px; font: 600 11.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--tier); }
.tier-head:first-child { padding-top: 0; }
.tier-head .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--tier); box-shadow: 0 0 10px var(--tier); }
.tier-head small { font: 500 10px/1 var(--f-mono); letter-spacing: .1em; color: var(--faint); }
/* a row opens that member's page */
a.brow { text-decoration: none; color: inherit; transition: border-color .2s, background-color .2s; }
a.brow:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .045); }
/* a row of the old Squeekchain board: dim until its member is back */
.brow.old .nm, .brow.old .sd, .brow.old img { opacity: .72; }
.brow.old.back { border-color: rgba(79, 227, 161, .4); }
.brow.old.back .nm, .brow.old.back .sd, .brow.old.back img { opacity: 1; }
.brow.old.back .who small { color: var(--ok); }

/* A project: its picture drawn as scan lines, at 16 to 9 */
.cover { aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: #000; border: 1px solid var(--line); display: grid; place-items: center; }
.cover img { width: 100%; height: 100%; display: block; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.project { padding: 10px; display: grid; gap: 12px; align-content: start; }
.project-body { display: grid; gap: 8px; padding: 0 4px 4px; }
.project-body h3 { font-size: 17px; overflow-wrap: anywhere; }
.project-body p { color: var(--ink-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.project-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.project-links { display: flex; gap: 6px; }

/* Things that slide in when they scroll into view. Without script they are simply there. */
.js .rv { opacity: 0; transform: translateY(20px); filter: blur(6px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; filter: none; }

/* The glass in front of everything: scan lines, a slow refresh band and a soft vignette */
.crt { position: fixed; inset: 0; z-index: 80; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0, 0, 0, .11) 2px 3px), radial-gradient(120% 90% at 50% 45%, transparent 62%, rgba(0, 0, 0, .42) 100%); }
.crt::before { content: ""; position: absolute; inset: 0; background-image: var(--grain, none); background-size: 180px 180px; opacity: .05; animation: grain .9s steps(6) infinite; }
.crt::after { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(180deg, transparent, rgba(255, 220, 180, .028), transparent); animation: refresh 9s linear infinite; }
@keyframes grain { 0% { background-position: 0 0; } 20% { background-position: -40px 30px; } 40% { background-position: 60px -50px; } 60% { background-position: -70px -20px; } 80% { background-position: 30px 70px; } 100% { background-position: 0 0; } }
@keyframes refresh { to { top: 120%; } }

/* Messages that pop up at the bottom */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(16, 10, 28, .96); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .8); font-size: 14.5px; animation: toast-in .35s var(--ease); }
.toast .led { margin-top: 7px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.toast.err { border-color: rgba(255, 59, 59, .5); }
.toast.good { border-color: rgba(79, 227, 161, .45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* A sheet over the page, for picking a wallet */
.veil { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(3, 2, 8, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: veil-in .25s; }
.sheet { width: min(440px, 100%); padding: 24px; display: grid; gap: 16px; animation: sheet-in .35s var(--ease); max-height: calc(100vh - 32px); overflow: auto; }
.sheet h2 { font-size: 24px; }
@keyframes veil-in { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.wlist { display: grid; gap: 8px; }
.wrow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); text-align: left; transition: border-color .2s, background-color .2s; }
.wrow:hover { border-color: var(--orange); background: rgba(255, 138, 36, .06); }
.wrow img, .wlet { width: 40px; height: 40px; border-radius: 9px; }
.wlet { display: grid; place-items: center; background: var(--panel-2); font: 700 18px/1 var(--f-display); font-style: normal; color: var(--amber); }
.wtx { display: grid; gap: 3px; min-width: 0; }
.wtx b { font: 600 15.5px/1.2 var(--f-display); }
.wtx small { color: var(--muted); font-size: 13px; }
.werr { color: #FF8F8F; font-size: 14.5px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--amber); color: #1A0A02; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* The local preview tag, bottom left */
.demo-tag { position: fixed; left: 12px; bottom: 12px; pointer-events: none; z-index: 85; padding: 6px 9px; border-radius: 5px; background: rgba(255, 211, 107, .12); border: 1px solid rgba(255, 211, 107, .5); color: var(--amber); font: 500 10px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; max-width: calc(100vw - 24px); opacity: .9; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rv { opacity: 1; transform: none; filter: none; }
  .crt::before, .crt::after { display: none; }
}
