/* ======================================================================
   GROKLET - stylesheet
   1. Tokens   2. Base   3. Layout helpers   4. Buttons & links   5. Navigation
   6. Hero     7. Featured post   8. Story   9. Archive   10. Signals
   11. Community & contract   12. Footer   13. Lightbox   14. Motion & fallbacks
   ====================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #03050B;
  --navy: #070D1B;
  --indigo: #11152A;
  --teal: #19D8CF;
  --cyan: #36DDF4;
  --violet: #7952C7;
  --ink: #F0F4FA;
  --muted: #98A4BE;      /* secondary text, 7:1 on --bg */
  --faint: #8190AB;      /* metadata only, 5.6:1 on --bg */
  --line: rgba(240, 244, 250, .12);
  --line-strong: rgba(240, 244, 250, .26);
  --line-teal: rgba(25, 216, 207, .4);

  --f-head: "Space Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1280px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --cut: 14px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  overflow-x: clip;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--f-mono); }
[hidden] { display: none !important; }
::selection { background: rgba(25, 216, 207, .35); color: #fff; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 2000;
  background: var(--teal); color: #031013; padding: .7rem 1rem; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.icon { width: 1.1em; height: 1.1em; flex: none; }

/* Fixed atmosphere (static; no repaint cost while scrolling) */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.cosmos {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 88% 6%, rgba(121, 82, 199, .17), transparent 70%),
    radial-gradient(50% 45% at 0% 62%, rgba(25, 216, 207, .06), transparent 70%),
    radial-gradient(70% 60% at 50% 120%, rgba(17, 21, 42, .9), transparent 70%);
}
main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- 3. Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--f-head); font-weight: 500; font-size: .75rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--teal); flex: none; }

.display {
  font-family: var(--f-head); font-weight: 600;
  font-size: clamp(2.35rem, 5.4vw, 4.6rem);
  line-height: 1.03; letter-spacing: -.025em; text-wrap: balance;
  margin-top: 1.1rem;
}
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); line-height: 1.7; max-width: 38em; margin-top: 1.4rem; }

section { position: relative; }

/* ---------- 4. Buttons & links ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 52px; padding: .9rem 1.5rem;
  font-family: var(--f-head); font-weight: 600; font-size: .8rem;
  letter-spacing: .15em; text-transform: uppercase; text-decoration: none;
  border: 0; background: none; transition: background-color .25s var(--ease), color .25s, border-color .25s, transform .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  --pcut: 16px;
  isolation: isolate; padding: .55rem .6rem .55rem 1.5rem; color: var(--ink);
  background: linear-gradient(115deg, var(--cyan), var(--teal) 45%, var(--violet));
  clip-path: polygon(var(--pcut) 0, 100% 0, 100% calc(100% - var(--pcut)), calc(100% - var(--pcut)) 100%, 0 100%, 0 var(--pcut));
}
.btn--primary::before {
  content: ""; position: absolute; inset: 1.5px; z-index: -1; transition: background-color .3s var(--ease), opacity .3s;
  clip-path: polygon(calc(var(--pcut) - .6px) 0, 100% 0, 100% calc(100% - var(--pcut) + .6px), calc(100% - var(--pcut) + .6px) 100%, 0 100%, 0 calc(var(--pcut) - .6px));
  background: radial-gradient(130% 160% at 0% 100%, rgba(25, 216, 207, .26), transparent 62%), radial-gradient(90% 120% at 100% 0%, rgba(121, 82, 199, .22), transparent 60%), #050a17;
}
.btn--primary .icon {
  box-sizing: content-box; width: 1.05em; height: 1.05em; padding: .6em; border-radius: 50%; color: var(--cyan);
  border: 1px solid rgba(54, 221, 244, .55); transition: background-color .3s var(--ease), color .3s, border-color .3s, transform .3s var(--ease);
}
.btn--primary:hover::before { background: radial-gradient(130% 160% at 0% 100%, rgba(25, 216, 207, .42), transparent 62%), radial-gradient(90% 120% at 100% 0%, rgba(121, 82, 199, .34), transparent 60%), #07101f; }
.btn--primary:hover .icon { background: var(--teal); border-color: var(--teal); color: #021012; transform: translateX(3px); }
.btn--primary:focus-visible { outline: none; }
.btn--primary:focus-visible::before { box-shadow: inset 0 0 0 2px var(--ink); }

.btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost::before, .btn--ghost::after {
  content: ""; position: absolute; width: 9px; height: 9px; border: 0 solid var(--teal); transition: width .3s var(--ease), height .3s var(--ease);
}
.btn--ghost::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.btn--ghost::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--line-teal); background: rgba(25, 216, 207, .06); }
.btn--ghost:hover::before, .btn--ghost:hover::after { width: 16px; height: 16px; }

.textlink {
  display: inline-flex; align-items: center; gap: .4rem; color: var(--teal); text-decoration: none;
  font-family: var(--f-head); font-weight: 500; font-size: .85rem; letter-spacing: .02em;
  border-bottom: 1px solid var(--line-teal); padding-bottom: 1px; transition: color .2s, border-color .2s;
}
.textlink:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- 5. Navigation ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; transition: background-color .35s, backdrop-filter .35s, box-shadow .35s; }
.nav.is-scrolled, .nav.is-open { background: rgba(3, 5, 11, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav.is-open { background: rgba(3, 5, 11, .985); }
.nav__bar { height: var(--nav-h); display: flex; align-items: center; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand__mark { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-teal); }
.brand__name { font-family: var(--f-head); font-weight: 700; font-size: 1.12rem; letter-spacing: .02em; }

.nav__links { display: none; gap: .4rem; }
.nav__links a {
  position: relative; padding: .55rem .85rem; text-decoration: none;
  font-family: var(--f-head); font-size: .86rem; font-weight: 500; color: var(--muted); transition: color .2s;
}
.nav__links a::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 1px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

.nav__x {
  display: none; align-items: center; gap: .55rem; padding: .5rem .9rem; text-decoration: none;
  font-family: var(--f-head); font-size: .82rem; font-weight: 500; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow .25s, background-color .25s;
}
.nav__x:hover { box-shadow: inset 0 0 0 1px var(--line-teal); background: rgba(25, 216, 207, .06); }

.nav__toggle {
  display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 .2rem 0 .6rem; background: none; border: 0;
  font-family: var(--f-head); font-weight: 500; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
}
.nav__toggle-bars { position: relative; width: 24px; height: 12px; }
.nav__toggle-bars i { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__toggle-bars i:first-child { top: 1px; }
.nav__toggle-bars i:last-child { top: 9px; }
.nav__toggle[aria-expanded="true"] i:first-child { top: 5px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] i:last-child { top: 5px; transform: rotate(-45deg); }

.menu { height: calc(100dvh - var(--nav-h)); overflow-y: auto; padding: 2rem var(--gutter) 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  display: flex; align-items: baseline; gap: 1rem; padding: 1.05rem 0; text-decoration: none;
  font-family: var(--f-head); font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 600; letter-spacing: -.02em;
  border-bottom: 1px solid var(--line);
}
.menu__nav small { font-size: .72rem; letter-spacing: .2em; color: var(--teal); font-weight: 500; }
.menu__x { display: inline-flex; align-items: center; gap: .7rem; min-height: 52px; font-family: var(--f-head); font-weight: 500; text-decoration: none; color: var(--teal); }

@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav__x { display: inline-flex; }
  .nav__toggle { display: none; }
  .brand { margin-right: auto; }
}

/* ---------- 6. Hero ---------- */
.hero {
  min-height: min(100svh, 1000px); padding-top: calc(var(--nav-h) + 8px); padding-bottom: 5.5rem;
  display: flex; align-items: center; overflow: clip;
}
.hero__nebula {
  position: absolute; inset: -6% -6% 0; pointer-events: none;
  background:
    radial-gradient(38% 46% at 74% 44%, rgba(121, 82, 199, .26), transparent 70%),
    radial-gradient(30% 36% at 66% 70%, rgba(25, 216, 207, .1), transparent 70%),
    radial-gradient(34% 40% at 12% 18%, rgba(121, 82, 199, .12), transparent 72%);
  animation: drift 70s ease-in-out infinite alternate;
}
.hero__grid { position: relative; display: grid; align-items: center; gap: 1rem; }

.hero__copy { position: relative; z-index: 2; }
.hero__eyebrow span { line-height: 1.5; }

.hero__title {
  font-family: var(--f-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(3.3rem, 9.6vw, 8.3rem); line-height: .9; letter-spacing: -.04em; margin: 1.2rem 0 0; white-space: nowrap;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line__in { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero__title .line:nth-child(2) .line__in { animation-delay: .12s; background: linear-gradient(180deg, #fff 30%, #b9f5f2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__title i { font-style: normal; color: var(--teal); -webkit-text-fill-color: var(--teal); }
.hero__meet {
  font-size: .36em; font-weight: 500; letter-spacing: .32em; color: var(--muted); display: inline-block; margin-bottom: .45em;
  text-transform: uppercase;
}

.hero__lede { margin-top: 1.5rem; max-width: 30em; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: #c7d0e3; animation: fade 1.2s .45s var(--ease) both; }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .9rem; animation: fade 1.2s .6s var(--ease) both; }

.hero__figure { position: relative; order: -1; width: 100%; max-width: 560px; margin-inline: auto; margin-top: .5rem; animation: figure-in 1.6s var(--ease) both; }
.hero__art {
  position: relative; aspect-ratio: 1 / 1;
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0,0,0,.78) 66%, rgba(0,0,0,.4) 82%, transparent 100%);
          mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0,0,0,.78) 66%, rgba(0,0,0,.4) 82%, transparent 100%);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__xglow {
  position: absolute; left: 50.2%; top: 32.4%; width: 22%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(54, 221, 244, .5), rgba(25, 216, 207, .16) 45%, transparent 70%);
  mix-blend-mode: screen; animation: glow 5.5s ease-in-out infinite;
}
.hero__orbits { position: absolute; inset: -9%; width: 118%; height: 118%; overflow: visible; pointer-events: none; }
.orbit { transform-origin: 50px 50px; fill: none; stroke: rgba(54, 221, 244, .3); stroke-width: .18; }
.orbit circle { fill: var(--cyan); stroke: none; }
.orbit--a { animation: spin 140s linear infinite; }
.orbit--b { animation: spin 220s linear infinite reverse; stroke: rgba(240, 244, 250, .12); stroke-dasharray: .4 1.4; }
.orbit--b circle { fill: var(--ink); opacity: .7; }

.scrollcue {
  position: absolute; left: 50%; bottom: 1.4rem; translate: -50% 0; z-index: 3; display: none; flex-direction: column; align-items: center; gap: .6rem; text-decoration: none;
  font-family: var(--f-head); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.scrollcue i { width: 1px; height: 38px; background: linear-gradient(var(--teal), transparent); transform-origin: top; animation: cue 2.8s var(--ease) infinite; }

@media (max-width: 899px) {
  .hero { padding-bottom: 4rem; align-items: flex-start; }
  .hero__figure { width: min(100%, 520px); margin-bottom: -6vw; }
  .hero__copy { margin-top: -2vw; }
  .hero__title { margin-top: .9rem; }
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 0; }
  .hero__figure { order: 0; max-width: 800px; margin-right: calc(var(--gutter) * -1.1); margin-top: 0; }
  .scrollcue { display: flex; }
}
@media (min-width: 900px) and (max-height: 760px) { .hero { padding-bottom: 4rem; } .hero__figure { max-width: 560px; } }

/* ---------- 7. Featured post ---------- */
.post { padding: clamp(5.5rem, 11vw, 10rem) 0 clamp(4rem, 8vw, 7rem); }
.post__glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(46% 46% at 80% 48%, rgba(25, 216, 207, .07), transparent 70%), radial-gradient(40% 40% at 100% 20%, rgba(121, 82, 199, .14), transparent 70%); }
.post__grid { position: relative; display: grid; gap: 3rem; align-items: center; }
.post__intro { max-width: 40rem; }
.post__intro .display { font-size: clamp(2.8rem, 7.4vw, 6.2rem); line-height: 1; }
.post__intro .lede { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.6; color: #c3cce0; margin-top: 1.8rem; }


.artifact { position: relative; }
.artifact__rings {
  position: absolute; z-index: 0; width: 120%; aspect-ratio: 1; right: -38%; top: -22%; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(54, 221, 244, .14);
  box-shadow: inset 0 0 0 clamp(40px, 7vw, 110px) transparent, 0 0 0 clamp(40px, 7vw, 110px) transparent;
  background: radial-gradient(closest-side, transparent 70%, rgba(54, 221, 244, .05) 71%, transparent 72%);
}
.artifact__frame {
  position: relative; z-index: 1; display: block; width: 100%; padding: 0; border: 1px solid var(--line-teal); background: #000; cursor: zoom-in;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(25, 216, 207, .35);
  transition: border-color .3s, box-shadow .4s;
}
.artifact__frame:hover { border-color: rgba(54, 221, 244, .7); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 90px -24px rgba(25, 216, 207, .5); }
.artifact__frame img { width: 100%; aspect-ratio: 1179 / 1114; }
.tick { position: absolute; width: 22px; height: 22px; border: 0 solid var(--cyan); pointer-events: none; }
.tick--tl { left: -7px; top: -7px; border-width: 2px 0 0 2px; }
.tick--br { right: -7px; bottom: -7px; border-width: 0 2px 2px 0; }
.artifact__zoom {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .8rem;
  font-family: var(--f-head); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  background: rgba(3, 5, 11, .82); box-shadow: inset 0 0 0 1px var(--line-strong); opacity: .85; transition: opacity .25s, background-color .25s;
}
.artifact__frame:hover .artifact__zoom, .artifact__frame:focus-visible .artifact__zoom { opacity: 1; background: rgba(3, 5, 11, .95); }

.artifact__cap {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin-top: 1.1rem;
  font-size: .82rem; color: var(--muted);
}
.artifact__fig { font-family: var(--f-head); letter-spacing: .2em; text-transform: uppercase; font-size: .68rem; color: var(--faint); }
.artifact__cap .textlink { margin-left: auto; }

@media (min-width: 960px) {
  .post__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); }
  .artifact { margin-right: calc(var(--gutter) * -.3); }
}

/* ---------- 8. Story ---------- */
.story { padding: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem); }
.story::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.story__grid { display: grid; gap: 3rem; align-items: center; }
.story__visual { position: relative; padding: 0 0 3rem; width: min(100%, 720px); margin-inline: auto; }
.story__plate { position: relative; overflow: hidden; }
.story__plate img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.story__plate::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(240, 244, 250, .1); pointer-events: none; }
.story__lens {
  position: absolute; right: -2%; bottom: 0; width: min(52%, 330px); background: var(--bg); padding: 6px;
  box-shadow: 0 0 0 1px var(--line-teal), 0 30px 60px -20px rgba(0, 0, 0, .9);
}
.story__lens img { width: 100%; aspect-ratio: 660 / 460; object-fit: cover; }
.story__lens figcaption { margin-top: .5rem; padding: 0 .1rem .1rem; font-family: var(--f-head); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }


.pull { margin-top: clamp(4rem, 8vw, 7rem); padding-top: 2.4rem; border-top: 1px solid var(--line); display: grid; gap: 1.2rem; }
.pull p {
  font-family: var(--f-head); font-weight: 500; letter-spacing: -.035em; line-height: .98; text-wrap: balance;
  font-size: clamp(2.5rem, 8.4vw, 7.4rem); padding-bottom: .12em;
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 40%, var(--teal) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pull footer { font-family: var(--f-head); font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }



/* ---------- 9. Archive ---------- */
.archive { padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem); background: linear-gradient(180deg, rgba(7, 13, 27, 0), rgba(7, 13, 27, .85) 8%, rgba(7, 13, 27, .85) 92%, rgba(7, 13, 27, 0)); }
.archive__head { display: grid; gap: 1rem; align-items: end; }
.archive__head .lede { margin-top: .5rem; }
.archive__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin: 2.6rem 0 2.2rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.filter {
  position: relative; display: inline-flex; align-items: baseline; gap: .45rem; min-height: 44px; padding: 0; background: none; border: 0; color: var(--muted);
  font-family: var(--f-head); font-size: .9rem; font-weight: 500; transition: color .2s;
}
.filter sup { font-size: .62rem; color: var(--faint); letter-spacing: .08em; }
.filter::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); }
.filter[aria-pressed="true"]::after { transform: scaleX(1); }
.archive__count { font-family: var(--f-head); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }

.gallery { --cols: 1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); align-items: start; }
.gallery__col { display: flex; flex-direction: column; gap: clamp(28px, 3.4vw, 54px); min-width: 0; }
@media (min-width: 1024px) { .gallery__col:nth-child(2) { margin-top: 64px; } }

.piece { position: relative; }
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; cursor: zoom-in;
  background: linear-gradient(135deg, #0b1226, #11152A); aspect-ratio: var(--ar, 1 / 1);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .5s; }
.tile::before, .tile::after { content: ""; position: absolute; z-index: 2; width: 0; height: 0; border: 0 solid var(--cyan); transition: width .4s var(--ease), height .4s var(--ease); pointer-events: none; }
.tile::before { left: 10px; top: 10px; border-width: 1.5px 0 0 1.5px; }
.tile::after { right: 10px; bottom: 10px; border-width: 0 1.5px 1.5px 0; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.025); filter: saturate(1.08) brightness(1.04); }
.tile:hover::before, .tile:hover::after, .tile:focus-visible::before, .tile:focus-visible::after { width: 18px; height: 18px; }
.piece figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .75rem; font-family: var(--f-head); font-size: .8rem; }
.piece__title { color: var(--ink); font-weight: 500; }
.piece__no { color: var(--teal); letter-spacing: .1em; margin-right: .6rem; font-size: .72rem; }
.piece__cat { color: var(--faint); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; text-align: right; }

.archive__more { display: flex; justify-content: center; margin-top: 3.5rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 0; }
.empty code { color: var(--teal); }

@media (min-width: 900px) { .archive__head { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }

/* ---------- 10. Signals ---------- */
.signals { padding: clamp(5rem, 9vw, 8rem) 0; overflow: clip; }
.signals__glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 40% at 15% 30%, rgba(25, 216, 207, .08), transparent 70%), radial-gradient(40% 40% at 95% 70%, rgba(121, 82, 199, .15), transparent 70%); }
.signals__head { max-width: 44rem; }
.signals__grid { position: relative; display: grid; gap: 3.2rem; margin-top: 3.5rem; align-items: start; }
.signals__note { margin-top: 3rem; font-size: .82rem; color: var(--faint); }

.signal { position: relative; display: flex; flex-direction: column; gap: 1.3rem; min-width: 0; }
.signal__screen {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 360px; padding: 1.2rem 1.2rem 1.4rem; overflow: hidden;
  background:
    radial-gradient(90% 70% at 0% 100%, rgba(25, 216, 207, .16), transparent 60%),
    linear-gradient(160deg, #0d1530, #090e20 60%, #070b17);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}
.signal__head { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 1rem; font-family: var(--f-head); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.signal__head b { color: var(--teal); font-weight: 500; }
.signal__waves { position: absolute; left: -22%; bottom: -30%; width: 120%; aspect-ratio: 1; pointer-events: none; fill: none; stroke: var(--cyan); stroke-width: .25; }
.signal__waves circle { opacity: .5; transform-origin: 50px 50px; animation: wave 6s ease-in-out infinite; }
.signal__waves circle:nth-child(2) { animation-delay: -1.5s; opacity: .35; }
.signal__waves circle:nth-child(3) { animation-delay: -3s; opacity: .22; }
.signal__waves circle:nth-child(4) { animation-delay: -4.5s; opacity: .14; }
.signal__play { position: relative; z-index: 2; align-self: flex-start; }
.signal__embed { position: relative; z-index: 2; margin-top: .6rem; }
.signal__embed:empty { display: none; }
.signal__state { margin-top: .8rem; font-size: .84rem; color: var(--muted); }
.signal__state a { color: var(--teal); }

.signal.is-live .signal__screen { padding: .6rem; min-height: 0; clip-path: none; }
.signal.is-live .signal__head, .signal.is-live .signal__waves, .signal.is-live .signal__play { display: none; }
.signal.is-live .signal__embed { margin: 0; }
.signal__embed .twitter-tweet { margin: 0 auto !important; }

.signal__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; z-index: 0; }
.signal--video .signal__screen { aspect-ratio: var(--ar, 4 / 5); min-height: 300px; max-height: 640px; }
.signal--video .signal__screen::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(3, 5, 11, .55), rgba(3, 5, 11, 0) 35%, rgba(3, 5, 11, .65)); }
.signal--video .signal__waves { z-index: 1; opacity: .5; }
.signal--video.is-live .signal__screen { aspect-ratio: auto; max-height: none; }
.signal--video.is-live .signal__screen::after { display: none; }
.signal__embed video { display: block; width: 100%; height: auto; max-height: 70vh; background: #000; object-fit: contain; }
.signal__text { font-family: var(--f-head); font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.signal__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-size: .8rem; color: var(--muted); }

@media (max-width: 899px) {
  .signal { width: min(100%, 520px); }
  .signal:nth-child(even) { margin-left: auto; }
  .signal__screen { min-height: 340px; }
}
@media (min-width: 900px) {
  .signals__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); }
  .signal:nth-child(3n + 2) { margin-top: 5rem; }
  .signal:nth-child(3n) { margin-top: 2rem; }
  .signal__screen { min-height: 430px; }
}

/* ---------- 11. Community & contract ---------- */
.community { padding: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem); }
.community__banner { position: relative; margin-bottom: clamp(3rem, 6vw, 5rem); }
.community__banner img { width: 100%; aspect-ratio: 2172 / 724; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.community__grid { display: grid; gap: 3rem; align-items: start; }

.links { margin-top: 2.2rem; border-top: 1px solid var(--line); }
.links a {
  display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: center; gap: 1rem; min-height: 64px; padding: .9rem 0; text-decoration: none; border-bottom: 1px solid var(--line);
  transition: padding .3s var(--ease), background-color .3s;
}
.links a:hover { padding-inline: .8rem; background: rgba(25, 216, 207, .05); }
.links .icon { width: 1.3rem; height: 1.3rem; color: var(--teal); }
.links strong { display: block; font-family: var(--f-head); font-weight: 600; font-size: 1.08rem; }
.links small { display: block; color: var(--faint); font-size: .8rem; line-height: 1.3; }
.links .arrow { color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.links a:hover .arrow { color: var(--teal); transform: translate(3px, -3px); }

.contract { position: relative; padding: clamp(1.4rem, 3vw, 2.2rem); background: linear-gradient(160deg, rgba(17, 21, 42, .9), rgba(7, 13, 27, .9)); box-shadow: inset 0 0 0 1px var(--line); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.contract::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 54px; background: var(--teal); }
.contract__title { font-family: var(--f-head); font-weight: 500; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.2rem; }
.contract__title span { margin-left: .6rem; color: var(--ink); }
.contract__note { margin-top: 1.1rem; font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* Contract address control (shared) */
.ca {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; gap: 0; min-width: 0;
  background: rgba(3, 5, 11, .7); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.ca__label { display: flex; align-items: center; padding: 0 .85rem; font-family: var(--f-head); font-weight: 700; font-size: .72rem; letter-spacing: .2em; color: var(--teal); border-right: 1px solid var(--line); }
.ca__value { display: flex; align-items: center; min-width: 0; padding: .7rem .9rem; font-size: .78rem; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.ca__copy {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 96px; min-height: 48px; padding: 0 1rem; border: 0; background: rgba(25, 216, 207, .1); color: var(--teal);
  font-family: var(--f-head); font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; border-left: 1px solid var(--line);
  transition: background-color .25s, color .25s; touch-action: manipulation;
}
.ca__copy:hover { background: rgba(25, 216, 207, .2); }
.ca__copy .icon--check { display: none; }
.ca.is-copied .ca__copy { background: var(--teal); color: #021012; }
.ca.is-copied .icon--copy { display: none; }
.ca.is-copied .icon--check { display: block; }
.ca.is-failed .ca__copy { background: rgba(240, 244, 250, .1); color: var(--ink); }
.ca__status { position: absolute; left: 0; top: 100%; margin-top: .5rem; font-size: .78rem; color: var(--teal); }
.ca__status:empty { display: none; }
.ca.is-failed .ca__status { color: var(--ink); }

.ca--compact { margin-top: 2.2rem; max-width: 29rem; animation: fade 1.2s .75s var(--ease) both; margin-bottom: .6rem; }
.ca--compact .ca__value { font-size: .72rem; padding: .6rem .8rem; }
.ca--large .ca__value { font-size: clamp(.82rem, 2.2vw, 1.02rem); padding: 1rem 1.1rem; letter-spacing: .02em; }
.ca--large { margin-bottom: 1.6rem; }

@media (max-width: 479px) {
  .ca--compact .ca__value { font-size: .66rem; letter-spacing: -.01em; }
  .ca { grid-template-columns: auto minmax(0, 1fr); }
  .ca__copy { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); min-height: 50px; }
  .ca__label { border-right: 1px solid var(--line); }
}
@media (min-width: 960px) { .community__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); } .contract { margin-top: 3.2rem; } }

/* ---------- 12. Footer ---------- */
.footer { padding: 3rem 0 3.4rem; border-top: 1px solid var(--line); background: rgba(3, 5, 11, .82); }
.footer__grid { display: grid; gap: 1.8rem; align-items: start; }
.footer__brand { display: flex; align-items: center; gap: .9rem; }
.footer__brand img { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-teal); }
.footer__name { font-family: var(--f-head); font-weight: 700; letter-spacing: .02em; }
.footer__name span:last-child { color: var(--teal); margin-left: .4rem; font-weight: 500; }
.footer__tag { font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); font-family: var(--f-head); }
.footer__legal { color: var(--muted); font-size: .84rem; line-height: 1.65; max-width: 36rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--f-head); font-size: .85rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer__links a:hover { color: var(--teal); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: auto minmax(0, 1fr) auto; gap: 3rem; align-items: center; } .footer__links { justify-content: flex-end; } }

/* ---------- 13. Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 64px 16px 76px; opacity: 0; transition: opacity .3s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(2, 4, 9, .95); }
.lightbox__figure { position: relative; display: flex; flex-direction: column; align-items: center; gap: .9rem; max-width: 100%; max-height: 100%; }
.lightbox__figure img { max-width: min(96vw, 1500px); max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px -20px #000; }
.lightbox__figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; font-family: var(--f-head); font-size: .85rem; text-align: center; max-width: 90vw; }
#lbTitle { font-weight: 500; }
#lbMeta { color: var(--faint); letter-spacing: .16em; text-transform: uppercase; font-size: .7rem; align-self: center; }
.lightbox__count { position: absolute; left: 20px; top: 24px; font-family: var(--f-head); font-size: .74rem; letter-spacing: .2em; color: var(--muted); }
.lb-btn {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: rgba(7, 13, 27, .85); border: 0; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color .2s, box-shadow .2s, color .2s;
}
.lb-btn:hover { background: rgba(25, 216, 207, .16); box-shadow: inset 0 0 0 1px var(--line-teal); color: var(--cyan); }
.lb-btn .icon { width: 22px; height: 22px; }
.lb-btn--close { right: 16px; top: 14px; }
.lb-btn--prev, .lb-btn--next { bottom: 14px; }
.lb-btn--prev { left: calc(50% - 56px); }
.lb-btn--next { left: calc(50% + 8px); }
@media (min-width: 900px) {
  .lb-btn--prev, .lb-btn--next { top: 50%; bottom: auto; translate: 0 -50%; }
  .lb-btn--prev { left: 20px; } .lb-btn--next { left: auto; right: 20px; }
  .lightbox { padding: 56px 96px 70px; }
}
body.is-locked { overflow: hidden; }

/* ---------- 14. Motion & fallbacks ---------- */
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes figure-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { opacity: .3; transform: scale(.9); } 50% { opacity: .75; transform: scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translate3d(-1.5%, 0, 0); } to { transform: translate3d(1.5%, -2%, 0); } }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes wave { 0%, 100% { transform: scale(.82); } 50% { transform: scale(1.04); } }

/* Scroll reveals only apply when JS is running */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__xglow { opacity: .5; }
}
@media print { #stars, .cosmos, .nav { display: none; } }

/* Story: quote sits beside the artwork on desktop */
@media (min-width: 960px) {
  .story__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(3rem, 6vw, 6rem); }
  .story__visual { margin-inline: 0; width: 100%; }
  .story__grid .pull { margin-top: 0; padding: 0 0 0 clamp(1.5rem, 3vw, 3rem); border-top: 0; border-left: 1px solid var(--line-teal); }
  .story__grid .pull p { font-size: clamp(2.8rem, 4.9vw, 4.9rem); overflow-wrap: break-word; }
}
