:root {
  --navy: #1a2a6c;
  --navy-dark: #111c4e;
  --navy-deep: #0a1330;
  --gold: #f5c518;
  --gold-dark: #d4a800;
  --red: #e53935;
  --green: #43a047;
  --blue: #42a5f5;
  --white: #ffffff;
  --text-muted: rgba(255,255,255,0.75);
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background:
    radial-gradient(1100px 700px at 10% -10%, rgba(245,197,24,0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 8%, rgba(66,165,245,0.14), transparent 55%),
    radial-gradient(800px 550px at 50% 105%, rgba(229,57,53,0.08), transparent 55%),
    var(--navy);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

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

section, header, footer, nav, main {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Tetromino decorations ---------- */
.tetro-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.tetro {
  position: absolute;
  width: 68px;
  height: 68px;
  opacity: 0.28;
  animation: tetro-float 8s ease-in-out infinite;
}

.tetro span {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--tc, var(--gold));
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.35);
}

.tetro--t span:nth-child(1){ left:0;   top:0;  }
.tetro--t span:nth-child(2){ left:19px;top:0;  }
.tetro--t span:nth-child(3){ left:38px;top:0;  }
.tetro--t span:nth-child(4){ left:19px;top:19px;}

.tetro--o span:nth-child(1){ left:0;   top:0;  }
.tetro--o span:nth-child(2){ left:19px;top:0;  }
.tetro--o span:nth-child(3){ left:0;   top:19px;}
.tetro--o span:nth-child(4){ left:19px;top:19px;}

.tetro--s span:nth-child(1){ left:19px;top:0;  }
.tetro--s span:nth-child(2){ left:38px;top:0;  }
.tetro--s span:nth-child(3){ left:0;   top:19px;}
.tetro--s span:nth-child(4){ left:19px;top:19px;}

.tetro--z span:nth-child(1){ left:0;   top:0;  }
.tetro--z span:nth-child(2){ left:19px;top:0;  }
.tetro--z span:nth-child(3){ left:19px;top:19px;}
.tetro--z span:nth-child(4){ left:38px;top:19px;}

.tetro--l span:nth-child(1){ left:0; top:0;  }
.tetro--l span:nth-child(2){ left:0; top:19px;}
.tetro--l span:nth-child(3){ left:0; top:38px;}
.tetro--l span:nth-child(4){ left:19px;top:38px;}

@keyframes tetro-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .08s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .16s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .24s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .tetro { animation: none; }
  .app-shot-frame, .legend-chip { animation: none !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

.logo {
  font-family: 'Fredoka One', cursive;
  font-size: 32px;
  letter-spacing: 1px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 2px;
}

.logo-mark span { border-radius: 2px; }
.logo-mark span:nth-child(1) { background: var(--gold); }
.logo-mark span:nth-child(2) { background: var(--green); }
.logo-mark span:nth-child(3) { background: var(--blue); }
.logo-mark span:nth-child(4) { background: var(--red); }

.logo .de { color: var(--gold); }
.logo .tris { color: var(--red); }

.section-title {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 760px;
  margin-bottom: 42px;
  font-weight: 600;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  text-decoration: none;
  border-radius: 12px;
  padding: 14px 30px;
  font-weight: 800;
  transition: 0.2s ease;
  font-size: 16px;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 4px 20px rgba(245, 197, 24, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--gold-dark);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  border: 2px solid rgba(255,255,255,0.25);
  color: var(--white);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.97);
}

.badge {
  display: inline-block;
  background: rgba(245, 197, 24, 0.15);
  border: 1px solid rgba(245, 197, 24, 0.4);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(17, 28, 78, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 100;
}

.nav-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

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

.nav-links .nav-cta {
  background: var(--gold);
  color: var(--navy-dark);
  padding: 10px 22px;
  border-radius: 8px;
}

.nav-links .nav-cta:hover {
  color: var(--navy-dark);
  background: var(--gold-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: 0.25s ease;
}

.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#hero {
  padding: 150px 0 100px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  font-size: 46px;
  line-height: 1.18;
  margin-bottom: 20px;
}

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

.hero-text p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 30px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-legend span.hint {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  margin-right: 4px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.legend-pill i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend-pill--subject i { background: var(--gold); }
.legend-pill--verb i { background: var(--green); }
.legend-pill--object i { background: var(--blue); }

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(245,197,24,0.22), transparent 62%);
  filter: blur(6px);
  z-index: -1;
}

.app-shot-frame {
  max-width: 320px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 30px rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-shot-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.28);
}

.hero-visual .app-shot-frame {
  animation: frame-float 5.5s ease-in-out infinite;
}

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

.app-shot-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
}

.app-shot-frame h3 {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

.legend-chip {
  position: absolute;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--navy-dark);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
  animation: tetro-float 6.5s ease-in-out infinite;
  z-index: 2;
}

.legend-chip--subject { background: var(--gold); top: 6%; left: -6%; }
.legend-chip--verb { background: var(--green); color: #fff; top: 46%; right: -10%; animation-delay: .8s; }
.legend-chip--object { background: var(--blue); color: #062038; bottom: 8%; left: -4%; animation-delay: 1.6s; }

#problem {
  padding: 90px 0;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.problem-card {
  padding: 28px 24px;
  border-top: 3px solid var(--gold);
}

.problem-card:nth-child(1) { border-top-color: var(--gold); }
.problem-card:nth-child(2) { border-top-color: var(--green); }
.problem-card:nth-child(3) { border-top-color: var(--blue); }
.problem-card:nth-child(4) { border-top-color: var(--red); }

.problem-number {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 12px;
}

.problem-card:nth-child(2) .problem-number { color: var(--green); }
.problem-card:nth-child(3) .problem-number { color: var(--blue); }
.problem-card:nth-child(4) .problem-number { color: var(--red); }

.problem-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.problem-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 600;
}

.solution-text {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

.mid-cta {
  margin-top: 36px;
  text-align: center;
}

#how {
  padding: 100px 0;
  overflow: hidden;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-number {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  font-size: 15px;
  flex-shrink: 0;
}

.step:not(:last-child) .step-number::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 24px;
  background: rgba(255,255,255,0.15);
}

.step:nth-child(1) .step-number { background: var(--gold); color: var(--navy-dark); }
.step:nth-child(2) .step-number { background: var(--green); color: #fff; }
.step:nth-child(3) .step-number { background: var(--blue); color: var(--navy-dark); }
.step:nth-child(4) .step-number { background: var(--red); color: #fff; }

.step h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 5px;
}

.step p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.screens-column {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

#learn {
  padding: 90px 0;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.topic-card {
  padding: 22px 18px;
  text-align: center;
  background: linear-gradient(135deg, rgba(45,75,196,0.28), rgba(13,22,68,0.5));
  border: 1px solid rgba(100,181,246,0.2);
  border-radius: 16px;
  border-top: 3px solid var(--gold);
  transition: transform 0.25s ease;
}

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

.topic-card:nth-child(1) { border-top-color: var(--gold); }
.topic-card:nth-child(2) { border-top-color: var(--green); }
.topic-card:nth-child(3) { border-top-color: var(--blue); }
.topic-card:nth-child(4) { border-top-color: var(--red); }
.topic-card:nth-child(5) { border-top-color: var(--gold); }

.topic-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.topic-card p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.level-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245,197,24,0.3);
  background: rgba(245,197,24,0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

#features {
  padding: 100px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
}

.feature-item {
  padding: 20px;
  border-left: 3px solid var(--gold);
}

.feature-item:nth-child(1) { border-left-color: var(--gold); }
.feature-item:nth-child(2) { border-left-color: var(--green); }
.feature-item:nth-child(3) { border-left-color: var(--blue); }

.feature-item h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

#seo-copy {
  padding: 90px 0;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.seo-card {
  padding: 24px;
  border-left: 3px solid var(--gold);
}

.seo-card:nth-child(1) { border-left-color: var(--gold); }
.seo-card:nth-child(2) { border-left-color: var(--green); }
.seo-card:nth-child(3) { border-left-color: var(--blue); }

.seo-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

.seo-card p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

#cta {
  padding: 110px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  overflow: hidden;
}

#cta .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 560px;
}

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

#support {
  padding: 90px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

#support .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 560px;
}

.support-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

footer {
  padding: 38px 0;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Legal / policy page ---------- */
#policy-hero {
  padding: 150px 0 50px;
}

#policy-content {
  padding: 0 0 110px;
}

.policy-card {
  padding: 44px;
}

.policy-card p {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
  margin-bottom: 16px;
}

.policy-card h2 {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  font-size: 20px;
  color: var(--gold);
  margin: 36px 0 12px;
}

.policy-card h2:first-of-type {
  margin-top: 0;
}

.policy-card ul {
  margin: 0 0 16px 22px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.9;
}

.policy-card li {
  margin-bottom: 4px;
}

.policy-card a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}

.policy-card a:hover {
  color: var(--gold-dark);
}

@media (max-width: 1000px) {
  .hero-grid,
  .how-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .problem-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }

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

  .screens-column {
    grid-template-columns: 1fr 1fr;
  }

  .tetro { display: none; }
}

@media (max-width: 760px) {
  .app-shot-frame {
    max-width: 250px;
  }

  .app-shot-frame img {
    max-width: 100%;
    margin: auto;
  }

  .legend-chip { display: none; }

  .nav-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-dark);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
  }

  .nav-links.is-open {
    max-height: 420px;
    padding: 14px 24px 22px;
  }

  .nav-links li {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links li:last-child {
    border-bottom: none;
    padding-top: 16px;
  }

  .nav-links .nav-cta {
    display: block;
    text-align: center;
  }

  .hero-grid,
  .how-grid,
  .features-grid,
  .problem-grid,
  .seo-grid,
  .topics-grid,
  .screens-column {
    grid-template-columns: 1fr;
  }

  .container,
  .nav-inner,
  .footer-inner {
    width: min(100%, calc(100% - 28px));
  }

  #hero { padding: 130px 0 70px; }

  .hero-title {
    font-size: 30px;
    line-height: 1.2;
  }

  .section-title { font-size: 26px; }

  .hero-text p,
  .section-subtitle {
    font-size: 16px;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

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

  .footer-links {
    justify-content: center;
  }

  .policy-card { padding: 28px 22px; }
}
