:root {
  --bg: #12142b;
  --bg-alt: #1b1d36;
  --surface: #23264a;
  --text: #eef0ff;
  --muted: #a9adcf;
  --accent: #ffd166;
  --accent-2: #4fc3f7;
  --pink: #ff5d8f;
  --green: #7ed957;
  --orange: #ff8a5c;
  --radius: 18px;
  --max: 1140px;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--accent-2);
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 20, 43, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

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

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 6rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(79, 195, 247, 0.18), transparent 55%),
    radial-gradient(ellipse at 85% 30%, rgba(255, 93, 143, 0.16), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 209, 102, 0.12), transparent 60%);
}

.hero-sparks {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff8, transparent),
    radial-gradient(2px 2px at 30% 70%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 55% 25%, #fff9, transparent),
    radial-gradient(2px 2px at 75% 60%, #fff5, transparent),
    radial-gradient(1.5px 1.5px at 90% 15%, #fff8, transparent),
    radial-gradient(1.5px 1.5px at 65% 85%, #fff6, transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 780px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.2rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
}

.accent {
  background: linear-gradient(90deg, var(--accent), var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 620px;
}

.hero-actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

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

.btn-primary {
  background: var(--accent);
  color: #1b1d36;
}

.btn-primary:hover {
  background: #ffdc85;
}

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
}

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

/* Sections */
.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-head h2,
.about h2,
.contact h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

/* Products */
.product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.product.reverse .product-media {
  order: 2;
}

.product-media {
  border-radius: 14px;
  overflow: hidden;
}

.product-echoes .product-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 45% center;
}

.product h3 {
  font-size: 2rem;
  margin-top: 0.8rem;
  margin-bottom: 0.2rem;
}

.tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.product-echoes .tagline { color: #c7a6ff; }
.product-algebra .tagline { color: var(--accent-2); }
.product-toy .tagline { color: var(--orange); }

.product-body p {
  color: var(--muted);
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.features li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.4rem;
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
}

.product-algebra .features li::before { background: var(--accent-2); }
.product-toy .features li::before { background: var(--orange); }

.platforms {
  font-size: 0.92rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-live { background: rgba(126, 217, 87, 0.15); color: var(--green); }
.badge-dev  { background: rgba(79, 195, 247, 0.15); color: var(--accent-2); }
.badge-soon { background: rgba(255, 138, 92, 0.15); color: var(--orange); }

/* Algebra illustration */
.algebra-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(rgba(79, 195, 247, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(79, 195, 247, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(135deg, #1a3350, #16213e);
}

.algebra-card {
  padding: 1.5rem 2.5rem;
  border-radius: 14px;
  background: #fdfdff;
  color: #1b1d36;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}

.eq-line {
  line-height: 1.5;
}

.eq-step {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  font-size: 0.7em;
  font-style: normal;
  color: #1e88e5;
}

.eq-answer {
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 2px solid #1b1d3622;
  font-weight: 700;
  color: #2e7d32;
}

.check {
  font-style: normal;
}

/* Toy illustration */
.toy-art {
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #3a2f6b, #262a4d);
}

.toy-art svg {
  width: 100%;
  height: 100%;
}

.gear {
  animation: spin 8s linear infinite;
}

.belt {
  animation: belt 3s ease-in-out infinite alternate;
}

.coins {
  animation: bob 2.4s ease-in-out infinite;
}

.smoke {
  animation: puff 3s ease-in-out infinite;
}

.smoke.s2 {
  animation-delay: 1s;
}

@keyframes spin {
  from { transform: translate(330px, 70px) rotate(0deg); }
  to   { transform: translate(330px, 70px) rotate(360deg); }
}

@keyframes belt {
  from { transform: translateX(-8px); }
  to   { transform: translateX(8px); }
}

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

@keyframes puff {
  0%, 100% { opacity: 0.2; transform: translateY(4px); }
  50%      { opacity: 0.8; transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .belt, .coins, .smoke { animation: none; }
  .gear { animation: none; transform: translate(330px, 70px); }
  html { scroll-behavior: auto; }
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about p {
  color: var(--muted);
}

.values {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.values li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: var(--surface);
}

.value-icon {
  grid-row: span 2;
  font-size: 1.8rem;
}

.values h3 {
  font-size: 1.2rem;
  margin: 0;
}

.values p {
  margin: 0;
}

/* Contact */
.contact {
  text-align: center;
  max-width: 640px;
}

.contact p {
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

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

.footer-inner p {
  margin: 0;
}

.footer-inner ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 860px) {
  .product,
  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product {
    padding: 1.5rem;
  }

  .product.reverse .product-media {
    order: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 1rem 1.25rem;
  }
}
