/* =========================================================
   SOLARTEL — Energia Fotovoltaica e Tecnologia
   ========================================================= */

:root {
  --sun: #F8A800;
  --sun-light: #FFC234;
  --sun-dark: #D98E00;
  --navy: #0E3E52;
  --navy-2: #0A2F3F;
  --navy-3: #072431;
  --panel: #0B4A66;
  --ink: #16313D;
  --muted: #5B707A;
  --line: #E3E9EC;
  --soft: #F5F8F9;
  --white: #fff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(10, 47, 63, .10);
  --shadow-lg: 0 24px 60px rgba(7, 36, 49, .22);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 32px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: .95rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--sun { background: var(--sun); color: var(--navy-3); box-shadow: 0 8px 22px rgba(248, 168, 0, .35); }
.btn--sun:hover { background: var(--sun-light); box-shadow: 0 12px 28px rgba(248, 168, 0, .45); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--sm { padding: .6rem 1.15rem; font-size: .9rem; }
.btn--block { width: 100%; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sun-dark); margin-bottom: .9rem;
}
.eyebrow--light { color: var(--sun); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(10,47,63,.06); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand__logo { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a:not(.btn) {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--navy);
  position: relative;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--sun); transition: width .25s;
}
.nav a:not(.btn):hover::after { width: 100%; }

.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--navy); margin: 5px 0; transition: .3s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% -10%, #155773 0%, transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem);
}
.hero__glow {
  position: absolute; width: 520px; height: 520px; right: -120px; top: -160px;
  background: radial-gradient(circle, rgba(248,168,0,.35) 0%, transparent 65%);
  filter: blur(10px); pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; }
.hero .hl {
  color: var(--sun);
  background: linear-gradient(transparent 70%, rgba(248,168,0,.22) 70%);
}
.lead { font-size: 1.12rem; color: rgba(255,255,255,.82); max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin: 2rem 0 1.8rem; }
.hero__checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.hero__checks li { position: relative; padding-left: 1.6rem; font-weight: 600; font-size: .95rem; color: rgba(255,255,255,.9); }
.hero__checks li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A2F3F' stroke-width='3.5'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/70% no-repeat;
}

/* Hero illustration */
.hero__art { position: relative; height: 440px; }
.sun { position: absolute; top: 10px; right: 40px; width: 190px; height: 190px; }
.sun__core {
  position: absolute; inset: 35px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFD66B, var(--sun) 60%, var(--sun-dark));
  box-shadow: 0 0 60px rgba(248,168,0,.6), 0 0 120px rgba(248,168,0,.3);
}
.sun__rays {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--sun) 0deg 7deg, transparent 7deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%, #000 100%);
          mask: radial-gradient(circle, transparent 62%, #000 63%, #000 100%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.roof {
  position: absolute; left: 0; right: 0; bottom: 40px; height: 250px;
  perspective: 900px;
}
.panels {
  position: absolute; left: 6%; right: 6%; bottom: 0; height: 230px;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); gap: 8px;
  padding: 12px; border-radius: 12px;
  background: #C7D2D8;
  transform: rotateX(52deg) rotateZ(-14deg);
  transform-origin: bottom center;
  box-shadow: 0 40px 60px rgba(0,0,0,.35);
}
.panels i {
  border-radius: 4px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 40%),
    repeating-linear-gradient(90deg, transparent 0 calc(33.33% - 1px), rgba(255,255,255,.25) calc(33.33% - 1px) 33.33%),
    repeating-linear-gradient(0deg, transparent 0 calc(16.66% - 1px), rgba(255,255,255,.18) calc(16.66% - 1px) 16.66%),
    linear-gradient(160deg, #13698F, var(--panel) 55%, #08354A);
}

.stat-card {
  position: absolute; background: #fff; color: var(--navy); border-radius: 14px;
  padding: .9rem 1.2rem; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; line-height: 1.2;
  animation: float 6s ease-in-out infinite;
}
.stat-card strong { font-family: var(--font-head); font-weight: 900; font-size: 1.5rem; color: var(--navy); }
.stat-card span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat-card--a { left: 0; top: 70px; border-left: 4px solid var(--sun); }
.stat-card--b { right: 0; bottom: 10px; border-left: 4px solid var(--panel); animation-delay: -3s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Benefits ---------- */
.benefits { position: relative; margin-top: -3.2rem; z-index: 2; }
.benefits__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
}
.benefit { background: #fff; padding: 2rem 1.6rem; }
.benefit__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(248,168,0,.14); color: var(--sun-dark); margin-bottom: 1rem;
}
.benefit__icon svg { width: 24px; height: 24px; }
.benefit h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.benefit p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section--soft { background: var(--soft); }
.section--dark { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section__head p { color: var(--muted); font-size: 1.05rem; }
.section__head--light h2 { color: #fff; }
.section__head--light p { color: rgba(255,255,255,.75); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.service {
  position: relative; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden;
}
.service::before {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0; background: var(--sun); transition: width .35s;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service:hover::before { width: 100%; }
.service__icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); color: var(--sun); margin-bottom: 1.2rem;
}
.service__icon svg { width: 28px; height: 28px; }
.service p { color: var(--muted); margin: 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: s; }
.step {
  position: relative; padding: 2rem 1.6rem; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 3rem; right: -1.1rem; width: .8rem; height: .8rem;
  border-top: 2px solid var(--sun); border-right: 2px solid var(--sun); transform: rotate(45deg); opacity: .7;
}
.step__n { display: block; font-family: var(--font-head); font-weight: 900; font-size: 2.6rem; color: var(--sun); line-height: 1; margin-bottom: 1rem; }
.step h3 { color: #fff; }
.step p { color: rgba(255,255,255,.72); margin: 0; font-size: .95rem; }

/* ---------- Simulator ---------- */
.simulator { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: center; }
.simulator__intro p { color: var(--muted); font-size: 1.05rem; }
.simulator__intro .note { font-size: .82rem; color: var(--muted); border-left: 3px solid var(--sun); padding-left: .9rem; margin-top: 1.5rem; }

.sim-card {
  background: #fff; border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.sim-card__label { font-family: var(--font-head); font-weight: 700; color: var(--muted); font-size: .9rem; }
.sim-card__value { font-family: var(--font-head); font-weight: 900; font-size: clamp(2.2rem, 6vw, 3rem); color: var(--navy); margin: .2rem 0 .8rem; }
.sim-card__range { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .5rem; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 99px;
  background: linear-gradient(90deg, var(--sun) var(--p, 4%), var(--line) var(--p, 4%));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 6px solid var(--sun); box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 6px solid var(--sun); box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
input[type="range"]:focus-visible { box-shadow: 0 0 0 4px rgba(248,168,0,.3); }

.sim-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin: 1.8rem 0 1rem; }
.sim-result { background: var(--soft); border-radius: 12px; padding: 1rem 1.1rem; }
.sim-result span { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.sim-result strong { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--navy); }
.sim-result:first-child { background: var(--navy); }
.sim-result:first-child span { color: rgba(255,255,255,.7); }
.sim-result:first-child strong { color: var(--sun); }
.sim-25 { text-align: center; font-size: .95rem; color: var(--muted); margin-bottom: 1.3rem; }
.sim-25 strong { color: var(--navy); font-family: var(--font-head); }

/* ---------- FAQ ---------- */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .8rem;
  transition: box-shadow .2s;
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.2rem 3.2rem 1.2rem 1.4rem; position: relative;
  font-family: var(--font-head); font-weight: 700; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(248,168,0,.15); color: var(--sun-dark); font-size: 1.3rem; font-weight: 700; transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 1.4rem 1.3rem; margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; width: 600px; height: 600px; left: -250px; bottom: -300px;
  background: radial-gradient(circle, rgba(248,168,0,.25), transparent 65%); pointer-events: none;
}
.contact__inner { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: center; }
.contact h2 { color: #fff; }
.contact__info > p { color: rgba(255,255,255,.78); font-size: 1.05rem; }
.contact__phone { display: inline-flex; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.contact__phone-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: var(--navy-3); flex-shrink: 0; }
.contact__phone small { display: block; font-size: .8rem; color: rgba(255,255,255,.6); font-weight: 600; }
.contact__phone > span:last-child { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; line-height: 1.2; }

.form { background: #fff; color: var(--ink); border-radius: 22px; padding: clamp(1.5rem, 4vw, 2.2rem); box-shadow: var(--shadow-lg); }
.form label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: .4rem; padding: .85rem 1rem;
  font: inherit; font-weight: 400; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--soft);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--sun); background: #fff; box-shadow: 0 0 0 4px rgba(248,168,0,.15);
}
.form .is-invalid { border-color: #D64545; }
.form__msg { margin: .8rem 0 0; font-size: .9rem; text-align: center; min-height: 1.2em; color: var(--muted); }
.form__msg.err { color: #C43838; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-3); color: rgba(255,255,255,.7); padding: 3rem 0 2rem; text-align: center; }
.footer__inner { display: flex; flex-direction: column; align-items: center; }
.footer__logo { height: 48px; width: auto; margin-bottom: .8rem; }
.footer p { margin: 0 0 .4rem; font-size: .92rem; }
.footer__phone { font-family: var(--font-head); font-weight: 800; color: var(--sun); font-size: 1.3rem; margin: .4rem 0 1.4rem; }
.footer__copy { font-size: .8rem !important; color: rgba(255,255,255,.45); border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.4rem; width: 100%; }

/* ---------- WhatsApp float ---------- */
.whats-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: #25D366; color: #fff;
  box-shadow: 0 10px 25px rgba(37,211,102,.45); transition: transform .2s;
}
.whats-float:hover { transform: scale(1.08); }
.whats-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .benefits__grid { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
}

@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 1rem 16px 1.5rem; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(10,47,63,.12);
    transform: translateY(-120%); visibility: hidden; transition: transform .3s, visibility .3s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1rem; }

  .hero__inner, .simulator, .contact__inner { grid-template-columns: 1fr; }
  .hero__art { height: 340px; max-width: 480px; width: 100%; margin: 0 auto; }
  .sun { width: 150px; height: 150px; right: 10px; }
  .panels { height: 180px; }
  .roof { height: 200px; }
  .benefits { margin-top: -2rem; }
}

@media (max-width: 560px) {
  .brand__logo { height: 38px; }
  .hero__ctas .btn { width: 100%; }
  .benefits__grid, .services, .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .sim-results { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .sim-result strong { font-size: 1.1rem; }
  .stat-card strong { font-size: 1.2rem; }
  .stat-card--a { top: 40px; }
  .contact__phone > span:last-child { font-size: 1.35rem; }
}

/* evita estouro horizontal em grids */
.hero__inner > *, .simulator > *, .contact__inner > * { min-width: 0; }
@media (max-width: 880px) {
  .hero__inner, .simulator, .contact__inner { grid-template-columns: minmax(0, 1fr); }
}
