/* ============================================================
   STUNFISH GAMES — Night Light
   CRT pixel-grid aesthetic with colorful accents
   ============================================================ */

:root {
  --bg:            #0b1420;
  --bg-card:       #101e30;
  --bg-card-hover: #162a40;
  --border:        rgba(70, 160, 220, 0.12);

  --text:          #d8e8f4;
  --text-mid:      #7eaac8;
  --text-dim:      #3e6888;

  --cyan:          #4db8e8;
  --cyan-bright:   #80e0ff;
  --green:         #5ce8a0;
  --pink:          #f0789a;
  --orange:        #e8a050;
  --purple:        #b080e0;

  --font-pixel:    'Press Start 2P', monospace;
  --font-body:     'Nunito', sans-serif;
  --container:     min(68rem, 92vw);
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset ---- */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ---- CRT Overlays ---- */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(70, 160, 220, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 160, 220, 0.4) 1px, transparent 1px);
  background-size: 4px 4px;
}

/* ---- Particles ---- */

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

/* ---- Section Title ---- */

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  text-transform: uppercase;
  text-align: center;
  color: var(--cyan-bright);
  margin-bottom: 3rem;
  text-shadow: 0 0 20px rgba(77, 184, 232, 0.4), 2px 2px 0 rgba(0,0,0,0.5);
  letter-spacing: 0.1em;
}

.section-title--left { text-align: left; }

/* ---- Nav ---- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.8rem 0;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav--scrolled {
  background: rgba(11, 20, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav__logo-text {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--text);
  letter-spacing: 0.05em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav__links a {
  color: var(--text-mid);
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

.nav__steam-btn {
  font-family: var(--font-pixel) !important;
  font-size: 0.55rem !important;
  background: var(--cyan) !important;
  color: var(--bg) !important;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  transition: all 0.2s !important;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

.nav__steam-btn:hover {
  background: var(--cyan-bright) !important;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 9rem 0 5rem;
  overflow: hidden;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(77, 184, 232, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(196, 128, 224, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(92, 232, 160, 0.04) 0%, transparent 50%);
  z-index: -1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--orange);
  background: rgba(232, 160, 80, 0.1);
  border: 1px solid rgba(232, 160, 80, 0.25);
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s var(--ease) forwards;
}

.hero__title {
  font-family: var(--font-pixel);
  line-height: 1.4;
  margin-bottom: 1.2rem;
}

.hero__title-line {
  display: block;
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--text);
  text-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 30px rgba(77, 184, 232, 0.2);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) forwards;
}

.hero__title-line:first-child { animation-delay: 0.3s; }

.hero__title-line--accent {
  color: var(--cyan-bright);
  text-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 40px rgba(128, 224, 255, 0.35),
    0 0 80px rgba(128, 224, 255, 0.15);
  animation-delay: 0.45s;
}

.hero__subtitle {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--text-mid);
  max-width: 36ch;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s var(--ease) forwards;
}

/* Trailer */

.hero__trailer-wrap {
  max-width: 800px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s var(--ease) forwards;
}

.hero__trailer {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow:
    0 0 60px rgba(77, 184, 232, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.4);
  background: #000;
}

.hero__trailer video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

/* CTA Button */

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  background: linear-gradient(135deg, #1a8a40 0%, #20a050 100%);
  color: #fff;
  padding: 0.9rem 1.6rem;
  border-radius: 6px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4), 0 0 30px rgba(92, 232, 160, 0.15);
  transition: all 0.2s;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.6s 0.9s var(--ease) forwards;
}

.hero__cta:hover {
  background: linear-gradient(135deg, #20a050 0%, #28b860 100%);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.4), 0 0 40px rgba(92, 232, 160, 0.25);
}

.hero__cta-price {
  color: rgba(255,255,255,0.9);
}

.hero__cta-price s {
  opacity: 0.5;
  margin-right: 0.3rem;
}

.hero__cta-sep {
  width: 1px;
  height: 1.2rem;
  background: rgba(255,255,255,0.25);
}

.hero__cta-text {
  color: #fff;
  letter-spacing: 0.05em;
}

.hero__cta-badge {
  background: var(--green);
  color: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.5rem;
  font-weight: 900;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Screenshots ---- */

.screens {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.screens__container {
  width: var(--container);
  margin: 0 auto;
}

.screens__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.screens__grid img {
  border-radius: 6px;
  border: 2px solid var(--border);
  transition: all 0.3s var(--ease);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.screens__grid img:hover {
  border-color: var(--cyan);
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(77, 184, 232, 0.15), 0 8px 30px rgba(0,0,0,0.4);
}

/* ---- Features ---- */

.features {
  position: relative;
  z-index: 1;
  padding: 4rem 0 5rem;
}

.features__container {
  width: var(--container);
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem 1.4rem;
  text-align: center;
  transition: all 0.3s var(--ease);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(70, 160, 220, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--cyan-bright);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px rgba(128, 224, 255, 0.3);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* Tags */

.features__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.features__tags span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  border: 1px solid rgba(176, 128, 224, 0.2);
  color: var(--purple);
  background: rgba(176, 128, 224, 0.06);
}

/* ---- About ---- */

.about {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.about__container {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 52ch;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about__text strong { color: var(--text); }
.about__text em { color: var(--orange); font-style: italic; }
.about__text--dim { color: var(--text-dim); font-size: 0.95rem; }

.about__mascot {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__mascot::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 2px dashed rgba(232, 160, 80, 0.2);
  animation: spin 20s linear infinite;
}

.about__mascot::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(77, 184, 232, 0.15);
  animation: spin 15s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

.about__mascot-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(232, 160, 80, 0.25));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---- Footer ---- */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer__inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer__logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer__name {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--text-mid);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer__steam {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

/* ---- Scroll Reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Section Dividers ---- */

.screens::before,
.features::before,
.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.15;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .features__grid { grid-template-columns: 1fr 1fr; }

  .about__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about__text { margin-left: auto; margin-right: auto; }

  .about__mascot {
    margin: 0 auto;
    width: 140px;
    height: 140px;
  }

  .about__mascot-img { width: 90px; height: 90px; }

  .section-title--left { text-align: center; }
}

@media (max-width: 600px) {
  .nav__links { gap: 0.8rem; font-size: 0.8rem; }
  .nav__steam-btn { font-size: 0.45rem !important; padding: 0.5rem 0.7rem; }

  .hero__title-line { font-size: clamp(1.5rem, 10vw, 2.5rem); }

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

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

  .hero__cta {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.5rem;
  }

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