/* The front door. Covers the app until you go in. */

.landing {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior: contain;
  background: var(--void);
  transform-origin: center;
}

.landing[hidden] { display: none; }

.landing__inner {
  position: relative;
  min-height: 100svh;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* the landing sits above the body's star field, so it carries its own */
.landing::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 70% 22%, var(--tint), transparent 70%),
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 74% 12%, rgba(201, 167, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 33% 61%, rgba(110, 242, 255, 0.7), transparent),
    radial-gradient(1px 1px at 88% 72%, rgba(255, 168, 226, 0.8), transparent),
    radial-gradient(1px 1px at 51% 88%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 8% 79%, rgba(255, 211, 77, 0.7), transparent),
    radial-gradient(1px 1px at 64% 44%, rgba(110, 242, 255, 0.6), transparent),
    linear-gradient(180deg, var(--void-2), var(--void) 70%);
}

/* ---- nav ---------------------------------------------------------------- */

.lnav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: var(--void);
  border-bottom: 2px solid var(--void);
  box-shadow: 0 2px 0 var(--edge);
}

.lnav__mark {
  font-family: var(--font-pixel);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--hot);
  text-shadow: 2px 2px 0 var(--hot-deep);
}

.lnav__links {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  font-family: var(--font-pixel);
  font-size: var(--step-0);
}

.lnav__links a {
  color: var(--ghost-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.lnav__links a:hover {
  color: var(--hot-lit);
  border-bottom-color: var(--hot);
}

/* ---- hero --------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: calc(100svh - 132px);
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2.5rem) 0 clamp(2rem, 5vh, 4rem);
}

.hero__copy > * {
  animation: rise 700ms var(--ease-out) backwards;
}

.hero__copy > *:nth-child(1) { animation-delay: 60ms; }
.hero__copy > *:nth-child(2) { animation-delay: 140ms; }
.hero__copy > *:nth-child(3) { animation-delay: 240ms; }
.hero__copy > *:nth-child(4) { animation-delay: 340ms; }

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.35em 0.6em;
  font-family: var(--font-pixel);
  font-size: var(--step-0);
  color: var(--void);
  background: var(--lav);
  border: 2px solid var(--void);
  box-shadow: var(--bevel);
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-pixel);
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ghost);
  text-shadow: 4px 4px 0 var(--hot-deep), 8px 8px 0 rgba(6, 3, 12, 0.55);
}

.hero__title span { color: var(--hot); }

.hero__sub {
  margin: 0 0 1.6rem;
  max-width: 36ch;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.65rem);
  line-height: 1.32;
  color: var(--ghost-dim);
}

.hero__sub b {
  color: var(--cyan);
  font-weight: 400;
}

.hero__cta a.ghost-btn { text-decoration: none; }

.hero__cta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-huge {
  appearance: none;
  padding: 0.85em 1.6em;
  border: 3px solid var(--void);
  background: var(--hot);
  color: var(--void);
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--hot-deep), var(--bevel);
  transition: transform 90ms var(--ease-out), box-shadow 90ms, background 200ms;
}

.btn-huge:hover { background: var(--hot-lit); }

.btn-huge:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0), var(--bevel-in);
}

.hero__art {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: min(46vh, 26rem);
  animation: rise 900ms var(--ease-out) 200ms backwards;
}

.hero__parcel svg {
  width: min(28vw, 21rem);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.6));
  animation: bob 5s ease-in-out infinite;
}

/* she leans out from behind the parcel */
.hero__girl {
  position: absolute;
  top: 4%;
  right: 6%;
  width: min(21vw, 16rem);
  transform: rotate(4deg);
  animation: bob 6.5s ease-in-out infinite reverse;
}

.hero__girl svg {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--void);
  background: linear-gradient(160deg, var(--panel-2), var(--void-2));
  box-shadow: 6px 6px 0 var(--hot-deep), var(--bevel);
}

.hero__tag {
  position: absolute;
  left: -0.6rem;
  bottom: -0.8rem;
  padding: 0.25em 0.6em;
  background: var(--hot);
  color: var(--void);
  border: 2px solid var(--void);
  box-shadow: var(--bevel);
  font-family: var(--font-pixel);
  font-size: var(--step-0);
}

.hero__parcel {
  position: relative;
  z-index: 2;
  margin: 14% 22% 0 0;
}

.hero__art::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(34vw, 26rem);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  filter: blur(18px);
  opacity: 0.7;
}

/* ---- marquee (the only one on the page) --------------------------------- */

.marquee {
  display: flex;
  overflow: hidden;
  margin: 0 calc(clamp(1rem, 4vw, 3rem) * -1);
  border-top: 2px solid var(--void);
  border-bottom: 2px solid var(--void);
  background: var(--hot);
  color: var(--void);
  font-family: var(--font-pixel);
  font-size: var(--step-1);
  padding: 0.5rem 0;
  user-select: none;
}

.marquee__track {
  display: flex;
  flex: none;
  gap: 2.5rem;
  padding-right: 2.5rem;
  white-space: nowrap;
  animation: slide 38s linear infinite;
}

/* ---- section frame ------------------------------------------------------ */

.lsec {
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.lsec.is-in {
  opacity: 1;
  transform: none;
}

.lsec__head {
  margin: 0 0 1.6rem;
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ghost);
  text-shadow: 3px 3px 0 var(--hot-deep);
}

.lsec__body {
  max-width: 52ch;
  margin: 0 0 1.6rem;
  color: var(--ghost-dim);
  line-height: 1.5;
}

.win {
  border: 2px solid var(--void);
  background: var(--panel);
  box-shadow: var(--hard-shadow), var(--bevel);
}

.win__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: var(--hot-deep);
  border-bottom: 2px solid var(--void);
  font-family: var(--font-pixel);
  font-size: var(--step-0);
  color: var(--ghost);
}

.win__dots {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.win__dots i {
  width: 10px;
  height: 10px;
  background: var(--lav);
  border: 2px solid var(--void);
}

.win__body { padding: clamp(0.9rem, 2vw, 1.4rem); }

/* ---- contract box ------------------------------------------------------- */

.ca {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  max-width: 52rem;
}

.ca__value {
  padding: 0.9rem 1rem;
  border: 2px solid var(--void);
  border-right: 0;
  background: var(--void-2);
  box-shadow: var(--bevel-in);
  font-size: var(--step-1);
  color: var(--cyan);
  overflow-x: auto;
  white-space: nowrap;
}

.ca__copy {
  appearance: none;
  padding: 0 1.4em;
  border: 2px solid var(--void);
  background: var(--lav);
  color: var(--void);
  font-family: var(--font-pixel);
  font-size: var(--step-0);
  cursor: pointer;
  box-shadow: var(--bevel);
}

.ca__copy:hover { background: var(--hot-lit); }

/* ---- how: one wide cell, two narrow ------------------------------------- */

.how {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.how > :first-child { grid-column: 1 / -1; }

.how__step { padding: clamp(1rem, 2.5vw, 1.6rem); }

.how__wide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}

.how__live {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--void);
  background: var(--void-2);
  box-shadow: var(--bevel-in);
}

.how__live div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.how__live dt {
  font-family: var(--font-pixel);
  font-size: var(--step-0);
  color: var(--ghost-faint);
}

.how__live dd {
  margin: 0;
  font-size: var(--step-2);
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.how__verb {
  margin: 0 0 0.5rem;
  font-family: var(--font-pixel);
  font-size: var(--step-2);
  color: var(--hot-lit);
}

.how__step p {
  margin: 0;
  max-width: 46ch;
  color: var(--ghost-dim);
  line-height: 1.5;
}

.how__step p b { color: var(--gold); font-weight: 400; }

/* ---- tokenomics bars ---------------------------------------------------- */

.split-chart {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.split-chart li {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-pixel);
  font-size: var(--step-0);
  color: var(--ghost-dim);
}

.split-chart .track {
  height: 18px;
  border: 2px solid var(--void);
  background: var(--void-2);
  box-shadow: var(--bevel-in);
  overflow: hidden;
}

.split-chart .track span {
  display: block;
  height: 100%;
  background: var(--hot);
  transform-origin: left;
  animation: grow 900ms var(--ease-out) backwards;
}

.split-chart small {
  display: block;
  font-size: 0.58rem;
  line-height: 1.3;
  opacity: 0.6;
}

.split-chart li:nth-child(2) .track span { background: var(--cyan); }
.split-chart li:nth-child(3) .track span { background: var(--lav); }
.split-chart li:nth-child(4) .track span { background: var(--up); }
.split-chart li:nth-child(5) .track span { background: var(--gold); }

.split-chart b {
  justify-self: end;
  color: var(--ghost);
  font-weight: 400;
}

/* ---- vault wall --------------------------------------------------------- */

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wall li {
  border: 2px solid var(--void);
  background: var(--panel-2);
  box-shadow: var(--bevel);
}

.wall svg { display: block; width: 100%; height: auto; }

.wall figcaption {
  display: grid;
  gap: 0.1rem;
  padding: 0.4rem 0.5rem 0.5rem;
  border-top: 2px solid var(--void);
  font-family: var(--font-pixel);
  font-size: var(--step-0);
  color: var(--ghost-dim);
}

.wall .floor { color: var(--gold); }

/* ---- fairness terminal -------------------------------------------------- */

.term {
  padding: clamp(0.9rem, 2vw, 1.4rem);
  background: var(--void-2);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--up);
  overflow-x: auto;
}

.term .dim { color: var(--ghost-faint); }
.term .out { color: var(--cyan); word-break: break-all; }

.term .caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  vertical-align: -0.15em;
  background: var(--up);
  animation: blink 1.1s steps(2) infinite;
}

/* ---- cope corner -------------------------------------------------------- */

.cope {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}

.cope dt {
  margin-bottom: 0.3rem;
  font-family: var(--font-pixel);
  font-size: var(--step-1);
  color: var(--hot-lit);
}

.cope dd {
  margin: 0;
  color: var(--ghost-dim);
  line-height: 1.5;
}

/* ---- footer ------------------------------------------------------------- */

.lfoot {
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) 0 clamp(3rem, 8vh, 5rem);
  border-top: 2px solid var(--edge);
  display: grid;
  gap: 1.2rem;
  justify-items: start;
}

.lfoot__real {
  margin: 0;
  max-width: 56ch;
  font-family: var(--font-flavour);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ghost-faint);
}

/* ---- sparkles ----------------------------------------------------------- */

.spark {
  position: fixed;
  z-index: 45;
  width: 10px;
  height: 10px;
  pointer-events: none;
  background: var(--hot-lit);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  will-change: transform, opacity;
}

/* ---- the way in --------------------------------------------------------- */

/* CRT power-off: the page collapses to a line, then the app comes up. */
.landing.is-leaving {
  animation: crt-off 620ms cubic-bezier(0.6, 0, 0.9, 0.2) forwards;
  pointer-events: none;
}

.shell.is-arriving {
  animation: boot-in 620ms var(--ease-out) backwards;
}

@keyframes crt-off {
  0% { transform: scale(1); filter: brightness(1); opacity: 1; }
  55% { transform: scaleX(1.04) scaleY(0.008); filter: brightness(3.2); opacity: 1; }
  75% { transform: scaleX(0.5) scaleY(0.004); filter: brightness(5); opacity: 1; }
  100% { transform: scaleX(0) scaleY(0.002); filter: brightness(6); opacity: 0; }
}

@keyframes boot-in {
  0% { transform: scaleY(0.01); filter: brightness(4); opacity: 0.4; }
  40% { transform: scaleY(1); filter: brightness(1.6); opacity: 1; }
  100% { transform: none; filter: none; opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-3%) rotate(1.5deg); }
}

@keyframes slide {
  to { transform: translateX(-50%); }
}

@keyframes grow {
  from { transform: scaleX(0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---- narrow ------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-top: 1.5rem;
    gap: 2rem;
  }

  .hero__art { order: -1; min-height: 40vh; }
  .hero__parcel svg { width: min(52vw, 15rem); }
  .hero__girl { width: min(34vw, 9.5rem); top: 0; right: 2%; }
  .hero__parcel { margin: 16% 26% 0 0; }
  .hero__sub { max-width: none; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how > :first-child { grid-column: auto; }
  .ca { grid-template-columns: minmax(0, 1fr); }
  .ca__value { border-right: 2px solid var(--void); }
  .ca__copy { padding: 0.7em; }
  .split-chart li { grid-template-columns: 7.5rem minmax(0, 1fr) 2.8rem; }
  .how__wide { grid-template-columns: minmax(0, 1fr); }
  .lnav__links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__copy > *,
  .hero__art,
  .hero__art svg,
  .marquee__track,
  .split-chart .track span,
  .term .caret { animation: none; }

  .lsec { opacity: 1; transform: none; transition: none; }
  .landing.is-leaving { animation: fade-out 220ms linear forwards; }
  .shell.is-arriving { animation: none; }
  .spark { display: none; }
}

@keyframes fade-out {
  to { opacity: 0; }
}
