/* ===== Variables ===== */
:root {
  --bg: #0d0f14;
  --bg-elevated: #151821;
  --bg-card: #1a1d26;
  --text: #e8eaef;
  --text-muted: #8b8f9a;
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, 0.15);
  --accent-secondary: #4ecdc4;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: "Syne", "Outfit", system-ui, sans-serif;
  --transition: 0.25s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ===== Noise Overlay ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(13, 15, 20, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.1em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.btn-nav {
  padding: 10px 20px !important;
  color: var(--bg) !important;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-nav:hover {
  background: #ff7d5f;
  color: var(--bg) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: #ff7d5f;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-muted);
  border: 1px solid var(--border);
}

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

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 120px 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255, 107, 74, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
    var(--bg);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.hero-glow-1 {
  top: 10%;
  left: -10%;
  background: var(--accent);
}

.hero-glow-2 {
  bottom: 10%;
  right: -10%;
  background: var(--accent-secondary);
}

.hero-label {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-desc {
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 420px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  width: 280px;
  aspect-ratio: 9 / 19;
  background: var(--bg-card);
  border-radius: 36px;
  padding: 12px;
  border: 2px solid var(--border);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1e222a 0%, #151821 100%);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.phone-screen-coloring {
  background-image: url("images/coloring-game.jpg");
  background-size: cover;
  background-position: center;
}

.mockup-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Section ===== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== Features (Bento) ===== */
.features {
  padding: 100px 0;
  background: var(--bg-elevated);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

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

.feature-card-content {
  padding: 28px;
  position: relative;
  z-index: 2;
}

.feature-card-large {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 400px;
}

.feature-card-hero {
  position: relative;
}

.feature-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 1;
}

.feature-card-hero:hover .feature-card-bg {
  opacity: 0.35;
  transform: scale(1.05);
}

.feature-card-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 15, 20, 0.4) 50%, rgba(13, 15, 20, 0.85) 100%);
  z-index: 1;
}

.feature-card-hero .feature-card-content {
  color: var(--text);
  position: relative;
  z-index: 2;
}

.feature-card-hero .feature-icon {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.feature-card-hero h3 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.feature-card-with-image {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--bg-card);
}

.feature-card-with-image .feature-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feature-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elevated);
}

.feature-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.feature-card-with-image:hover .feature-image-wrap img {
  transform: scale(1.08);
}

.feature-card-wide {
  grid-column: span 2;
}

.feature-card-gradient {
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.08) 0%, rgba(78, 205, 196, 0.08) 100%);
  border-color: rgba(255, 107, 74, 0.2);
  position: relative;
  overflow: hidden;
}

.feature-card-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 74, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card-gradient:hover {
  border-color: rgba(255, 107, 74, 0.4);
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.12) 0%, rgba(78, 205, 196, 0.12) 100%);
}

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

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1;
  display: inline-block;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-card-hero .feature-card-content p {
  color: rgba(255, 255, 255, 0.9);
}

.feature-card-large .feature-icon { font-size: 2.5rem; }
.feature-card-large h3 { font-size: 1.5rem; }
.feature-card-large p { font-size: 1rem; }

/* ===== Games Gallery ===== */
.games-gallery {
  padding: 100px 0;
  background: var(--bg);
}

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

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.game-card:hover {
  border-color: rgba(255, 107, 74, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.game-card-img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elevated);
}

.game-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-img-wrap img {
  transform: scale(1.08);
}

.game-card h3 {
  margin: 0;
  padding: 20px 20px 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.game-card p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== Screenshots ===== */
.screenshots {
  padding: 100px 0;
  background: var(--bg-elevated);
}

.screenshots-strip {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot-card {
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  background: var(--bg-card);
}

.screenshot-card:hover {
  transform: scale(1.02);
  border-color: rgba(255, 107, 74, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}

/* ===== Coming Soon ===== */
.coming-soon {
  padding: 100px 0;
  background: var(--bg-elevated);
}

.coming-soon-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.coming-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
}

.coming-desc {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.coming-sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.subscribe-form input::placeholder {
  color: var(--text-muted);
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.subscribe-form .btn {
  flex-shrink: 0;
}

/* ===== Download ===== */
.download {
  padding: 100px 0;
}

.download-inner {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.download-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.download-desc {
  margin: 0 0 28px;
  color: var(--text-muted);
}

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

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.store-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer .logo {
  font-size: 1.1rem;
}

.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 24px 60px;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .features-bento {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card-large {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 300px;
  }

  .feature-card-wide {
    grid-column: span 2;
  }

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

  .hide-mobile { display: none; }
}

/* Mobile nav overlay */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 15, 20, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 80px 24px 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    font-size: 1.25rem;
  }

  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 101;
  }

  .menu-toggle span {
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  body.menu-open {
    overflow: hidden;
  }

  .header {
    padding: 16px 20px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .features-bento {
    grid-template-columns: 1fr;
  }

  .feature-card-large,
  .feature-card-wide {
    grid-column: span 1;
    min-height: 280px;
  }

  .feature-card-hero .feature-card-bg {
    opacity: 0.2;
  }

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

  .subscribe-form {
    flex-direction: column;
  }

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

@media (max-width: 480px) {
  .screenshot-card {
    min-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
