/* COQ INU — dark only, by design */
:root {
  --ink: #08080A;
  --smoke: #16161A;
  --line: rgba(237, 234, 228, .12);
  --bone: #EDEAE4;
  --mute: #8A8780;
  --red: #FF3B30;
  --display: "Unbounded", system-ui, sans-serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background:
    radial-gradient(60vw 50vh at 50% 110%, rgba(255, 59, 48, .10), transparent 70%),
    radial-gradient(40vw 40vh at 50% 40%, rgba(237, 234, 228, .045), transparent 70%),
    var(--ink);
  background-attachment: fixed;
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--red); color: var(--ink); }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ───────── Layers ───────── */
.stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}
main, .foot { position: relative; z-index: 2; }
.hero__word { z-index: 0; }  /* sits under the WebGL canvas */

.grain {
  position: fixed; inset: -50%;
  z-index: 50; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 3%); }
  40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 8%); }
  80% { transform: translate(7%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ───────── Loader ───────── */
.loader { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.loader__half { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--ink); }
.loader__half--top { top: 0; border-bottom: 1px solid var(--line); }
.loader__half--bottom { bottom: 0; }
.loader__ui {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px;
}
.loader__count { font-size: clamp(48px, 9vw, 120px); letter-spacing: -.02em; color: var(--bone); }
.loader__label { color: var(--mute); }
.loader.is-done { display: none; }

/* ───────── Nav ───────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
}
/* text inverts over whatever is behind it; the coin keeps its colours */
.nav__word, .nav__links { mix-blend-mode: difference; }
.nav__mark { display: inline-flex; align-items: center; gap: 10px; font: 800 15px/1 var(--display); letter-spacing: -.02em; }
.nav__coin { width: 28px; height: 28px; flex: none; transition: transform .6s var(--ease); }
.nav__mark:hover .nav__coin { transform: rotate(-20deg) scale(1.08); }
.nav__word span { font-weight: 300; margin-left: .3em; opacity: .7; }
.nav__links { display: flex; gap: 32px; }
.nav__links a { position: relative; opacity: .7; transition: opacity .3s; }
.nav__links a:hover { opacity: 1; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ───────── Buttons ───────── */
.btn {
  --x: 50%; --y: 50%;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 28px;
  border-radius: 999px;
  background: var(--bone); color: var(--ink);
  font: 500 14px/1 var(--sans); letter-spacing: -.005em;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; z-index: -1;
  left: var(--x); top: var(--y);
  width: 260%; aspect-ratio: 1; border-radius: 50%;
  background: var(--red);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: translate(-50%, -50%) scale(1); }
.btn:hover { color: var(--bone); }
.btn span { display: inline-block; transition: color .3s; }
.btn--ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px rgba(237, 234, 228, .3); }
.btn--sm { height: 38px; padding: 0 18px; font-size: 13px; }

/* ───────── Shared ───────── */
.label { display: flex; align-items: center; gap: 12px; color: var(--mute); }
.label span { color: var(--red); }
.label::after { content: ""; flex: 0 0 48px; height: 1px; background: var(--line); }

.ca {
  display: inline-flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 6px 0 16px;
  border-radius: 999px;
  background: rgba(22, 22, 26, .55);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--line);
  max-width: 100%;
  transition: box-shadow .3s;
}
.ca:hover { box-shadow: inset 0 0 0 1px rgba(255, 59, 48, .6); }
.ca__k { color: var(--red); }
.ca__v { color: var(--bone); letter-spacing: .06em; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ca__s { padding: 7px 12px; border-radius: 999px; background: var(--bone); color: var(--ink); transition: background .3s, color .3s; }
.ca.is-copied .ca__s { background: var(--red); color: var(--bone); }
.ca--plain { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-left: 0; box-shadow: none; }
.ca--plain .ca__s { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--bone); }

/* ───────── Hero ───────── */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__word {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font: 900 min(28vw, 64vh)/.8 var(--display);
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 234, 228, .1);
  background: linear-gradient(0deg, var(--bone) 0 var(--fill, 0%), transparent var(--fill, 0%) 100%);
  -webkit-background-clip: text; background-clip: text;
  user-select: none; pointer-events: none;
  translate: 0 -2vh;
}
.hero__word span { display: inline-block; }
.hero__ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero__ui > * { pointer-events: auto; }
.corner { position: absolute; color: var(--mute); }
.corner--tl { top: 84px; left: var(--gutter); }
.chain {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px 0 4px; border-radius: 999px;
  color: var(--bone);
  background: rgba(22, 22, 26, .55);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chain__logo { width: 20px; height: 20px; flex: none; }
.corner--tr { top: 84px; right: var(--gutter); }
.hero__bottom {
  position: absolute; left: var(--gutter); bottom: 32px;
  display: flex; flex-direction: column; gap: 20px; pointer-events: auto;
}
.hero__line { font: 300 clamp(20px, 2.2vw, 30px)/1.1 var(--sans); letter-spacing: -.02em; }
.hero__line em { font-style: normal; font-weight: 500; color: var(--red); }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .ca { position: absolute; left: 50%; bottom: 40px; translate: -50% 0; }

@media (max-width: 900px) {
  .hero .ca { left: var(--gutter); right: var(--gutter); transform: none; bottom: auto; top: 120px; translate: none; justify-content: space-between; }
  .corner--tl, .corner--tr { top: 70px; }
  .corner--tl { top: 64px; }
  .hero__bottom { right: var(--gutter); }
}

/* ───────── Spec ───────── */
.spec { position: relative; height: 100svh; }
.spec__inner {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(560px, 46vw);
  display: flex; flex-direction: column; gap: 28px;
}
.spec__rows { list-style: none; border-top: 1px solid var(--line); }
.spec__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.spec__row span { color: var(--mute); }
.spec__row b { font: 600 clamp(28px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.spec__row:first-child b { color: var(--red); }
.spec__note { color: var(--mute); }
@media (max-width: 900px) {
  .spec__inner { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 48px; transform: none; }
  .spec__row { padding: 16px 0; }
}

/* ───────── Manifesto ───────── */
.manifesto { position: relative; height: 100svh; display: grid; place-items: center; }
.manifesto__inner { width: min(1180px, 100% - 2 * var(--gutter)); display: flex; flex-direction: column; gap: 40px; }
.manifesto__text {
  font: 500 clamp(30px, 5.2vw, 84px)/1.02 var(--display);
  letter-spacing: -.045em;
}
.manifesto__text .w { opacity: .14; }
.manifesto__sign { font: 300 clamp(18px, 1.8vw, 24px)/1 var(--sans); letter-spacing: -.01em; }
.manifesto__sign em { font-style: normal; color: var(--red); }

/* ───────── Swap ───────── */
.swap {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: 1fr minmax(320px, 440px); align-items: center;
  gap: 48px 64px;
  padding: 120px var(--gutter) 80px;
  max-width: 1280px; margin: 0 auto;
}
.swap__head { display: flex; flex-direction: column; gap: 28px; }
.swap__title { font: 600 clamp(40px, 6vw, 96px)/.95 var(--display); letter-spacing: -.055em; }
.swap__title em { font-style: normal; color: var(--red); white-space: nowrap; }
.swap__panel {
  position: relative;
  border-radius: 24px; padding: 8px;
  background: linear-gradient(180deg, rgba(30, 30, 35, .62), rgba(14, 14, 17, .72));
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(237, 234, 228, .1), 0 40px 120px -40px rgba(255, 59, 48, .35);
  min-height: 0;
}
.swap__panel::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, rgba(255, 59, 48, .9) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
}
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.swap__mount { min-height: 420px; }
.swap__skeleton { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.swap__skeleton i {
  display: block; height: 64px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(237, 234, 228, .04), rgba(237, 234, 228, .09), rgba(237, 234, 228, .04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.swap__skeleton i.tall { height: 140px; }
.swap__skeleton i.btnish { height: 52px; border-radius: 999px; margin-top: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.swap__fallback { display: grid; place-items: center; gap: 16px; padding: 40px; min-height: 420px; align-content: center; text-align: center; color: var(--mute); }
.swap__fallback[hidden] { display: none; }
.ca--center { grid-column: 1 / -1; justify-self: center; }
@media (max-width: 900px) {
  .swap { grid-template-columns: minmax(0, 1fr); padding-top: 100px; }
  .swap > * { min-width: 0; }
  .swap__panel { padding: 4px; }
  .ca--center { justify-self: stretch; justify-content: space-between; }
}

/* ───────── Footer ───────── */
.foot { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding-top: 30vh; }
.foot__grid {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap;
  padding: 0 var(--gutter) 40px;
  border-bottom: 1px solid var(--line);
}
.foot__social { display: flex; flex-direction: column; }
.foot__social a {
  font: 600 clamp(36px, 5vw, 72px)/1.05 var(--display); letter-spacing: -.05em;
  display: inline-flex; gap: .2em; align-items: baseline;
  transition: color .3s, transform .5s var(--ease);
}
.foot__social a i { font-style: normal; font-size: .45em; color: var(--red); transition: transform .5s var(--ease); }
.foot__social a:hover { color: var(--red); transform: translateX(10px); }
.foot__social a:hover i { transform: translate(4px, -4px); }
.foot__meta { display: flex; flex-direction: column; gap: 14px; color: var(--mute); max-width: 440px; text-transform: none; letter-spacing: .04em; font-size: 12px; }
.foot__meta .ca { font-size: 11px; }
.foot__word {
  font: 900 34vw/.74 var(--display); letter-spacing: -.07em;
  text-align: center; white-space: nowrap;
  margin-bottom: -6vw; padding-top: 2vw;
  color: transparent;
  background: linear-gradient(180deg, rgba(237, 234, 228, .14), rgba(237, 234, 228, 0) 85%);
  -webkit-background-clip: text; background-clip: text;
  user-select: none; pointer-events: none; /* sits over the links above it */
}

/* ───────── Toast ───────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 85;
  padding: 12px 18px; border-radius: 999px;
  background: var(--bone); color: var(--ink);
  transform: translate(-50%, 200%); visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s .5s;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--ease); }

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  .grain, .swap__panel::before, .swap__skeleton i { animation: none; }
  .manifesto__text .w { opacity: 1; }
  .hero__word { --fill: 100%; color: rgba(237, 234, 228, .06); }
}
