:root {
  --green-deep: #1b4332;
  --green-mid: #2d6a4f;
  --green-bright: #52b788;
  --green-glow: #95d5b2;
  --earth: #5c4033;
  --earth-light: #8b5e3c;
  --cream: #fff9ef;
  --cream-dark: #f3e6d0;
  --sky: #4cc9f0;
  --gold: #f4a261;
  --text: #1a2e1f;
  --text-muted: #4a5f50;
  --shadow: 0 12px 40px rgba(27, 67, 50, 0.18);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --nav-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--green-mid);
  text-decoration: none;
}

a:hover {
  color: var(--green-deep);
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Nav */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 249, 239, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 106, 79, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--earth);
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-muted);
}

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

.nav-toggle {
  display: none;
  border: none;
  background: var(--green-mid);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

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

.btn-primary {
  background: linear-gradient(180deg, #6bcf8a 0%, #2d6a4f 100%);
  color: #fff;
  box-shadow: 0 6px 0 #1b4332, var(--shadow);
}

.btn-primary:hover {
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(180deg, #7dd3fc 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 5px 0 #1d4ed8, 0 8px 24px rgba(59, 130, 246, 0.35);
}

.btn-secondary:hover {
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--earth);
  border: 2px solid rgba(92, 64, 51, 0.2);
}

/* Hero */
.hero {
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(149, 213, 178, 0.45), transparent),
    linear-gradient(180deg, #e8f5e9 0%, var(--cream) 55%);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: rgba(45, 106, 79, 0.12);
  color: var(--green-mid);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  line-height: 1.12;
  color: var(--earth);
  margin: 0 0 1rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 32ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat {
  text-align: left;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-mid);
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-phone {
  width: min(320px, 85%);
  border-radius: 28px;
  box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, 0.5);
}

.hero-float {
  position: absolute;
  width: 38%;
  border-radius: 16px;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.hero-float.left {
  left: -4%;
  bottom: 8%;
  animation-delay: -1s;
}

.hero-float.right {
  right: -6%;
  top: 12%;
}

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

/* Sections */
section {
  padding: 5rem 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-label {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-bright);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: var(--earth);
  margin: 0.5rem 0 0.75rem;
}

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

/* Worlds */
.worlds {
  background: linear-gradient(180deg, var(--cream) 0%, #e8f5e9 100%);
}

.world-map-wrap {
  margin-bottom: 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 520px;
  margin-inline: auto;
}

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

.world-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(27, 67, 50, 0.1);
  border: 1px solid rgba(45, 106, 79, 0.08);
  transition: transform 0.2s ease;
}

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

.world-card img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.world-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.world-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  color: var(--earth);
  font-size: 1.2rem;
}

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

.world-icon {
  font-size: 1.35rem;
  margin-right: 0.35rem;
}

/* How to play */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(45, 106, 79, 0.1);
  box-shadow: 0 6px 20px rgba(27, 67, 50, 0.06);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-mid);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  color: var(--earth);
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

.feature-shot {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: 600;
  color: var(--text);
}

.feature-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green-glow);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.feature-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.feature-block {
  background: linear-gradient(145deg, #fff 0%, var(--cream-dark) 100%);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(92, 64, 51, 0.1);
}

.feature-block h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--earth);
}

.feature-block p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Gallery */
.gallery-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroll img {
  flex: 0 0 auto;
  width: 200px;
  border-radius: 16px;
  scroll-snap-align: start;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(45, 106, 79, 0.15);
}

.faq-item button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--earth);
  text-align: left;
  cursor: pointer;
}

.faq-item button .icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-glow);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.faq-item.open button .icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* CTA */
.cta-band {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 50%, #40916c 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 0 auto;
  width: min(1120px, 92vw);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 0.75rem;
}

.cta-band p {
  margin: 0 auto 1.75rem;
  max-width: 42ch;
  opacity: 0.92;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  background: var(--earth);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer a {
  color: var(--green-glow);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--green-glow);
  cursor: pointer;
}

.footer-links button:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.75;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 46, 31, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: min(640px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
  background: var(--cream);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.25rem;
  color: var(--earth);
}

.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--cream-dark);
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--earth);
}

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--cream-dark);
  padding: 0 1rem;
  background: var(--cream);
}

.modal-tabs button {
  flex: 1;
  padding: 0.85rem;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.modal-tabs button.active {
  color: var(--green-mid);
  border-bottom-color: var(--green-mid);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.modal-body h3 {
  font-family: var(--font-display);
  color: var(--earth);
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body ul {
  padding-left: 1.25rem;
}

.modal-body p {
  margin: 0 0 0.75rem;
}

.legal-panel {
  display: none;
}

.legal-panel.active {
  display: block;
}

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

  .hero-visual {
    order: -1;
  }

  .hero-float {
    display: none;
  }

  .steps,
  .feature-blocks {
    grid-template-columns: 1fr;
  }

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

/* Standalone legal pages */
.legal-page-main {
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
  min-height: 60vh;
}

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(27, 67, 50, 0.08);
  border: 1px solid rgba(45, 106, 79, 0.1);
}

.legal-doc h1 {
  font-family: var(--font-display);
  color: var(--earth);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 0.35rem;
}

.legal-doc .legal-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
}

.legal-doc h2 {
  font-family: var(--font-display);
  color: var(--earth);
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

.legal-doc h2:first-of-type {
  margin-top: 0;
}

.legal-doc p,
.legal-doc li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.legal-doc ul {
  padding-left: 1.25rem;
}

.legal-doc .legal-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cream-dark);
}

@media (max-width: 768px) {
  .legal-doc {
    padding: 1.5rem 1.25rem;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(45, 106, 79, 0.12);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}
