/* Hypersolar - leituras sobre instalacao eletrica fotovoltaica residencial */
:root {
  --violet: #4C3B9E;
  --lime: #A3C644;
  --night: #1E1B2E;
  --cloud: #F6F5FA;
  --text: #23213A;
  --muted: #6C6985;
  --stroke: #DEDBEA;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito Sans', 'Segoe UI', Tahoma, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
}
h1, h2, h3, h4 {
  font-family: 'Red Hat Display', 'Trebuchet MS', sans-serif;
  line-height: 1.18;
  margin: 0 0 .55em;
  color: var(--night);
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.05em; }
a { color: var(--violet); text-underline-offset: 3px; }
a:hover { filter: brightness(.8); }
img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }
.hpe-container { width: min(1120px, 91%); margin-inline: auto; }
.hpe-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'Red Hat Display', sans-serif; font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--violet); margin-bottom: .8rem;
}
.hpe-eyebrow::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.hpe-intro { font-size: 1.18rem; color: var(--muted); max-width: 64ch; }
.hpe-block { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.hpe-block--cloud { background: var(--cloud); }
.hpe-block__head { margin-bottom: 2.4rem; max-width: 70ch; }
.hpe-cta {
  display: inline-block; padding: .85rem 1.5rem; border-radius: 999px; font-weight: 700;
  text-decoration: none; background: var(--lime); color: var(--night); transition: transform .15s;
}
.hpe-cta:hover { transform: translateY(-2px); filter: none; }
.hpe-cta--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.hpe-cta--ghost:hover { border-color: var(--lime); color: var(--lime); }
.hpe-cta--violet { background: var(--violet); color: #fff; }
.hpe-cta--violet:hover { color: #fff; }

/* Cabecalho */
.hpe-header { background: #fff; border-bottom: 1px solid var(--stroke); position: sticky; top: 0; z-index: 30; }
.hpe-header__row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.hpe-brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--night); font-family: 'Red Hat Display', sans-serif; font-weight: 800; font-size: 1.25rem; }
.hpe-brand:hover { filter: none; }
.hpe-brand__sun { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--lime) 0 38%, var(--violet) 40% 100%); flex: none; }
.hpe-brand em { font-style: normal; color: var(--violet); }
.hpe-menu { position: relative; }
.hpe-menu summary { list-style: none; display: none; cursor: pointer; font-weight: 700; padding: .55rem 1rem; border: 1px solid var(--stroke); border-radius: 999px; }
.hpe-menu summary::-webkit-details-marker { display: none; }
.hpe-menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.7rem; }
.hpe-menu a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.hpe-menu a:hover { color: var(--violet); filter: none; }

/* Hero escuro */
.hpe-hero { background: var(--night); color: #fff; padding: clamp(3rem, 7vw, 5.5rem) 0 0; overflow: hidden; }
.hpe-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hpe-hero h1 { color: #fff; }
.hpe-hero h1 mark { background: none; color: var(--lime); }
.hpe-hero .hpe-intro { color: #C9C5DC; }
.hpe-hero .hpe-eyebrow { color: var(--lime); }
.hpe-hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 2rem; }
.hpe-ficha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.4rem; }
.hpe-ficha b { display: block; font-family: 'Red Hat Display', sans-serif; font-size: 1.5rem; color: var(--lime); line-height: 1.1; }
.hpe-ficha span { font-size: .88rem; color: #C9C5DC; }
.hpe-hero__art { position: relative; margin: 0; }
.hpe-hero__art img { border-radius: 18px 18px 18px 90px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hpe-hero__art::after { content: ''; position: absolute; right: -16px; top: 22%; width: 8px; height: 56%; background: var(--lime); border-radius: 4px; }
.hpe-hero__note { margin-top: clamp(2.2rem, 5vw, 3.5rem); background: rgba(255,255,255,.06); border-top: 1px solid rgba(255,255,255,.12); padding: .9rem 0; font-size: .86rem; color: #B8B3CF; }
.hpe-hero__note a { color: #fff; }

/* Leituras (blog-first) */
.hpe-leituras { display: grid; gap: 1.6rem; }
.hpe-leitura { display: grid; grid-template-columns: 38% 1fr; background: #fff; border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; }
.hpe-leitura img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.hpe-leitura__body { padding: 1.8rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.hpe-leitura__tag { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); margin-bottom: .5rem; }
.hpe-leitura h3 { font-size: 1.45rem; margin-bottom: .5rem; }
.hpe-leitura h3 a { color: var(--night); text-decoration: none; }
.hpe-leitura h3 a:hover { color: var(--violet); filter: none; }
.hpe-leitura p { color: var(--muted); margin-bottom: .9rem; }
.hpe-leitura__meta { font-size: .85rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; }
.hpe-leitura__meta strong { color: var(--text); }

/* Estimador CSS-only + comparativo */
.hpe-util { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.hpe-estimador { background: var(--night); color: #fff; border-radius: 16px; padding: 1.8rem; }
.hpe-estimador h3 { color: #fff; margin-bottom: .3rem; }
.hpe-estimador > p { color: #C9C5DC; font-size: .95rem; }
.hpe-estimador input { position: absolute; opacity: 0; pointer-events: none; }
.hpe-estimador__opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0 1.2rem; }
.hpe-estimador__opts label {
  display: block; padding: .8rem .9rem; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; cursor: pointer; font-size: .95rem;
}
.hpe-estimador__opts label small { display: block; color: #B8B3CF; font-size: .8rem; }
.hpe-estimador__res { display: none; background: rgba(163,198,68,.12); border: 1px solid var(--lime); border-radius: 10px; padding: 1rem 1.1rem; font-size: .95rem; }
.hpe-estimador__res b { color: var(--lime); font-family: 'Red Hat Display', sans-serif; font-size: 1.25rem; display: block; margin-bottom: .2rem; }
.hpe-estimador__vazio { color: #B8B3CF; font-size: .9rem; border: 1px dashed rgba(255,255,255,.3); border-radius: 10px; padding: 1rem 1.1rem; }
#e1:checked ~ .hpe-estimador__opts label[for="e1"], #e2:checked ~ .hpe-estimador__opts label[for="e2"],
#e3:checked ~ .hpe-estimador__opts label[for="e3"], #e4:checked ~ .hpe-estimador__opts label[for="e4"] { border-color: var(--lime); background: rgba(163,198,68,.14); }
#e1:checked ~ .hpe-estimador__vazio, #e2:checked ~ .hpe-estimador__vazio, #e3:checked ~ .hpe-estimador__vazio, #e4:checked ~ .hpe-estimador__vazio { display: none; }
#e1:checked ~ .hpe-estimador__res[data-r="1"], #e2:checked ~ .hpe-estimador__res[data-r="2"],
#e3:checked ~ .hpe-estimador__res[data-r="3"], #e4:checked ~ .hpe-estimador__res[data-r="4"] { display: block; }
.hpe-estimador__nota { font-size: .8rem; color: #B8B3CF; margin: 1rem 0 0; }
.hpe-compara { overflow-x: auto; }
.hpe-compara table { font-size: .93rem; }
.hpe-compara caption { text-align: left; font-family: 'Red Hat Display', sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--night); padding-bottom: .8rem; }
.hpe-compara th, .hpe-compara td { padding: .75rem .85rem; border-bottom: 1px solid var(--stroke); text-align: left; vertical-align: top; }
.hpe-compara thead th { background: var(--violet); color: #fff; font-weight: 700; }
.hpe-compara thead th:first-child { border-radius: 10px 0 0 0; }
.hpe-compara thead th:last-child { border-radius: 0 10px 0 0; }
.hpe-compara tbody th { font-weight: 700; color: var(--night); width: 26%; }
.hpe-compara__nota { font-size: .85rem; color: var(--muted); margin-top: .7rem; }

/* Guia */
.hpe-guia { display: grid; grid-template-columns: 260px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hpe-guia__side { position: sticky; top: 96px; }
.hpe-guia__side ol { margin: 0; padding: 0 0 0 1.2rem; font-size: .92rem; line-height: 1.5; }
.hpe-guia__side li { margin-bottom: .55rem; }
.hpe-guia__side a { text-decoration: none; color: var(--text); }
.hpe-guia__side a:hover { color: var(--violet); }
.hpe-guia__side .hpe-guia__autor { border-top: 1px solid var(--stroke); margin-top: 1.4rem; padding-top: 1rem; font-size: .86rem; color: var(--muted); }
.hpe-guia__autor strong { color: var(--text); }
.hpe-guia__main { max-width: 74ch; }
.hpe-guia__main h3 { margin-top: 2.4rem; scroll-margin-top: 100px; display: flex; gap: .8rem; align-items: baseline; }
.hpe-guia__main h3 i { font-style: normal; font-size: .85rem; color: #fff; background: var(--violet); border-radius: 6px; padding: .1rem .5rem; flex: none; }
.hpe-nota { background: var(--cloud); border-radius: 12px; padding: 1.1rem 1.3rem; margin: 1.5rem 0; border-left: 5px solid var(--lime); }
.hpe-nota p:last-child { margin: 0; }
.hpe-guia__main ul li, .hpe-guia__main ol li { margin-bottom: .35rem; }
.hpe-guia__main table { font-size: .92rem; margin: 1.2rem 0 1.6rem; }
.hpe-guia__main th, .hpe-guia__main td { border: 1px solid var(--stroke); padding: .6rem .75rem; text-align: left; }
.hpe-guia__main thead th { background: var(--cloud); }

/* Sobre */
.hpe-sobre { display: grid; grid-template-columns: 1fr .8fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hpe-sobre img { border-radius: 16px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.hpe-sobre__ficha { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.4rem; }
.hpe-sobre__ficha div { background: var(--cloud); border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; }
.hpe-sobre__ficha span { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* FAQ em grade */
.hpe-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.hpe-faq article { background: #fff; border: 1px solid var(--stroke); border-radius: 14px; padding: 1.5rem 1.6rem; }
.hpe-faq h3 { font-size: 1.08rem; padding-left: 2rem; position: relative; }
.hpe-faq h3::before { content: '?'; position: absolute; left: 0; top: -.05rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--lime); color: var(--night); font-size: .9rem; display: grid; place-items: center; font-weight: 800; }
.hpe-faq p { margin: 0; color: var(--text); font-size: .97rem; }

/* Contato centralizado */
.hpe-contato { text-align: center; max-width: 70ch; margin-inline: auto; }
.hpe-contato__canais { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; text-align: left; }
.hpe-contato__canais div { background: #fff; border: 1px solid var(--stroke); border-radius: 14px; padding: 1.3rem 1.4rem; font-size: .95rem; }
.hpe-contato__canais span { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.hpe-contato__canais a { font-weight: 700; word-break: break-all; }

/* Rodape */
.hpe-footer { background: var(--night); color: #B8B3CF; padding: 3rem 0 1.5rem; font-size: .92rem; }
.hpe-footer a { color: #fff; }
.hpe-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; }
.hpe-footer .hpe-brand { color: #fff; margin-bottom: .8rem; }
.hpe-footer ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; }
.hpe-footer__legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.2rem; padding-top: 1.3rem; font-size: .82rem; line-height: 1.6; }
.hpe-footer__legal p { margin-bottom: .5rem; }

/* Aviso de cookies: pilula inferior esquerda */
.hpe-ck { position: absolute; opacity: 0; pointer-events: none; }
.hpe-cookie {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 50; max-width: 380px;
  background: var(--violet); color: #fff; border-radius: 14px; padding: 1rem 1.2rem; font-size: .88rem; box-shadow: 0 12px 30px rgba(30,27,46,.3);
}
.hpe-cookie a { color: var(--lime); }
.hpe-cookie label { display: inline-block; margin-top: .6rem; background: #fff; color: var(--night); font-weight: 700; padding: .45rem 1rem; border-radius: 999px; cursor: pointer; }
.hpe-ck:checked ~ .hpe-cookie { display: none; }

/* Internas */
.hpe-page { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.hpe-artigo { max-width: 72ch; margin-inline: auto; }
.hpe-artigo__meta { color: var(--muted); font-size: .92rem; margin: -.3rem 0 1.5rem; }
.hpe-artigo__meta strong { color: var(--text); }
.hpe-artigo__capa { margin: 1.5rem 0 2rem; }
.hpe-artigo__capa img { border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.hpe-artigo__capa figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.hpe-artigo h2 { font-size: 1.6rem; margin-top: 2.3rem; }
.hpe-artigo h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.hpe-artigo table { font-size: .92rem; margin: 1.2rem 0 1.6rem; }
.hpe-artigo th, .hpe-artigo td { border: 1px solid var(--stroke); padding: .6rem .75rem; text-align: left; }
.hpe-artigo thead th { background: var(--cloud); }
.hpe-artigo li { margin-bottom: .4rem; }
.hpe-trilha { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.hpe-trilha a { color: var(--muted); }
.hpe-legal { max-width: 76ch; margin-inline: auto; }
.hpe-legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.hpe-mais { border-top: 1px solid var(--stroke); margin-top: 3rem; padding-top: 1.8rem; }
.hpe-mais ul { padding-left: 1.2rem; }
.hpe-linha-tempo { list-style: none; padding: 0; margin: 1.5rem 0; }
.hpe-linha-tempo li { position: relative; padding: 0 0 1.4rem 2.2rem; border-left: 2px solid var(--stroke); margin-left: .6rem; }
.hpe-linha-tempo li::before { content: ''; position: absolute; left: -9px; top: .35rem; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); border: 3px solid #fff; }
.hpe-linha-tempo strong { display: block; font-family: 'Red Hat Display', sans-serif; color: var(--violet); }

/* Responsivo */
@media (max-width: 940px) {
  .hpe-hero__grid, .hpe-util, .hpe-sobre, .hpe-faq { grid-template-columns: 1fr; }
  .hpe-hero__art { max-width: 540px; }
  .hpe-guia { grid-template-columns: 1fr; }
  .hpe-guia__side { position: static; }
  .hpe-leitura { grid-template-columns: 1fr; }
  .hpe-leitura img { aspect-ratio: 16 / 9; }
  .hpe-contato__canais { grid-template-columns: 1fr; }
  .hpe-footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 1rem; }
  .hpe-menu summary { display: inline-block; }
  .hpe-menu ul { display: none; position: absolute; right: 0; top: calc(100% + .6rem); background: #fff; border: 1px solid var(--stroke); border-radius: 12px; padding: .6rem 1rem; flex-direction: column; gap: 0; min-width: 220px; box-shadow: 0 10px 30px rgba(30,27,46,.12); }
  .hpe-menu[open] ul { display: flex; }
  .hpe-menu li { border-bottom: 1px solid var(--stroke); }
  .hpe-menu li:last-child { border-bottom: 0; }
  .hpe-menu a { display: block; padding: .7rem 0; }
  .hpe-ficha { grid-template-columns: 1fr; gap: .8rem; }
  .hpe-estimador__opts { grid-template-columns: 1fr; }
  .hpe-sobre__ficha { grid-template-columns: 1fr; }
  .hpe-footer ul { grid-template-columns: 1fr; }
  .hpe-cookie { left: .6rem; right: .6rem; max-width: none; }
  .hpe-guia__main table, .hpe-artigo table { display: block; overflow-x: auto; width: 100%; }
  .hpe-hero__art img { border-radius: 14px 14px 14px 60px; }
}
