/* Curta o Jogo — folha de estilo principal */
/* Fontes hospedadas no próprio site (SIL Open Font License 1.1) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/figtree-latin.woff2") format("woff2"); }
:root {
  --ink: #13203b;
  --ink-2: #3c4a66;
  --muted: #5d6a82;
  --paper: #f4f7fb;
  --card: #ffffff;
  --line: #dce3ee;
  --teal: #08776b;
  --teal-deep: #05584f;
  --teal-soft: #d4f1ea;
  --coral: #e8553f;
  --coral-soft: #fde3dd;
  --sun: #ffc93c;
  --sun-soft: #fff3cf;
  --violet: #5b4bdb;
  --violet-soft: #e6e3fb;
  --sky: #2f7fd8;
  --sky-soft: #dceafb;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(19, 32, 59, .06), 0 8px 24px rgba(19, 32, 59, .08);
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .6rem; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* Cabeçalho */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-head .container { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.logo img { width: 36px; height: 36px; }
.logo em { font-style: normal; color: var(--coral); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a { display: block; padding: .5rem .8rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .97rem; }
.main-nav a:hover { background: var(--paper); color: var(--ink); }
.main-nav a[aria-current] { background: var(--teal-soft); color: var(--teal-deep); }
.nav-btn { display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font: 600 .95rem var(--font-body); color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .nav-btn { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: .6rem 16px 1rem; }
  .main-nav a { border-radius: 10px; padding: .75rem .8rem; }
}

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .8rem 1.35rem; border-radius: 999px; border: 2px solid transparent; font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-soft { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-sm { padding: .5rem .95rem; font-size: .92rem; }

/* Herói */
.hero { padding: 3.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.1rem; }
.chip { display: inline-block; padding: .3rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--sun-soft); color: #6b4d00; }
.chip.teal { background: var(--teal-soft); color: var(--teal-deep); }
.chip.coral { background: var(--coral-soft); color: #9a2a17; }
.chip.violet { background: var(--violet-soft); color: #3a2d9e; }
.hero h1 span { color: var(--teal); }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mosaic a { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease; background: var(--card); }
.mosaic a:nth-child(odd) { transform: rotate(-2deg); }
.mosaic a:nth-child(even) { transform: rotate(2deg) translateY(10px); }
.mosaic a:hover { transform: rotate(0) scale(1.04); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }

/* Seções */
.band { padding: 3.5rem 0; }
.band-white { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: #e9eef7; }
.band-ink h2 { color: #fff; }
.band-ink a { color: var(--sun); }
.kicker { font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); margin-bottom: .5rem; }
.band-head { max-width: 640px; margin-bottom: 2rem; }
.band-head p { color: var(--ink-2); }

/* Por tempo */
.time-cols { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .time-cols { grid-template-columns: repeat(3, 1fr); } }
.time-col { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.time-col h3 { display: flex; align-items: baseline; gap: .5rem; }
.time-col h3 b { font-size: 2rem; color: var(--teal); }
.game-row { display: grid; grid-template-columns: 64px 1fr; gap: .85rem; align-items: center; padding: .7rem; margin-top: .65rem; border-radius: 14px; background: var(--card); text-decoration: none; color: var(--ink); border: 1px solid var(--line); transition: border-color .15s ease, transform .15s ease; }
.game-row:hover { border-color: var(--teal); transform: translateX(3px); color: var(--ink); }
.game-row img { width: 64px; height: 64px; border-radius: 12px; }
.game-row strong { display: block; font-family: var(--font-head); font-size: 1.08rem; }
.game-row span { font-size: .92rem; color: var(--muted); line-height: 1.4; display: block; }

/* Passos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--card); border-radius: var(--radius); padding: 1.4rem; border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); font: 800 1.25rem var(--font-head); margin-bottom: .8rem; }
.steps p { margin: 0; color: var(--ink-2); }

/* Lista "não tem" */
.nope { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
@media (min-width: 700px) { .nope { grid-template-columns: repeat(2, 1fr); } }
.nope li { display: flex; gap: .7rem; align-items: flex-start; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: .85rem 1rem; }
.nope li::before { content: ""; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M7 7l8 8M15 7l-8 8' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/22px no-repeat; margin-top: 2px; }
.nope strong { color: #fff; }

/* Grade de jogos (catálogo) */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: box-shadow .15s ease, transform .15s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--ink); }
.card img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card-body h3 { margin-bottom: .3rem; }
.card-body p { margin: 0 0 .7rem; color: var(--ink-2); font-size: .97rem; }
.meta { display: flex; flex-wrap: wrap; gap: .35rem; }

/* FAQ */
.faq { display: grid; gap: .7rem; }
@media (min-width: 900px) { .faq.two { grid-template-columns: 1fr 1fr; align-items: start; } }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.15rem; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: translateY(-70%) rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 1.15rem 1.1rem; color: var(--ink-2); }
.faq details > div p:last-child { margin: 0; }

/* Caixa de destaque */
.note { border-radius: var(--radius); padding: 1.5rem; background: var(--sun-soft); border: 1px solid #f3dc92; }
.note.teal { background: var(--teal-soft); border-color: #a6ddd1; }
.split { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr auto; } }

/* Páginas internas */
.page-top { padding: 2.5rem 0 1.5rem; }
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: .8rem; }
.crumbs a { color: var(--muted); }
.page-top .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1rem 0 1.5rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; border: 1px solid var(--line); padding: .6rem .7rem; vertical-align: top; }
.prose th { background: var(--paper); }
.updated { display: inline-block; font-size: .88rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.info-grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
dl.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
dl.facts dt { font-weight: 700; }
dl.facts dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }

/* Área de jogo */
.game-shell { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.game-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.game-bar label { font-size: .9rem; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: .4rem; }
.game-bar select { font: 600 .95rem var(--font-body); padding: .4rem .6rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.stats { display: flex; gap: .5rem; margin-left: auto; flex-wrap: wrap; }
.stat { background: var(--paper); border-radius: 10px; padding: .3rem .7rem; font-size: .85rem; color: var(--ink-2); text-align: center; min-width: 74px; }
.stat b { display: block; font: 800 1.15rem var(--font-head); color: var(--ink); }
.game-stage { padding: 1.5rem 1rem 1.25rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.status { min-height: 1.6em; font-weight: 700; text-align: center; margin: 0; }
.status.good { color: var(--teal); }
.status.bad { color: #b3321e; }
.two-col { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
.other-games { display: flex; flex-wrap: wrap; gap: .5rem; }
.other-games a { padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.other-games a:hover { border-color: var(--teal); color: var(--teal-deep); }

/* Resta Um */
.peg-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(4px, 1.4vw, 8px); width: min(100%, 420px); }
.peg-board .void { aspect-ratio: 1; }
.peg { aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; background: #e7ecf4; box-shadow: inset 0 3px 6px rgba(19, 32, 59, .18); padding: 0; position: relative; }
.peg.on::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8b78, var(--coral) 60%, #b63a26); box-shadow: 0 3px 4px rgba(0, 0, 0, .25); }
.peg.sel::after { background: radial-gradient(circle at 35% 30%, #ffe08a, var(--sun) 60%, #c79300); }
.peg.target { background: var(--teal-soft); box-shadow: inset 0 0 0 3px var(--teal); }

/* Ligue 4 */
.c4-wrap { width: min(100%, 470px); }
.c4-drops { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.c4-drops button { border: 0; background: var(--paper); border-radius: 8px; padding: .35rem 0; font: 800 .95rem var(--font-head); color: var(--ink-2); cursor: pointer; }
.c4-drops button:hover:not(:disabled) { background: var(--coral-soft); color: #9a2a17; }
.c4-drops button:disabled { opacity: .4; cursor: default; }
.c4-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; background: var(--sky); padding: 8px; border-radius: 16px; }
.c4-cell { aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: inset 0 3px 5px rgba(0, 0, 0, .2); }
.c4-cell.p1 { background: radial-gradient(circle at 35% 30%, #ff8b78, var(--coral) 65%); }
.c4-cell.p2 { background: radial-gradient(circle at 35% 30%, #ffe08a, var(--sun) 65%); }
.c4-cell.win { box-shadow: 0 0 0 4px var(--ink) inset; }

/* Torre de Hanói */
.hanoi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 640px); }
.peg-col { position: relative; height: 230px; border: 2px solid transparent; border-radius: 14px; background: var(--paper); cursor: pointer; display: flex; flex-direction: column-reverse; align-items: center; padding: 0 6px 14px; font: inherit; }
.peg-col::before { content: ""; position: absolute; bottom: 14px; left: 50%; width: 8px; height: 190px; transform: translateX(-50%); background: #b8c2d3; border-radius: 4px; }
.peg-col::after { content: ""; position: absolute; bottom: 6px; left: 8px; right: 8px; height: 8px; background: #8f9ab0; border-radius: 4px; }
.peg-col.picked { border-color: var(--teal); background: var(--teal-soft); }
.peg-col .lbl { position: absolute; top: 6px; left: 10px; font-weight: 800; color: var(--muted); font-size: .85rem; }
.disc { position: relative; z-index: 1; height: 22px; border-radius: 11px; margin-top: 3px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.disc.lift { transform: translateY(-14px); }

/* Apaga-Luz */
.lights { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: min(100%, 380px); }
.light { aspect-ratio: 1; border-radius: 14px; border: 0; cursor: pointer; background: #2a3654; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); transition: background .12s ease; }
.light.on { background: var(--sun); box-shadow: 0 0 18px rgba(255, 201, 60, .7), inset 0 -4px 0 rgba(0, 0, 0, .12); }

/* Deslize 15 */
.slide { display: grid; gap: 6px; width: min(100%, 380px); background: var(--ink); padding: 8px; border-radius: 16px; }
.tile { aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--violet); color: #fff; font: 800 clamp(1.2rem, 5vw, 1.8rem) var(--font-head); cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.tile.ok { background: var(--teal); }
.tile.blank { background: transparent; box-shadow: none; cursor: default; }

/* Caça-palavras */
.ws-layout { display: grid; gap: 1.25rem; width: 100%; justify-items: center; }
@media (min-width: 860px) { .ws-layout { grid-template-columns: auto 220px; align-items: start; justify-content: center; } }
.ws-grid { display: grid; gap: 3px; width: min(100%, 480px); user-select: none; }
.ws-cell { aspect-ratio: 1; border: 0; border-radius: 6px; background: var(--paper); font: 700 clamp(.85rem, 3.4vw, 1.1rem) var(--font-body); color: var(--ink); cursor: pointer; padding: 0; }
.ws-cell.start { background: var(--sun); }
.ws-cell.found { background: var(--teal-soft); color: var(--teal-deep); }
.ws-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ws-words li { padding: .3rem .7rem; border-radius: 999px; background: var(--paper); font-weight: 700; font-size: .92rem; }
.ws-words li.done { background: var(--teal-soft); color: var(--teal-deep); text-decoration: line-through; }

/* Rodapé */
.site-foot { background: var(--ink); color: #c9d2e3; padding: 3rem 0 1.5rem; margin-top: 0; font-size: .95rem; }
.site-foot a { color: #e9eef7; text-decoration: none; }
.site-foot a:hover { color: var(--sun); text-decoration: underline; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-foot .logo { color: #fff; }
.site-foot h2 { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sun); margin-bottom: .8rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.linkish { background: none; border: 0; padding: 0; color: #e9eef7; font: inherit; cursor: pointer; text-align: left; }
.linkish:hover { color: var(--sun); text-decoration: underline; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 2.2rem; padding-top: 1.2rem; font-size: .86rem; color: #a9b4ca; display: grid; gap: .35rem; }

/* Consentimento */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; max-width: 720px; margin: 0 auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(19, 32, 59, .25); padding: 1.1rem 1.2rem; }
.consent p { margin: 0 0 .8rem; font-size: .95rem; color: var(--ink-2); }
.consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent-actions .btn { flex: 1 1 140px; }
.prefs { position: fixed; inset: 0; z-index: 70; background: rgba(19, 32, 59, .55); display: grid; place-items: center; padding: 16px; }
.prefs[hidden], .consent[hidden] { display: none; }
.prefs-box { background: var(--card); border-radius: 20px; padding: 1.5rem; max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; }
.pref { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.pref input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--teal); }
.pref label { font-weight: 700; }
.pref p { margin: .2rem 0 0; font-size: .92rem; color: var(--ink-2); }

.notfound { text-align: center; padding: 5rem 0; }
.notfound .big { font: 800 clamp(4rem, 14vw, 8rem) var(--font-head); color: var(--coral); line-height: 1; }
