:root {
  --sky-top: #9bd7ff;
  --sky-bottom: #e8f6ff;
  --grass: #7cc66b;
  --grass-dark: #4e9f5b;
  --ink: #1f2a44;
  --ink-soft: #4a5875;
  --paper: #ffffff;
  --cream: #fff8ec;
  --line: #e3e8f2;
  --accent: #ff8a3d;
  --accent-dark: #e06a1c;
  --danger: #d64545;
  --ok: #2e9e6b;
  --radius: 18px;
  --shadow: 0 6px 0 rgba(31, 42, 68, 0.12), 0 14px 30px rgba(31, 42, 68, 0.08);
  --font-title: 'Baloo 2', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

img { max-width: 100%; }

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

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* Cabeçalho */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--font-title); font-weight: 800; font-size: 1.5rem; }
.brand span { font-size: 1.7rem; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; }
.top nav a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.top nav a:hover { color: var(--accent-dark); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border: 0; border-radius: 999px;
  font: 800 1.05rem var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--accent); color: #fff;
  box-shadow: 0 5px 0 var(--accent-dark);
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-dark); }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Hero */
.hero {
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  position: relative; overflow: hidden;
  padding: 72px 0 120px;
}
.hero::after {
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 140px;
  background: var(--grass); border-radius: 50% 50% 0 0;
  box-shadow: inset 0 10px 0 rgba(255,255,255,.25);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-title); font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 16px; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 28px; max-width: 34em; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }

/* Tabuleiro de exemplo */
.board {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  padding: 14px; background: #fff; border-radius: 24px; box-shadow: var(--shadow);
  max-width: 380px; margin-inline: auto; transform: rotate(-3deg);
}
.cell {
  aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center;
  font-size: clamp(1.1rem, 4.5vw, 1.9rem); font-weight: 900; color: rgba(31,42,68,.35);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.12);
}
.cell.a { background: #ffd166; }
.cell.b { background: #8ecae6; }
.cell.c { background: #b5e48c; }
.cell.d { background: #f4a1c1; }
.cell.e { background: #c3aef0; }
.cell.pop { animation: pop 2.4s ease-in-out infinite; }
@keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Seções */
section { padding: 72px 0; }
section h2 { font-family: var(--font-title); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; text-align: center; }
section .sub { text-align: center; color: var(--ink-soft); max-width: 40em; margin: 0 auto 40px; }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card .icon { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.card h3 { margin: 0 0 6px; font-family: var(--font-title); font-size: 1.3rem; }
.card p { margin: 0; color: var(--ink-soft); }

.worlds { background: #fff; }
.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.world { border-radius: var(--radius); padding: 18px; color: var(--ink); box-shadow: inset 0 -6px 0 rgba(0,0,0,.1); }
.world b { display: block; font-family: var(--font-title); font-size: 1.15rem; }
.world .em { font-size: 2rem; }
.world small { color: rgba(31,42,68,.75); font-size: .9rem; }
.w1 { background: #cdeec3; } .w2 { background: #d4ecfb; } .w3 { background: #c9e6cf; }
.w4 { background: #bfe8d6; } .w5 { background: #ffe2b3; } .w6 { background: #ffd4b0; }
.w7 { background: #c8eee8; } .w8 { background: #c4e2f7; } .w9 { background: #ffd9e7; }
.w10 { background: #dde3ee; } .w11 { background: #c9cdf0; } .w12 { background: #f1dcff; }

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

/* Contato */
.contact { background: linear-gradient(var(--cream), #ffeeda); }
form.contact-form { background: var(--paper); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); max-width: 720px; margin: 0 auto; display: grid; gap: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: grid; gap: 6px; font-weight: 700; }
label .opt { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fbfcff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; font-weight: 700; min-height: 1.6em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }

/* Rodapé */
footer { background: var(--ink); color: #c9d2e6; padding: 40px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Páginas legais */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 820px; }
.doc article { background: var(--paper); border-radius: 24px; padding: 40px; box-shadow: var(--shadow); }
.doc h1 { font-family: var(--font-title); font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 4px; }
.doc .updated { color: var(--ink-soft); margin: 0 0 28px; }
.doc h2 { font-family: var(--font-title); font-size: 1.4rem; margin: 32px 0 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { background: #f5f7fb; }
.table-scroll { overflow-x: auto; }
.callout { background: #fff4e6; border-left: 5px solid var(--accent); padding: 16px 20px; border-radius: 12px; margin: 20px 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; margin-bottom: 16px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 900;
}

@media (max-width: 860px) {
  .hero .wrap, .rules, .features, .row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 110px; }
  .board { max-width: 300px; }
  .top nav { display: none; }
  .doc article { padding: 24px; }
  form.contact-form { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .cell.pop { animation: none; }
  html { scroll-behavior: auto; }
}
