/* esg.css — página "Projeto Sampaio ESG" (/esg).
   Usa a base visual da página de Tecnologia (tecnologia.css: protocolo,
   trilha de custódia, seções, abas de pasta, fecho) e acrescenta as peças
   próprias: a tríade E·S·G, o passeio pelo escritório com as placas reais,
   a lista da cozinha que se confere sozinha e o ciclo de 90 dias. */

:root {
    --folha-verde: #6F8A6A;     /* só um aceno ao verde das placas físicas */
    --esg-e: #8FA27E;
    --esg-s: #CF9D68;
    --esg-g: #6B7A8F;
}

/* ---------- Abertura: tríade E · S · G ---------- */
.esg-triade { position: relative; width: min(420px, 86vw); aspect-ratio: 1; margin-inline: auto; }
.esg-triade svg { width: 100%; height: 100%; overflow: visible; }
.esg-triade .aro { fill: rgba(255,255,255,0.55); stroke-width: 1.6; cursor: pointer; transition: fill 0.4s ease, stroke-width 0.3s ease, transform 0.5s var(--curva); transform-box: fill-box; transform-origin: center; }
.esg-triade .aro.e { stroke: var(--esg-e); }
.esg-triade .aro.s { stroke: var(--esg-s); }
.esg-triade .aro.g { stroke: var(--esg-g); }
.esg-triade .aro:hover, .esg-triade .aro:focus-visible, .esg-triade .aro.ativo { stroke-width: 2.6; fill: rgba(255,255,255,0.9); transform: scale(1.04); outline: none; }
.esg-triade .aro { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js-tec .esg-triade.desenhada .aro { animation: esg-aro 1.6s var(--curva) forwards; }
.js-tec .esg-triade.desenhada .aro.s { animation-delay: 0.25s; }
.js-tec .esg-triade.desenhada .aro.g { animation-delay: 0.5s; }
@keyframes esg-aro { to { stroke-dashoffset: 0; } }
.esg-triade .letra { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 30px; pointer-events: none; }
.esg-triade .letra.e { fill: var(--esg-e); } .esg-triade .letra.s { fill: var(--esg-s); } .esg-triade .letra.g { fill: var(--esg-g); }
.esg-triade .rot { font-family: var(--protocolo); font-size: 10px; letter-spacing: 2px; fill: var(--nanquim-suave); text-transform: uppercase; pointer-events: none; }
.esg-triade .nucleo { fill: var(--latao); opacity: 0; transition: opacity 0.8s ease 1.6s; }
.js-tec .esg-triade.desenhada .nucleo { opacity: 1; }
.esg-legenda { min-height: 3.2em; text-align: center; font-size: 0.95rem; line-height: 1.55; color: var(--grafite); max-width: 380px; margin: 18px auto 0; transition: opacity 0.3s ease; }
.esg-legenda b { color: var(--tinta); }

/* ---------- Ambiental: passeio pelo escritório ---------- */
.esg-passeio { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: stretch; }
.esg-planta { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr 0.9fr; grid-template-areas: 'salas coz' 'salas coz' 'pias san'; gap: 10px; padding: 14px; background: #fff; border: 1px solid var(--fio); border-radius: 20px; min-height: 380px;
    background-image: repeating-linear-gradient(0deg, transparent 0 23px, rgba(30,32,34,0.04) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, rgba(30,32,34,0.04) 23px 24px); }
.esg-comodo { all: unset; box-sizing: border-box; cursor: pointer; position: relative; border: 1.5px solid rgba(30,32,34,0.28); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(250,248,244,0.86); transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--curva); min-height: 44px; }
.esg-comodo:nth-child(1) { grid-area: salas; } .esg-comodo:nth-child(2) { grid-area: coz; } .esg-comodo:nth-child(3) { grid-area: san; } .esg-comodo:nth-child(4) { grid-area: pias; }
.esg-comodo .nome { font-family: var(--protocolo); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nanquim-suave); }
.esg-comodo .pino { align-self: flex-end; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--fio-forte); transition: all 0.35s var(--curva); }
.esg-comodo .pino svg { width: 18px; height: 18px; stroke: var(--tinta); }
.esg-comodo::after { content: ""; position: absolute; left: 22px; bottom: -1.5px; width: 34px; height: 3px; background: #fff; }
.esg-comodo:hover, .esg-comodo:focus-visible, .esg-comodo[aria-pressed="true"] { background: #fff; border-color: var(--latao); outline: none; }
.esg-comodo[aria-pressed="true"] .pino { background: var(--tinta); border-color: var(--tinta); transform: scale(1.1); }
.esg-comodo[aria-pressed="true"] .pino svg { stroke: var(--latao); }
.esg-comodo .pino::before { content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--latao); opacity: 0; }
.js-tec .esg-comodo:not([aria-pressed="true"]) .pino::before { animation: esg-pulso 2.6s ease-out infinite; }
@keyframes esg-pulso { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.8); opacity: 0; } }
.esg-comodo .pino { position: relative; }

.esg-mural { display: flex; flex-direction: column; gap: 16px; }
.esg-placa { background: #fff; border: 1px solid var(--fio); border-radius: 14px; padding: 22px 24px; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center; box-shadow: 0 18px 40px -30px rgba(30,32,34,0.45); transform: rotate(-0.6deg); transition: transform 0.5s var(--curva); }
.esg-placa:hover { transform: rotate(0deg) translateY(-2px); }
.esg-placa svg { width: 46px; height: 46px; stroke: var(--tinta); }
.esg-placa .frase { font-weight: 800; font-size: 1.28rem; line-height: 1.2; color: var(--tinta); display: block; }
.esg-placa .hash { font-size: 0.86rem; color: var(--nanquim-suave); margin-top: 4px; display: block; }
.esg-placa .hash b { font-weight: 500; }
.esg-porque { padding: 18px 20px; border-left: 3px solid var(--latao); background: #F7F2EB; border-radius: 0 12px 12px 0; font-size: 0.94rem; line-height: 1.65; color: var(--grafite); }
.esg-porque .tec-protocolo { display: block; margin-bottom: 6px; }
.esg-mural .troca { transition: opacity 0.3s ease, transform 0.35s var(--curva); }
.esg-mural.trocando .troca { opacity: 0; transform: translateY(8px); }

/* Compromissos ambientais do Código (art. 49) */
.esg-pilares3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.esg-pilar { background: #fff; border: 1px solid var(--fio); border-radius: 16px; padding: 24px; position: relative; overflow: hidden; isolation: isolate; }
.esg-pilar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--latao-vela), transparent 60%); opacity: 0; transition: opacity 0.35s ease; }
.esg-pilar:hover::before { opacity: 1; }
.esg-pilar svg { width: 28px; height: 28px; stroke: var(--tinta); margin-bottom: 14px; }
.esg-pilar h3 { font-size: 1rem; margin: 0 0 8px; }
.esg-pilar p { font-size: 0.88rem; line-height: 1.6; color: var(--nanquim-suave); margin: 0; }

/* Lista da cozinha que se confere ao rolar */
.esg-cozinha { margin-top: 44px; background: #fff; border: 1px solid var(--fio); border-radius: 20px; padding: 34px 38px; position: relative; overflow: hidden; }
.esg-cozinha h3 { font-size: 1.35rem; font-weight: 300; margin: 8px 0 6px; }
.esg-cozinha h3 strong { font-weight: 700; }
.esg-cozinha > p { color: var(--nanquim-suave); font-size: 0.92rem; margin: 0 0 22px; }
.esg-grupos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
.esg-grupo h4 { font-family: var(--protocolo); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--latao-escuro); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.esg-grupo h4 svg { width: 16px; height: 16px; stroke: var(--latao-escuro); }
.esg-grupo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.esg-grupo li { position: relative; padding-left: 30px; font-size: 0.92rem; line-height: 1.55; color: var(--grafite); }
.esg-grupo li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border: 1.5px solid rgba(207,157,104,0.7); border-radius: 5px; background: #fff; transition: background 0.35s ease, border-color 0.35s ease; }
.esg-grupo li::after { content: ""; position: absolute; left: 6px; top: 5px; width: 5px; height: 10px; border: solid var(--tinta); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.esg-grupo li.ok::before { background: var(--latao); border-color: var(--latao); }
.esg-grupo li.ok::after { transform: rotate(45deg) scale(1); }
.esg-lema { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--fio); display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.esg-lema b { font-size: 1.3rem; font-weight: 700; }
.esg-lema span { color: var(--nanquim-suave); font-size: 0.9rem; }

/* ---------- Social ---------- */
.esg-social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.esg-cartao { background: #fff; border: 1px solid var(--fio); border-radius: 20px; padding: 30px; display: flex; flex-direction: column; position: relative; overflow: hidden; isolation: isolate; transition: transform 0.4s var(--curva), box-shadow 0.4s ease; }
.esg-cartao:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -36px rgba(30,32,34,0.5); }
.esg-cartao::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), var(--latao-vela), transparent 60%); opacity: 0; transition: opacity 0.35s ease; }
.esg-cartao:hover::before { opacity: 1; }
.esg-cartao .marca { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--papel); border: 1px solid var(--fio); margin-bottom: 20px; }
.esg-cartao .marca svg { width: 26px; height: 26px; stroke: var(--tinta); }
.esg-cartao h3 { font-size: 1.2rem; margin: 6px 0 10px; }
.esg-cartao p { font-size: 0.93rem; line-height: 1.65; color: var(--grafite); margin: 0 0 10px; }
.esg-temas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.esg-temas span { font-size: 0.76rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(207,157,104,0.55); color: var(--latao-escuro); background: rgba(207,157,104,0.06); }
.esg-cartao a { color: var(--latao-escuro); font-weight: 700; font-size: 0.86rem; margin-top: auto; padding-top: 12px; }
.esg-nota { margin-top: 22px; font-size: 0.82rem; color: var(--nanquim-suave); max-width: 760px; }

/* ---------- Governança: ciclo de 90 dias ---------- */
.esg-gov { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; margin-bottom: 48px; }
.esg-ciclo { position: relative; width: min(340px, 78vw); aspect-ratio: 1; margin-inline: auto; }
.esg-ciclo svg { width: 100%; height: 100%; overflow: visible; }
.esg-ciclo .trim { fill: none; stroke: rgba(30,32,34,0.1); stroke-width: 14; }
.esg-ciclo .varre { fill: none; stroke: var(--latao); stroke-width: 14; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 170px 170px; stroke-dasharray: 0 1000; }
.esg-ciclo .marco { fill: var(--papel-fundo); stroke: var(--tinta); stroke-width: 1.5; transition: fill 0.3s ease; }
.esg-ciclo .marco.aceso { fill: var(--latao); stroke: var(--latao); }
.esg-ciclo .num { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: 54px; fill: var(--tinta); }
.esg-ciclo .sub { font-family: var(--protocolo); font-size: 10px; letter-spacing: 2px; fill: var(--nanquim-suave); text-transform: uppercase; }
.esg-ciclo .tri { font-family: var(--protocolo); font-size: 10px; letter-spacing: 1.5px; fill: var(--latao-escuro); }
.esg-ciente { margin-top: 14px; text-align: center; min-height: 2.6em; font-size: 0.9rem; color: var(--grafite); }
.esg-ciente b { color: var(--tinta); }
.esg-gov-texto h3 { font-size: 1.6rem; font-weight: 300; margin: 10px 0 14px; line-height: 1.2; }
.esg-gov-texto h3 strong { font-weight: 700; }
.esg-gov-texto p { font-size: 1rem; line-height: 1.75; color: var(--grafite); margin: 0 0 12px; }
.esg-fatos { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.esg-fatos li { font-size: 0.9rem; color: var(--grafite); padding-left: 22px; position: relative; line-height: 1.5; }
.esg-fatos li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 1.5px; background: var(--latao); }
.esg-canal { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 18px; border-radius: 12px; background: var(--tinta); color: #F4F1EC; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.esg-canal svg { width: 18px; height: 18px; stroke: var(--latao); }
.esg-canal:hover { box-shadow: 0 14px 30px -14px rgba(30,32,34,0.55); }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
    .esg-social { grid-template-columns: 1fr 1fr; }
    .esg-social .esg-cartao:last-child { grid-column: span 2; }
}
@media (max-width: 860px) {
    .esg-passeio, .esg-gov { grid-template-columns: 1fr; gap: 28px; }
    .esg-planta { min-height: 320px; }
    .esg-pilares3, .esg-grupos, .esg-fatos { grid-template-columns: 1fr; }
    .esg-cozinha { padding: 26px 22px; }
    .esg-social { grid-template-columns: 1fr; }
    .esg-social .esg-cartao:last-child { grid-column: auto; }
    .esg-placa .frase { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .esg-triade .aro { stroke-dashoffset: 0; animation: none !important; }
    .esg-triade .nucleo { opacity: 1; transition: none; }
    .esg-comodo .pino::before { animation: none !important; }
    .esg-grupo li::after, .esg-placa, .esg-mural .troca { transition: none; }
}

/* ===================== v2 · O escritório como árvore ===================== */
/* Contraste AA (skill: accessibility): dourado e madeira escurecidos para textos pequenos nesta página. */
body.esg { --latao-escuro: #8A5E33; }
:root { --salvia: #7E8F74; --salvia-clara: rgba(126,143,116,0.14); --madeira: #9B7B58; --terra: #8A6A4F; --anoitecer: #15171A; }

/* Abertura: árvore em traço, três partes clicáveis */
.esg-arvore { width: min(440px, 88vw); margin-inline: auto; }
.esg-arvore svg { width: 100%; height: auto; overflow: visible; }
.esg-arvore .parte { cursor: pointer; outline: none; }
.esg-arvore .area { fill: transparent; transition: fill 0.4s ease; }
.esg-arvore .traco { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.esg-arvore .traco.fino { stroke-width: 1; opacity: 0.6; }
.esg-arvore .copa .traco { stroke: var(--salvia); }
.esg-arvore .tronco .traco { stroke: var(--madeira); }
.esg-arvore .raiz .traco { stroke: var(--latao); }
.js-tec .esg-arvore.desenhada .traco { animation: esg-cresce 1.6s cubic-bezier(0.45,0.05,0.4,1) forwards; }
.js-tec .esg-arvore.desenhada .raiz .traco { animation-delay: 0.1s; }
.js-tec .esg-arvore.desenhada .tronco .traco { animation-delay: 0.6s; }
.js-tec .esg-arvore.desenhada .copa .traco { animation-delay: 1.1s; }
@keyframes esg-cresce { to { stroke-dashoffset: 0; } }
.esg-arvore .letra { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 22px; opacity: 0; transition: opacity 0.6s ease 2.2s; pointer-events: none; }
.js-tec .esg-arvore.desenhada .letra { opacity: 1; }
.esg-arvore .copa .letra { fill: var(--salvia); } .esg-arvore .tronco .letra { fill: var(--madeira); } .esg-arvore .raiz .letra { fill: var(--latao-escuro); }
.esg-arvore .copa:hover .area, .esg-arvore .copa:focus-visible .area, .esg-arvore .copa.ativo .area { fill: var(--salvia-clara); }
.esg-arvore .tronco:hover .area, .esg-arvore .tronco:focus-visible .area, .esg-arvore .tronco.ativo .area { fill: rgba(155,123,88,0.12); }
.esg-arvore .raiz:hover .area, .esg-arvore .raiz:focus-visible .area, .esg-arvore .raiz.ativo .area { fill: var(--latao-vela); }
.esg-arvore .parte:focus-visible .traco { stroke-width: 2.6; }
.esg-arvore .nucleo { fill: var(--latao-escuro); opacity: 0; transition: opacity 0.9s ease 2.4s; }
.js-tec .esg-arvore.desenhada .nucleo { opacity: 1; }
.esg-arvore .copa { animation: esg-respira 7s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.esg-arvore .copa .area { stroke: none; }
@keyframes esg-respira { 0%,100% { transform: scale(1); } 50% { transform: scale(1.012) rotate(0.3deg); } }

/* A linha condutora vira ramo; os nós viram folhas */
body.esg .tec-trilha i { background: linear-gradient(var(--salvia), var(--madeira) 55%, var(--latao)); }
body.esg .tec-no { border-radius: 0 60% 0 60%; transform: rotate(-45deg); width: 18px; height: 18px; margin-left: -8px; border-color: var(--salvia); background: var(--papel-fundo); }
body.esg .tec-no::after { width: 1.5px; height: 12px; border-radius: 0; background: var(--salvia); transform: rotate(45deg); }
body.esg .tec-secao.passou .tec-no { background: var(--salvia); border-color: var(--salvia); transform: rotate(-45deg) scale(1.25); }
body.esg .tec-secao.passou .tec-no::after { background: #fff; }
body.esg .esg-pilar svg, body.esg #ambiental .tec-protocolo { stroke: var(--salvia); }

/* Governança: anéis de crescimento */
.esg-aneis { position: relative; width: min(340px, 80vw); aspect-ratio: 1; margin-inline: auto; }
.esg-aneis svg { width: 100%; height: 100%; overflow: visible; }
.esg-aneis .cerne { fill: #F3EADF; stroke: rgba(155,123,88,0.35); stroke-width: 1.5; }
.esg-aneis .anel { fill: none; stroke: var(--madeira); stroke-width: 1.4; opacity: 0.85; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(0.45,0.05,0.4,1), stroke 0.4s ease; }
.esg-aneis .anel.vis { stroke-dashoffset: 0; }
.esg-aneis .anel.novo { stroke: var(--latao); stroke-width: 2.2; }
.esg-aneis .racha { stroke: rgba(155,123,88,0.3); stroke-width: 1; fill: none; }
.esg-anel-info { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.esg-anel-info .num { font-weight: 300; font-size: 3rem; line-height: 1; color: var(--tinta); background: rgba(243,234,223,0.92); border-radius: 50%; width: 92px; height: 92px; display: grid; place-items: center; margin: 0 auto 8px; box-shadow: 0 0 0 1px rgba(155,123,88,0.25); }
.esg-anel-info .sub { font-family: var(--protocolo); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: #735A3F; background: rgba(250,248,244,0.9); padding: 3px 8px; border-radius: 999px; }

/* Social: raízes que se desenham ao rolar */
.esg-raizes { margin: -10px auto 18px; max-width: 900px; }
.esg-raizes svg { width: 100%; height: auto; display: block; }
.esg-raizes .r { fill: none; stroke: var(--latao); stroke-linecap: round; opacity: 0.55; stroke-dasharray: 1; stroke-dashoffset: 1; }
.js-tec .esg-raizes.vis .r { animation: esg-cresce 1.4s cubic-bezier(0.45,0.05,0.4,1) forwards; }
.js-tec .esg-raizes.vis .p5 { animation-delay: 0.2s; } .js-tec .esg-raizes.vis .p4 { animation-delay: 0.4s; } .js-tec .esg-raizes.vis .p3 { animation-delay: 0.6s; }
.js-tec .esg-raizes.vis .p2 { animation-delay: 0.8s; } .js-tec .esg-raizes.vis .p1 { animation-delay: 1s; }

/* Fecho: o interruptor da placa */
.esg-interruptor { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; background: #fff; border: 1px solid var(--fio); border-radius: 28px; padding: 56px 64px; position: relative; z-index: 1201; transition: background 0.8s ease, color 0.8s ease, border-color 0.8s ease; }
.esg-interruptor h2 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem); font-weight: 300; margin: 12px 0 10px; line-height: 1.15; }
.esg-interruptor h2 strong { font-weight: 800; }
.esg-interruptor p { margin: 0; color: var(--grafite); font-size: 1.02rem; }
.esg-interruptor .depois { display: none; }
.esg-tecla { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 10px; }
.esg-tecla .placa { width: 96px; height: 140px; border-radius: 16px; background: linear-gradient(#fbfaf7, #efe9e0); border: 1px solid rgba(30,32,34,0.14); box-shadow: inset 0 1px 0 #fff, 0 18px 32px -20px rgba(30,32,34,0.5); display: grid; place-items: center; }
.esg-tecla .alavanca { width: 40px; height: 74px; border-radius: 10px; background: linear-gradient(#fff, #e9e2d6); border: 1px solid rgba(30,32,34,0.18); box-shadow: 0 6px 0 rgba(30,32,34,0.12); transform: perspective(200px) rotateX(18deg); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease; position: relative; }
.esg-tecla .alavanca::after { content: ""; position: absolute; left: 50%; top: 10px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--latao); box-shadow: 0 0 10px var(--latao); transition: all 0.4s ease; }
.esg-tecla:hover .alavanca { box-shadow: 0 8px 0 rgba(30,32,34,0.14); }
.esg-tecla:focus-visible .placa { outline: 2px solid var(--latao); outline-offset: 4px; }
.esg-tecla .rotulo { font-family: var(--protocolo); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--nanquim-suave); }
.esg-saida { margin-top: 28px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.esg-saida p { margin: 0; max-width: 620px; color: var(--nanquim-suave); font-size: 0.95rem; }

/* Luzes apagadas: a página anoitece; só o interruptor fica aceso */
.esg-noite { position: fixed; inset: 0; background: radial-gradient(900px circle at var(--nx, 50%) var(--ny, 70%), rgba(21,23,26,0.55), rgba(21,23,26,0.94) 60%); opacity: 0; pointer-events: none; transition: opacity 1.1s ease; z-index: 1200; }
body.apagado .esg-noite { opacity: 1; }
body.apagado .esg-interruptor { background: #1E2022; color: #F4F1EC; border-color: rgba(207,157,104,0.35); }
body.apagado .esg-interruptor p { color: rgba(244,241,236,0.85); }
body.apagado .esg-interruptor .antes { display: none; }
body.apagado .esg-interruptor .depois { display: block; }
body.apagado .esg-tecla .alavanca { transform: perspective(200px) rotateX(-18deg); box-shadow: 0 -6px 0 rgba(0,0,0,0.25); }
body.apagado .esg-tecla .alavanca::after { top: 58px; background: #555; box-shadow: none; }
body.apagado .esg-tecla .rotulo { color: rgba(244,241,236,0.7); }
body.apagado .vivo-luz { opacity: 0 !important; }

@media (max-width: 860px) {
    .esg-interruptor { grid-template-columns: 1fr; padding: 36px 26px; text-align: center; justify-items: center; }
    .esg-saida { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .esg-arvore .traco, .esg-raizes .r, .esg-aneis .anel { stroke-dashoffset: 0 !important; animation: none !important; transition: none !important; }
    .esg-arvore .letra, .esg-arvore .nucleo { opacity: 1; transition: none; }
    .esg-arvore .copa { animation: none; }
    .esg-noite, .esg-interruptor { transition: none; }
}

/* ===================== v3 · Hábitos da mesa (substitui planta e placa da cozinha) ===================== */
.esg-pilares3 .esg-pilar:first-child { grid-column: span 2; }
.esg-mesa { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: stretch; }
.esg-objetos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; padding: 34px 24px 0; background: #fff; border: 1px solid var(--fio); border-radius: 22px; position: relative; overflow: hidden; }
.esg-objetos::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58px; background: linear-gradient(#F3EADF, #EADCC9); border-top: 1px solid rgba(155,123,88,0.35); }
.esg-objeto { all: unset; box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; padding: 10px 6px 18px; border-radius: 16px; min-height: 44px; transition: transform 0.45s var(--curva); }
.esg-objeto .obj-ic { width: 100%; max-width: 120px; aspect-ratio: 1 / 1.25; display: grid; place-items: end center; }
.esg-objeto .obj-ic svg { width: 78%; height: auto; stroke: var(--grafite); transition: stroke 0.3s ease, transform 0.5s var(--curva); transform-origin: 50% 100%; }
.esg-objeto .obj-nome { font-family: var(--protocolo); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nanquim-suave); text-align: center; line-height: 1.4; min-height: 2.8em; }
.esg-objeto::before { content: ""; position: absolute; left: 50%; bottom: 52px; width: 64%; height: 10px; margin-left: -32%; border-radius: 50%; background: radial-gradient(rgba(30,32,34,0.18), transparent 70%); transition: transform 0.45s var(--curva), opacity 0.45s ease; }
.esg-objeto:hover .obj-ic svg, .esg-objeto:focus-visible .obj-ic svg { transform: translateY(-6px) rotate(-3deg); stroke: var(--tinta); }
.esg-objeto:hover::before { transform: scale(0.8); opacity: 0.7; }
.esg-objeto[aria-pressed="true"] .obj-ic svg { stroke: var(--salvia); transform: translateY(-10px); stroke-width: 1.5; }
.esg-objeto[aria-pressed="true"] .obj-nome { color: var(--tinta); font-weight: 700; }
.esg-objeto[aria-pressed="true"]::after { content: ""; position: absolute; top: 2px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--salvia); box-shadow: 0 0 0 5px var(--salvia-clara); }
.esg-objeto:focus-visible { outline: 2px solid var(--latao); outline-offset: 2px; }
.esg-objeto .obj-nome { position: relative; z-index: 1; }
.esg-habito { background: var(--tinta); color: #F4F1EC; border-radius: 22px; padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; min-height: 300px; }
.esg-habito::before { content: ""; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(rgba(126,143,116,0.35), transparent 70%); }
.esg-habito .hab-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(244,241,236,0.06); border: 1px solid rgba(126,143,116,0.5); margin-bottom: 18px; }
.esg-habito .hab-ic svg { width: 30px; height: 30px; stroke: #B9C6AF; stroke-width: 1.5; }
.esg-habito .tec-protocolo { color: #B9C6AF; }
.esg-habito h3 { font-size: 1.45rem; font-weight: 700; line-height: 1.25; margin: 8px 0 10px; color: #fff; }
.esg-habito p { margin: 0 0 18px; font-size: 1rem; line-height: 1.7; color: rgba(244,241,236,0.85); }
.esg-habito .hab-lema { font-size: 0.82rem; color: rgba(244,241,236,0.55); }
.esg-habito > * { transition: opacity 0.3s ease, transform 0.35s var(--curva); position: relative; }
.esg-habito.trocando > * { opacity: 0; transform: translateY(8px); }
@media (max-width: 860px) {
    .esg-mesa { grid-template-columns: 1fr; }
    .esg-objetos { grid-template-columns: repeat(2, 1fr); padding: 24px 16px 0; row-gap: 4px; }
    .esg-objetos::after { display: none; }
    .esg-objeto::before { display: none; }
    .esg-pilares3 .esg-pilar:first-child { grid-column: auto; }
    .esg-habito { min-height: 0; text-align: left; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .esg-objeto .obj-ic svg, .esg-habito > * { transition: none; } }
