@font-face {
  font-family: LiftPixel;
  src: url('../assets/fonts/press-start-2p.ttf') format('truetype');
  font-display: swap;
}

:root {
  --green: #76ff42;
  --paper: #f3f7e9;
  --night: #06131d;
  --muted: #bfd0d4;
  --edge: rgba(221, 246, 233, .24);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 280px; background: var(--night); }
body { margin: 0; color: var(--paper); font-family: 'Courier New', monospace; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--green); outline-offset: 6px; }
button svg, a svg { display: block; width: 22px; height: 22px; flex: none; }
::selection { background: var(--green); color: var(--night); }

.page {
  min-height: max(760px, 100svh);
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: clip;
}
.backdrop, .backdrop video, .backdrop canvas, .scrim, .scanlines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.backdrop { z-index: -1; overflow: hidden; background: #5c8ed2; }
.backdrop video { object-fit: cover; object-position: 40% 50%; image-rendering: pixelated; }
.backdrop canvas { display: block; image-rendering: pixelated; }
.scrim {
  background:
    linear-gradient(90deg, rgba(3,12,20,.97) 0%, rgba(3,12,20,.88) 34%, rgba(3,12,20,.36) 65%, rgba(3,12,20,.14) 100%),
    linear-gradient(0deg, rgba(3,12,20,.94) 0%, transparent 31%, transparent 78%, rgba(3,12,20,.45) 100%);
}
.scanlines {
  pointer-events: none;
  opacity: .23;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.14) 3px 4px);
}

.topbar, .hero-body, .bottom-bar {
  width: min(1500px, 100%);
  margin: 0 auto;
  position: relative;
}
.topbar {
  padding: 28px clamp(26px, 4.5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.brand img { width: 44px; height: 44px; image-rendering: pixelated; border: 1px solid var(--edge); }
.socials { display: flex; gap: 12px; }
.social {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(243,247,233,.5);
  background: rgba(3,12,20,.22);
  transition: transform .2s, color .2s, background .2s, box-shadow .2s;
}
.social:hover { color: var(--night); background: var(--green); transform: translateY(-3px); box-shadow: 4px 4px 0 rgba(118,255,66,.2); }
.social:active { transform: translateY(0); }

.hero-body { flex: 1; display: flex; align-items: center; padding: 27px clamp(26px, 4.5vw, 76px) 42px; }
.hero-copy { position: relative; z-index: 1; width: min(620px, 56%); }
.ticker { display: flex; align-items: center; gap: 12px; color: var(--green); font-weight: 700; font-size: 16px; letter-spacing: .16em; margin-bottom: 27px; }
.ticker span { display: block; width: 28px; height: 3px; background: currentColor; }
h1 {
  margin: 0 0 31px;
  font-family: LiftPixel, 'Courier New', monospace;
  font-weight: 400;
  font-size: clamp(68px, 7.7vw, 116px);
  line-height: 1.19;
  letter-spacing: -.055em;
  text-shadow: 5px 6px 0 rgba(0,0,0,.38);
}
h1 span { display: block; color: var(--green); }
.description { margin: 0; max-width: 420px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.7; color: #e0e9e8; text-wrap: pretty; }
.description strong { color: var(--green); font-weight: 700; }
.description .last-line { display: block; margin-top: 15px; color: #bdcdd0; }

.bottom-bar { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 0 clamp(26px, 4.5vw, 76px) 36px; }
.contract-wrap { width: min(670px, 100%); min-width: 0; }
.ca-label { display: block; font-size: 12px; letter-spacing: .14em; font-weight: 700; color: #bdcdd0; margin: 0 0 10px; }
.contract { display: flex; min-width: 0; align-items: stretch; border: 1px solid var(--edge); background: rgba(3,12,20,.82); min-height: 58px; }
.contract code { min-width: 0; align-self: center; flex: 1; padding: 17px 18px; font: 400 14px/1.55 'Courier New', monospace; color: var(--paper); overflow-wrap: anywhere; }
.copy { display: flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; padding: 17px 20px; border: 0; border-left: 1px solid var(--green); background: var(--green); color: #10200d; font-size: 14px; font-weight: 700; transition: background .18s, box-shadow .18s; }
.copy svg { width: 18px; height: 18px; }
.copy:hover { background: #a4ff81; box-shadow: 0 0 24px rgba(118,255,66,.2); }
.copy.is-copied { background: #d0ffb8; }
.movie-control { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--edge); background: rgba(3,12,20,.6); color: var(--paper); transition: border-color .2s, color .2s; }
.movie-control:hover { color: var(--green); border-color: var(--green); }
.movie-control svg { width: 15px; height: 15px; }
.movie-control .play-icon { display: none; }
.movie-control[data-paused='true'] .pause-icon { display: none; }
.movie-control[data-paused='true'] .play-icon { display: block; }

.notice { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); width: max-content; padding: 14px 20px; border: 1px solid var(--green); background: #08151e; color: var(--paper); font-size: 14px; line-height: 1.5; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 10; }
.notice.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) and (min-width: 701px) {
  h1 { font-size: clamp(60px, 8vw, 80px); }
  .hero-copy { width: 57%; }
  .description { font-size: 17px; max-width: 360px; }
  .contract-wrap { width: min(620px, 90%); }
}

@media (max-width: 700px) {
  .page { min-height: max(850px, 100svh); }
  .topbar { padding: 22px 24px; gap: 16px; }
  .brand { font-size: 14px; gap: 10px; }
  .brand img { width: 36px; height: 36px; }
  .socials { gap: 10px; }
  .social { width: 40px; height: 40px; }
  .social svg { width: 19px; height: 19px; }
  .hero-body { align-items: start; padding: 24px 26px 236px; }
  .hero-copy { width: 100%; }
  .ticker { font-size: 14px; margin-bottom: 22px; }
  h1 { font-size: clamp(48px, 13.5vw, 82px); line-height: 1.17; margin-bottom: 24px; text-shadow: 3px 4px 0 rgba(0,0,0,.38); }
  .description { font-size: 16px; max-width: 370px; line-height: 1.65; }
  .description .last-line { max-width: 295px; margin-top: 11px; }
  .scrim { background: linear-gradient(180deg, rgba(3,12,20,.86) 0%, rgba(3,12,20,.86) 34%, rgba(3,12,20,.53) 51%, rgba(3,12,20,.1) 70%, rgba(3,12,20,.72) 88%, rgba(3,12,20,.97) 100%); }
  .bottom-bar { padding: 0 24px 28px; gap: 12px; align-items: end; }
  .contract-wrap { width: 100%; }
  .contract { min-height: 85px; flex-direction: column; }
  .contract code { width: 100%; font-size: 13px; padding: 12px 13px; }
  .copy { padding: 12px 15px; border-left: 0; border-top: 1px solid var(--green); font-size: 13px; }
  .copy svg { width: 16px; height: 16px; }
  .movie-control { width: 35px; height: 35px; position: absolute; right: 24px; bottom: calc(100% + 18px); }
  .ca-label { font-size: 12px; }
}

@media (max-width: 370px) {
  .page { min-height: max(870px, 100svh); }
  .topbar { padding: 18px 17px; gap: 10px; }
  .brand { font-size: 12px; gap: 8px; }
  .brand img { width: 31px; height: 31px; }
  .social { width: 35px; height: 35px; }
  .socials { gap: 8px; }
  .social svg { width: 17px; height: 17px; }
  .hero-body { padding: 22px 19px 236px; }
  h1 { font-size: clamp(42px, 13.3vw, 49px); }
  .ticker { font-size: 14px; margin-bottom: 21px; }
  .bottom-bar { padding: 0 18px 24px; }
  .movie-control { right: 18px; }
}

@media (min-width: 701px) and (max-height: 780px) {
  .page { min-height: max(680px, 100svh); }
  .topbar { padding-top: 22px; padding-bottom: 20px; }
  .hero-body { padding-top: 12px; padding-bottom: 26px; }
  h1 { font-size: clamp(66px, 7vw, 96px); margin-bottom: 23px; }
  .ticker { margin-bottom: 21px; }
  .description { font-size: 17px; line-height: 1.6; }
  .bottom-bar { padding-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
