/* =========================================================
   EcoLuz — sistema de design v3
   Papel e tinta · serifa nos títulos · dados em mono
   Verde-floresta como cor de ação, âmbar só como sinal.
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
    --paper: #f2f0e8;
    --paper-2: #e9e6db;
    --surface: #faf9f4;
    --ink: #111915;
    --ink-2: #3a4640;
    --ink-3: #58625c;
    --line: #d6d2c4;
    --line-2: #b8b3a2;
    --brand: #0e4d3a;
    --on-brand: #f4f2ea;
    --accent: #c8780a;
    --accent-ink: #94560a;
    --accent-soft: #f0dcb4;
    --danger: #a8321f;

    --r: 4px;
    --header-h: 64px;
    --f-display: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --f-text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --f-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Paleta dos CENÁRIOS (céu, sol, colinas, turbinas, painéis, água...).
       É sempre a mesma, de dia: o modo escuro muda só a interface. */
    --sky: #d9e5da;
    --sky-top: #d0ded3;
    --sky-mid: #d9e5da;
    --sky-low: #e5ebdc;
    --sun-a: #f3b63f;
    --sun-b: #eba21e;
    --sun-glow: rgba(243, 182, 63, 0.22);
    --hill-1: #b7cdbb;
    --hill-2: #8db79b;
    --hill-3: #3f7d61;
    --blade: #ffffff;
    --tower: #f7f5ee;
    --panel-a: #2e6a80;
    --panel-b: #163f50;
    --water-a: #5fa9b8;
    --water-b: #1f6679;
    --tree-a: #2c7a55;
    --tree-b: #226548;
    --trunk: #6a4c33;
    --concrete: #d2d6cf;
    --pylon: #4b5a55;
    --cloud: rgba(255, 255, 255, 0.7);

    /* apelidos usados por trechos antigos */
    --color-primary: var(--brand);
    --color-secondary: var(--accent);
    --color-text: var(--ink-2);
    --color-text-dark: var(--ink);
    --color-background: var(--paper);
    --color-surface: var(--surface);
    --color-border: var(--line);
    --font-heading: var(--f-display);
    --font-body: var(--f-text);
    --font-mono: var(--f-mono);
}
[data-theme="dark"] {
    --paper: #0b1310;
    --paper-2: #0f1914;
    --surface: #101c17;
    --ink: #ece9df;
    --ink-2: #b9c2bb;
    --ink-3: #85908a;
    --line: #22302a;
    --line-2: #344439;
    --brand: #4fcb94;
    --on-brand: #06110c;
    --accent: #e8a53a;
    --accent-ink: #f0b042;
    --accent-soft: #3a2b0f;
    --danger: #ff8a7a;
}

body {
    font-family: var(--f-text);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-2);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .3s ease, color .3s ease;
}
::selection { background: var(--accent-soft); color: var(--ink); }
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
    font-family: var(--f-display);
    color: var(--ink);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.015em;
    text-wrap: balance;
}
p { text-wrap: pretty; }
strong { color: var(--ink); font-weight: 600; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--ink); color: var(--paper);
    font: 500 .875rem var(--f-text); text-decoration: none; border-radius: var(--r);
    transition: top .2s;
}
.skip-link:focus { top: 10px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Cabeçalho ---------- */
.main-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.main-header .container {
    max-width: none;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 4px; }
.logo-icon { width: 30px; height: 30px; flex-shrink: 0; }
.logo-icon > circle { fill: var(--brand); }
.logo-icon > ellipse { display: none; }
.logo-icon > path { fill: rgba(0, 0, 0, .22); }
.logo-icon polygon, #logoBlade { fill: var(--on-brand); }
.logo-icon g circle { fill: var(--accent); }
.logo-rotor { transform-box: view-box; transform-origin: 0 0; animation: logo-spin 16s linear infinite; }
.logo-link:hover .logo-rotor { animation-duration: 2s; }
@keyframes logo-spin { to { transform: rotate(360deg); } }
.logo-text {
    font-family: var(--f-display);
    font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
    color: var(--ink); line-height: 1;
}
.logo-luz { color: var(--accent-ink); background: none; -webkit-text-fill-color: currentColor; }

.header-actions { display: flex; align-items: center; gap: 28px; }
nav ul { list-style: none; display: flex; gap: 28px; }
nav a {
    position: relative; display: inline-block; padding: 6px 0;
    font-size: .9rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
    transition: color .2s;
}
nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
    background: var(--accent); transform: scaleX(0); transform-origin: left;
    transition: transform .25s cubic-bezier(.3, .7, .2, 1);
}
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a:hover::after, nav a[aria-current]::after { transform: scaleX(1); }

.language-switcher { display: flex; align-items: center; gap: 8px; padding-left: 20px; border-left: 1px solid var(--line); }
.language-flag {
    width: 26px; height: 18px; padding: 0; border: 0; background: none;
    border-radius: 2px; overflow: hidden; cursor: pointer; line-height: 0;
    opacity: .5; filter: saturate(.7);
    transition: opacity .2s, filter .2s, box-shadow .2s;
}
.language-flag svg { width: 100%; height: 100%; display: block; }
.language-flag:hover { opacity: .9; filter: none; }
.language-flag.is-active { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.language-flag:focus-visible { outline-offset: 4px; }

.theme-toggle {
    width: 36px; height: 36px; display: inline-grid; place-items: center;
    background: none; color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r);
    cursor: pointer; transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--paper-2); border-color: var(--ink-3); }
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle svg { position: absolute; width: 18px; height: 18px; transition: transform .45s cubic-bezier(.3, .8, .3, 1), opacity .3s; }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-70deg) scale(.5); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(70deg) scale(.5); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: none; }
.theme-toggle:hover svg { filter: drop-shadow(0 0 0 transparent); }

.nav-toggle {
    display: none; width: 36px; height: 36px; padding: 0; position: relative;
    background: none; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer;
}
.nav-toggle span {
    position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--ink);
    transition: transform .25s, opacity .2s, top .25s;
}
.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 17px; }
.nav-toggle span:nth-child(3) { top: 22px; }
.main-header.nav-open .nav-toggle span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.main-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.main-header.nav-open .nav-toggle span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* ---------- Botões ---------- */
.cta-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 48px; padding: 0 22px;
    background: var(--brand); color: var(--on-brand);
    border: 1px solid var(--brand); border-radius: var(--r);
    font: 600 .9375rem/1 var(--f-text); text-decoration: none; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .12s;
}
.cta-button::after { content: "\2192"; transition: transform .2s; }
.cta-button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cta-button:hover::after { transform: translateX(4px); }
.cta-button:active { transform: translateY(1px); }
.cta-button[disabled] { cursor: progress; background: var(--ink-3); border-color: var(--ink-3); color: var(--paper); }
.cta-button[aria-busy="true"]::after {
    content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Eyebrow / rótulos ---------- */
.fig-n { font-family: var(--f-mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow { color: var(--accent-ink); font: 600 .9375rem var(--f-text); margin-bottom: 16px; }

/* =========================================================
   HOME — figura fixa à esquerda, conteúdo à direita
   ========================================================= */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.figure {
    position: sticky; top: var(--header-h);
    height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
    display: flex; flex-direction: column;
    border-right: 1px solid var(--line); background: var(--paper-2);
}
.figure-art { position: relative; flex: 1; overflow: hidden; background: var(--sky); transition: background .3s; }
.figure-art .bg-sun {
    --s: 76px;
    position: absolute; left: 0; top: 0; width: var(--s); height: var(--s);
    margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%;
    background: var(--sun-a); box-shadow: 0 0 0 calc(var(--s) * .18) var(--sun-glow); will-change: transform;
}
.bg-strip { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg-strip .h1 { fill: var(--hill-1); }
.bg-strip .h2 { fill: var(--hill-2); }
.bg-strip .h3 { fill: var(--hill-3); }
.bg-strip .sc { opacity: var(--w, 0); transform: translateY(calc((1 - var(--w, 0)) * 24px)); }
.bg-strip .sc.off { visibility: hidden; }
.bg-strip .cloud { fill: var(--cloud); animation: cloud-drift 120s linear infinite; }
@keyframes cloud-drift { from { transform: translateX(-160px); } to { transform: translateX(1360px); } }
.bg-strip .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: tree-sway 5s ease-in-out infinite alternate; }
@keyframes tree-sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.bg-strip .fall { stroke-dasharray: 7 9; animation: fall-flow .7s linear infinite; }
@keyframes fall-flow { to { stroke-dashoffset: -16; } }
.bg-strip .mist { animation: mist-pulse 3s ease-in-out infinite; }
@keyframes mist-pulse { 50% { opacity: .15; } }

.figure-cap {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; border-top: 1px solid var(--line);
    background: var(--paper); font-family: var(--f-mono); font-size: .75rem; color: var(--ink-2);
}
.fig-n { color: var(--accent-ink); }
.fig-t { color: var(--ink); letter-spacing: .02em; }
.fig-ticks { margin-left: auto; display: flex; gap: 5px; }
.fig-ticks i { width: 18px; height: 3px; background: var(--line-2); transition: background .3s, width .3s; }
.fig-ticks i.on { background: var(--accent); width: 28px; }

.split-main { min-width: 0; }
.split-main .container { max-width: 760px; margin: 0; padding: 0 clamp(20px, 5vw, 72px); }
.split-main > section { padding: clamp(36px, 7vh, 72px) 0; }
.split-main h3 { font-size: clamp(1.75rem, 2.4vw + .6rem, 2.35rem); margin-bottom: 20px; }
.split-main section p { max-width: 60ch; font-size: 1.0625rem; margin-bottom: 1em; }
.split-main > section a.cta-button { margin-top: 20px; }

.hero-section { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; }
.hero-section h1 { font-size: clamp(2.2rem, 3.2vw + 1rem, 3.4rem); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 22px; }
.hero-section .hero-lead { font-size: 1.1875rem; max-width: 46ch; margin-bottom: 32px; }
.hero-section .cta-button { margin-top: 0; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 24px 44px; margin-top: clamp(40px, 8vh, 64px); }
.hero-facts div { max-width: 17ch; }
.hero-facts dt { font: 500 1.6rem/1.1 var(--f-display); color: var(--ink); letter-spacing: -.01em; }
.hero-facts dd { margin-top: 8px; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); }

/* soluções — linhas, não cartões */
.solution-cards { margin-top: 28px; display: grid; gap: 8px; margin-left: -14px; margin-right: -14px; }
.card {
    display: grid; grid-template-columns: 168px 1fr auto; gap: 8px 28px; align-items: center;
    padding: 14px; border-radius: 4px; text-decoration: none; position: relative;
    transition: background .25s;
}
.card-art { grid-row: 1 / span 2; width: 176px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: var(--sky); }
.card-art svg { display: block; width: 100%; height: 100%; }
.card-art .h1 { fill: var(--hill-1); }
.card-art .h2 { fill: var(--hill-2); }
.card-art .h3 { fill: var(--hill-3); }
.card h4 { font-size: 1.4rem; align-self: end; }
.card p { grid-column: 2; margin: 0 !important; font-size: .98rem !important; align-self: start; max-width: 44ch; }
.card::after {
    content: "\2192"; grid-column: 3; grid-row: 1 / span 2; font-size: 1.4rem; color: var(--ink-3);
    transition: transform .25s, color .25s;
}
.card:hover { background: var(--paper-2); }
.card:hover::after { transform: translateX(4px); color: var(--ink); }
.card:hover h4 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* calculadora */
.calculator-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; max-width: 540px; margin-top: 28px; }
.calculator-form .presets, .calculator-form .calc-error, .calculator-form .cta-button { grid-column: 1 / -1; }
.calculator-form .cta-button { margin-top: 4px !important; }
label { font-size: .875rem; font-weight: 500; color: var(--ink); }
input, textarea {
    width: 100%; font: inherit; color: var(--ink);
    padding: 12px 14px; background: var(--surface);
    border: 1px solid var(--line-2); border-radius: var(--r);
    transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .8; }
input:hover, textarea:hover { border-color: var(--ink-3); }
input:focus-visible, textarea:focus-visible {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.calculator-form .cta-button { justify-self: start; }

.results { display: none; margin-top: 36px; max-width: 540px; padding: 20px 22px; background: var(--paper-2); border-radius: 4px; animation: rise .5s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.results h4 { font: 600 .95rem var(--f-text); letter-spacing: 0; color: var(--ink); margin-bottom: 6px; }
.results p {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
    max-width: none !important; margin: 0 !important; padding: 10px 0;
    font-size: .95rem !important;
}
.results p strong { font-weight: 500; color: var(--ink-2); }
#economia-anual, #co2-reducao { font: 500 1.45rem/1.1 var(--f-mono); color: var(--ink); letter-spacing: -.02em; }
.results .small-text { justify-content: flex-start; gap: .4ch; border-bottom: 0; color: var(--ink-2); }
#arvores { font: 500 1.05rem var(--f-mono); color: var(--brand); }

/* contato */
.contact-form { display: grid; gap: 18px; max-width: 520px; margin-top: 32px; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .cta-button { justify-self: start; margin-top: 6px; }
.form-status { min-height: 0; font-size: .9rem; padding-left: 12px; border-left: 3px solid transparent; }
.form-status:empty { display: none; }
.form-status[data-type="ok"] { border-color: var(--brand); color: var(--ink); }
.form-status[data-type="error"] { border-color: var(--danger); color: var(--danger); }

/* rodapé */
.main-footer { border-top: 1px solid var(--line); padding: 28px 0; background: var(--paper); }
.main-footer p { font: 400 .75rem var(--f-mono); letter-spacing: .02em; color: var(--ink-3); }
.main-footer .container { max-width: none; }

/* =========================================================
   PÁGINAS DE IMPACTO
   ========================================================= */
.impact-page { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.impact-page .container { max-width: 1180px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
:where(.impact-page .container) > * { grid-column: 1 / -1; }
.impact-page h1 { grid-column: 1 / 7; grid-row: 1; align-self: end; font-size: clamp(2rem, 2.6vw + 1rem, 3rem); line-height: 1.06; letter-spacing: -.025em; padding-bottom: 24px; }
.impact-page .container > h1 + p { grid-column: 1 / 7; grid-row: 2; align-self: start; max-width: 52ch; font-size: 1.125rem; text-align: left !important; }
.image-full { grid-column: 7 / -1; grid-row: 1 / span 2; align-self: start; margin: 0 0 48px; }
.image-full::after {
    content: "Fig. \2014  " attr(aria-label); display: block; padding-top: 10px;
    font: 400 .72rem/1.4 var(--f-mono); letter-spacing: .02em; color: var(--ink-3);
}
.illus { overflow: hidden; line-height: 0; }
.illus svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 2px; background: var(--sky); }
.image-full.illus::after { line-height: 1.4; }

.article { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 0 clamp(40px, 6vw, 80px); margin-top: 8px; }
.article-main { min-width: 0; }
.article-main > h2 { margin: 52px 0 14px; font-size: 1.55rem; line-height: 1.2; }
.article-main > h2:first-child { margin-top: 0; }
.article-main > p, .article-main > .facts-list { max-width: 66ch; }
.impact-page p { font-size: 1.0625rem; }

.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; padding-left: 18px; border-left: 1px solid var(--line); }
.toc-title { margin-bottom: 8px; font: 600 .8125rem var(--f-text) !important; color: var(--ink-3); }
.toc-list { list-style: none; }
.toc a { position: relative; display: block; padding: 6px 0; font-size: .9rem; line-height: 1.35; color: var(--ink-3); text-decoration: none; transition: color .2s; }
.toc a::before { content: ""; position: absolute; left: -19px; top: 4px; bottom: 4px; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .25s cubic-bezier(.3, .7, .2, 1); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); font-weight: 500; }
.toc a.is-active::before { transform: scaleY(1); }

.page-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.next-link { display: flex; flex-direction: column; align-items: flex-end; text-align: right; text-decoration: none; }
.next-kicker { font-size: .8125rem; color: var(--ink-3); }
.next-title { font: 500 1.6rem/1.2 var(--f-display); color: var(--ink); letter-spacing: -.015em; }
.next-title::after { content: "\2192"; display: inline-block; margin-left: .35em; transition: transform .25s cubic-bezier(.3, .7, .2, 1); }
.next-link:hover .next-title::after { transform: translateX(6px); }
.next-link:hover .next-title { color: var(--brand); }

.facts-list { list-style: none; }
.facts-list li { position: relative; padding: 8px 0 8px 22px; font-size: 1.0625rem; line-height: 1.6; }
.facts-list li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 7px; background: var(--accent); border-radius: 1px; }

.dicas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.dica-card h4 { font-size: 1.25rem; margin-bottom: 6px; }
.dica-card p { font-size: 1rem !important; margin: 0 !important; }

/* ---------- Solução Tech ---------- */
.tech-solution { margin-top: 84px; padding-top: 44px; border-top: 1px solid var(--line); }
.tech-head { margin-bottom: 36px; max-width: none; }
.tech-badge, .cases-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); margin-bottom: 14px; font: 600 .9375rem var(--f-text); }
.tech-badge svg, .cases-badge svg { width: 16px; height: 16px; }
.tech-title, .cases-title { font-size: clamp(1.45rem, 1.4vw + 1rem, 1.9rem); max-width: 28ch; margin-bottom: 12px; }
.tech-lead, .cases-lead { max-width: 62ch; margin: 0 !important; font-size: 1rem !important; }

.tech-flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; }
.tech-step { position: relative; padding: 0 clamp(16px, 3vw, 36px) 0 0; }
.tech-step:last-child { padding-right: 0; }
.tech-step-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--paper-2); color: var(--brand); margin-bottom: 16px; border-radius: 50%; }
.tech-step-icon svg { width: 20px; height: 20px; }
.tech-step-n { display: block; color: var(--ink-3); font: 500 .85rem var(--f-text); margin-bottom: 4px; }
.tech-step h4 { font-size: 1.2rem; margin-bottom: 8px; }
.tech-step p { font-size: .95rem !important; margin: 0 !important; }
.tech-foot { display: grid; gap: 20px; margin-top: 36px; }
.tech-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tags li { padding: 3px 11px; border-radius: 999px; font: 500 .82rem var(--f-text); color: var(--ink-2); background: var(--paper-2); }
.tech-result { font-size: .95rem !important; margin: 0 !important; max-width: none !important; padding-left: 16px; border-left: 2px solid var(--accent); }

/* ---------- Casos reais ---------- */
.cases { margin-top: 72px; }
.cases-head { max-width: none; margin-bottom: 24px; }
.cases-list { border-top: 1px solid var(--line); }
.case { border-bottom: 1px solid var(--line); }
.case > summary {
    list-style: none; display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: center;
    padding: 18px 4px; cursor: pointer; transition: background .2s, padding .2s;
}
.case > summary::-webkit-details-marker { display: none; }
.case > summary:hover { background: var(--paper-2); padding-left: 12px; padding-right: 12px; }
.case-flag { width: 44px; height: 30px; overflow: hidden; border-radius: 2px; border: 1px solid var(--line); line-height: 0; }
.case-flag svg { width: 100%; height: 100%; }
.case-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.case-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.case-country { font: 600 .85rem var(--f-text); color: var(--ink-3); }
.case-status { display: inline-flex; align-items: center; gap: 6px; font: 500 .82rem var(--f-text); color: var(--ink-2); }
.case-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.case-status[data-status="use"]::before { background: var(--brand); }
.case-status[data-status="rollout"]::before { background: var(--accent); }
.case-status[data-status="field"]::before { background: #3a7ca5; }
.case-status[data-status="research"]::before { background: transparent; border: 1.5px solid var(--ink-3); }
.case-name { font: 500 1.2rem/1.25 var(--f-display); color: var(--ink); letter-spacing: -.01em; }
.case-chevron { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink); transition: transform .3s, background .2s; }
.case-chevron svg { width: 16px; height: 16px; }
.case[open] .case-chevron { transform: rotate(180deg); background: var(--ink); color: var(--paper); }
.case-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; padding: 4px 4px 28px 66px; }
.case-label { display: block; color: var(--accent-ink); font: 600 .85rem var(--f-text); margin-bottom: 6px; }
.case-text p { font-size: .98rem !important; margin-bottom: 12px !important; max-width: none !important; }
.case-src { margin: 0 !important; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.case-link { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .85rem; }
.case-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.case-link a:hover { color: var(--ink); }
.case-link svg { width: 14px; height: 14px; }
.case-pub { color: var(--ink-3); font-size: .8rem; }
.case-stat { align-self: start; padding: 4px 0 4px 24px; border-left: 2px solid var(--accent); }
.case-stat-n { display: block; font: 500 clamp(2rem, 3vw, 2.7rem)/1 var(--f-display); color: var(--ink); letter-spacing: -.02em; }
.case-stat-l { display: block; margin-top: 8px; font-size: .88rem; line-height: 1.45; color: var(--ink-2); }

/* ---------- Revelar ao rolar ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
    nav ul { gap: 20px; }
    .header-actions { gap: 20px; }
}
@media (max-width: 1100px) {
    .article { grid-template-columns: minmax(0, 1fr); }
    .toc { display: none; }
}
@media (max-width: 980px) {
    .split { display: block; }
    .figure { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .figure-art { flex: none; height: clamp(180px, 34vw, 280px); }
    .split-main .container { max-width: 720px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
    .hero-section { min-height: 0; }
    .impact-page h1, .impact-page .container > h1 + p { grid-column: 1 / -1; grid-row: auto; }
    .image-full { grid-column: 1 / -1; grid-row: auto; margin: 32px 0 8px; }
    .article-main > h2 { margin-top: 40px; }
}
@media (max-width: 900px) {
    .nav-toggle { display: inline-block; }
    .header-actions { gap: 12px; }
    .language-switcher { padding-left: 12px; gap: 6px; }
    nav {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--paper); border-bottom: 1px solid var(--line);
        display: none; padding: 8px clamp(20px, 4vw, 40px) 20px;
    }
    .main-header.nav-open nav { display: block; animation: rise .25s ease-out; }
    nav ul { flex-direction: column; gap: 0; }
    nav li { border-bottom: 1px solid var(--line); }
    nav a { display: block; padding: 16px 0; font-size: 1.05rem; }
    nav a::after { display: none; }
    nav a[aria-current] { color: var(--accent-ink); }
}
@media (max-width: 760px) {
    .tech-flow { grid-template-columns: 1fr; }
    .tech-step { padding: 0 0 24px; }
    .tech-foot { grid-template-columns: 1fr; }
    .case-body { grid-template-columns: 1fr; padding-left: 4px; gap: 20px; }
    .dicas-grid { grid-template-columns: 1fr; }
    .page-end { flex-direction: column; align-items: stretch; }
    .next-link { align-items: flex-start; text-align: left; }
}
@media (max-width: 640px) {
    :root { --header-h: 58px; }
    .logo-text { font-size: 1.3rem; }
    .logo-icon { width: 26px; height: 26px; }
    .solution-cards { margin-left: -10px; margin-right: -10px; }
    .card { grid-template-columns: 96px 1fr; gap: 6px 16px; padding: 10px; }
    .card-art { width: 96px; }
    .card::after { display: none; }
    .card h4 { font-size: 1.2rem; }
    .case > summary { grid-template-columns: 36px 1fr auto; gap: 12px; }
    .case-flag { width: 36px; height: 25px; }
    .case-name { font-size: 1.08rem; }
    .contact-form .cta-button, .calculator-form .cta-button { justify-self: stretch; }
    .calculator-form { grid-template-columns: 1fr; }
    .language-flag { width: 24px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
    .reveal { opacity: 1; transform: none; }
    body, .figure, .hero-section .container > * { animation: none !important; }
    .read-progress { transition: none; }
}

/* =========================================================
   v4 — vida na interface: microinterações, feedback e componentes novos
   ========================================================= */
[hidden] { display: none !important; }
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* troca de tema suave: só cores da interface (cenários não mudam de cor) */
html.theme-anim body, html.theme-anim body *:not(.bg-strip):not(.bg-strip *):not(.illus svg):not(.illus svg *):not(.card-art svg):not(.card-art svg *) {
    transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease, fill .35s ease, stroke .35s ease !important;
}

/* entrada de página e saída ao navegar */
body { animation: page-in .4s ease both; }
@keyframes page-in { from { opacity: 0; } }
html.is-leaving body { opacity: 0; transition: opacity .18s ease; }

/* progresso de leitura + sombra do cabeçalho ao rolar */
.read-progress {
    position: fixed; left: 0; top: 0; z-index: 70; width: 100%; height: 3px;
    background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; pointer-events: none;
}
.main-header { transition: box-shadow .25s ease, background-color .3s ease; }
.main-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(10, 25, 18, .45); }

/* voltar ao topo */
.to-top {
    position: fixed; right: clamp(14px, 2.5vw, 28px); bottom: clamp(14px, 2.5vw, 28px); z-index: 40;
    width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
    background: var(--ink); color: var(--paper); border: 0; border-radius: var(--r); cursor: pointer;
    opacity: 0; transform: translateY(10px); visibility: hidden;
    transition: opacity .25s, transform .25s, visibility 0s .25s, background .2s;
}
.to-top svg { width: 20px; height: 20px; transition: transform .2s; }
.to-top.show { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.to-top:hover { background: var(--brand); color: var(--on-brand); }
.to-top:hover svg { transform: translateY(-2px); }
.to-top:active { transform: scale(.95); }

/* rodapé */
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { font-size: .875rem; color: var(--ink-2); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; padding-bottom: 2px; transition: background-size .25s, color .2s; }
.footer-nav a:hover { color: var(--ink); background-size: 100% 1.5px; }

/* campos de formulário */
.field { display: grid; gap: 6px; }
.field label { transition: color .2s; }
.field:focus-within label { color: var(--brand); }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent); }
input.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.calc-error { padding-left: 12px; border-left: 3px solid var(--danger); color: var(--danger); font-size: .9rem; animation: rise .25s ease-out; }
.presets-label { display: block; margin-bottom: 10px; font-size: .875rem; color: var(--ink-3); }
.presets-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 7px 14px; font: 500 .875rem var(--f-text); color: var(--ink-2); cursor: pointer;
    background: transparent; border: 1px solid var(--line-2); border-radius: 999px;
    transition: background .2s, border-color .2s, color .2s, transform .12s;
}
.chip:hover { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip.is-selected { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.results .results-note { display: block; margin-top: 8px !important; padding: 12px 0 0 !important; border-top: 1px solid var(--line); font-size: .8125rem !important; line-height: 1.5; color: var(--ink-3); }
.results.is-new { animation: rise .5s ease-out, result-flash 1.2s ease-out; }
@keyframes result-flash { from { background: var(--accent-soft); } }

/* hero: segundo caminho + entrada escalonada */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.text-link {
    font-weight: 600; color: var(--ink); text-decoration: none; padding-bottom: 2px;
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1.5px no-repeat; transition: background-size .25s, color .2s;
}
.text-link::after { content: "\2193"; display: inline-block; margin-left: .4em; transition: transform .25s; }
.text-link:hover { background-size: 100% 100%; }
.text-link:hover::after { transform: translateY(3px); }
.hero-section .container > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-section .container > :nth-child(2) { animation-delay: .06s; }
.hero-section .container > :nth-child(3) { animation-delay: .12s; }
.hero-section .container > :nth-child(4) { animation-delay: .18s; }
.hero-section .container > :nth-child(5) { animation-delay: .26s; }
.figure { animation: page-in .8s ease .1s both; }

/* estados de interação consistentes */
.cta-button:focus-visible, .chip:focus-visible, .theme-toggle:focus-visible, .nav-toggle:focus-visible, .to-top:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.language-flag:active { transform: scale(.92); }
.language-flag { transition: opacity .2s, filter .2s, box-shadow .2s, transform .15s; }
.theme-toggle:active, .nav-toggle:active { transform: scale(.94); }
.case > summary:focus-visible { outline-offset: -2px; background: var(--paper-2); }
.case > summary:active .case-chevron { transform: scale(.92); }
.case[open] > summary:active .case-chevron { transform: rotate(180deg) scale(.92); }
.card:active { background: var(--paper-2); }
.card:focus-visible { outline-offset: 2px; }

/* animações só rodam quando visíveis (economiza bateria) */
.is-paused, .is-paused * { animation-play-state: paused !important; }

@media (hover: none) { .card:hover { background: none; } .case > summary:hover { background: none; padding-left: 4px; padding-right: 4px; } }

/* =========================================================
   Ilustrações (SVG no próprio código) — usam as variáveis do tema
   ========================================================= */
.scene .h1 { fill: var(--hill-1); }
.scene .h2 { fill: var(--hill-2); }
.scene .h3 { fill: var(--hill-3); }



.glint {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: glint 3.4s ease-in-out infinite;
}
@keyframes glint {
    0%, 100% { opacity: 0; transform: scale(.3); }
    50%      { opacity: 1; transform: scale(1); }
}
.bird { animation: bird-drift 36s linear infinite; }
@keyframes bird-drift {
    from { transform: translateX(-60px); }
    to   { transform: translateX(1300px); }
}
.drone { animation: drone-bob 3s ease-in-out infinite; }
@keyframes drone-bob { 50% { transform: translateY(-7px); } }
.scan { opacity: .22; animation: scan-pulse 2.6s ease-in-out infinite; }
@keyframes scan-pulse { 50% { opacity: .46; } }
.hot {
    transform-box: fill-box;
    transform-origin: center;
    animation: hot-pulse 1.6s ease-out infinite;
}
@keyframes hot-pulse {
    0%   { transform: scale(.6); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}
.wave { animation: wave-move 9s linear infinite; }
@keyframes wave-move { to { transform: translateX(-400px); } }
.floatrow { animation: float-bob 4.5s ease-in-out infinite; }
@keyframes float-bob { 50% { transform: translateY(2.5px); } }
.smoke {
    fill: #a9b6c1;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: smoke-rise 5.1s ease-out infinite;
}
@keyframes smoke-rise {
    0%   { opacity: .75; transform: translate(0, 0) scale(.5); }
    100% { opacity: 0;   transform: translate(16px, -86px) scale(1.7); }
}
.ring { stroke-dasharray: 14 10; animation: ring-dash 2.4s linear infinite; }
@keyframes ring-dash { to { stroke-dashoffset: -48; } }
.wifi { opacity: .25; animation: wifi-pulse 1.8s ease-in-out infinite; }
@keyframes wifi-pulse { 40% { opacity: 1; } }


@media (prefers-reduced-motion: reduce) {
    .glint, .bird, .drone, .scan, .hot, .wave, .floatrow, .smoke, .ring, .wifi { animation: none !important; }
    .glint { opacity: .8; transform: none; }
    .wifi { opacity: 1; }
}



.blades {
    transform-box: view-box;
    transform-origin: 0 0;
    animation: turbine-spin 14s linear infinite;
}
.blades.b2 { animation-duration: 11s; }
.blades.b3 { animation-duration: 9s; }
@keyframes turbine-spin { to { transform: rotate(360deg); } }
.sun-glow { transform-box: fill-box; transform-origin: center; animation: sun-pulse 7s ease-in-out infinite; }
@keyframes sun-pulse { 50% { transform: scale(1.08); opacity: 0.85; } }

.t-blade { fill: var(--blade); stroke: rgba(0, 0, 0, 0.14); stroke-width: 0.6; }
.t-tower { fill: var(--tower); }
.t-hub   { fill: var(--tower); stroke: rgba(0, 0, 0, 0.18); stroke-width: 0.8; }
.card-art .blades { animation-duration: 4s; animation-play-state: paused; }
.card:hover .card-art .blades { animation-play-state: running; }

/* =========================================================
   TEXTO DENTRO DA FIGURA (abre ao clicar na própria figura)
   ========================================================= */
.com-texto { position: relative; }
.fo-hit { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; z-index: 1; }
.fo-hit::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; transition: border-color .2s; pointer-events: none; }
.fo-hit:hover::after, .fo-hit:focus-visible::after { border-color: var(--accent); }
.fo-hit:focus-visible { outline: none; }
.texto-aberto > .fo-hit { cursor: zoom-out; }
.fig-hint {
    position: absolute; left: 0; bottom: 0; z-index: 1; padding: 6px 10px; pointer-events: none;
    font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .02em; color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-left: 0; border-bottom: 0;
}
.texto-aberto > .fig-hint { display: none; }
.fig-hint-cap { order: 3; flex-basis: 100%; font: 500 .75rem var(--f-mono); color: var(--accent-ink); }
.figure-cap { flex-wrap: wrap; }

.fig-over {
    position: absolute; z-index: 2; right: 0; bottom: 0; top: 0; width: min(66%, 480px);
    background: var(--paper); color: var(--ink); border-left: 1px solid var(--line-2);
    overflow-y: auto; overscroll-behavior: contain; outline: none; line-height: 1.5; text-align: left;
    animation: fo-in .25s ease both;
}
.fig-over[hidden] { display: none; }
@keyframes fo-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* home: o quadro sobe da base da figura, a cena fica visível acima */
.figure-art > .fig-over { top: auto; left: 0; width: auto; height: 64%; border-left: 0; border-top: 1px solid var(--line-2); }
.fo-head {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 18px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.fo-title { margin: 0; white-space: nowrap; font: 500 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.fo-close { font: 600 .8125rem var(--f-text); color: var(--ink); background: none; border: 1px solid var(--line-2); padding: 4px 10px; cursor: pointer; transition: background .2s, color .2s; }
.fo-close:hover { background: var(--ink); color: var(--paper); }
.fo-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fm-chapter { padding: 22px 18px 20px; min-height: 80%; opacity: .5; transition: opacity .35s; }
.fm-chapter.is-on { opacity: 1; }
.fm-chapter:last-child { min-height: calc(100% - 46px); }
.fm-chapter .fm-n { font: 500 .72rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 6px; }
.fm-chapter h3 { font-size: 1.25rem; line-height: 1.2; margin: 0 0 12px; }
.fm-chapter p { margin: 0 0 12px; line-height: 1.6; font-size: .9375rem; }
.fm-chapter p.fm-n { font-size: .72rem; }
.fm-stat { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 12px !important; padding: 10px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.fm-big { font: 600 1.6rem var(--f-mono); color: var(--accent-ink); white-space: nowrap; }
.fm-lab { font-size: .8125rem; color: var(--ink-2); line-height: 1.4; }
.fm-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fm-links .text-link::after { content: "\2192"; }
.illus .fig-over { top: 0; bottom: auto; }
@media (max-width: 640px) {
    .fig-over { width: 100%; border-left: 0; }
    .illus .fig-over { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .fig-over { animation: none; }
    .fm-chapter { transition: none; }
}
@media (max-width: 980px) {
    .figure-art.texto-aberto { height: min(72svh, 480px); transition: height .25s ease; }
}

/* ---- texto POR CIMA da figura (a cena inteira fica atrás, escurecida) ---- */
.fig-over, .figure-art > .fig-over, .illus .fig-over {
    top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto;
    border: 0; color: #fff; background: rgba(8, 20, 14, .6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.5) transparent;
}
.illus .fig-over { bottom: auto; }
.fo-head { background: rgba(8, 20, 14, .55); border-bottom: 1px solid rgba(255, 255, 255, .25); padding: 12px clamp(18px, 4vw, 36px); }
.fo-title { color: rgba(255, 255, 255, .85); }
.fo-close { color: #fff; border-color: rgba(255, 255, 255, .6); text-shadow: none; }
.fo-close:hover { background: #fff; color: #10201a; }
.fm-chapter { padding: 30px clamp(18px, 4vw, 36px) 24px; }
.fm-chapter .fm-n { color: #f5c25a; }
.fm-chapter h3 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.fm-chapter p { color: #fff; font-size: clamp(.9375rem, 1.3vw, 1.0625rem); font-weight: 500; }
.fm-chapter p.fm-n { color: #f5c25a; font-size: .72rem; }
.fm-stat { border-color: rgba(255, 255, 255, .35); }
.fm-big { color: #f5c25a; }
.fm-lab { color: rgba(255, 255, 255, .9); }
.fm-links .text-link { color: #fff; background-image: linear-gradient(#f5c25a, #f5c25a); }
.fm-links .text-link:hover { color: #10201a; }
.fo-close:focus-visible { outline-color: #f5c25a; }

/* ---- texto AO LADO, dentro da figura: a cena fica livre à esquerda ---- */
.fig-over, .figure-art > .fig-over, .illus .fig-over {
    left: auto; width: 44%; background: rgba(8, 20, 14, .78); border-left: 1px solid rgba(255, 255, 255, .25);
}
.illus .fig-over { bottom: auto; }
.fo-head { background: rgba(8, 20, 14, .9); }
/* ao abrir, a figura ganha largura para a cena e o texto caberem lado a lado */
.split { transition: grid-template-columns .35s ease; }
.split:has(.figure-art.texto-aberto) { grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); }
.split:has(.figure-art.texto-aberto) .split-main { visibility: hidden; overflow: hidden; }
.image-full.texto-aberto { grid-column: 1 / -1; grid-row: auto; }
@media (max-width: 980px) {
    .split:has(.figure-art.texto-aberto) { display: block; }
    .split:has(.figure-art.texto-aberto) .split-main { display: none; }
}
@media (max-width: 760px) {
    .fig-over, .figure-art > .fig-over, .illus .fig-over { top: auto; bottom: 0; left: 0; width: auto; height: 58%; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .25); }
}

/* ---- correções do texto na figura das páginas de tema ---- */
.illus .fig-over { top: 0; bottom: auto; height: var(--h, 100%); }
.illus .fig-hint { bottom: auto; top: calc(var(--h, 100%) - 28px); }
@media (max-width: 760px) {
    .illus .fig-over { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: auto; height: min(56svh, 340px); border-top: 1px solid rgba(255,255,255,.25); }
    .illus .fig-hint { top: auto; bottom: auto; position: static; display: block; }
}

/* ---- paralaxe leve das colinas e brilho que segue o ponteiro ---- */
.bg-strip .h1, .bg-strip .h2, .bg-strip .h3,
.illus svg .h1, .illus svg .h2, .illus svg .h3 {
    transform-box: fill-box; transform-origin: 50% 100%;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.bg-strip .h1, .illus svg .h1 { transform: translate(calc(var(--px, 0) * -3px), calc(var(--py, 0) * -1px)) scale(1.02); }
.bg-strip .h2, .illus svg .h2 { transform: translate(calc(var(--px, 0) * -7px), calc(var(--py, 0) * -2px)) scale(1.04); }
.bg-strip .h3, .illus svg .h3 { transform: translate(calc(var(--px, 0) * -13px), calc(var(--py, 0) * -3px)) scale(1.06); }
.com-texto:not(.texto-aberto) .fo-hit:hover { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 70%); }
.illus.texto-aberto > .fig-hint { display: none !important; }

/* ---- acabamento: texto sobre a cena com degradê (sem caixa pesada) ---- */
.fig-over, .figure-art > .fig-over, .illus .fig-over {
    width: 54%; border: 0;
    background: linear-gradient(90deg, rgba(8, 20, 14, 0) 0, rgba(8, 20, 14, .72) 24%, rgba(8, 20, 14, .86) 100%);
}
.fig-over .fo-head { background: none; border: 0; padding: 14px clamp(18px, 3vw, 32px) 0; }
.fig-over .fo-head .fo-title { font: 500 .68rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); margin: 0; }
.fig-over .fo-close { font-size: .75rem; padding: 3px 9px; }
.fig-over .fm-chapter { padding: 26px clamp(18px, 3vw, 32px) 20px; margin-left: 12%; }
.fig-over .fm-chapter h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin-bottom: 10px; }
.fig-over .fm-chapter p { font-size: clamp(.9rem, 1.15vw, 1rem); line-height: 1.55; margin-bottom: 10px; }
.fig-over .fm-chapter p.fm-n { font-size: .68rem; }
@media (max-width: 760px) {
    .fig-over, .figure-art > .fig-over, .illus .fig-over { width: auto; background: rgba(8, 20, 14, .86); }
    .fig-over .fm-chapter { margin-left: 0; }
}

/* ---- texto de um lado, assunto da figura do outro ---- */
.illus .fig-over { width: max(36%, 300px); transition: opacity .17s; }
.figure-art > .fig-over { width: 46%; }
.fig-over.troca { opacity: 0; }
.fig-over .fm-chapter { margin-left: 8%; }
.fig-over.lado-esq { right: auto; left: 0; background: linear-gradient(270deg, rgba(8, 20, 14, 0) 0, rgba(8, 20, 14, .72) 24%, rgba(8, 20, 14, .86) 100%); }
.fig-over.lado-esq .fm-chapter { margin-left: 0; margin-right: 8%; }
@media (max-width: 760px) {
    .fig-over.lado-esq { background: rgba(8, 20, 14, .86); }
    .fig-over .fm-chapter, .fig-over.lado-esq .fm-chapter { margin: 0; }
}

/* dica sobre a figura: etiqueta clara e discreta, igual nos dois temas */
.fig-hint { left: 12px; bottom: auto; top: calc(var(--h, 100%) - 38px); padding: 5px 10px; background: rgba(255, 253, 247, .92); color: #1b2a22; border: 0; border-left: 3px solid #c47a12; text-shadow: none; }
@media (max-width: 760px) { .illus .fig-hint { position: static; margin: 0; border-left: 0; border-top: 1px solid rgba(0,0,0,.1); } }
