/* ======================================================================
   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.6rem; max-width: 22em; font-family: var(--f-head); font-weight: 500; font-size: clamp(1.25rem, 2.1vw, 1.7rem); line-height: 1.3; letter-spacing: -.01em; color: #d7deee; animation: fade 1.2s .45s var(--ease) both; }
.hero__cta { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: .9rem; animation: fade 1.2s .6s var(--ease) both; }

/* Greeting bubble beside Groklet */
.hero__hello {
  position: absolute; z-index: 3; left: 58%; top: -2%; margin: 0; padding: .6rem .95rem; white-space: nowrap;
  font-family: var(--f-head); font-weight: 600; font-size: clamp(.95rem, 2vw, 1.25rem); line-height: 1.2; letter-spacing: -.01em; color: var(--ink);
  background: rgba(5, 10, 23, .9); border: 1px solid var(--line-teal);
  transform-origin: 0% 120%; animation: pop .7s 1.2s var(--ease) both;
}
.hero__hello::after {
  content: ""; position: absolute; left: 12%; bottom: -7px; width: 12px; height: 12px; background: #050a17; border: solid var(--line-teal); border-width: 0 1px 1px 0; rotate: 45deg;
}

.hero__figure { position: relative; order: -1; width: min(64vw, 320px); margin: .5rem auto 0; animation: figure-in 1.6s var(--ease) both; }
.hero__art { position: relative; aspect-ratio: 560 / 1084; }
.hero__art img, .hero__art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero__art video { opacity: 0; transition: opacity .5s; }
.hero__art video.is-playing { opacity: 1; }
.hero__art img.is-hidden { visibility: hidden; }
.hero__art { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); }
.hero__halo {
  position: absolute; left: 50%; top: 46%; width: 190%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(121, 82, 199, .34), rgba(54, 80, 190, .14) 48%, rgba(25, 216, 207, .06) 70%, transparent 100%);
}
.hero__orbits { position: absolute; left: 50%; top: 46%; width: 230%; height: auto; aspect-ratio: 1; translate: -50% -50%; overflow: visible; pointer-events: none; }
.orbit { transform-origin: 50px 50px; fill: none; stroke: rgba(54, 221, 244, .3); stroke-width: .12; }
.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__copy { margin-top: .5rem; }
  .hero__title { margin-top: .9rem; }
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 2rem; }
  .hero__figure { order: 0; width: auto; height: min(80vh, 800px); margin: 0 auto; }
  .hero__art { height: 100%; }
  .hero__hello { left: 74%; top: -1%; }
  .scrollcue { display: flex; }
}
@media (min-width: 900px) and (max-height: 700px) { .hero { padding-bottom: 3rem; } .hero__figure { height: 74vh; } }

/* ---------- 7. The proof ---------- */
.proof { padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.proof__glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 40% at 50% 55%, rgba(25, 216, 207, .06), transparent 70%), radial-gradient(40% 40% at 100% 10%, rgba(121, 82, 199, .12), transparent 70%); }
.proof__inner { position: relative; max-width: 780px; margin-inline: auto; text-align: center; }
.proof__inner .eyebrow { justify-content: center; }
.proof__inner .eyebrow::after { content: ""; width: 34px; height: 1px; background: var(--teal); flex: none; }
.proof__inner .display { font-size: clamp(2.6rem, 6vw, 4.8rem); }

.artifact { position: relative; margin-top: clamp(2rem, 4vw, 3rem); text-align: left; }
.artifact__frame {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line-teal); background: #000; cursor: zoom-in;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
  transition: border-color .3s;
}
.artifact__frame:hover { border-color: rgba(54, 221, 244, .65); }
.artifact__frame img { width: 100%; aspect-ratio: 1179 / 1114; }
.tick { position: absolute; width: 16px; height: 16px; border: 0 solid var(--cyan); pointer-events: none; }
.tick--tl { left: -5px; top: -5px; border-width: 1.5px 0 0 1.5px; }
.tick--br { right: -5px; bottom: -5px; border-width: 0 1.5px 1.5px 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 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin-top: 1rem; font-size: .82rem; color: var(--muted); }
.artifact__cap .textlink { margin-left: auto; }

.proof__about { margin: clamp(2.2rem, 4vw, 3.2rem) auto 0; max-width: 40rem; font-size: clamp(1.1rem, 1.9vw, 1.35rem); line-height: 1.65; color: #cfd7e8; text-wrap: pretty; }

/* ---------- 7b. Where next: two choices ---------- */
.choices { padding: 0 0 clamp(4.5rem, 8vw, 7rem); }
.choices__grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.choice {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem; min-height: clamp(190px, 24vw, 260px); padding: clamp(1.3rem, 2.4vw, 2rem);
  overflow: hidden; text-decoration: none; background: #050a17; box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transition: box-shadow .3s;
}
.choice__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform 1.2s var(--ease), opacity .4s; }
.choice::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(3, 5, 11, .1) 0%, rgba(3, 5, 11, .88) 85%); }
.choice__k { font-family: var(--f-head); font-weight: 500; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--teal); }
.choice__t { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 1.05; letter-spacing: -.02em; }
.choice__go {
  flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; 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);
}
.choice__go .icon { width: 1.2rem; height: 1.2rem; }
.choice:hover { box-shadow: inset 0 0 0 1px var(--line-teal); }
.choice:hover .choice__bg { transform: scale(1.05); opacity: .7; }
.choice:hover .choice__go { background: var(--teal); border-color: var(--teal); color: #021012; transform: translateY(-2px); }
.choice--join { box-shadow: inset 0 0 0 1px rgba(54, 221, 244, .45); }
.choice--join::before { background: linear-gradient(180deg, rgba(3, 5, 11, .05) 0%, rgba(3, 5, 11, .85) 85%), radial-gradient(90% 90% at 0% 100%, rgba(25, 216, 207, .22), transparent 60%); }
.choice:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
@media (min-width: 760px) { .choices__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 8. 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 { max-width: 46rem; }
.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); }


/* ---------- 9. Contract address control (footer) ---------- */
.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; }

@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); }
}

/* ---------- 9b. Community ---------- */
.community { padding: clamp(3rem, 6vw, 5rem) 0 clamp(4.5rem, 8vw, 7rem); }
.community .display { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.links { display: grid; gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(2rem, 4vw, 3rem); }
.links a {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 92px; padding: 1.1rem 1.3rem; text-decoration: none;
  background: linear-gradient(160deg, rgba(17, 21, 42, .7), rgba(7, 13, 27, .7)); box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  transition: box-shadow .3s, background-color .3s;
}
.links a:hover { box-shadow: inset 0 0 0 1px var(--line-teal); background: linear-gradient(160deg, rgba(25, 216, 207, .1), rgba(7, 13, 27, .8)); }
.links a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.links__icon { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; color: var(--cyan); border: 1px solid rgba(54, 221, 244, .45); }
.links__icon .icon { width: 1.3rem; height: 1.3rem; }
.links strong { display: block; font-family: var(--f-head); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; }
.links small { display: block; margin-top: .1rem; color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.links__go { color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.links a:hover .links__go { color: var(--teal); transform: translate(3px, -3px); }
@media (min-width: 760px) { .links { grid-template-columns: repeat(3, minmax(0, 1fr)); } .links a { min-height: 150px; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: end; } .links__icon { grid-column: 1; } .links__text { grid-column: 1; grid-row: 2; } .links__go { grid-column: 2; grid-row: 1; align-self: start; } }

/* ---------- 10. Footer ---------- */
.footer { padding: 2.6rem 0 3.2rem; border-top: 1px solid var(--line); background: rgba(3, 5, 11, .82); }
.footer__grid { display: grid; gap: 1.6rem; }
.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 .ca--compact { margin: 0 0 .6rem; max-width: 31rem; animation: none; }
.footer__legal { color: var(--muted); font-size: .82rem; line-height: 1.65; max-width: 38rem; }
.footer__side { display: grid; gap: .3rem; justify-items: start; min-width: 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: .2rem 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: minmax(0, 1fr) auto; align-items: start; column-gap: 4rem; }
  .footer__side { justify-items: end; }
  .footer__links { justify-content: flex-end; }
}

/* ---------- 11. 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; }

/* ---------- 12. 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 pop { from { opacity: 0; transform: scale(.82) translateY(6px); } 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; } }

/* 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; }
}
@media print { #stars, .cosmos, .nav { display: none; } }

