/* =========================================================
   ÁGUAS SERRA DO RAMALHO - style.css
   1. Tokens  2. Base  3. Botões  4. Header  5. Hero  6. Empresa
   7. Serviços  8. Caminho da água  9. Sustentabilidade
   10. Cliente  11. Contato  12. Rodapé  13. Animações  14. Responsivo

   Regras: lima = ação e destaque | azul = água
   Raios: botões 100px | cards 20px | campos 12px
   Camadas (z-index): 1 conteúdo, 90 topo, 100 header, 200 avisos
   ========================================================= */

/* 1. TOKENS */
:root {
  --bg: #061525; --bg-alt: #0a1d33; --surface: #0f2843; --line: rgba(160, 190, 220, .18);
  --text: #f2f7fd; --muted: #a9bdd1; --water: #039bf0; --water-text: #5cc3ff;
  --lime: #aeea00; --on-lime: #0a1f05; --error: #ff98a3; --field: #081a2d;
  --logo: url("assets/img/logo-light.png");
  --radius: 20px; --header-h: 76px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --head: "Outfit", "Segoe UI", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6fafd; --bg-alt: #e9f2f9; --surface: #fdfeff; --line: rgba(10, 50, 90, .16);
  --text: #08203a; --muted: #465d75; --water-text: #0067ad; --error: #b3172b; --field: #fdfeff;
  --logo: url("assets/img/logo.png");
  color-scheme: light;
}

/* 2. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--body); font-size: 1.04rem; line-height: 1.65; color: var(--text); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: 1.35rem; }
p { color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--water-text); outline-offset: 3px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--on-lime); padding: 8px 14px; border-radius: 12px; z-index: 200; }
.skip-link:focus { left: 8px; }
.ic { width: 24px; height: 24px; flex: none; }
.container { width: min(1280px, 100% - 40px); margin-inline: auto; }
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head p { margin-top: 18px; max-width: 60ch; font-size: 1.1rem; }
#topSentinel { position: absolute; top: 0; height: 40px; width: 1px; }

/* 3. BOTÕES */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px; border: 1px solid transparent; border-radius: 100px; font-weight: 600; white-space: nowrap; transition: transform .35s var(--ease), background-color .25s, border-color .25s; }
.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: #c2f533; transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn .ic { width: 20px; height: 20px; transition: transform .35s var(--ease); }
.btn:hover .ic { transform: translateX(4px); }
.btn-block { width: 100%; }

/* 4. HEADER (o desfoque fica no ::before para não prender o menu mobile) */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); }
.site-header::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .35s; }
.site-header.scrolled::before { opacity: 1; }
.header-inner { position: relative; height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { margin-right: auto; }
.logo-img { display: block; width: 152px; aspect-ratio: 1000 / 362; background: var(--logo) center / contain no-repeat; }
.main-nav, .main-nav ul { display: flex; align-items: center; gap: 4px; }
.nav-link { position: relative; display: block; padding: 10px 14px; font-size: .97rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.nav-link:hover, .nav-link.active { color: var(--text); }
[data-theme="light"] .nav-link::after { background: var(--water-text); }
.nav-link.active::after { transform: scaleX(1); }
.nav-cta { min-height: 44px; padding: 8px 20px; margin-left: 10px; }
.theme-btn, .burger { width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: none; }
.theme-btn .ic { transition: transform .6s var(--ease); }
[data-theme="light"] .theme-btn .ic { transform: rotate(180deg); }
.burger { display: none; position: relative; }
.burger span { grid-area: 1 / 1; width: 18px; height: 2px; background: currentColor; transition: transform .35s var(--ease); }
.burger span:first-child { transform: translateY(-4px); } .burger span:last-child { transform: translateY(4px); }
.burger.open span:first-child { transform: rotate(45deg); } .burger.open span:last-child { transform: rotate(-45deg); }

/* 5. HERO */
.hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 20px) 0 48px; overflow: clip; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.1vw, 3.6rem); letter-spacing: -.035em; text-wrap: nowrap; }
.line { display: block; overflow: clip; padding-bottom: .12em; margin-bottom: -.06em; }
.line > span { display: block; }
.lead { margin-top: 24px; max-width: 48ch; font-size: clamp(1.06rem, 1.4vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-mark { width: 100%; aspect-ratio: 395 / 272; background: url("assets/img/icon.png") center / 94% auto no-repeat; }
.hero-mark.gl { background: none; }
#water { width: 100%; height: 100%; display: block; }

/* 6. EMPRESA */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 7vw, 110px); align-items: center; }
.photo-frame { border-radius: var(--radius); overflow: hidden; aspect-ratio: 478 / 550; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.fill { margin-top: 28px; font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.5; color: var(--text); }
.checks { margin-top: 32px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 14px; align-items: baseline; }
.checks li::before { content: ""; flex: none; width: 8px; height: 14px; border: solid var(--water-text); border-width: 0 2.5px 2.5px 0; transform: rotate(42deg); }
.stats { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; align-items: end; margin-top: clamp(64px, 8vw, 110px); }
.stat strong { display: block; font-family: var(--head); font-weight: 600; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat:first-child strong { font-size: clamp(4rem, 10vw, 8.5rem); color: var(--water-text); }
.stat span { display: block; margin-top: 10px; color: var(--muted); }

/* 7. SERVIÇOS */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(250px, auto); gap: 16px; }
.cell { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 28px; border-radius: var(--radius); background: var(--surface); }
.cell::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(92, 195, 255, .2), transparent 70%); opacity: 0; transition: opacity .4s; }
.cell:hover::after { opacity: 1; }
.cell > .ic { width: 34px; height: 34px; color: var(--water-text); transition: transform .5s var(--ease); }
.cell:hover > .ic { transform: translateY(-4px); }
.cell p { margin-top: 10px; font-size: 1rem; max-width: 44ch; }
.cell-abastecimento, .cell-operacao, .cell-verde, .cell-educacao { grid-column: span 2; }
.cell-abastecimento { grid-row: span 2; background: #0560a8; }
.cell-abastecimento h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.cell-abastecimento, .cell-operacao { color: #f2f7fd; }
.cell-abastecimento p, .cell-operacao p { color: #dcebf8; }
.cell-abastecimento > .ic, .cell-operacao > .ic { color: #f2f7fd; }
.cell-abastecimento > .ic { width: 52px; height: 52px; }
.cell-water { position: absolute; inset: 0; z-index: -1; }
.cell-water i { position: absolute; left: 50%; top: 42%; width: 240%; aspect-ratio: 1; margin-left: -120%; border-radius: 46%; background: #04528f; animation: spin 26s linear infinite; }
.cell-water i + i { top: 50%; border-radius: 44%; background: #034379; animation-duration: 19s; animation-direction: reverse; }
.cell-photo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4, 16, 30, .93) 30%, rgba(4, 16, 30, .5)), url("assets/img/empresa.jpg") center 22% / cover; transition: transform 1s var(--ease); }
.cell-operacao:hover .cell-photo { transform: scale(1.05); }
.cell-verde { background: var(--lime); color: var(--on-lime); }
.cell-verde p, .cell-verde > .ic { color: var(--on-lime); }

/* 8. CAMINHO DA ÁGUA: cenário único; a câmera acompanha a gota (script.js) */
.path-head { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.path-head > div { max-width: 760px; }
html:not(.js) #replay { display: none; }
#replay { transition: opacity .4s, visibility .4s, border-color .25s; }
#replay.off { opacity: 0; visibility: hidden; }
.path { --sky1: #0b2948; --sky2: #10497a; --hill: #103a61; --hill2: #0d3050; --ground: #12304a; --soil: #0c2338; --wall: #dce9f4; --roof: #2f6f9f; --steel: #7d9cb8; --leaf: #2f8f5b; --dry: #24496a; --win: #49667f; --glass: rgba(220, 240, 255, .13); --sun: #e9f4ff; }
[data-theme="light"] .path { --sky1: #a9dcfb; --sky2: #e6f6ff; --hill: #a5d3c8; --hill2: #83c1a6; --ground: #8fb27f; --soil: #77996c; --wall: #fdfeff; --roof: #0067ad; --steel: #5c7892; --leaf: #2f8f5b; --dry: #58794f; --win: #a9c3d8; --glass: rgba(255, 255, 255, .55); --sun: #ffe48a; }
.stage { position: relative; aspect-ratio: 1280 / 480; border-radius: var(--radius); overflow: hidden; background: linear-gradient(var(--sky1), var(--sky2) 70%); }
.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.w-sun { fill: var(--sun); } .w-hill { fill: var(--hill); } .w-hill.near { fill: var(--hill2); }
.w-ground { fill: var(--ground); } .w-soil { fill: var(--soil); } .w-bed { fill: var(--soil); }
.w-wall { fill: var(--wall); } .w-roof { fill: var(--roof); } .w-leaf { fill: var(--leaf); }
.w-trunk { stroke: #6a5240; stroke-width: 6; }
.w-steel { fill: none; stroke: var(--steel); stroke-width: 12; stroke-linecap: round; } .w-steel.thin { stroke-width: 6; }
.w-glass { fill: var(--glass); stroke: var(--steel); stroke-width: 4; } .w-glass.cup { stroke-width: 2; }
.w-win { fill: var(--win); transition: fill .8s var(--d, 0s); } .scene.is-on .w-win { fill: #ffd977; }
.w-hub { fill: var(--roof); } .w-blade { stroke: var(--wall); stroke-width: 5; stroke-linecap: round; }
.w-fan { transform-origin: 232px 247px; } .scene.is-on .w-fan { animation: spin 1.8s linear infinite; }
.w-wave { fill: url(#gWater); animation: wave 3.2s linear infinite; } .w-wave.back { fill: #6fd0ff; opacity: .6; animation-duration: 5s; animation-direction: reverse; }
.w-level { fill: var(--water); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 1.4s var(--ease) var(--d); }
.w-level.v0 { fill: #6f9a86; } .w-level.v1 { fill: #3fa5b8; } .w-level.v2 { fill: #2bb6ff; }
.scene.is-on .w-level { transform: none; }
.w-bubble { fill: #fdfeff; opacity: 0; } .scene.is-on .w-bubble { animation: bubble 2.4s ease-in var(--d) infinite; }
.w-rise { transform: translateY(90px); transition: transform 1.8s var(--ease); } .scene.is-on .w-rise { transform: none; }
.w-pipe, .w-wet, .w-flow, .m-wet, .w-branch { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.w-pipe { stroke: var(--dry); stroke-width: 20; } .w-pipe.slim, .w-branch { stroke-width: 12; }
.w-wet { stroke: var(--water); stroke-width: 13; } .m-wet { stroke: white; stroke-width: 13; }
.w-flow { stroke: rgba(255, 255, 255, .75); stroke-width: 3; stroke-dasharray: 18 46; animation: flow 1.4s linear infinite; }
.w-branch { stroke: var(--water); stroke-width: 7; stroke-dasharray: 1 1; stroke-dashoffset: 1; stroke-linecap: butt; transition: stroke-dashoffset 1s var(--ease) var(--d); } .scene.is-on .w-branch { stroke-dashoffset: 0; }
.w-cup { fill: var(--water); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 2.4s ease-out .4s; } .scene.is-on .w-cup { transform: none; }
.w-drip { fill: var(--water); opacity: 0; } .scene.is-on .w-drip { animation: drip 1.1s ease-in infinite; }
.w-head { fill: #fdfeff; stroke: var(--water); stroke-width: 5; } .w-halo { fill: #4cc3ff; opacity: .35; animation: halo 1.4s ease-in-out infinite; }
#drop { transition: opacity .6s; } #drop.off { opacity: 0; }
html:not(.js) #drop { display: none; }
.flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.step { position: relative; padding: 22px 0 0; border-top: 4px solid var(--line); }
.step::before { content: ""; position: absolute; inset: -4px 0 auto; height: 4px; background: var(--water); transform: scaleX(var(--p, 1)); transform-origin: left; }
.step-btn { width: 52px; height: 52px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--water-text); transition: background-color .4s, color .4s, transform .5s var(--ease); }
.step-btn::after { content: ""; position: absolute; inset: -4px 0 0; }
.step:hover .step-btn { transform: translateY(-3px); }
.step.is-active .step-btn { background: var(--lime); color: var(--on-lime); }
.step-text { margin-top: 16px; transition: opacity .5s; }
.step-text p { margin-top: 8px; font-size: 1rem; }
.js .flow.playing .step:not(.is-active, :hover, :focus-within) .step-text { opacity: .72; }

/* Vila: a água chega a várias casas, uma após a outra */
.k2 .w-roof { fill: #c46a45; } .k3 .w-roof { fill: #2b8f8a; } .k1 .w-wall { fill: #e9f1dc; } .k3 .w-wall { fill: #f4e6d6; }
.w-fundo .w-wall { fill: color-mix(in srgb, var(--wall) 42%, var(--hill2)); } .w-fundo .w-roof { fill: color-mix(in srgb, var(--roof) 55%, var(--hill2)); } .w-door { fill: #5a4636; }
.w-tank { fill: #1c5f94; } .w-tankfill { fill: #5cc9ff; transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease) var(--d); }
.scene.is-on .w-tankfill { transform: none; }
.w-casa { transform-box: fill-box; transform-origin: bottom; } .scene.is-on .w-casa { animation: casa .7s var(--ease) var(--d); }
.w-branch.ext { transition: stroke-dashoffset 2s linear; } .w-flow.ext { opacity: 0; transition: opacity .6s; } .scene.is-on .w-flow.ext { opacity: 1; transition-delay: 2s; }
.w-ring { fill: none; stroke: #7fd6ff; stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; } .scene.is-on .w-ring { animation: ring 2.6s ease-out var(--d) infinite; }
.w-spray { fill: none; stroke: #8edbff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 5 9; opacity: 0; transition: opacity .6s; } .scene.is-on .w-spray { opacity: 1; transition-delay: 2.4s; animation: spray .7s linear infinite; }

/* 9. SUSTENTABILIDADE */
.sustain-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 110px); }
.sustain-head { position: sticky; top: calc(var(--header-h) + 48px); align-self: start; }
.sustain-head p { margin-top: 20px; font-size: 1.1rem; }
.sustain-list { display: grid; grid-template-columns: 1fr 1fr; gap: 52px 40px; }
.sustain-list li { display: grid; gap: 18px; align-content: start; }
.sustain-list .ic { width: 40px; height: 40px; color: var(--water-text); }
.sustain-list p { margin-top: 8px; }

/* 10. CLIENTE */
.c-btn { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); padding: clamp(28px, 5vw, 60px); border-radius: var(--radius); background: var(--lime); color: var(--on-lime); transition: transform .5s var(--ease); }
.c-btn:active { transform: scale(.99); }
.c-btn > .ic:first-child { width: clamp(36px, 5vw, 64px); height: clamp(36px, 5vw, 64px); }
.c-btn > span { flex: 1; }
.c-btn strong { display: block; font-family: var(--head); font-weight: 600; font-size: clamp(1.5rem, 4vw, 3.2rem); line-height: 1.1; letter-spacing: -.03em; }
.c-btn small { display: block; margin-top: 8px; font-size: clamp(.98rem, 1.4vw, 1.15rem); }
.c-btn .go { width: clamp(28px, 4vw, 56px); height: clamp(28px, 4vw, 56px); transition: transform .5s var(--ease); }
.c-btn:hover .go { transform: translateX(10px); }

/* 11. CONTATO */
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.contact-info > p { margin: 18px 0 36px; font-size: 1.1rem; }
.info-list { display: grid; gap: 24px; }
.info-list li { display: flex; gap: 16px; }
.info-list .ic { margin-top: 3px; color: var(--water-text); }
.info-list b { display: block; font-family: var(--head); font-weight: 600; }
.info-list a, .info-list span { color: var(--muted); }
.info-list a { text-decoration: underline; text-underline-offset: 4px; }
.info-list a:hover { color: var(--text); }
.socials { display: flex; gap: 10px; margin-top: 32px; }
.socials a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: background-color .25s, color .25s, transform .35s var(--ease); }
.socials a:hover { background: var(--lime); color: var(--on-lime); transform: translateY(-3px); }
.contact-form { display: grid; gap: 16px; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: var(--surface); }
.contact-form h3 { font-size: 1.7rem; margin-bottom: 6px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 500; font-size: .95rem; }
.field :is(input, select, textarea) { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--muted) 60%, transparent); background: var(--field); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field ::placeholder { color: var(--muted); opacity: 1; }
.field :is(input, select, textarea):focus { outline: none; border-color: var(--water-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--water) 35%, transparent); }
.field.invalid :is(input, select, textarea) { border-color: var(--error); }
.err { color: var(--error); font-size: .88rem; }
.err:empty { display: none; }
.form-hint, .form-status { font-size: .92rem; text-align: center; }
.form-status { color: var(--text); }
.form-status:empty { display: none; }

/* 12. RODAPÉ */
.site-footer { background: var(--bg-alt); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.f-brand p { margin-top: 18px; max-width: 38ch; }
.socials.small { margin-top: 22px; }
.site-footer h4 { font-size: 1.05rem; margin-bottom: 14px; letter-spacing: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; color: var(--muted); transition: color .2s; }
.site-footer li a:hover, .footer-bottom a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 30px; width: max-content; max-width: min(92vw, 460px); padding: 14px 22px; border-radius: 12px; background: var(--text); color: var(--bg); opacity: 0; visibility: hidden; transform: translate(-50%, 24px); transition: opacity .35s, transform .5s var(--ease), visibility .35s; z-index: 200; text-align: center; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 50px; height: 50px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity .3s, transform .5s var(--ease), visibility .3s; z-index: 90; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* 13. ANIMAÇÕES */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -64; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave { to { transform: translateX(80px); } }
@keyframes bubble { 20% { opacity: .8; } to { opacity: 0; transform: translateY(-62px); } }
@keyframes drip { 20% { opacity: 1; } to { opacity: 1; transform: translateY(16px); } }
@keyframes casa { 40% { transform: scale(1.05, 1.1); } }
@keyframes ring { 10% { opacity: .9; } 60%, to { opacity: 0; transform: scale(2.6); } }
@keyframes spray { to { stroke-dashoffset: -14; } }
@keyframes halo { 50% { transform: scale(1.35); } }
@keyframes rise { from { transform: translateY(115%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } }
@keyframes wordFill { from { opacity: .22; } }
@keyframes drift { from { transform: scale(1.16) translateY(-5%); } to { transform: scale(1.16) translateY(5%); } }

@media (prefers-reduced-motion: no-preference) {
  .line > span { animation: rise 1.1s var(--ease) .1s both; }
  .line + .line > span { animation-delay: .22s; }
  .lead { animation: fadeUp .9s var(--ease) .45s both; }
  .hero-actions { animation: fadeUp .9s var(--ease) .58s both; }
  .js .reveal { opacity: 0; translate: 0 34px; transition: opacity .8s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s), transform .5s var(--ease); }
  .js .reveal.visible { opacity: 1; translate: 0 0; }
  .js .reveal-clip { clip-path: inset(100% 0 0 0 round 20px); transition: clip-path 1.3s var(--ease); }
  .js .reveal-clip.visible { clip-path: inset(0 0 0 0 round 20px); }
  @supports (animation-timeline: view()) {
    .photo-frame img { animation: drift linear both; animation-timeline: view(); }
    .fill .w { display: inline-block; animation: wordFill linear both; animation-timeline: view(); animation-range: cover 12% cover 38%; }
  }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 14. RESPONSIVO */
@media (max-width: 1100px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .hero h1 { text-wrap: balance; }
  .nav-link { padding-inline: 8px; font-size: .9rem; } .nav-link::after { left: 8px; right: 8px; }
}
@media (max-width: 900px) {
  .burger { display: grid; }
  .brand, .theme-btn, .burger { z-index: 1; }
  .brand { position: relative; }
  .main-nav { position: fixed; inset: 0; flex-direction: column; align-items: stretch; justify-content: center; gap: 28px; padding: var(--header-h) 24px 32px; background: var(--bg); visibility: hidden; opacity: 0; transition: opacity .35s, visibility .35s; overflow-y: auto; }
  .main-nav.open { visibility: visible; opacity: 1; }
  .theme-btn { position: relative; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .nav-link { padding: 12px 0; font-family: var(--head); font-size: 1.9rem; color: var(--text); }
  .nav-link::after { display: none; }
  .nav-cta { min-height: 54px; margin: 0; }
  .hero { align-items: start; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-mark { order: -1; max-width: 400px; margin-inline: auto; }
  .about-grid, .contact-grid, .sustain-grid { grid-template-columns: 1fr; }
  .photo-frame { max-width: 480px; }
  .sustain-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Caminho da água no celular: botões em linha e texto da etapa ativa */
@media (max-width: 900px) {
  .path-head { flex-direction: column; align-items: start; }
  .stage { aspect-ratio: 1; max-height: 62svh; width: 100%; }
  .flow-steps { gap: 12px; }
  .step-text { padding-right: 0; }
  .js .step { display: contents; }
  .js .step-btn { position: relative; justify-self: center; grid-row: 1; }
  .js .step-btn::after { inset: -6px; }
  .js .step-text { grid-row: 2; grid-column: 1 / -1; min-height: 120px; }
  .js .step:not(.is-active) .step-text, .js .flow.playing .step:not(.is-active) .step-text { opacity: 0; visibility: hidden; transition: none; }
  html:not(.js) .flow-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .logo-img { width: 126px; }
  .hero-mark { max-width: 270px; }
  .hero-actions .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; } .stat:first-child { grid-column: span 2; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .cell { grid-column: auto !important; min-height: 200px; }
  .cell-abastecimento { min-height: 340px; }
  .sustain-list { grid-template-columns: 1fr; gap: 32px; }
  .sustain-list li { grid-template-columns: 40px 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
/* Telas muito estreitas */
.theme-btn, .burger { flex: none; }
@media (max-width: 900px) {
  .hero-inner, .about-grid, .contact-grid, .sustain-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid > *, .contact-grid > *, .sustain-grid > * { min-width: 0; }
}
@media (max-width: 340px) {
  .logo-img { width: 104px; }
  .header-inner { gap: 8px; }
  .theme-btn, .burger { width: 42px; height: 42px; }
  .hero h1, h2 { font-size: 1.75rem; }
  h3 { overflow-wrap: anywhere; }
  .btn { padding-inline: 14px; white-space: normal; text-align: center; }
  
  .stat:first-child strong { font-size: 3.2rem; }
  .c-btn { flex-wrap: wrap; }
}
