:root {
  color-scheme: dark;
  --ink: #050812;
  --panel: rgba(6, 9, 18, .82);
  --yellow: #ffd51a;
  --red: #ef1919;
  --blue: #14a8ff;
  --lime: #9fe000;
  --white: #fffdf5;
  --outline: #050505;
  --shadow: 0 8px 0 #050505, 0 16px 36px rgba(0, 0, 0, .44);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: Inter, ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-shell {
  position: relative;
  width: 100%;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background: #0c1424 url('/assets/poster.jpg') center / cover no-repeat;
}

.hero-video {
  position: absolute;
  z-index: -4;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  filter: saturate(1.06) contrast(1.03);
}

.video-shade {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(4, 8, 18, .08) 0 22%, rgba(4, 8, 18, .48) 68%, rgba(2, 4, 10, .84) 100%),
    linear-gradient(180deg, rgba(2, 5, 12, .62) 0%, transparent 25%, transparent 60%, rgba(2, 4, 10, .82) 100%);
}

.speed-lines {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .14;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 56px, rgba(255,255,255,.18) 57px 59px, transparent 60px 128px);
  transform: translateX(-10%);
  animation: rush 8s linear infinite;
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icon-button,
.contract-pill,
.buy-button,
.play-button,
.secondary-button {
  border: 3px solid var(--outline);
  box-shadow: 0 5px 0 var(--outline), 0 10px 24px rgba(0,0,0,.34);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.icon-button:hover,
.contract-pill:hover,
.buy-button:hover,
.play-button:hover,
.secondary-button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.icon-button:active,
.contract-pill:active,
.buy-button:active,
.play-button:active,
.secondary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--outline); }
.icon-button:focus-visible,
.contract-pill:focus-visible,
.buy-button:focus-visible,
.play-button:focus-visible,
.secondary-button:focus-visible,
.loader-close:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }

.icon-button {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #111722;
  color: var(--yellow);
}
.icon-button svg { width: 23px; height: 23px; fill: currentColor; }

.contract-pill {
  height: 52px;
  min-width: 0;
  max-width: min(52vw, 535px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--yellow);
  color: #080808;
  cursor: pointer;
  font-weight: 950;
}
.contract-pill code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}
.contract-pill svg { width: 19px; height: 19px; fill: currentColor; flex: 0 0 auto; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #11bb63; box-shadow: 0 0 0 4px rgba(17,187,99,.16); flex: 0 0 auto; }
.copy-label { font-size: 11px; letter-spacing: .08em; }
.ca-short { display: none; }

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--red);
  color: white;
  text-decoration: none;
  font-weight: 1000;
  letter-spacing: .03em;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.buy-button .buy-ticker { color: var(--yellow); }

.hero {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  padding: clamp(80px, 12svh, 104px) 20px 80px;
  text-align: center;
}

.hero-lockup {
  width: min(74vw, 560px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: none;
}

.eyebrow {
  margin: 0 0 -14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: clamp(10px, 1.05vw, 14px);
  font-weight: 1000;
  letter-spacing: .18em;
  text-shadow: 0 2px 8px #000, 0 0 18px #000;
}
.eyebrow span { width: 38px; height: 5px; background: var(--yellow); border: 2px solid #050505; transform: skewX(-28deg); }

.hero-logo {
  display: block;
  width: min(42vw, 430px);
  max-height: 36svh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 0 rgba(0,0,0,.64)) drop-shadow(0 24px 32px rgba(0,0,0,.62));
  user-select: none;
  -webkit-user-drag: none;
  animation: logo-float 4.8s ease-in-out infinite;
}

.play-button {
  position: relative;
  min-width: 204px;
  min-height: 72px;
  margin-top: -22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 0 38px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff2b25, #df0909);
  color: var(--yellow);
  cursor: pointer;
  font-size: clamp(22px, 2.2vw, 31px);
  font-weight: 1000;
  letter-spacing: .055em;
  text-shadow: 0 3px 0 #8c0000, 0 0 2px #050505;
}
.play-button::after { content: ""; position: absolute; inset: 5px; border: 2px solid rgba(255,255,255,.3); border-radius: 10px; pointer-events: none; }
.play-triangle { width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid var(--yellow); filter: drop-shadow(0 2px 0 #8c0000); }
.build-status { margin: 18px 0 0; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-shadow: 0 2px 9px #000; opacity: .88; }

.footer {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: max(15px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(94vw, 980px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: rgba(255,255,255,.72);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-shadow: 0 2px 8px #000;
}
.footer a { color: white; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.loader-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; }
.loader-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 10, .83); backdrop-filter: blur(12px) saturate(.8); }
.loader-card {
  position: relative;
  width: min(94vw, 590px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 24px 30px 30px;
  border: 4px solid #050505;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(20,28,49,.98), rgba(6,9,18,.98));
  box-shadow: 0 10px 0 #050505, 0 30px 90px rgba(0,0,0,.72), inset 0 0 0 2px rgba(255,255,255,.12);
  text-align: center;
}
.loader-card::before { content: ""; position: absolute; inset: 0; border-radius: 19px; opacity: .06; pointer-events: none; background: repeating-linear-gradient(135deg,#fff 0 8px,transparent 8px 16px); }
.loader-close { position: absolute; z-index: 2; top: 12px; right: 14px; width: 40px; height: 40px; border: 2px solid #000; border-radius: 12px; background: var(--yellow); color: #050505; cursor: pointer; font-size: 28px; font-weight: 950; line-height: 1; }
.loader-logo { position: relative; display: block; width: min(75%, 380px); height: auto; margin: -7px auto -22px; filter: drop-shadow(0 9px 0 rgba(0,0,0,.55)); }
.loader-card h1 { position: relative; margin: 0; color: var(--yellow); font-size: clamp(21px, 4vw, 32px); font-weight: 1000; letter-spacing: .045em; text-shadow: 0 3px 0 #9c4300; }
.loader-status { position: relative; min-height: 24px; margin: 13px 0 17px; font-weight: 850; color: rgba(255,255,255,.88); }
.progress-shell { position: relative; height: 34px; overflow: hidden; border: 3px solid #050505; border-radius: 12px; background: #131827; box-shadow: inset 0 3px 10px rgba(0,0,0,.5); }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0%; background: repeating-linear-gradient(135deg, var(--yellow) 0 18px, #ff9d00 18px 36px); box-shadow: inset 0 3px 0 rgba(255,255,255,.35); transition: width .32s ease-out; }
.progress-shell span { position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 12px; font-weight: 1000; text-shadow: 0 2px 3px #000; }
.loading-dots { position: relative; display: flex; justify-content: center; gap: 8px; margin: 18px 0 8px; }
.loading-dots i { width: 12px; height: 12px; border: 2px solid #050505; background: var(--red); transform: rotate(45deg); animation: dot-bounce .9s ease-in-out infinite alternate; }
.loading-dots i:nth-child(2) { background: var(--blue); animation-delay: .18s; }
.loading-dots i:nth-child(3) { background: var(--lime); animation-delay: .36s; }
.loader-note { position: relative; margin: 0 auto; max-width: 430px; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.55; }
.loader-actions { position: relative; display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.secondary-button { min-height: 50px; padding: 0 18px; border-radius: 13px; background: white; color: #080808; cursor: pointer; font-size: 12px; font-weight: 1000; }
.loader-actions .buy-button { min-height: 50px; font-size: 12px; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 12px 18px; border: 3px solid #050505; border-radius: 12px; background: var(--lime); color: #050505; box-shadow: 0 5px 0 #050505; font-size: 12px; font-weight: 1000; letter-spacing: .08em; }

@keyframes logo-float { 0%,100% { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-8px) rotate(.3deg); } }
@keyframes rush { from { transform: translateX(-10%); } to { transform: translateX(10%); } }
@keyframes dot-bounce { from { transform: translateY(0) rotate(45deg); } to { transform: translateY(-9px) rotate(45deg); } }

@media (max-width: 760px) {
  .topbar { align-items: flex-start; gap: 6px; padding-inline: 8px; }
  .topbar-group { gap: 6px; flex: 0 1 auto; min-width: 0; }
  .icon-button { width: 42px; height: 42px; border-radius: 11px; }
  .contract-pill { width: clamp(116px, 37vw, 144px); height: 42px; padding: 0 9px; border-radius: 11px; }
  .ca-full { display: none; }
  .ca-short { display: inline; }
  .copy-label { display: none; }
  .buy-button.compact { min-width: 88px; min-height: 42px; padding: 0 10px; border-radius: 11px; font-size: 10px; }
  .buy-button.compact .buy-word { display: none; }
  .hero { padding: 82px 12px 88px; }
  .hero-lockup { width: 78vw; max-width: 320px; transform: none; overflow: visible; }
  .eyebrow { margin-bottom: -4px; font-size: 9px; gap: 7px; }
  .eyebrow span { width: 24px; }
  .hero-logo { width: min(62vw, 300px); max-width: 62vw; max-height: 30svh; }
  .play-button { min-width: 164px; min-height: 58px; margin-top: -14px; padding: 0 26px; }
  .build-status { max-width: 88vw; padding-inline: 8px; font-size: 8px; line-height: 1.55; letter-spacing: .11em; overflow-wrap: anywhere; }
  .footer { bottom: max(10px, env(safe-area-inset-bottom)); width: 100%; max-width: 100%; padding-inline: 12px; display: block; line-height: 1.45; font-size: 7px; letter-spacing: .055em; overflow-wrap: anywhere; white-space: normal; }
  .footer-divider { display: none; }
  .footer a { display: block; margin-bottom: 2px; }
  .loader-card { padding: 22px 18px 24px; }
  .loader-logo { width: 88%; margin-bottom: -13px; }
  .loader-actions { flex-direction: column; }
  .loader-actions > * { width: 100%; }
}

@media (max-height: 650px) and (orientation: landscape) {
  .hero { padding-block: 68px 45px; }
  .hero-lockup { transform: none; }
  .hero-logo { width: min(34vw, 360px); max-height: 36vh; }
  .eyebrow { display: none; }
  .play-button { min-height: 54px; min-width: 160px; margin-top: -22px; font-size: 21px; }
  .build-status { margin-top: 12px; }
  .footer { bottom: 7px; }
  .loader-card { max-width: 520px; padding-block: 12px 18px; }
  .loader-logo { width: 50%; margin-bottom: -12px; }
  .loader-card h1 { font-size: 22px; }
  .loader-status { margin-block: 7px 9px; }
  .loading-dots { margin: 10px 0 5px; }
  .loader-actions { margin-top: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .hero-video { display: none; }
  .progress-bar { transition: none; }
}
