/* =========================================================================
   EMOJIVERSE COIN — core design system
   Tokens, reset, layout shell, and shared components.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces — cool-tinted darks, never pure black */
  --ink-1000: #05070a;
  --ink-900: #080b10;
  --ink-850: #0b0f15;
  --ink-800: #0f141b;
  --ink-700: #141a23;

  /* Hairlines */
  --line-soft: rgba(233, 238, 246, .06);
  --line: rgba(233, 238, 246, .11);
  --line-strong: rgba(233, 238, 246, .2);

  /* Text */
  --text: #e9eef6;
  --text-2: #a4aebe;
  --text-3: #6c7686;

  /* Accents — one warm signal against a cool field */
  --gold: #d8a63f;
  --gold-bright: #edbc58;
  --gold-wash: rgba(216, 166, 63, .12);
  --steel: #7ea6bd;

  /* Type */
  --font-sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --shell: 1240px;
  --section-y: clamp(5rem, 11vh, 8.5rem);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 72px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink-1000);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: rgba(216, 166, 63, .25);
}

/* ---------- Atmosphere: fixed, non-interactive depth layers ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmosphere__glow {
  position: absolute;
  top: -34vh;
  left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      rgba(48, 74, 112, .38) 0%,
      rgba(24, 38, 64, .22) 38%,
      transparent 70%);
}

.atmosphere__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(233, 238, 246, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233, 238, 246, .045) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 12%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 12%, #000 0%, transparent 78%);
}

.atmosphere__grain {
  position: absolute;
  inset: -50%;
  opacity: .035;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
}

/* ---------- Shell & rules ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 300;
  padding: .75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-1000);
  background: var(--gold);
  transform: translate(-50%, -110%);
  transition: transform .2s var(--ease);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline-offset: -4px;
}

/* ---------- Typography primitives ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--steel);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.display {
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.display em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.01em;
  color: var(--gold-bright);
}

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  color: var(--text-2);
}

.prose p {
  color: var(--text-2);
  line-height: 1.82;
}

.prose p + p {
  margin-top: 1.15rem;
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 1.6rem;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text-3);
}

.prose > .btn-row {
  margin-top: 1.6rem;
}

.eyebrow + .tags {
  margin-top: 1.2rem;
}

.quote {
  margin: 2rem 0;
  padding-left: 1.6rem;
  border-left: 1px solid var(--gold);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -.015em;
  color: var(--text);
}

.glyph {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}

.nav.is-stuck {
  background: rgba(8, 11, 16, .82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  min-height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-right: auto;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--ink-900);
}

.brand__type {
  display: grid;
  gap: 1px;
}

.brand__name {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand__ticker {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--text-3);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
}

.nav__links a {
  position: relative;
  font-size: .85rem;
  color: var(--text-2);
  transition: color .2s var(--ease);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--text);
}

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__cta {
  display: inline-flex;
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
  cursor: pointer;
}

.nav__toggle-bars {
  display: grid;
  gap: 3px;
  width: 14px;
}

.nav__toggle-bars i {
  height: 1px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bars i:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bars i:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bars i:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

.nav__drawer {
  display: none;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .82rem 1.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: .86rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--btn-fg);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease),
    color .25s var(--ease), transform .25s var(--ease);
}

.btn svg {
  flex: none;
  transition: transform .3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  --btn-fg: #1b1405;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.btn--primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn--ghost:hover {
  border-color: var(--line-strong);
  background: rgba(233, 238, 246, .05);
}

.btn--small {
  padding: .62rem 1rem;
  font-size: .78rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(3rem, 7vh, 5rem);
}

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__index {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.section__title {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

.section__title + .lede {
  max-width: 46ch;
  margin-top: 1.1rem;
}

/* ---------- Surfaces ---------- */
.card {
  position: relative;
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  background: linear-gradient(160deg, rgba(233, 238, 246, .045), rgba(233, 238, 246, .012));
  border: 1px solid var(--line);
  border-radius: 3px;
}

.card--flush {
  background: none;
  border-color: var(--line-soft);
}

/* ---------- Data table (meaning map) ---------- */
.datatable {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.datatable caption {
  padding-bottom: .9rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
}

.datatable th,
.datatable td {
  padding: .78rem .6rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: .88rem;
  font-weight: 400;
  vertical-align: middle;
}

.datatable thead th {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom-color: var(--line);
}

.datatable tbody tr {
  transition: background-color .2s var(--ease);
}

.datatable tbody tr:hover {
  background: rgba(233, 238, 246, .03);
}

.datatable .glyph {
  font-size: 1.35rem;
}

.datatable td:first-child {
  width: 3.2rem;
}

.datatable .datatable__key {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--text);
}

.datatable .datatable__note {
  color: var(--text-3);
}

/* ---------- Spec sheet ---------- */
.spec {
  display: grid;
  gap: 0;
}

.spec__row {
  display: grid;
  grid-template-columns: minmax(9rem, 22%) 1fr;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.spec__row:first-child {
  border-top: 1px solid var(--line);
}

.spec__key {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: .18rem;
}

.spec__val {
  font-size: 1rem;
  color: var(--text);
}

.spec__val small {
  display: block;
  margin-top: .3rem;
  font-size: .84rem;
  color: var(--text-3);
}

/* ---------- Metric strip ---------- */
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.metric__value {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.metric__label {
  margin-top: .3rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- Tag list ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tags li {
  padding: .45rem .8rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--text-2);
}

/* ---------- Footer ---------- */
.footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  border-top: 1px solid var(--line);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

.footer__blurb {
  max-width: 34ch;
  margin-top: 1.1rem;
  font-size: .88rem;
  color: var(--text-3);
  line-height: 1.7;
}

.footer__label {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.1rem;
}

.footer__list {
  display: grid;
  gap: .65rem;
  font-size: .88rem;
}

.footer__list a {
  color: var(--text-2);
  transition: color .2s var(--ease);
}

.footer__list a:hover {
  color: var(--gold);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.disclaimer {
  max-width: 78ch;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  font-size: .78rem;
  line-height: 1.75;
  color: var(--text-3);
}

.disclaimer b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in,
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  :root {
    --nav-h: 64px;
  }

  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__drawer {
    display: grid;
    gap: .35rem;
    padding: 0 var(--gutter);
    max-height: 0;
    overflow: hidden;
    background: rgba(8, 11, 16, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid transparent;
    transition: max-height .4s var(--ease), padding .4s var(--ease),
      border-color .4s var(--ease);
  }

  .nav__drawer.is-open {
    max-height: 60vh;
    padding-block: 1rem 1.5rem;
    border-top-color: var(--line);
    overflow-y: auto;
  }

  .nav__drawer a {
    padding: .7rem 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: .95rem;
    color: var(--text-2);
  }

  .nav__drawer .btn {
    margin-top: 1rem;
    justify-content: center;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .section__head {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  .spec__row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .footer__top {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
