/* ═══════════════════════════════════════════════════════════════════════════
   ParcelPunk — Brand Design System
   ═══════════════════════════════════════════════════════════════════════════
   DO NOT use AI-generated styles. Every rule is hand-written for intent.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Colors (from game UIStyle.gd, TitleLogo.gd, project.godot) ──────── */

:root {
  --bg:         #0A0A0F;
  --surface:    #12141A;
  --surface-50: rgba(18, 20, 26, 0.5);
  --cyan:       #73E5FF;
  --cyan-bright:#59F2FF;
  --magenta:    #FA389E;
  --gold:       #FFD633;
  --green:      #59F273;
  --red:        #FF5959;
  --dim:        #99A8B8;
  --text:       #D6DCE4;
  --text-bright:#F0F4F8;
  --dark:       #05050D;

  --font-display: 'Press Start 2P', monospace;
  --font-body:    'VT323', monospace;

  --max-w: 1080px;
  --nav-h: 72px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ──────────────────────────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

::selection {
  background: var(--magenta);
  color: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-bright); }

/* ── Utility ───────────────────────────────────────────────────────────── */

.section {
  padding: 100px 24px;
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 16px;
}

.section__desc {
  font-size: 22px;
  color: var(--dim);
  max-width: 640px;
  margin-bottom: 56px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  line-height: 1;
  border: 2px solid transparent;
  background: none;
  color: var(--text-bright);
}

.btn--primary {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
}

.btn--primary:hover {
  background: transparent;
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(115, 229, 255, 0.25);
}

.btn--ghost {
  border-color: var(--dim);
  color: var(--dim);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ── Navigation ────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(115, 229, 255, 0.08);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  color: var(--text-bright);
}

.nav__logo-img {
  display: block;
  width: 28px;
  height: 28px;
  image-rendering: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__link {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--cyan);
}

.nav__link--cta {
  padding: 10px 20px;
  border: 2px solid var(--cyan);
  border-radius: 4px;
  color: var(--cyan);
}

.nav__link--cta:hover {
  background: var(--cyan);
  color: var(--bg);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--nav-h) 1fr;
  overflow: hidden;
}

.hero__spacer {
  grid-row: 1;
}

.hero__inner {
  grid-row: 2;
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  width: 100%;
  padding: 0 24px 48px;
  justify-self: center;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 60%, rgba(250, 56, 158, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 40%, rgba(115, 229, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 50% 80%, rgba(89, 242, 115, 0.03) 0%, transparent 70%);
}

/* ── Logo ───────────────────────────────────────────────────────────── */

.hero__logo {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero__logo-img {
  max-width: 100%;
  height: auto;
  width: 560px;
  image-rendering: auto;
}

/* ── Tagline ─────────────────────────────────────────────────────────── */

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(10px, 2vw, 14px);
  letter-spacing: 8px;
  color: var(--cyan);
  margin-bottom: 20px;
  opacity: 0.8;
}

.hero__sub {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--dim);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 2;
  pointer-events: none;
}

/* ── About ──────────────────────────────────────────────────────────────── */

.about__content {
  display: grid;
  gap: 48px;
}

.about__text {
  font-size: 22px;
  line-height: 1.8;
  max-width: 720px;
  color: var(--text);
}

.about__text strong {
  color: var(--cyan-bright);
  font-weight: normal;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid rgba(115, 229, 255, 0.1);
  border-radius: 6px;
  background: var(--surface-50);
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.stat__label {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── Features ──────────────────────────────────────────────────────────── */

.features {
  background: var(--surface);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 36px 32px;
  border: 1px solid rgba(115, 229, 255, 0.08);
  border-radius: 8px;
  background: var(--bg);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  border-color: rgba(115, 229, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card__icon {
  margin-bottom: 20px;
  width: 48px;
  height: 48px;
}

.feature-card__icon svg {
  width: 100%;
  height: 100%;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

.feature-card__text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--dim);
}

/* ── Gameplay ───────────────────────────────────────────────────────────── */

.gameplay__phases {
  display: grid;
  gap: 4px;
}

.phase {
  display: grid;
  grid-template-columns: 56px 1fr 32px;
  gap: 24px;
  align-items: start;
  padding: 32px 24px;
  border: 1px solid rgba(115, 229, 255, 0.06);
  border-radius: 4px;
  background: var(--surface-50);
  transition: all 0.3s;
}

.phase:hover {
  border-color: rgba(115, 229, 255, 0.15);
  background: var(--surface);
}

.phase__number {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--magenta);
  line-height: 1;
  padding-top: 4px;
}

.phase__title {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}

.phase__text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--dim);
}

.phase__arrow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  opacity: 0.3;
}

/* ── Tech Stack ─────────────────────────────────────────────────────────── */

.tech {
  border-top: 1px solid rgba(115, 229, 255, 0.06);
}

.tech__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech__item {
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(115, 229, 255, 0.06);
  border-radius: 4px;
}

.tech__name {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.tech__detail {
  font-size: 16px;
  color: var(--dim);
}

/* ── CTA ────────────────────────────────────────────────────────────────── */

.cta {
  background: var(--surface);
}

.cta__card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 40px;
  border: 1px solid rgba(115, 229, 255, 0.1);
  border-radius: 8px;
  background: var(--bg);
}

.cta__title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.cta__text {
  font-size: 20px;
  color: var(--dim);
  margin-bottom: 32px;
  line-height: 1.7;
}

.cta__form {
  max-width: 480px;
  margin: 0 auto;
}

.cta__input-group {
  display: flex;
  gap: 0;
  border: 2px solid rgba(115, 229, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.cta__input-group:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(115, 229, 255, 0.1);
}

.cta__input {
  flex: 1;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--text-bright);
  background: var(--bg);
  border: none;
  outline: none;
  min-width: 0;
}

.cta__input::placeholder {
  color: var(--dim);
  opacity: 0.5;
}

.cta__btn {
  border-radius: 0;
  padding: 16px 28px;
  flex-shrink: 0;
}

.cta__note {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(153, 168, 184, 0.5);
}

.cta__success {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--green);
  padding: 16px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  padding: 48px 24px;
  border-top: 1px solid rgba(115, 229, 255, 0.06);
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-bright);
}

.footer__tag {
  font-size: 16px;
  color: var(--dim);
  margin-top: 4px;
}

.footer__links {
  display: flex;
  gap: 16px;
}

.footer__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(115, 229, 255, 0.1);
  border-radius: 4px;
  color: var(--dim);
  transition: all 0.3s;
}

.footer__link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(115, 229, 255, 0.1);
}

.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: rgba(153, 168, 184, 0.3);
  margin-top: 8px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(115, 229, 255, 0.08);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__logo-img {
    width: 100%;
    max-width: 400px;
  }

  .hero__tagline {
    letter-spacing: 4px;
    font-size: 9px;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .phase {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .phase__arrow {
    display: none;
  }

  .phase__number {
    margin-bottom: 4px;
  }

  .tech__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta__card {
    padding: 40px 24px;
  }

  .cta__input-group {
    flex-direction: column;
    border: none;
  }

  .cta__input {
    border: 2px solid rgba(115, 229, 255, 0.15);
    border-radius: 4px;
    margin-bottom: 12px;
  }

  .cta__btn {
    width: 100%;
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 64px 16px;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat {
    padding: 20px 12px;
  }

  .stat__value {
    font-size: 22px;
  }

  .feature-card {
    padding: 28px 20px;
  }

  .tech__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Fade-in Animation (JS-triggered) ──────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card.fade-in {
  transition-delay: calc(var(--i, 0) * 0.1s);
}

.feature-card.fade-in.is-visible {
  transition-delay: calc(var(--i, 0) * 0.1s);
}

.phase.fade-in {
  transition-delay: calc(var(--i, 0) * 0.15s);
}

/* ── Reduced Motion ─────────────────────────────────────────────────────── */

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

  html {
    scroll-behavior: auto;
  }
}
