/* ============================================
   DigiChompers.com — Dark Cosmic Theme
   ============================================ */

/* --- Custom Properties --- */
:root {
  --lime-green: #9ACD32;
  --electric-blue: #4FC3F7;
  --enemy-red: #E53935;
  --digi-orange: #FF9800;
  --bg-dark: #0D1B2A;
  --bg-darker: #1B2838;
  --bg-section-alt: #0F2236;
  --cyan-glow: #00E5FF;
  --white: #FFFFFF;
  --white-soft: rgba(255, 255, 255, 0.85);
  --white-muted: rgba(255, 255, 255, 0.6);
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Quicksand', sans-serif;
  --max-width: 1200px;
  --nav-height: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--white);
  background: var(--bg-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 27, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(79, 195, 247, 0.1);
  height: var(--nav-height);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  height: 100%;
}

.nav__avatar {
  width: 156px;
  height: 156px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  top: 15px;
}

.nav__logo-text {
  height: 250px;
  width: auto;
  object-fit: contain;
  position: relative;
  top: -12px;
  left: -105px;
  transform: scale(1.15);
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
}

.nav__links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white-soft);
  transition: color 0.2s;
}

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

.nav__cta {
  background: var(--lime-green);
  color: var(--bg-dark) !important;
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 700 !important;
  transition: background 0.2s, transform 0.2s;
}

.nav__cta:hover {
  background: #B8E04A;
  transform: translateY(-1px);
}

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

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- HERO --- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero__scroll-container {
  height: 500vh;
  position: relative;
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__end-frame {
  position: absolute;
  top: 50%;
  margin-top: -540px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 1080px;
  object-fit: contain;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  padding-top: calc(var(--nav-height) - 45px);
}

.hero__title-img {
  width: auto;
  height: clamp(198px, 33vw, 462px);
  object-fit: contain;
  margin: -60px auto 16px;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  max-width: 540px;
  margin: 500px auto 32px;
  background: linear-gradient(90deg, #4FC3F7, #E53935);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.75vw, 1.5rem);
  text-shadow: none;
}

.hero__btn-img {
  height: clamp(150px, 20vw, 250px);
  position: relative;
  top: -100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s;
}

.hero__btn-img:hover {
  transform: translateY(-2px);
}

.btn--img {
  display: inline-block;
}

/* Nav link image (Features etc) */
.nav__link-img {
  height: 250px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  position: relative;
  top: 8px;
  transform: scale(1.15);
}

.nav__link-hiw {
  top: 13px;
  right: -45px;
}

.nav__link-feat {
  transform: scale(1.32);
  position: relative;
  right: -15px;
}

.nav__link-characters {
  transform: scale(1.38);
}

.nav__link-download {
  transform: scale(1.59);
}


/* Section title image */
.section__title-img {
  display: block;
  height: clamp(160px, 20vw, 280px);
  width: auto;
  object-fit: contain;
  margin: 0 auto 8px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 32px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--lime-green);
  color: var(--bg-dark);
  box-shadow: 0 4px 20px rgba(154, 205, 50, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 6px 28px rgba(154, 205, 50, 0.45);
}

/* --- SECTIONS --- */
.section {
  padding: 100px 0;
  position: relative;
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 8px;
}

.section__subtitle {
  text-align: center;
  color: var(--white-muted);
  font-size: 1.1rem;
  margin-bottom: 60px;
}

/* --- HOW IT WORKS --- */
.how-it-works {
  background: var(--bg-section-alt);
  position: relative;
  z-index: 10;
}

.how-it-works .section__title-img {
  margin-top: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step {
  text-align: center;
  position: relative;
}

.step__icon {
  width: 375px;
  height: 375px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(79, 195, 247, 0.08);
  border: 2px solid rgba(79, 195, 247, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.step__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lime-green);
  color: var(--bg-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
}

.step__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.step__text {
  color: var(--white-soft);
  font-size: 0.95rem;
  max-width: 280px;
  margin: 0 auto;
}

/* --- FEATURES --- */
.features {
  background: var(--bg-dark);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(79, 195, 247, 0.1);
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 195, 247, 0.3);
}

.feature-card__icon {
  width: 100%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
}

.feature-card__icon img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.feature-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.feature-card__text {
  color: var(--white-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- CHARACTERS --- */
.characters {
  background: var(--bg-section-alt);
  padding-top: 175px;
}

.characters .section__title-img {
  transform: scale(1.5);
  margin-top: 20px;
  margin-bottom: 40px;
  position: relative;
  top: 40px;
}

.characters__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.character-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s;
}

.character-card:hover {
  transform: translateY(-4px);
}

.character-card--hero {
  border-color: rgba(154, 205, 50, 0.2);
}

.character-card--villain {
  border-color: rgba(229, 57, 53, 0.2);
}

.character-card__image {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.character-card--hero .character-card__image {
  background: linear-gradient(135deg, rgba(154, 205, 50, 0.06), rgba(79, 195, 247, 0.06));
}

.character-card--villain .character-card__image {
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.06), rgba(255, 152, 0, 0.06));
}

.character-card__image img {
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto;
}

.character-card__info {
  padding: 24px 28px 32px;
}

.character-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.character-card--hero .character-card__name {
  color: var(--lime-green);
}

.character-card--villain .character-card__name {
  color: var(--enemy-red);
}

.character-card__role {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--white-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.character-card__desc {
  color: var(--white-soft);
  font-size: 0.95rem;
}

/* Enemy sizes showcase */
.enemy-sizes {
  text-align: center;
}

.enemy-sizes__img {
  max-width: 700px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* --- DOWNLOAD CTA --- */
.download {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #06101C 100%);
  text-align: center;
  padding: 120px 0;
}

.download__content {
  max-width: 600px;
  margin: 0 auto;
}

.download__logo {
  width: 480px;
  height: 480px;
  margin: 60px auto -400px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(154, 205, 50, 0.2));
  position: relative;
  top: 200px;
}

.download__title-img {
  max-width: 500px;
  width: 100%;
  height: auto;
  margin: 210px auto 20px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4));
  position: relative;
  top: 125px;
}

.download__subtitle {
  color: var(--white-soft);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.download__badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.2s, background 0.2s;
  color: var(--white);
}

.badge:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.badge svg {
  flex-shrink: 0;
}

.badge div {
  text-align: left;
}

.badge small {
  display: block;
  font-size: 0.7rem;
  color: var(--white-muted);
  line-height: 1.2;
}

.badge strong {
  font-size: 1rem;
  font-weight: 700;
}

.badge--coming-soon {
  opacity: 0.75;
  cursor: default;
}

/* --- FOOTER --- */
.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #06101C;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--white-muted);
}

.footer__tagline {
  color: var(--lime-green);
  font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .steps {
    gap: 24px;
  }

  .feature-grid {
    gap: 24px;
  }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(13, 27, 42, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav__links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Fix: nav link images in hamburger menu */
  .nav__link-img {
    height: 80px;
    transform: scale(1) !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
  }

  /* Fix: nav avatar for tablet */
  .nav__avatar {
    width: 72px;
    height: 72px;
    top: 4px;
  }

  .nav__logo-text {
    height: 140px;
    left: -50px;
    top: -6px;
    transform: scale(1);
  }

  .hero__scroll-container {
    height: 400vh;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    gap: 48px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

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

  .characters {
    padding-top: 80px;
  }

  .characters .section__title-img {
    transform: scale(1.2);
    margin-top: 0;
    top: 0;
  }

  .enemy-sizes__img {
    max-width: 100%;
  }

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

/* Mobile */
@media (max-width: 480px) {
  .section {
    padding: 72px 0;
  }

  .hero__scroll-container {
    height: 300vh;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  /* Fix: hero title logo — push down so it's on screen */
  .hero__overlay {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .hero__title-img {
    height: clamp(100px, 26vw, 180px);
    margin: 0 auto 12px;
  }

  /* Fix: subtitle — pull up closer to title */
  .hero__subtitle {
    margin-top: 200px;
  }

  /* Fix: Get Started button — bigger and higher */
  .hero__btn-img {
    height: clamp(80px, 22vw, 140px);
    top: -40px;
  }

  /* Fix: nav avatar — way too big, tighten up */
  .nav__avatar {
    width: 52px;
    height: 52px;
    top: 0;
  }

  /* Fix: DigiChompers logo text — center properly */
  .nav__logo-text {
    height: 100px;
    left: -20px;
    top: -4px;
    transform: scale(1);
  }

  .nav__logo {
    gap: 4px;
  }

  /* Fix: hamburger menu items — shrink so all 4 fit */
  .nav__link-img {
    height: 60px;
    transform: scale(1) !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
  }

  .nav__links {
    gap: 4px;
    padding: 12px 16px;
  }

  /* Fix: section title images bigger on mobile */
  .section__title-img {
    height: clamp(100px, 26vw, 180px);
  }

  /* Fix: How It Works title bigger */
  .how-it-works .section__title-img {
    height: clamp(100px, 28vw, 180px);
    margin-top: 10px;
  }

  /* Fix: step icons — constrain to mobile width */
  .step__icon {
    width: 280px;
    height: 280px;
  }

  /* Fix: Meet the Characters — kill massive top padding, bigger title */
  .characters {
    padding-top: 60px;
  }

  .characters .section__title-img {
    transform: scale(1.15);
    margin-top: 0;
    margin-bottom: 20px;
    top: 0;
  }

  /* Fix: enemy sizes — reduce gap after */
  .enemy-sizes {
    margin-bottom: 0;
  }

  /* Fix: download section — kill dead space */
  .download {
    padding: 40px 0 32px;
  }

  .download__logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    top: 0;
  }

  .download__title-img {
    margin: 16px auto 16px;
    top: 0;
    max-width: 260px;
  }

  .download__subtitle {
    margin-bottom: 24px;
  }

  .download__badges {
    flex-direction: column;
    align-items: center;
  }

  .badge {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

}

/* --- Modes Grid --- */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.mode-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(20, 20, 60, 0.6);
  border-radius: 10px;
  padding: 0.4rem 0.3rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.mode-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 14px rgba(245, 200, 66, 0.3);
}

.mode-tile img {
  width: 100%;
  max-width: 70px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.3rem;
}

.mode-tile span {
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
}

/* --- Parent Zone Section --- */
.parent-zone {
  padding: 4rem 0;
}

/* --- Reading Soon Section --- */
.reading-soon {
  padding: 3rem 0;
}

/* --- Ad Slots --- */
.ad-slot {
  text-align: center;
  overflow: hidden;
}

.ad-slot--leaderboard {
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
  padding: 0.5rem 0;
}

.ad-slot--inline {
  max-width: 728px;
  min-height: 90px;
  margin: 1rem auto;
  padding: 0.5rem 0;
}

.ad-slot--sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 50px;
  max-height: 60px;
  background: rgba(10, 10, 30, 0.95);
  border-top: 1px solid rgba(245, 200, 66, 0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-dismiss {
  position: absolute;
  top: 2px;
  right: 8px;
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.ad-dismiss:hover {
  color: #fff;
}

@media (max-width: 480px) {
  .ad-slot--leaderboard,
  .ad-slot--inline {
    max-width: 320px;
    min-height: 50px;
  }
}

/* --- Play Section --- */
.play-section {
  padding: 3rem 0;
}

.play-embed {
  max-width: 500px;
  margin: 1.5rem auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(245, 200, 66, 0.2);
  border: 2px solid rgba(245, 200, 66, 0.3);
}

.play-iframe {
  width: 100%;
  height: 800px;
  border: none;
  background: #000;
}

@media (max-width: 480px) {
  .play-iframe {
    height: 500px;
  }
  .play-embed {
    max-width: 100%;
    border-radius: 8px;
  }
}

/* --- Moments Grid --- */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 700px;
  margin: 1.5rem auto 0;
}

.moment-clip {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 16/9;
  background: rgba(20, 20, 60, 0.6);
  transition: transform 0.2s;
}

.moment-clip:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(245, 200, 66, 0.3);
}

/* --- Character Card Video --- */
.character-card__video {
  width: 100%;
  max-width: 302px;
  border-radius: 12px;
  object-fit: cover;
}

/* --- Responsive: Moments --- */
@media (max-width: 480px) {
  .moments-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}

/* --- Responsive: Modes Grid --- */
@media (max-width: 480px) {
  .modes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .mode-tile img {
    max-width: 60px;
  }

  .mode-tile span {
    font-size: 0.6rem;
  }
}
