:root {
  --night: #0b0420;
  --night-2: #1a0838;
  --mint: #3ef0c4;
  --pink: #ff4fd8;
  --orange: #ff8a3d;
  --sun: #ffd23f;
  --sky: #6fd3ff;
  --ink: #f4efff;
  --ink-dim: #b9acd9;
  --glass: rgba(16, 6, 40, 0.8);
  --glass-edge: rgba(126, 240, 210, 0.28);
  --radius: 22px;
  --display: "Bungee", "Impact", sans-serif;
  --arcade: "Press Start 2P", monospace;
  --body: "Outfit", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 120%, #ff4f8b 0%, #3a1352 35%, var(--night) 75%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

#bg3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.12) 2px 3px);
  mix-blend-mode: multiply;
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(11,4,32,0.85), rgba(11,4,32,0));
}
.brand {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-orb {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--mint) 40%, #0a7d66 100%);
  box-shadow: 0 0 14px var(--mint), 0 0 0 3px rgba(255,138,61,0.65);
}
.nav nav { display: flex; gap: clamp(10px, 2.4vw, 28px); align-items: center; }
.nav nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color .2s;
}
.nav nav a:hover { color: var(--mint); }
.nav .nav-cta {
  color: var(--night) !important;
  background: var(--mint);
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(62,240,196,0.5);
}
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
}

/* ---------- ARCADE ---------- */
.arcade {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}
.arcade::after { /* soft vignette so text pops over the city */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(5,0,20,0.55) 100%);
}
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  touch-action: pan-y;
  cursor: crosshair;
}
.arcade.playing #game { touch-action: none; cursor: none; }

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 40px;
  background: radial-gradient(ellipse at center, rgba(11,4,32,0.55) 0%, rgba(11,4,32,0.15) 60%, rgba(11,4,32,0) 100%);
  transition: opacity .4s, transform .4s;
}
.overlay.hidden { opacity: 0; pointer-events: none; transform: scale(1.04); }

.kicker {
  font-family: var(--arcade);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--sun);
  text-transform: uppercase;
  margin: 0 0 18px;
}
.logo {
  font-family: var(--display);
  font-size: clamp(56px, 13vw, 170px);
  line-height: .9;
  margin: 0;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #fff 0%, var(--mint) 45%, #0fa585 55%, var(--sky) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #ff4fd8) drop-shadow(0 10px 0 #5a1a8a) drop-shadow(0 0 30px rgba(62,240,196,.55));
  animation: hover-logo 4s ease-in-out infinite;
}
@keyframes hover-logo { 50% { transform: translateY(-8px) rotate(-1deg); } }
.tagline {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  margin: 22px 0 6px;
  text-shadow: 0 2px 18px rgba(0,0,0,.7);
}
.tagline em { font-style: normal; color: var(--orange); }
.sub { color: var(--ink-dim); margin: 0 0 26px; text-shadow: 0 2px 12px rgba(0,0,0,.8); }

.arcade-btn {
  font-family: var(--arcade);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--night);
  background: linear-gradient(180deg, #ffe27a, var(--orange));
  border: none;
  border-radius: 14px;
  padding: 16px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 0 #a53d0e, 0 0 30px rgba(255,138,61,0.55);
  transition: transform .1s, box-shadow .1s;
}
.arcade-btn:hover { transform: translateY(-2px); }
.arcade-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a53d0e, 0 0 20px rgba(255,138,61,0.55); }
.arcade-btn:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
.arcade-btn.ghost {
  background: transparent;
  color: var(--mint);
  box-shadow: inset 0 0 0 2px var(--mint), 0 0 20px rgba(62,240,196,.3);
}
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.controls { margin-top: 26px; font-size: 14px; color: var(--ink-dim); }
kbd {
  font-family: var(--arcade);
  font-size: 10px;
  padding: 4px 7px;
  margin: 0 2px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--ink);
}
.touch-hint { display: none; }
@media (hover: none) { .touch-hint { display: inline; } }
.skip { margin-top: 14px; color: var(--mint); font-size: 14px; }

.over-title {
  font-family: var(--arcade);
  font-size: clamp(28px, 6vw, 56px);
  color: var(--pink);
  text-shadow: 0 0 24px var(--pink);
  margin: 0 0 14px;
}
.over-score { font-family: var(--arcade); font-size: 14px; color: var(--sun); }

.exit-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  font-family: var(--arcade);
  font-size: 10px;
  color: var(--ink);
  background: rgba(11,4,32,.6);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.exit-btn.hidden { display: none; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 90px;
  z-index: 4;
  transform: translate(-50%, 20px);
  max-width: min(560px, 90vw);
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(11,4,32,.85);
  border: 1px solid var(--mint);
  box-shadow: 0 0 30px rgba(62,240,196,.35);
  font-size: 15px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .35s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--mint); font-family: var(--arcade); font-size: 10px; display: block; margin-bottom: 6px; }

/* ---------- PANELS ---------- */
.panel {
  scroll-margin-top: 80px;
  width: min(1100px, calc(100% - 32px));
  margin: 18vh auto;
  padding: clamp(28px, 5vw, 64px);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
}
.eyebrow {
  font-family: var(--arcade);
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 1px;
  margin: 0 0 16px;
}
.panel h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 50px);
  line-height: 1.1;
  margin: 0 0 22px;
}
.lead { font-size: clamp(18px, 1.8vw, 22px); color: var(--ink-dim); max-width: 60ch; margin: 0; }
.lead strong { color: var(--ink); }

.reveal { opacity: 0; transform: translateY(40px) perspective(800px) rotateX(8deg); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 10px;
}
.card {
  position: relative;
  padding: 28px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform .3s, box-shadow .3s;
  transform-style: preserve-3d;
}
.card:hover { transform: translateY(-6px) rotateX(4deg); }
.card h3 { margin: 12px 0 8px; font-size: 22px; }
.card p { margin: 0; color: var(--ink-dim); font-size: 16px; }
.card-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: 50%;
}
.c-mint .card-icon { background: rgba(62,240,196,.15); box-shadow: 0 0 22px rgba(62,240,196,.4); }
.c-pink .card-icon { background: rgba(255,79,216,.15); box-shadow: 0 0 22px rgba(255,79,216,.4); }
.c-orange .card-icon { background: rgba(255,138,61,.15); box-shadow: 0 0 22px rgba(255,138,61,.4); }
.c-mint:hover { box-shadow: 0 20px 40px rgba(62,240,196,.18); }
.c-pink:hover { box-shadow: 0 20px 40px rgba(255,79,216,.18); }
.c-orange:hover { box-shadow: 0 20px 40px rgba(255,138,61,.18); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(62,240,196,.08), rgba(255,255,255,0));
  border-left: 3px solid var(--mint);
}
.steps span { font-family: var(--arcade); font-size: 14px; color: var(--mint); padding-top: 6px; }
.steps h3 { margin: 0 0 2px; font-size: 20px; }
.steps p { margin: 0; color: var(--ink-dim); font-size: 16px; }

/* ---------- CONTACT ---------- */
.contact { display: grid; gap: 16px; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .contact .row { grid-template-columns: 1fr; } }
.contact label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-dim); }
.contact input, .contact select, .contact textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: rgba(5,0,20,.55);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.contact select option { background: var(--night-2); }
.contact input:focus, .contact select:focus, .contact textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(62,240,196,.2);
}
.contact .invalid { border-color: var(--pink); }
.contact button { justify-self: start; }
.form-status { margin: 0; min-height: 1.5em; font-size: 15px; }
.form-status.ok { color: var(--mint); }
.form-status.err { color: var(--pink); }

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 10vh;
  padding: 50px clamp(16px, 5vw, 64px) 30px;
  background: linear-gradient(to bottom, rgba(11,4,32,0), rgba(11,4,32,.95) 30%);
  border-top: 1px solid rgba(62,240,196,.18);
}
.foot-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }
.footer p { color: var(--ink-dim); font-size: 15px; }
.footer h4 { font-family: var(--arcade); font-size: 10px; color: var(--orange); margin: 6px 0 14px; }
.footer .foot-grid > div > a:not(.brand) { display: block; color: var(--ink-dim); text-decoration: none; font-size: 15px; margin: 6px 0; }
.footer .foot-grid > div > a:not(.brand):hover { color: var(--mint); }
.legal { max-width: 1100px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px !important; }

@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- BUILT NOTE (bottom row of hero, beside the Info button) ---------- */
.built-note {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  white-space: nowrap;
  padding: 10px 14px;
  text-align: center;
  font-family: var(--arcade);
  font-size: 10px;
  letter-spacing: 1px;
  line-height: 1.6;
  color: var(--mint);
  background: rgba(11, 4, 32, 0.6);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
  text-shadow: 0 0 10px rgba(62, 240, 196, 0.6);
  pointer-events: none;
}
@media (max-width: 640px) {
  .built-note { white-space: normal; font-size: 8px; max-width: calc(100% - 130px); left: 14px; transform: none; text-align: left; }
}

/* ---------- SERVICES ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform .3s, box-shadow .3s;
}
.service:hover { transform: translateY(-6px); }
.s-mint { border-top: 3px solid var(--mint); }
.s-pink { border-top: 3px solid var(--pink); }
.s-mint:hover { box-shadow: 0 20px 40px rgba(62,240,196,.18); }
.s-pink:hover { box-shadow: 0 20px 40px rgba(255,79,216,.18); }
.service-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.service h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; }
.service-tag {
  font-family: var(--arcade);
  font-size: 9px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--sun);
}
.service p { margin: 0; color: var(--ink-dim); font-size: 16px; }
.stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(5,0,20,.5);
}
.stat-from { font-family: var(--arcade); font-size: 16px; color: var(--ink-dim); text-decoration: line-through; text-decoration-color: var(--pink); }
.stat-arrow { color: var(--orange); font-size: 20px; }
.stat-to { font-family: var(--arcade); font-size: 22px; color: var(--mint); text-shadow: 0 0 14px rgba(62,240,196,.5); }
.s-pink .stat-to { color: var(--pink); text-shadow: 0 0 14px rgba(255,79,216,.5); }
.stat-label { flex-basis: 100%; font-size: 14px; color: var(--ink-dim); }
.service-link { margin-top: auto; color: var(--mint); font-weight: 600; text-decoration: none; }
.s-pink .service-link { color: var(--pink); }
.service-link:hover { text-decoration: underline; }
