:root {
  --bg: #fef8eb;
  --text: #1e2a3a;
  --muted: #3b4d63;
  --card: #ffffff;
  --line: #d8e4f0;
  --primary: #ff8b2c;
  --primary-dark: #e56d0b;
  --secondary: #1f87c9;
  --accent: #38b46c;
  --shadow: 0 14px 30px rgba(31, 42, 62, 0.11);
  --radius: 18px;
  --base-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--base-size);
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 15% 8%, #fff8d4 0%, var(--bg) 35%, #eef9ff 100%);
  font-family: "Manrope", "Trebuchet MS", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--secondary);
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  opacity: 0.28;
  z-index: -1;
}

.bg-shape-1 {
  width: 22rem;
  height: 22rem;
  background: #ffb870;
  top: -5rem;
  left: -6rem;
}

.bg-shape-2 {
  width: 24rem;
  height: 24rem;
  background: #8fd9ff;
  right: -8rem;
  bottom: -8rem;
}

.topbar,
main,
.footer {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0.8rem;
  z-index: 10;
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 30%);
  background: color-mix(in srgb, white, transparent 7%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid #e8edf3;
}

.brand-name {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
}

.menu {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-left: auto;
}

.menu a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.controls {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.controls button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  border-radius: 9px;
  padding: 0.36rem 0.6rem;
  cursor: pointer;
}

main {
  padding: 3rem 0 2rem;
}

.hero {
  background: linear-gradient(130deg, #fff 0%, #fff5e8 42%, #eaf7ff 100%);
  border: 1px solid #fff;
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 2.6rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.87rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 800;
}

.hero h1 {
  margin: 0.65rem 0 0.9rem;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.1;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
}

.hero h1 span {
  color: var(--primary-dark);
}

.hero-copy {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.btn {
  text-decoration: none;
  font-weight: 800;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-secondary {
  border-color: var(--secondary);
  color: var(--secondary);
}

.domain-row {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.4rem 0.75rem;
  border: 1px dashed #b7cde2;
  border-radius: 12px;
  background: #fffdf8;
}

.domain-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.domain-link {
  font-weight: 800;
  text-decoration: none;
}

.pillars {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pillars li {
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dde8f2;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.section {
  margin-top: 2rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3.7vw, 2rem);
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
}

h3 {
  margin: 0;
}

.section-intro {
  color: var(--muted);
  margin: 0.55rem 0 0;
}

.grid-3 {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.card,
.panel,
.world-card,
.news-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.ai-safe {
  margin-top: 1rem;
  background: linear-gradient(120deg, #f4fbff 0%, #f7fff6 100%);
  border: 1px solid #cce5f7;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.ai-safe h3 {
  margin: 0;
}

.ai-safe p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.ai-safe ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

.mascots-grid {
  margin-top: 1rem;
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  scroll-snap-type: x proximity;
}

.mascot-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  flex: 0 0 230px;
  scroll-snap-align: start;
}

.mascot-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.mascot-role {
  margin-top: 0.2rem;
  font-weight: 800;
  color: #355270;
  font-size: 0.92rem;
}

.mascot-figure {
  margin: 0 0 0.65rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dce7f3;
  background: #eff6ff;
  position: relative;
  height: 185px;
}

.mascot-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}

.mascot-fallback {
  display: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  font-size: 2.05rem;
  background: linear-gradient(145deg, #fff9ea 0%, #eef7ff 100%);
}

.mascot-fallback-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #664300;
}

.mascot-figure.no-image .mascot-img {
  display: none;
}

.mascot-figure.no-image .mascot-fallback {
  display: flex;
}

.worlds {
  margin-top: 1rem;
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  scroll-snap-type: x proximity;
}

.world-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease;
  flex: 0 0 245px;
  scroll-snap-align: start;
}

.world-card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.world-card span {
  color: var(--muted);
}

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

.coming-soon {
  border-style: dashed;
}

.news-list {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.news-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.news-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e9f4ff;
  color: #105683;
  font-size: 0.8rem;
  font-weight: 800;
}

.news-status {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #edffef;
  color: #166338;
  font-size: 0.8rem;
  font-weight: 800;
}

.news-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 700;
  text-decoration: none;
}

.news-loading {
  margin: 0;
  color: var(--muted);
}

.dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.panel h2 {
  margin-bottom: 0.35rem;
}

.panel ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.panel p {
  margin: 0.45rem 0 0;
}

.playful {
  background: linear-gradient(160deg, #f6fdff 0%, #f9fff3 100%);
}

.institutional-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.legal-links {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.small-note {
  font-size: 0.86rem;
  color: #6a7a8b;
}

.footer {
  position: relative;
  margin-top: 2rem;
  margin-bottom: 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1rem;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to top,
      rgba(255, 255, 255, 0.66) 0%,
      rgba(255, 255, 255, 0.78) 42%,
      rgba(255, 255, 255, 0.88) 100%
    ),
    url("./assets/nomes-criancas.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: min(100%, 900px) auto;
  pointer-events: none;
  z-index: 0;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
}

.footer-title {
  margin: 0;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.footer p {
  margin: 0.45rem 0 0;
}

.footer ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.copy {
  position: relative;
  z-index: 1;
  margin: 0.8rem 0 0;
  color: #6a7a8b;
  font-size: 0.9rem;
  border-top: 1px solid #e6edf4;
  padding-top: 0.7rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.legal-page {
  width: min(900px, 92vw);
  margin: 1rem auto 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.legal-page .back-link {
  text-decoration: none;
  font-weight: 700;
}

.legal-page h1 {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin: 0.6rem 0 0.7rem;
}

.legal-page h2 {
  margin-top: 1.15rem;
}

.legal-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

body.high-contrast {
  --bg: #f9f9f9;
  --text: #111;
  --muted: #1f1f1f;
  --card: #fff;
  --line: #000;
  --primary: #ffcb00;
  --primary-dark: #d3a700;
  --secondary: #004cff;
}

@media (max-width: 980px) {
  .topbar {
    border-radius: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu {
    order: 3;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .grid-3,
  .news-list,
  .dual,
  .institutional-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .controls {
    width: 100%;
    justify-content: center;
  }

  .domain-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .world-card {
    flex: 0 0 78vw;
    max-width: 245px;
  }

  .mascot-card {
    flex: 0 0 82vw;
    max-width: 255px;
  }

  .mascot-figure {
    height: 150px;
  }
}
