/* ==========================================================================
   SolarSync — site institucional
   Vanilla CSS, sem build. Editar aqui e commitar; o deploy publica direto.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --accent:        #f2a516;
  --accent-strong: #d98908;
  --accent-soft:   rgba(242, 165, 22, .13);
  --teal:          #17b0a4;
  --wa:            #25d366;
  --wa-strong:     #1eb855;

  --ink:           #0e1726;
  --ink-2:         #33415c;
  --ink-3:         #66748d;

  --bg:            #ffffff;
  --bg-alt:        #f5f7fa;
  --surface:       #ffffff;
  --line:          #e3e8ef;

  --deep:          #0b1220;
  --deep-2:        #131e33;

  --radius:   14px;
  --radius-l: 20px;
  --wrap:     1140px;

  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .06), 0 2px 8px rgba(14, 23, 38, .05);
  --shadow-md: 0 8px 24px rgba(14, 23, 38, .09);
  --shadow-lg: 0 24px 60px rgba(6, 12, 24, .28);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:     #eef2f8;
    --ink-2:   #b3bfd2;
    --ink-3:   #8593ab;
    --bg:      #0b1220;
    --bg-alt:  #101a2c;
    --surface: #131e33;
    --line:    #23324f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.15rem, 1.4rem + 3.1vw, 3.65rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.14rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #1a1205;
  padding: .7rem 1.1rem; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px;
  font-size: .97rem; font-weight: 650; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: .6rem 1.05rem; font-size: .9rem; }
.btn .ico { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--accent); color: #1a1205;
  box-shadow: 0 6px 18px rgba(242, 165, 22, .32);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: rgba(120, 134, 158, .45); /* fallback p/ navegadores sem color-mix */
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* WhatsApp: verde da marca, porque é o que o visitante reconhece de imediato. */
.btn-wa {
  background: var(--wa); color: #06251a;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .3);
}
.btn-wa:hover { background: var(--wa-strong); }

/* Sobre o fundo escuro do hero, o botão fantasma inverte. */
.hero .btn-ghost { color: #e8edf7; border-color: rgba(232, 237, 247, .28); }
.hero .btn-ghost:hover { color: #fff; border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .88); /* fallback p/ navegadores sem color-mix */
  background: color-mix(in srgb, var(--deep) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 70px;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand:hover { text-decoration: none; }
.brand-text {
  font-size: 1.16rem; font-weight: 500; letter-spacing: -.015em; color: #f3f6fb;
}
.brand-text strong { font-weight: 800; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-list { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  color: #cbd5e6; font-size: .95rem; font-weight: 550;
  padding: .35rem 0; position: relative;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--accent); transition: right .2s ease;
}
.nav-list a:hover { color: #fff; text-decoration: none; }
.nav-list a:hover::after,
.nav-list a.is-active::after { right: 0; }
.nav-list a.is-active { color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 20px; height: 2px;
  background: #e8edf7; border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top:  6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(70rem 34rem at 78% -12%, rgba(242, 165, 22, .20), transparent 62%),
    radial-gradient(52rem 30rem at 8% 108%, rgba(23, 176, 164, .16), transparent 60%),
    linear-gradient(168deg, var(--deep) 0%, var(--deep-2) 100%);
  color: #c4cfe1;
  padding: clamp(3.5rem, 2rem + 7vw, 6.5rem) 0 clamp(4rem, 2rem + 8vw, 7rem);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 1px;
  background: rgba(255, 255, 255, .08);
}
.hero h1 { color: #fff; }
.hero .grad {
  background: linear-gradient(100deg, var(--accent) 10%, #ffd679 55%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center;
}

.eyebrow {
  display: inline-block; margin: 0 0 1rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(242, 165, 22, .28);
  padding: .38rem .8rem; border-radius: 999px;
}

.lead { font-size: 1.12rem; max-width: 34em; color: #b9c5da; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.9rem 0 2.1rem; }

.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.hero-points li {
  position: relative; padding-left: 1.85rem; font-size: .97rem; color: #a9b7cd;
}
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(242, 165, 22, .45);
}
.hero-points li::after {
  content: ""; position: absolute; left: .32rem; top: .68em;
  width: .42rem; height: .22rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Mock do painel ---------- */
.hero-visual { perspective: 1400px; }
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.15rem 1.25rem;
  transform: rotateY(-7deg) rotateX(3deg);
  transition: transform .5s ease;
}
.hero-visual:hover .panel { transform: rotateY(-3deg) rotateX(1deg); }

.panel-top { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; }
.panel-title { font-size: .9rem; font-weight: 650; color: #e8edf7; }
.panel-tag {
  margin-left: auto; font-size: .68rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--teal);
  border: 1px solid rgba(23, 176, 164, .4); border-radius: 999px; padding: .18rem .55rem;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); flex: none; }
.dot-live { box-shadow: 0 0 0 0 rgba(23, 176, 164, .6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(23, 176, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 176, 164, 0); }
}

.panel-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.kpi {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px; padding: .75rem .85rem;
}
.kpi-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8fa0bb; }
.kpi-value { display: block; margin-top: .25rem; font-size: 1.42rem; font-weight: 750; color: #fff; letter-spacing: -.02em; }
.kpi-value em { font-style: normal; font-size: .82rem; font-weight: 600; color: #9fb0c9; }

.panel-chart { margin: .95rem 0 .5rem; }
.panel-chart svg { display: block; width: 100%; height: 96px; }
.chart-line { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 2.2s .25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.panel-rows { display: grid; gap: .42rem; }
.row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .04); border-radius: 9px; padding: .5rem .7rem;
}
.row-name { font-size: .86rem; color: #c9d4e6; }
.badge { font-size: .72rem; font-weight: 650; padding: .16rem .55rem; border-radius: 999px; }
.badge-ok   { color: #6fe0d3; background: rgba(23, 176, 164, .16); }
.badge-warn { color: #ffcf7a; background: rgba(242, 165, 22, .18); }

/* ---------- Seções ---------- */
.section { padding: clamp(3.4rem, 2rem + 5.5vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 1rem + 2.5vw, 3.2rem); }
.section-head .eyebrow { color: var(--accent-strong); }
.section-sub { font-size: 1.06rem; color: var(--ink-3); margin-bottom: 0; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.3rem; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(242, 165, 22, .45); }
.card p:last-child { margin-bottom: 0; }
.card-compact { padding: 1.35rem 1.3rem; }
.card-compact p { font-size: .95rem; }

.card-ico {
  width: 44px; height: 44px; margin-bottom: 1rem;
  display: grid; place-items: center;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong);
}
.card-ico svg { width: 23px; height: 23px; }

/* ---------- Features ---------- */
/* Grade sem espaçamento: o "gap" de 1px é o próprio fundo aparecendo.
   Por isso as colunas são fixas, e não auto-fit — uma linha incompleta viraria
   um bloco cinza vazio. Mantenha o número de itens múltiplo de 6. */
.features {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.feature { background: var(--surface); padding: 1.7rem 1.5rem; }
.feature h3 { margin-bottom: .4rem; }
.feature h3::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 7px; height: 7px; margin-right: .6rem; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg);
}
.feature p { margin: 0; font-size: .96rem; color: var(--ink-3); }

/* ---------- Passos ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  counter-reset: step;
}
.step { position: relative; padding-top: 1.4rem; border-top: 2px solid var(--line); }
.step-num {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; margin-bottom: .85rem;
  border-radius: 50%; background: var(--accent); color: #1a1205;
  font-weight: 800; font-size: .95rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; font-size: .96rem; color: var(--ink-3); }

/* ---------- CTA ---------- */
.cta-section { padding-top: 0; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2rem;
  padding: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
  border-radius: var(--radius-l);
  background:
    radial-gradient(38rem 20rem at 88% 8%, rgba(242, 165, 22, .22), transparent 60%),
    linear-gradient(140deg, var(--deep) 0%, var(--deep-2) 100%);
  box-shadow: var(--shadow-md);
}
.cta h2 { color: #fff; margin-bottom: .5rem; }
.cta p { color: #b9c5da; margin: 0; max-width: 34em; }
.cta-copy { flex: 1 1 24rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.cta .btn-ghost { color: #e8edf7; border-color: rgba(232, 237, 247, .28); }
.cta .btn-ghost:hover { color: #fff; border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep); color: #93a2ba;
  /* A folga embaixo é para o atalho fixo do WhatsApp, que flutua sobre o
     rodapé quando a página chega ao fim, não tapar a última linha. */
  padding: clamp(2.8rem, 2rem + 3vw, 4rem) 0 5.5rem;
  font-size: .94rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.5fr repeat(3, minmax(9rem, 1fr));
  padding-bottom: 2.2rem; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-tag { margin: .9rem 0 0; max-width: 22rem; color: #7f8ea7; }
.footer-col h2 {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #e8edf7; margin-bottom: .9rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-col a, .footer-bottom a { color: #93a2ba; }
.footer-col a:hover, .footer-bottom a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  justify-content: space-between; padding-top: 1.6rem;
  font-size: .87rem; color: #74839c;
}
.footer-bottom p { margin: 0; }

.footer-wa { display: inline-flex; align-items: center; gap: .5rem; }
.footer-wa svg { width: 17px; height: 17px; flex: none; color: var(--wa); }
.footer-wa:hover svg { color: var(--wa); }

/* ---------- Atalho fixo do WhatsApp ---------- */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.15rem;
  background: var(--wa); color: #06251a;
  border-radius: 999px; font-size: .95rem; font-weight: 700; line-height: 1;
  box-shadow: 0 10px 28px rgba(6, 37, 26, .32);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.wa-float:hover {
  background: var(--wa-strong); text-decoration: none;
  transform: translateY(-2px); box-shadow: 0 14px 32px rgba(6, 37, 26, .4);
}
.wa-float svg { width: 23px; height: 23px; flex: none; }

/* ---------- Página de erro ---------- */
.error-page {
  min-height: 72vh; display: grid; place-items: center; text-align: center;
  padding: 4rem 0;
}
.error-code {
  font-size: clamp(4rem, 2rem + 12vw, 8rem); font-weight: 800; line-height: 1;
  letter-spacing: -.04em; margin: 0 0 .4rem;
  background: linear-gradient(100deg, var(--accent), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 940px) {
  /* Numa coluna só, o título vem primeiro: o mock ilustra, não abre a página. */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 30rem; margin-top: 1rem; }
  .panel { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--deep-2);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding: .5rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .nav-list a::after { display: none; }
  .nav-cta { margin-top: 1rem; justify-content: center; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .eyebrow { font-size: .72rem; letter-spacing: .09em; }
  .footer-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn, .cta-actions .btn { width: 100%; justify-content: center; }

  /* Em tela pequena o atalho vira só o ícone, para não tapar o conteúdo. */
  .wa-float {
    right: 1rem; bottom: 1rem;
    width: 56px; height: 56px; padding: 0; justify-content: center;
  }
  .wa-float-label { display: none; }
  .wa-float svg { width: 28px; height: 28px; }
}

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

@media print {
  .site-header, .hero-visual, .nav-toggle, .cta-actions, .wa-float { display: none; }
  body { color: #000; background: #fff; font-size: 12pt; }
}
