/* Oficina Infantil CLIMESA - site público */
:root {
  --navy: #142161;
  --ink: #1b2a5a;
  --ink-soft: #3a4a82;
  --orange: #F9A524;
  --orange-dark: #d4861a;
  --sky: #58B9F0;
  --pink: #FF7EA8;
  --mint: #5FD0A5;
  --mint-dark: #3fbf92;
  --purple: #9A7BE6;
  --yellow: #FFD23F;
  --line: #c9d6f2;
  --danger: #c62a2f;
  --radius: 22px;
  --font: "Arial Rounded MT Bold", "Nunito", "Baloo 2", "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.pub {
  margin: 0; min-height: 100vh; position: relative; overflow-x: hidden;
  font-family: var(--font); font-size: 17px; line-height: 1.5; color: var(--ink);
  background: #9fd8f7;
}
/* Fundo ilustrado: camada fixa (funciona também no iPhone). Telas em pé usam a arte vertical; telas largas, a horizontal. */
body.pub::before {
  content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none;
  background: #9fd8f7 url("../img/bg-mobile.webp") center / cover no-repeat;
}
@media (min-aspect-ratio: 1/1) {
  body.pub::before { background-image: url("../img/bg-desktop.webp"); }
}
a { color: var(--navy); }

/* usa a propriedade 'scale' (não 'transform') para não brigar com a rotação das letras; sem fill-mode: se a animação não rodar, o texto fica visível */
@keyframes pop { 0% { scale: .7; opacity: 0; } 70% { scale: 1.06; } 100% { scale: 1; opacity: 1; } }

/* ---------- Estrutura ---------- */
.top { position: relative; z-index: 2; text-align: center; padding: 18px 16px 0; }
.brand { display: inline-block; }
.brand img { display: block; width: 150px; height: auto; margin: 0 auto; filter: drop-shadow(0 4px 8px rgba(20, 33, 97, .15)); }
.wrap { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 0 18px 24px; }
.wrap-narrow { max-width: 720px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 8px 0 22px; }
.kicker {
  display: inline-block; margin: 8px 0 10px; padding: 6px 18px; border-radius: 999px;
  background: var(--yellow); color: var(--navy); font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 4px 0 #e0b21f;
}
.title { margin: 6px 0 8px; font-size: clamp(2.35rem, 9vw, 4.3rem); line-height: 1.04; font-weight: 900; letter-spacing: .01em; }
.title .word { display: inline-block; white-space: nowrap; }
.title .ch { display: inline-block; animation: pop .5s ease-out; -webkit-text-stroke: 8px #fff; paint-order: stroke fill; text-shadow: 0 4px 0 rgba(20, 33, 97, .2); }
.title .ch:nth-child(odd) { transform: rotate(-3deg); }
.title .ch:nth-child(even) { transform: translateY(-3px) rotate(2.5deg); }
.c-orange { color: var(--orange); } .c-sky { color: var(--sky); } .c-pink { color: var(--pink); }
.c-mint { color: var(--mint-dark); } .c-purple { color: var(--purple); } .c-navy { color: var(--navy); }
.subtitle { max-width: 30em; margin: 0 auto 22px; font-size: 1.18rem; font-weight: 700; color: var(--navy); text-shadow: 0 0 8px rgba(255, 255, 255, .95), 0 0 3px rgba(255, 255, 255, .95); }

.facts { list-style: none; margin: 0 auto 20px; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.fact {
  background: #fff; border-radius: var(--radius); padding: 14px 16px 14px 74px; position: relative; text-align: left;
  box-shadow: 0 10px 24px rgba(20, 33, 97, .09); border-bottom: 5px solid var(--sky); min-height: 74px;
}
.fact .ico { position: absolute; left: 14px; top: 50%; width: 46px; height: 46px; margin-top: -23px; padding: 10px; border-radius: 16px; }
.fact-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6272a8; }
.fact strong { display: block; font-size: 1.08rem; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; }
.f-sky { border-color: var(--sky); } .f-sky .ico { background: #dff3fd; color: #1c8dc9; }
.f-orange { border-color: var(--orange); } .f-orange .ico { background: #fff0d4; color: #c97d0a; }
.f-mint { border-color: var(--mint); } .f-mint .ico { background: #dcf6ec; color: #249a72; }

.slots {
  display: inline-block; margin: 6px 0 0; padding: 10px 24px; border-radius: 999px; background: #fff;
  border: 3px solid var(--orange); font-weight: 800; color: var(--navy); box-shadow: 0 6px 0 rgba(249, 165, 36, .35);
}
.slots b { font-size: 1.5em; color: #c97d0a; padding: 0 .1em; }
.slots-full { border-color: var(--pink); box-shadow: 0 6px 0 rgba(255, 126, 168, .35); }
.slots-closed { border-color: #9aa5c4; box-shadow: 0 6px 0 rgba(154, 165, 196, .35); }


/* Cartão "Local": toca em qualquer parte e abre o mapa com a rota */
.fact-map { transition: transform .12s, box-shadow .12s; }
.fact-map:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(20, 33, 97, .16); }
.fact-link { color: inherit; text-decoration: none; display: block; }
.fact-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.fact-link:focus-visible { outline: none; }
.fact-link:focus-visible::after { outline: 3px solid var(--navy); outline-offset: 2px; }
.fact-cta {
  display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 999px; background: #dcf6ec; color: #17785a;
  font-size: .76rem; font-weight: 800; letter-spacing: .02em;
}
.fact-map:active { transform: scale(.985); }

/* ---------- Cartão do formulário ---------- */
.card {
  position: relative; background: #fff; border-radius: 32px; padding: 34px 20px 26px; margin-top: 10px; overflow: hidden;
  box-shadow: 0 22px 44px rgba(20, 33, 97, .14);
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--purple), var(--sky), var(--mint));
}
.card-title { margin: 0 0 4px; font-size: 1.7rem; line-height: 1.15; color: var(--navy); }
.card-lead { margin: 0 0 18px; color: var(--ink-soft); }

.field { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; margin: 0 0 6px; padding: 0; font-weight: 800; font-size: .95rem; color: var(--navy); }
.field input[type="text"], .field input[type="tel"], .field input[type="password"] {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 1rem; color: var(--ink); background: #f8faff;
  border: 2.5px solid var(--line); border-radius: 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: #98a4c9; }
.field input:focus { background: #fff; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(88, 185, 240, .28); }
.field.has-error input[type="text"], .field.has-error input[type="tel"], .field.has-error input[type="password"] { border-color: var(--danger); background: #fff6f6; }
.field.has-error input:focus { box-shadow: 0 0 0 4px rgba(198, 42, 47, .18); }
.error { margin: 6px 2px 0; min-height: 0; font-size: .88rem; font-weight: 700; color: var(--danger); }
.error:empty { display: none; }
.row { display: grid; grid-template-columns: 104px 1fr; gap: 12px; }

.choice .pills { display: flex; gap: 10px; }
.pill { position: relative; flex: 0 0 auto; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.pill span {
  display: inline-block; min-width: 96px; text-align: center; padding: 12px 26px; border-radius: 999px; font-weight: 800;
  border: 2.5px solid var(--line); background: #f8faff; color: var(--navy); transition: all .15s;
}
.pill input:checked + span { background: var(--mint); border-color: var(--mint-dark); color: #0a3a2a; box-shadow: 0 4px 0 rgba(63, 191, 146, .45); }
.pill input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.has-error .pill span { border-color: var(--danger); }

.btn {
  display: block; width: 100%; margin-top: 8px; padding: 16px 20px; font: inherit; font-size: 1.2rem; font-weight: 900; text-align: center;
  text-decoration: none; color: var(--navy); background: var(--orange); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 0 var(--orange-dark); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--orange-dark); }
.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn[disabled] { opacity: .75; cursor: progress; transform: translateY(4px); box-shadow: 0 2px 0 var(--orange-dark); }
.btn-small { display: inline-block; width: auto; padding: 11px 26px; font-size: 1rem; }
.btn-ghost { background: #fff; border: 2.5px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.privacy { margin: 14px 0 0; font-size: .86rem; color: #5a6a9e; text-align: center; }
.form-alert {
  margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; background: #fff0f0; border: 2px solid #f3b4b6;
  color: var(--danger); font-weight: 700;
}
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mensagens (sucesso / lotado / encerrado) ---------- */
.done { text-align: center; padding: 6px 4px 4px; animation: pop .45s ease-out; }
.done[hidden] { display: none; }
.done h2 { margin: 12px 0 8px; font-size: 1.7rem; line-height: 1.2; color: var(--navy); }
.done-text { margin: 0 0 8px; font-size: 1.1rem; }
.done-note { margin: 0 0 16px; color: var(--ink-soft); }
.done-badge { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: var(--mint); box-shadow: 0 6px 0 var(--mint-dark); }
.done-badge svg { width: 46px; height: 46px; color: #fff; }
.badge-full { background: var(--pink); box-shadow: 0 6px 0 #e0618a; }
.badge-full svg { width: 44px; height: 44px; }
.done-full h2 { font-size: 1.55rem; }

/* ---------- Páginas de texto ---------- */
.doc { padding-top: 38px; }
.doc-title { margin: 0 0 12px; font-size: 1.9rem; line-height: 1.15; color: var(--navy); }
.doc h2 { margin: 22px 0 4px; font-size: 1.15rem; color: var(--navy); }
.doc p { margin: 0 0 8px; }
.doc-back { margin-top: 22px; }

/* ---------- Rodapé ---------- */
.foot { position: relative; z-index: 1; margin-top: 40px; padding: 0 12px; }
.foot-body { max-width: 860px; margin: 0 auto; background: rgba(255, 255, 255, .93); color: var(--ink); text-align: center; padding: 18px 16px 22px; font-size: .92rem; border-radius: 26px 26px 0 0; box-shadow: 0 -8px 30px rgba(20, 33, 97, .1); }
.foot-body p { margin: 4px 0; }
.foot-body a { color: var(--navy); font-weight: 800; }

/* ---------- Telas maiores ---------- */
@media (min-width: 700px) {
  body.pub { font-size: 18px; }
  .brand img { width: 190px; }
  .facts-3 { grid-template-columns: repeat(3, 1fr); }
  .facts-2 { grid-template-columns: repeat(2, 1fr); max-width: 640px; }
  .fact { padding: 74px 14px 14px; text-align: center; min-height: 0; }
  .fact .ico { left: 50%; top: 14px; margin: 0 0 0 -23px; }
  .card { padding: 40px 38px 32px; }
  .row { grid-template-columns: 130px 1fr; gap: 16px; }
  .btn { width: auto; min-width: 320px; margin-left: auto; margin-right: auto; }
  form .btn { display: block; }
}
@media (max-width: 420px) {
  .card { padding-left: 16px; padding-right: 16px; }
}

/* ================= Celular: topo compacto, formulário logo na primeira tela ================= */
@media (max-width: 699px) {
  body.pub { font-size: 16px; }
  .top { padding: 10px 16px 0; }
  .brand img { width: 108px; height: auto; }
  .wrap { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); padding-bottom: 12px; }
  .hero { padding: 0 0 12px; }
  .kicker { margin: 4px 0 6px; padding: 4px 14px; font-size: .66rem; letter-spacing: .12em; box-shadow: 0 3px 0 #e0b21f; }
  .title { font-size: clamp(1.95rem, 9.6vw, 2.7rem); margin: 0 0 6px; line-height: 1.02; }
  .title .ch { -webkit-text-stroke: 6px #fff; }
  .subtitle { max-width: 23em; margin: 0 auto 12px; font-size: 1rem; line-height: 1.35; }
  .facts { gap: 8px; margin: 0 auto 12px; }
  .fact { min-height: 0; padding: 9px 12px 9px 60px; border-bottom-width: 4px; border-radius: 18px; box-shadow: 0 6px 16px rgba(20, 33, 97, .12); }
  .fact .ico { left: 10px; width: 38px; height: 38px; margin-top: -19px; padding: 8px; border-radius: 13px; }
  .fact-label { font-size: .62rem; letter-spacing: .1em; }
  .fact strong { font-size: .93rem; line-height: 1.22; }
  .slots { padding: 7px 18px; border-width: 2.5px; font-size: .95rem; box-shadow: 0 4px 0 rgba(249, 165, 36, .35); }
  .card { margin-top: 4px; padding: 26px 16px 18px; border-radius: 26px; }
  .card-title { font-size: 1.45rem; }
  .card-lead { margin-bottom: 12px; font-size: .95rem; line-height: 1.35; }
  .field { margin-bottom: 11px; }
  .field label, .field legend { margin-bottom: 4px; font-size: .92rem; }
  .field input[type="text"], .field input[type="tel"], .field input[type="password"] { padding: 13px 14px; border-radius: 14px; }
  .row { grid-template-columns: 1fr; gap: 0; }      /* idade e telefone em linhas próprias: nada quebra nem desalinha */
  .field-age input { max-width: 9rem; }
  .pill span { min-width: 92px; padding: 12px 22px; }
  .btn { margin-top: 6px; padding: 15px 18px; font-size: 1.12rem; }
  .privacy { font-size: .8rem; margin-top: 12px; }
  .done h2 { font-size: 1.4rem; }
  .done-badge { width: 72px; height: 72px; }
  .foot { margin-top: 22px; padding: 0 8px; }
  .foot-body { padding: 14px 12px max(16px, env(safe-area-inset-bottom)); font-size: .82rem; border-radius: 22px 22px 0 0; }
  .doc { padding-top: 30px; }
  .doc-title { font-size: 1.55rem; }
}
@media (max-width: 360px) {
  .brand img { width: 92px; }
  .title { font-size: 1.8rem; }
  .fact { padding-left: 54px; }
  .fact .ico { width: 34px; height: 34px; margin-top: -17px; padding: 7px; }
  .pill span { min-width: 80px; padding: 12px 18px; }
  .card { padding-left: 14px; padding-right: 14px; }
}
/* celular deitado: pouca altura, então o topo fica ainda mais enxuto */
@media (max-height: 480px) and (orientation: landscape) {
  .brand img { width: 76px; }
  .kicker { display: none; }
  .title { font-size: 1.9rem; }
  .subtitle { margin-bottom: 8px; }
  .facts { grid-template-columns: repeat(2, 1fr); max-width: 560px; }
  .card { padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
