/* 3B Escolas.
   Celular: experiência de aplicativo. Cada seção ocupa a tela, as seguintes sobem como folhas
   sobre a anterior, barra de progresso no topo, cartões que deslizam com pontos de posição.
   Computador: composição centralizada e mais aberta.
   Clima de escola sem infantilizar: papel quadriculado de caderno, traço de caneta desenhado
   à mão no título e o final como uma lousa com letra de giz. */
:root {
  --branco: #ffffff;
  --nevoa: #F3F5F5;
  --petroleo: #0E5A6B;
  --ciano: #38C9D8;
  --grafite: #111111;
  --texto2: #4a5659;
  --zap: #1FAF5A;
  --m: clamp(20px, 6vw, 64px);
  --fonte: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mao: "Caveat", "Segoe Print", cursive;
  /* folha de caderno: pauta azul-clara a cada 32 px e margem vermelha à esquerda */
  --caderno: linear-gradient(90deg, transparent calc(var(--m) + 10px), rgba(214, 72, 72, .38) calc(var(--m) + 10px), rgba(214, 72, 72, .38) calc(var(--m) + 12px), transparent calc(var(--m) + 12px)), repeating-linear-gradient(180deg, transparent 0 31px, rgba(56, 150, 216, .22) 31px 32px);
  --topo: 58px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--branco); color: var(--grafite); font-family: var(--fonte); font-size: clamp(17px, 4.4vw, 19px); line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ciano); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-stretch: 68%; font-weight: 850; line-height: .95; letter-spacing: -.01em; color: var(--petroleo); }
h2 { font-size: clamp(2.3rem, 10.5vw, 4.4rem); text-wrap: balance; }
h3 { font-size: clamp(1.5rem, 6.4vw, 1.9rem); font-weight: 800; line-height: 1.05; }
p { margin: 0; }

/* Progresso de leitura */
.progresso { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 40; pointer-events: none; }
.progresso span { display: block; height: 100%; background: var(--ciano); transform-origin: 0 50%; transform: scaleX(0); }

/* Barra superior (celular: logo centralizada, como app) */
.topo { position: fixed; inset: 0 0 auto 0; z-index: 30; height: calc(var(--topo) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(14, 90, 107, .08); }
.marca { display: flex; align-items: center; min-height: 48px; }
.marca img { width: 124px; }
.nav-web { display: none; }
.voltar { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 5px; width: 48px; height: 48px; display: grid; place-items: center; }
.voltar::before { content: ""; width: 12px; height: 12px; border-left: 2.5px solid var(--petroleo); border-bottom: 2.5px solid var(--petroleo); transform: translateX(2px) rotate(45deg); }

/* Seções como telas */
.tela { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(var(--topo) + env(safe-area-inset-top) + 28px) max(var(--m), env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(var(--m), env(safe-area-inset-left)); }

/* Folhas que sobem sobre a seção anterior */
.folha { margin-top: -28px; border-radius: 28px 28px 0 0; box-shadow: 0 -12px 34px rgba(17, 17, 17, .07); z-index: 1; }
.alca { position: absolute; top: 10px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(14, 90, 107, .18); }

/* 1: capa */
.capa { justify-content: flex-start; gap: 6px; padding-top: calc(var(--topo) + env(safe-area-inset-top) + 10px); padding-bottom: 60px; }
.capa-arte { width: calc(100% + 2 * var(--m)); margin: 0 calc(-1 * var(--m)); }
.equipe { width: 100%; max-width: 620px; margin: 0 auto; }
.capa-texto { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.titulo { font-size: clamp(3.3rem, 17vw, 7rem); line-height: .88; letter-spacing: -.02em; }
.titulo > span { display: block; }
.trava { color: var(--grafite); }
.destrava { color: var(--petroleo); }
.riscado { position: relative; display: inline-block; }
.traco { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; }
.traco path { fill: none; stroke: var(--ciano); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 0; }
.subtitulo { font-size: clamp(1.05rem, 4.6vw, 1.35rem); color: var(--texto2); max-width: 30ch; }
.regiao { font-size: .86rem; color: var(--texto2); max-width: 32ch; }
.descer { position: absolute; left: 50%; bottom: calc(34px + env(safe-area-inset-bottom)); width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; }
.descer::before { content: ""; width: 12px; height: 12px; border-right: 2.5px solid var(--petroleo); border-bottom: 2.5px solid var(--petroleo); transform: rotate(45deg); opacity: .6; }

/* Botões */
.botao-zap { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 360px; min-height: 58px; padding: 0 26px; border-radius: 16px; background: var(--zap); color: var(--branco); font-weight: 750; font-size: 1.06rem; text-decoration: none; box-shadow: 0 10px 24px rgba(31, 175, 90, .28); touch-action: manipulation; transition: transform .12s ease; }
.botao-zap svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.botao-zap:active { transform: scale(.97); }

/* 2: serviços sobre folha de caderno */
.servicos { background: var(--caderno), #FBFCFD; justify-content: center; gap: 10px; padding-left: 0; padding-right: 0; }
.servicos h2 { max-width: 13ch; padding: 0 var(--m); }
.nota { font-family: var(--mao); font-weight: 700; font-size: 1.35rem; color: var(--petroleo); opacity: .75; transform: rotate(-2deg); margin-bottom: 8px; }
.trilho { display: flex; gap: 14px; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 8vw 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.trilho::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 84vw; max-width: 440px; scroll-snap-align: center; background: var(--branco); border-radius: 26px; padding: 12px 12px 22px; box-shadow: 0 14px 30px rgba(14, 90, 107, .10); transform: scale(.94); opacity: .6; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .45s ease; }
.slide.ativo { transform: none; opacity: 1; }
.slide img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; clip-path: inset(6px round 16px); }
.slide h3 { margin-top: 10px; }
a.slide { display: block; color: inherit; text-decoration: none; }
.mais { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 10px; font-weight: 750; color: var(--petroleo); }
.mais::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid currentColor; border-top: 2.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
a.slide:active .mais::after { transform: translateX(4px) rotate(45deg); }
.slide p { margin: 8px auto 0; color: var(--texto2); max-width: 30ch; font-size: .98rem; }
.pontos { display: flex; justify-content: center; gap: 0; }
.pontos button { width: 44px; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.pontos button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: rgba(14, 90, 107, .25); transition: width .3s ease, background .3s ease; }
.pontos button[aria-selected="true"]::before { width: 24px; background: var(--petroleo); }

/* Página de serviço */
.capa-servico { gap: 4px; background: var(--nevoa); }
.capa-servico .nota { margin: 4px 0 0; }
.capa-servico .equipe { clip-path: inset(6px); }
.titulo-servico { font-size: clamp(2.5rem, 12vw, 5.4rem); line-height: .92; color: var(--petroleo); max-width: 12ch; text-wrap: balance; }
.resolve { list-style: none; margin: 18px 0 0; padding: 0 var(--m); display: grid; gap: 14px; width: 100%; max-width: 560px; }
.resolve li { background: var(--branco); border-radius: 20px; padding: 18px 20px 18px 62px; text-align: left; position: relative; box-shadow: 0 10px 24px rgba(14, 90, 107, .08); }
.resolve li::before { content: ""; position: absolute; left: 20px; top: 20px; width: 26px; height: 26px; border-radius: 8px; background: var(--ciano) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M5 12.5l4.2 4.2L19 7%27 fill=%27none%27 stroke=%27%23111%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E") center / 18px no-repeat; }
.resolve strong { display: block; font-size: 1.08rem; color: var(--grafite); }
.resolve p { color: var(--texto2); font-size: .98rem; margin-top: 2px; }

/* Bloco da lei */
.lei { background: var(--branco); gap: 22px; }
.leis { display: grid; gap: 14px; width: 100%; max-width: 560px; }
.leis article { text-align: left; border-left: 4px solid var(--ciano); padding: 6px 0 6px 18px; }
.leis .nota { margin: 0; transform: none; font-size: 1.3rem; }
.leis h3 { font-size: 1.35rem; margin: 2px 0 6px; }
.leis p:not(.nota) { color: var(--texto2); font-size: .98rem; }
.fontes { font-size: .78rem; color: var(--texto2); max-width: 56ch; }

/* 3: como trabalha */
.metodo { background: var(--branco); gap: 34px; }
.metodo h2 { max-width: 10ch; }
.passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; max-width: 420px; position: relative; }
.passos::before { content: ""; position: absolute; left: 50%; top: 30px; bottom: 30px; width: 2px; margin-left: -1px; background: repeating-linear-gradient(var(--ciano) 0 6px, transparent 6px 12px); opacity: .6; }
.passos li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--branco); padding: 4px 0; }
.num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--petroleo); color: var(--branco); font-stretch: 68%; font-weight: 850; font-size: 1.7rem; box-shadow: 0 0 0 8px var(--branco); }
.passos strong { font-size: 1.2rem; color: var(--grafite); }
.passos p { color: var(--texto2); max-width: 32ch; }

/* 4: lousa */
.lousa { background: var(--petroleo) radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .07), transparent 60%); color: var(--branco); gap: 20px; }
.lousa .alca { background: rgba(255, 255, 255, .25); }
.lousa h2 { color: var(--branco); max-width: 9ch; }
.giz { font-family: var(--mao); font-weight: 600; font-size: clamp(1.7rem, 7vw, 2.3rem); line-height: 1.1; color: rgba(255, 255, 255, .92); max-width: 16ch; transform: rotate(-1.5deg); }
.botao-zap.claro { box-shadow: 0 12px 28px rgba(0, 0, 0, .25); }
.telefone { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--branco); text-decoration: none; letter-spacing: .03em; }
.rodape { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .2); width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .85rem; opacity: .85; }
.insta { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px; color: var(--branco); text-decoration: none; font-weight: 650; font-size: .95rem; }
.insta svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.insta:hover span { color: var(--ciano); }

/* Botão fixo do Zap (só entre a capa e a lousa) */
.zap-fixo { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 20px; background: var(--zap); display: grid; place-items: center; box-shadow: 0 10px 24px rgba(17, 17, 17, .22); z-index: 20; opacity: 0; transform: translateY(16px) scale(.85); pointer-events: none; transition: opacity .3s ease, transform .3s cubic-bezier(.2, .7, .2, 1); }
.zap-fixo.mostrar { opacity: 1; transform: none; pointer-events: auto; }
.zap-fixo svg { width: 30px; height: 30px; fill: var(--branco); }

/* Animações */
@media (prefers-reduced-motion: no-preference) {
  .equipe { animation: subir 1s cubic-bezier(.2, .7, .2, 1) .1s both; }
  .trava { animation: travar 1.1s cubic-bezier(.2, .7, .2, 1) .35s both; }
  .destrava { animation: surgir .6s ease-out 1.05s both; }
  .traco path { stroke-dashoffset: 340; animation: riscar .7s ease-out 1.55s forwards; }
  .subtitulo, .capa .botao-zap, .regiao { animation: surgir .6s ease-out 1.7s both; }
  .descer { animation: surgir .5s ease-out 2.3s both, quicar 2.2s ease-in-out 3s infinite; }
  .revela { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
  .revela.visto { opacity: 1; transform: none; }
  .giz.revela.visto { transform: rotate(-1.5deg); }
  .passos li.revela:nth-child(2) { transition-delay: .12s; }
  .passos li.revela:nth-child(3) { transition-delay: .24s; }
  .num { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1) .2s; transform: scale(.4); }
  .visto .num { transform: none; }
}
@keyframes subir { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes travar {
  0% { transform: translateX(-.06em) rotate(-2.5deg); opacity: 0; }
  18% { transform: translateX(.05em) rotate(1.5deg); opacity: 1; }
  32% { transform: translateX(-.035em) rotate(-1deg); }
  46% { transform: translateX(.02em) rotate(.6deg); }
  60%, 100% { transform: none; }
}
@keyframes surgir { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }
@keyframes riscar { to { stroke-dashoffset: 0; } }
@keyframes quicar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

@media (max-width: 359px) {
  .titulo { font-size: 3rem; }
  .botao-zap { font-size: 1rem; padding: 0 18px; }
}

/* Computador e tablet deitado: composição centralizada e aberta */
@media (min-width: 900px) {
  :root { --topo: 72px; }
  .topo { justify-content: space-between; padding: 0 var(--m); background: rgba(255, 255, 255, .88); }
  .marca img { width: 150px; }
  .nav-web { display: flex; gap: 8px; }
  .nav-web a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; text-decoration: none; font-weight: 650; color: var(--petroleo); }
  .nav-web a:hover { background: var(--nevoa); }
  .folha { margin-top: 0; border-radius: 0; box-shadow: none; }
  .alca { display: none; }
  .tela { min-height: auto; padding-top: 110px; padding-bottom: 110px; }
  .capa { min-height: 100vh; flex-direction: column-reverse; justify-content: flex-end; gap: 0; padding-top: calc(var(--topo) + 56px); padding-bottom: 0; }
  .capa-texto { gap: 22px; }
  .titulo { font-size: min(8.6vw, 8.2rem); }
  .titulo > span { display: inline; }
  .trava { margin-right: .22em; }
  .subtitulo { max-width: 44ch; font-size: 1.35rem; }
  .capa-arte { width: auto; margin: 26px 0 0; }
  .equipe { max-width: 720px; }
  .descer, .regiao { display: none; }
  .servicos { padding-top: 90px; }
  .servicos h2 { max-width: none; }
  .voltar { display: none; }
  .leis { grid-template-columns: repeat(3, 1fr); max-width: 1100px; gap: 32px; }
  .resolve { grid-template-columns: 1fr 1fr; max-width: 1000px; gap: 20px; }
  .titulo-servico { font-size: min(6.4vw, 6rem); max-width: 16ch; }
  .capa-servico .equipe { max-width: 640px; }
  a.slide:hover .mais::after { transform: translateX(4px) rotate(45deg); }
  .trilho { padding: 12px calc(50% - 230px) 20px; }
  .slide { flex-basis: 460px; }
  .slide:not(.ativo):hover { opacity: .85; }
  .metodo { gap: 56px; }
  .metodo h2 { max-width: none; }
  .passos { grid-template-columns: repeat(3, 1fr); max-width: 1000px; gap: 40px; }
  .passos::before { left: 16%; right: 16%; top: 28px; bottom: auto; width: auto; height: 2px; margin: 0; background: repeating-linear-gradient(90deg, var(--ciano) 0 6px, transparent 6px 12px); }
  .lousa { padding-bottom: 60px; }
  .lousa h2 { max-width: none; }
  .giz { max-width: none; }
  .rodape { max-width: 1000px; flex-direction: row; justify-content: space-between; gap: 14px; }
  .botao-zap:hover { filter: brightness(1.06); }
}
