:root {
  --bg: #050705;
  --panel: #090d09;
  --ink: #f2f7f2;
  --muted: #8f9b90;
  --line: rgba(191, 255, 203, 0.2);
  --green: #39ff64;
  --green-soft: #7dff96;
  --green-dark: #0b5c20;
  --hero-x: 0px;
  --hero-y: 0px;
  --back-x: 0px;
  --back-y: 0px;
  --hero-ry: 0deg;
  --hero-rx: 0deg;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

html {
  overflow-x: hidden;
}

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  background:
    linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px),
    radial-gradient(circle at 70% 54%, rgba(57,255,100,0.12), transparent 26%),
    #050705;
  background-size: 52px 52px, 52px 52px, auto, auto;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

#marketFx {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
}

.screen-vignette,
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.screen-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.55), transparent 14%, transparent 86%, rgba(0,0,0,0.55)),
    linear-gradient(0deg, rgba(0,0,0,0.5), transparent 18%, transparent 82%, rgba(0,0,0,0.42));
}

.scanlines {
  opacity: 0.17;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 4px
  );
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 3vw, 54px);
  border-bottom: 1px solid rgba(125,255,150,0.18);
  background: linear-gradient(180deg, rgba(5,7,5,0.97), rgba(5,7,5,0.74));
  backdrop-filter: blur(8px);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-index {
  color: var(--muted);
}

.brand-ticker {
  color: var(--green);
}

.market-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b9c4ba;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.18em;
}

.market-status i {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(57,255,100,0.92);
  animation: statusBlink 1.7s steps(1, end) infinite;
}

.stage {
  position: relative;
  z-index: 2;
  width: min(1520px, 100%);
  height: 100svh;
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(350px, 0.9fr) minmax(470px, 1.1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 84px);
  padding: 98px clamp(110px, 10vw, 170px) 74px;
}

.hero-copy {
  position: relative;
  z-index: 8;
  align-self: center;
  max-width: 650px;
  transform: translateY(-2vh);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font: 700 clamp(10px, 0.8vw, 13px)/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.24em;
}

.hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", Arial, sans-serif;
  font-size: clamp(78px, 9.7vw, 172px);
  font-weight: 900;
  line-height: 0.77;
  letter-spacing: -0.052em;
  text-transform: uppercase;
  text-shadow: 0 10px 42px rgba(0,0,0,0.58);
}

.hero-copy h1::first-line {
  color: #dce5dd;
}

.title-rule {
  width: min(440px, 92%);
  height: 8px;
  margin-top: 30px;
  background: linear-gradient(90deg, var(--green) 0 24%, rgba(57,255,100,0.18) 24% 100%);
  box-shadow: 0 0 18px rgba(57,255,100,0.13);
}

.ticker-line {
  margin: 14px 0 0;
  color: var(--muted);
  font: 700 clamp(11px, 1vw, 15px)/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.23em;
}

.portrait {
  position: relative;
  justify-self: end;
  width: min(43vw, 700px);
  aspect-ratio: 0.9 / 1;
  display: grid;
  place-items: end center;
  perspective: 1100px;
}

.portrait-backdrop {
  position: absolute;
  inset: 8% 3% 3% 10%;
  border: 1px solid rgba(125,255,150,0.22);
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(57,255,100,0.16) 50%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, rgba(57,255,100,0.12) 50%, transparent 50.3%);
  box-shadow: inset 0 0 100px rgba(0,0,0,0.64);
  transform: translate(var(--back-x), var(--back-y));
  transition: transform 0.18s ease-out;
}

.portrait-frame {
  position: relative;
  width: 92%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-top: 2px solid rgba(235,255,238,0.88);
  border-right: 2px solid var(--green);
  border-bottom: 8px solid var(--green-dark);
  border-left: 2px solid rgba(235,255,238,0.88);
  background: #020302;
  box-shadow:
    0 0 0 1px rgba(57,255,100,0.12),
    0 26px 80px rgba(0,0,0,0.62),
    0 0 60px rgba(57,255,100,0.12);
  transform:
    translate3d(var(--hero-x), var(--hero-y), 0)
    rotateY(var(--hero-ry))
    rotateX(var(--hero-rx));
  transition: transform 0.18s ease-out;
  animation: frameBreath 5.5s ease-in-out infinite;
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(57,255,100,0.22), transparent 1.5%, transparent 98.5%, rgba(57,255,100,0.22)),
    linear-gradient(180deg, transparent 0 72%, rgba(57,255,100,0.055) 100%);
  mix-blend-mode: screen;
}

.hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.hero-main {
  z-index: 3;
  filter: saturate(0.9) contrast(1.07) brightness(0.92);
  transform: scale(1.018);
  animation: heroBreath 5.5s ease-in-out infinite;
}

.hero-shadow {
  z-index: 2;
  opacity: 0.48;
  filter: sepia(1) hue-rotate(70deg) saturate(4) contrast(1.4);
  transform: translate(7px, 0) scale(1.02);
  mix-blend-mode: screen;
  animation: shadowDrift 5.5s ease-in-out infinite;
}

.hero-slice {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  height: 8%;
  opacity: 0;
  pointer-events: none;
  background-image: url("assets/hero.png");
  background-size: 100% auto;
  filter: saturate(1.25) contrast(1.3);
}

.hero-slice-a {
  top: 28%;
  background-position: center 31%;
  animation: strictGlitchA 6.4s steps(1, end) infinite;
}

.hero-slice-b {
  top: 61%;
  background-position: center 66%;
  animation: strictGlitchB 7.1s 1.2s steps(1, end) infinite;
}

.reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  width: 38%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0.18;
  border: 1px solid var(--green);
  pointer-events: none;
}

.reticle::before,
.reticle::after {
  content: "";
  position: absolute;
  background: var(--green);
}

.reticle::before {
  left: 50%;
  top: -15%;
  width: 1px;
  height: 130%;
}

.reticle::after {
  top: 50%;
  left: -15%;
  width: 130%;
  height: 1px;
}

.price-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 34%;
  z-index: 8;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 12px rgba(57,255,100,0.65);
  opacity: 0.56;
  animation: priceSweep 4.8s ease-in-out infinite;
}

.portrait-meta {
  position: absolute;
  right: 0;
  bottom: -26px;
  width: 92%;
  display: flex;
  justify-content: space-between;
  color: #6d786e;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.18em;
}

.contract {
  position: absolute;
  left: clamp(110px, 10vw, 170px);
  right: clamp(110px, 10vw, 170px);
  bottom: 24px;
  z-index: 12;
  display: none;
  grid-template-columns: 52px minmax(0, 1fr) 78px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(125,255,150,0.34);
  border-radius: 0;
  background: rgba(4,7,4,0.92);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.28);
}

body.ca-ready .contract {
  display: grid;
}

.contract-label,
.contract-action,
.contract-value {
  display: flex;
  align-items: center;
}

.contract-label {
  justify-content: center;
  color: var(--green);
  border-right: 1px solid rgba(125,255,150,0.25);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.contract-value {
  min-width: 0;
  padding: 0 14px;
  overflow: hidden;
  color: #b9c4ba;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contract-action {
  justify-content: center;
  border-left: 1px solid rgba(125,255,150,0.25);
  color: var(--ink);
  background: rgba(57,255,100,0.1);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.contract:hover {
  border-color: var(--green);
}

.contract:hover .contract-action {
  color: #021005;
  background: var(--green);
}

.edge-links {
  position: relative;
  z-index: 14;
  width: min(520px, 100%);
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(125,255,150,0.24);
  background: rgba(4,7,4,0.74);
  box-shadow:
    0 18px 50px rgba(0,0,0,0.34),
    inset 0 0 0 1px rgba(255,255,255,0.018);
  backdrop-filter: blur(10px);
}

.edge-links::before,
.edge-links::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.edge-links::before {
  left: -1px;
  top: -1px;
  width: 34%;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 20px rgba(57,255,100,0.55);
}

.edge-links::after {
  right: 12px;
  bottom: 8px;
  width: 5px;
  height: 5px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(57,255,100,0.85);
  animation: statusBlink 1.7s steps(1, end) infinite;
}

.edge-link {
  position: relative;
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid rgba(237,255,240,0.24);
  border-radius: 0;
  background: rgba(7,12,7,0.96);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 28px rgba(57,255,100,0.025);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.edge-link::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(57,255,100,0.62);
  box-shadow: 0 0 18px rgba(57,255,100,0.32);
}

.edge-link-buy {
  border-color: rgba(57,255,100,0.68);
  background:
    linear-gradient(90deg, rgba(57,255,100,0.11), transparent 54%),
    rgba(7,12,7,0.98);
}

.edge-link-buy::after {
  content: "PRIMARY";
  position: absolute;
  right: 8px;
  top: 6px;
  color: var(--green);
  font: 800 7px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.14em;
}

.link-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(125,255,150,0.22);
  background: rgba(57,255,100,0.055);
}

.link-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.link-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.link-copy b {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", Arial, sans-serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.045em;
}

.link-copy small {
  color: #8d998e;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.13em;
}

.edge-link:hover {
  z-index: 2;
  border-color: var(--green);
  background: rgba(13,22,14,0.99);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.32),
    inset 0 0 30px rgba(57,255,100,0.06);
  transform: translateY(-3px) skewX(-1deg);
}

.edge-link:hover .link-icon {
  border-color: var(--green);
  background: rgba(57,255,100,0.12);
}

.edge-link:active {
  transform: translateY(0);
}

.corner {
  position: fixed;
  z-index: 18;
  width: 28px;
  height: 28px;
  pointer-events: none;
  opacity: 0.5;
}

.corner-a {
  left: 14px;
  top: 84px;
  border-left: 1px solid var(--green);
  border-top: 1px solid var(--green);
}

.corner-b {
  right: 14px;
  top: 84px;
  border-right: 1px solid var(--green);
  border-top: 1px solid var(--green);
}

.corner-c {
  left: 14px;
  bottom: 14px;
  border-left: 1px solid var(--green);
  border-bottom: 1px solid var(--green);
}

.corner-d {
  right: 14px;
  bottom: 14px;
  border-right: 1px solid var(--green);
  border-bottom: 1px solid var(--green);
}

@keyframes statusBlink {
  0%, 72%, 100% { opacity: 1; }
  73%, 82% { opacity: 0.15; }
}

@keyframes frameBreath {
  0%, 100% { box-shadow: 0 0 0 1px rgba(57,255,100,0.12), 0 26px 80px rgba(0,0,0,0.62), 0 0 54px rgba(57,255,100,0.1); }
  50% { box-shadow: 0 0 0 1px rgba(57,255,100,0.2), 0 30px 90px rgba(0,0,0,0.72), 0 0 80px rgba(57,255,100,0.2); }
}

@keyframes heroBreath {
  0%, 100% { transform: scale(1.018); filter: saturate(0.9) contrast(1.07) brightness(0.92); }
  50% { transform: scale(1.032); filter: saturate(1) contrast(1.09) brightness(0.96); }
}

@keyframes shadowDrift {
  0%, 100% { transform: translate(7px, 0) scale(1.02); opacity: 0.42; }
  50% { transform: translate(10px, -2px) scale(1.035); opacity: 0.58; }
}

@keyframes strictGlitchA {
  0%, 88%, 100% { opacity: 0; transform: translateX(0); }
  89% { opacity: 0.8; transform: translateX(10px); }
  90% { opacity: 0.28; transform: translateX(-6px); }
  91% { opacity: 0; }
}

@keyframes strictGlitchB {
  0%, 73%, 100% { opacity: 0; transform: translateX(0); }
  74% { opacity: 0.6; transform: translateX(-8px); }
  75% { opacity: 0.22; transform: translateX(5px); }
  76% { opacity: 0; }
}

@keyframes priceSweep {
  0%, 100% { transform: translateY(-14px); opacity: 0.18; }
  50% { transform: translateY(28px); opacity: 0.72; }
}

@media (max-width: 1180px) {
  .stage {
    grid-template-columns: 0.9fr 1.1fr;
    padding-left: 92px;
    padding-right: 92px;
  }

  .contract {
    left: 92px;
    right: 92px;
  }
}

@media (max-width: 820px) {
  body {
    overflow-y: auto;
  }

  .topbar {
    height: 58px;
    padding: 0 18px;
  }

  .market-status span {
    display: none;
  }

  .stage {
    min-height: 760px;
    height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 12px;
    padding: 90px 68px 74px;
  }

  .hero-copy {
    align-self: start;
    transform: none;
  }

  .hero-copy h1 {
    font-size: clamp(64px, 17vw, 112px);
    line-height: 0.78;
  }

  .title-rule {
    margin-top: 18px;
    width: 72%;
  }

  .portrait {
    justify-self: center;
    width: min(66vw, 500px);
    margin-top: -10px;
  }

  .portrait-meta {
    bottom: -20px;
  }

  .edge-links {
    width: min(560px, 100%);
    margin-top: 22px;
  }

  .contract {
    left: 68px;
    right: 68px;
    bottom: 18px;
  }
}

@media (max-width: 540px) {
  .stage {
    min-height: 690px;
    padding: 82px 56px 68px;
  }

  .brand-mark {
    gap: 10px;
    font-size: 9px;
  }

  .hero-copy h1 {
    font-size: clamp(50px, 16vw, 86px);
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
  }

  .ticker-line {
    font-size: 10px;
  }

  .portrait {
    width: min(74vw, 420px);
  }

  .edge-links {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 18px;
    padding: 7px;
  }

  .edge-link {
    min-height: 54px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 9px;
  }

  .link-icon {
    width: 38px;
    height: 38px;
  }

  .link-icon img {
    width: 23px;
    height: 23px;
  }

  .link-copy b {
    font-size: 19px;
  }

  .contract {
    left: 56px;
    right: 56px;
    grid-template-columns: 42px minmax(0, 1fr) 58px;
  }

  .contract-label,
  .contract-action,
  .contract-value {
    font-size: 9px;
  }

  .contract-value {
    padding: 0 8px;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .stage {
    min-height: 620px;
    padding-top: 82px;
  }

  .hero-copy h1 {
    font-size: clamp(72px, 8.4vw, 126px);
  }

  .portrait {
    width: min(37vw, 560px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
