/*
Theme Name: Studio Analema
Theme URI: https://studioanalema.com.br
Author: Studio Analema
Description: Tema de blocos da Studio Analema: consultoria técnica em geração distribuída solar. Cores, Archivo e padrões de página do design system.
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studio-analema
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-stretch: 115%; }
.sa-texto p { max-width: 66ch; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--wp--preset--color--sol-escuro); outline-offset: 2px; }

/* Rótulo em caixa alta (eyebrow) */
.sa-rot { font-size: 13px !important; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--sol-escuro); margin: 0; }

/* Seções */
.sa-secao { padding-top: 72px; padding-bottom: 72px; }
.sa-secao.sa-papel { background: var(--wp--preset--color--papel); }
@media (max-width: 600px) { .sa-secao { padding-top: 48px; padding-bottom: 48px; } }

/* ---------- Cabeçalho ---------- */
.sa-header { position: sticky; top: 0; z-index: 20; background: var(--wp--preset--color--luz); border-bottom: 1px solid var(--wp--preset--color--linha); }
.admin-bar .sa-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sa-header { top: 0; position: relative; } }
.sa-header-in { padding-top: 14px; padding-bottom: 14px; gap: 12px 24px; }
.sa-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wp--preset--color--tinta); }
.sa-marca span { font-size: 18px; font-stretch: 125%; letter-spacing: .02em; white-space: nowrap; }
.sa-marca b { font-weight: 750; }
.sa-nav { font-size: 15px; gap: 6px 22px; }
.sa-nav a { text-decoration: none; }
.sa-nav .current-menu-item > a, .sa-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--wp--preset--color--sol); }
.sa-header .wp-block-button__link { padding: 10px 16px; font-size: 15px; }

/* ---------- Botões ---------- */
.wp-block-button.is-style-outline .wp-block-button__link { border: 1px solid var(--wp--preset--color--tinta); color: var(--wp--preset--color--tinta); background: transparent; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--papel); }
.wp-block-button__link:hover { background: var(--wp--preset--color--tinta-2); color: var(--wp--preset--color--luz); }

/* ---------- Abertura ---------- */
.sa-hero { gap: 48px; align-items: center !important; }
.sa-hero h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; }
.sa-lead { font-size: 19px !important; color: var(--wp--preset--color--tinta-2); }
.sa-simbolo { display: flex; justify-content: center; }
.sa-simbolo svg { max-width: 200px; height: auto; }

/* ---------- Fotos ---------- */
.sa-foto img { width: 100%; height: auto; object-fit: cover; display: block; }
.sa-foto-219 img { aspect-ratio: 21 / 9; }
.sa-foto-218 img { aspect-ratio: 21 / 8; }
.sa-foto-32 img { aspect-ratio: 3 / 2; }
.sa-foto-45 img { aspect-ratio: 4 / 5; }
@media (max-width: 600px) { .sa-foto-219 img, .sa-foto-218 img { aspect-ratio: 3 / 2; } }

/* ---------- Grades de cartões ---------- */
.sa-cards { gap: 28px !important; }
.sa-item { border-top: 2px solid var(--wp--preset--color--tinta); padding-top: 16px; }
.sa-item h3 { font-size: 20px; font-weight: 700; margin: 8px 0; }
.sa-item p { color: var(--wp--preset--color--tinta-2); margin: 0; }
.sa-item a { text-decoration: none; }
.sa-ico svg { width: 56px; height: 40px; display: block; }
.sa-link { color: var(--wp--preset--color--tinta-2); margin-top: 8px !important; }

/* ---------- Faixa amarela (uma por página) ---------- */
.sa-faixa { background: var(--wp--preset--color--sol); padding-top: 56px; padding-bottom: 56px; }
.sa-faixa h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; margin: 0; }
.sa-faixa .wp-block-button__link { background: var(--wp--preset--color--tinta); color: var(--wp--preset--color--luz); }

/* ---------- Serviços ---------- */
.sa-serv { border-top: 1px solid var(--wp--preset--color--linha); padding-top: 48px; padding-bottom: 48px; gap: 24px 48px !important; }
.sa-serv h2 { font-size: clamp(24px, 2.6vw, 30px); }
.sa-serv .sa-texto p { font-size: 17px; color: var(--wp--preset--color--tinta-2); }
.sa-serv .sa-texto p:first-child { font-size: 18px; color: var(--wp--preset--color--tinta); }
.sa-serv .sa-foto { max-width: 360px; }
.sa-indice { gap: 8px 20px; font-size: 15px; }

/* ---------- Diagramas (SVG em bloco HTML) ---------- */
.sa-fig svg { display: block; width: 100%; height: auto; max-width: 360px; }
.sa-fig figcaption, .sa-legenda { font-size: 13px; color: var(--wp--preset--color--tinta-3); }
.sa-fig .ln, .sa-ico .ln { fill: none; stroke: #1A1A1A; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.sa-fig .fino, .sa-ico .fino { fill: none; stroke: #5C5953; stroke-width: 1; }
.sa-fig .trac, .sa-ico .trac { fill: none; stroke: #5C5953; stroke-width: 1.25; stroke-dasharray: 4 4; }
.sa-fig .ch, .sa-ico .ch { fill: #1A1A1A; }
.sa-fig .cl, .sa-ico .cl { fill: #E2E0DA; }
.sa-fig .sol, .sa-ico .sol { fill: #D6B04C; }
.sa-fig .lt, .sa-ico .lt { fill: #5C5953; font-family: var(--wp--preset--font-family--archivo); font-size: 12px; }
.sa-fig .lb, .sa-ico .lb { fill: #1A1A1A; font-family: var(--wp--preset--font-family--archivo); font-size: 13px; font-weight: 600; }
.sa-analema svg { max-width: 420px; margin: 0 auto; }

/* ---------- Diferenciais ---------- */
.sa-nota { border-top: 2px solid var(--wp--preset--color--tinta); padding-top: 14px; }
.sa-nota h3 { font-size: 19px; margin: 0 0 6px; }
.sa-nota p { color: var(--wp--preset--color--tinta-2); margin: 0; }

/* ---------- Formulário (WPForms) ---------- */
.wpforms-container input, .wpforms-container select, .wpforms-container textarea { font-family: inherit !important; border-radius: 0 !important; border-color: var(--wp--preset--color--tinta-3) !important; }
.wpforms-container button[type="submit"] { background: var(--wp--preset--color--tinta) !important; color: var(--wp--preset--color--luz) !important; border-radius: 0 !important; font-family: inherit !important; font-weight: 600 !important; }
.wpforms-container .wpforms-field-label { font-weight: 600 !important; }

/* ---------- Formulário (Contact Form 7, alternativa) ---------- */
.wpcf7 form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.wpcf7 form > p, .wpcf7 form > div { margin: 0; }
.wpcf7 .sa-full, .wpcf7 form > .wpcf7-response-output, .wpcf7 .sa-aceite, .wpcf7 .sa-enviar { grid-column: 1 / -1; }
@media (max-width: 560px) { .wpcf7 form { grid-template-columns: 1fr; } }
.wpcf7 label { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea {
  font-family: inherit; font-size: 16px; color: var(--wp--preset--color--tinta); background: var(--wp--preset--color--papel);
  border: 1px solid var(--wp--preset--color--tinta-3); border-radius: 0; padding: 11px 12px; width: 100%; box-sizing: border-box; font-weight: 400; }
.wpcf7 textarea { min-height: 140px; }
.wpcf7 .sa-aceite { font-size: 14px; font-weight: 400; color: var(--wp--preset--color--tinta-2); }
.wpcf7 input[type="submit"] { background: var(--wp--preset--color--tinta); color: var(--wp--preset--color--luz); border: 0; border-radius: 0; padding: 14px 22px; font-weight: 600; font-family: inherit; font-size: 15px; cursor: pointer; }

/* ---------- Artigos ---------- */
.sa-artigos .wp-block-post-title { font-size: 19px; font-weight: 700; margin-top: 8px; }
.sa-artigos .wp-block-post-title a { text-decoration: none; }
.sa-artigos li { border-top: 2px solid var(--wp--preset--color--tinta); padding-top: 16px; }

/* ---------- Rodapé ---------- */
.sa-footer { background: var(--wp--preset--color--tinta); color: var(--wp--preset--color--luz); padding-top: 48px; padding-bottom: 48px; }
.sa-footer a { color: var(--wp--preset--color--luz); }
.sa-footer a:hover { color: var(--wp--preset--color--sol); }
.sa-footer p { margin: 0 0 6px; font-size: 15px; }
.sa-footer .sa-q { color: #C9C6BE; font-size: 14px; }
.sa-footer-marca { font-size: 22px; font-stretch: 125%; }
.sa-footer-marca b { font-weight: 750; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
