/* ==========================================================================
   RBR · Energia por Assinatura — site institucional
   Identidade visual aprovada ("A Usina"): marinho + Sol de Bagé.
   ========================================================================== */

/* ---------- TOKENS ---------- */
:root {
  /* marca — constantes nos dois temas */
  --marinho:  #13294B;
  --azul:     #2C5E9E;
  --sol:      #F2A32C;
  --sol-deep: #E08A16;
  --verde:    #5B8A3C;
  --terra:    #C9A46B;

  /* neutros (claro) — branco frio com viés de céu */
  --ground:   #F1F4F7;
  --surface:  #FFFFFF;
  --surface-2:#E9EEF3;
  --ink:      #142234;
  --ink-soft: #4C6076;
  --ink-faint:#8095A9;
  --line:     rgba(19,41,75,.13);
  --line-2:   rgba(19,41,75,.07);
  --shadow:   0 1px 2px rgba(19,41,75,.06), 0 14px 40px -18px rgba(19,41,75,.30);
  --shadow-sm:0 1px 2px rgba(19,41,75,.06), 0 6px 18px -10px rgba(19,41,75,.22);
  --sky-a:    #163458;
  --sky-b:    #0C1B31;
  --nav-bg:   rgba(255,255,255,.82);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --radius: 18px;
}
[data-theme="dark"] {
  --ground:   #0B1626;
  --surface:  #10233E;
  --surface-2:#16304F;
  --ink:      #E9F1FA;
  --ink-soft: #A6BAD0;
  --ink-faint:#6C8199;
  --line:     rgba(255,255,255,.13);
  --line-2:   rgba(255,255,255,.06);
  --shadow:   0 1px 2px rgba(0,0,0,.3), 0 22px 50px -22px rgba(0,0,0,.7);
  --shadow-sm:0 1px 2px rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.55);
  --sky-a:    #17365C;
  --sky-b:    #081326;
  --nav-bg:   rgba(11,22,38,.78);
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }
/* O atributo [hidden] precisa vencer regras de display (flex/grid) dos componentes. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -.025em; text-wrap: balance; line-height: 1.05; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--sol); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.wrap-narrow { max-width: 820px; }

.eyebrow {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--sol-deep);
  display: inline-block; margin-bottom: 18px;
}
.eyebrow-light { color: var(--sol); }

.wordmark { font-weight: 850; letter-spacing: -.045em; color: var(--ink); line-height: 1; }
.wordmark .r2 { color: var(--sol); }

/* ---------- BOTÕES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 680; font-size: .95rem; letter-spacing: -.01em;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-sol { background: var(--sol); color: #13294B; box-shadow: 0 8px 22px -10px rgba(242,163,44,.8); }
.btn-sol:hover { background: var(--sol-deep); box-shadow: 0 12px 26px -10px rgba(224,138,22,.85); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); border-color: #fff; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line-2); box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: inline-flex; }
.brand .wordmark { font-size: 1.5rem; color: #fff; transition: color .3s ease; }
.nav.scrolled .brand .wordmark { color: var(--ink); }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: .95rem; font-weight: 560; color: rgba(255,255,255,.9);
  transition: color .3s ease, opacity .2s ease; position: relative;
}
.nav.scrolled .nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--sol); }
.nav.scrolled .nav-links a:hover { color: var(--sol-deep); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.toggle { display: inline-flex; gap: 2px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 3px; }
.nav.scrolled .toggle { background: var(--surface-2); border-color: var(--line); }
.toggle button { border: none; background: transparent; color: rgba(255,255,255,.75); font-size: .82rem; width: 30px; height: 26px; border-radius: 999px; cursor: pointer; line-height: 1; }
.nav.scrolled .toggle button { color: var(--ink-faint); }
.toggle button[aria-pressed="true"] { background: var(--sol); color: #13294B; }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: background .3s ease; }
.nav.scrolled .nav-burger span { background: var(--ink); }
.nav-mobile { display: none; flex-direction: column; gap: 4px; padding: 12px clamp(20px,5vw,48px) 20px; background: var(--nav-bg); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-mobile a { padding: 12px 4px; color: var(--ink); font-weight: 560; border-bottom: 1px solid var(--line-2); }
.nav-mobile a.btn { margin-top: 10px; border-bottom: none; color: #13294B; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: var(--marinho); }
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center 40%; transform: scale(1.04); }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(9,18,34,.92) 0%, rgba(9,18,34,.62) 42%, rgba(9,18,34,.15) 78%, rgba(9,18,34,.35) 100%),
    linear-gradient(0deg, rgba(9,18,34,.7) 0%, rgba(9,18,34,0) 45%);
}
.hero-inner { position: relative; z-index: 2; padding-top: 96px; padding-bottom: 60px; width: 100%; }
.hero h1 {
  color: #fff; font-weight: 840; font-size: clamp(2.5rem, 6.4vw, 5rem);
  letter-spacing: -.04em; line-height: .98; max-width: 15ch;
  text-shadow: 0 2px 30px rgba(8,19,38,.5);
}
.hero h1 em { font-style: normal; color: var(--sol); }
.hero-sub { color: rgba(233,241,250,.9); font-size: clamp(1.05rem, 1.7vw, 1.28rem); max-width: 54ch; margin-top: 22px; text-shadow: 0 1px 14px rgba(8,19,38,.5); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-facts { list-style: none; margin: 46px 0 0; padding: 26px 0 0; display: flex; flex-wrap: wrap; gap: 40px; border-top: 1px solid rgba(255,255,255,.18); }
.hero-facts li { display: flex; flex-direction: column; gap: 3px; }
.hero-facts .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sol); }
.hero-facts .v { color: #fff; font-weight: 620; font-size: 1.02rem; }
.hero-scroll { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; width: 24px; height: 40px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; display: flex; justify-content: center; }
.hero-scroll span { width: 4px; height: 8px; background: var(--sol); border-radius: 4px; margin-top: 7px; animation: scrolldot 1.7s ease-in-out infinite; }
@keyframes scrolldot { 0%,100% { opacity: .3; transform: translateY(0);} 50% { opacity: 1; transform: translateY(9px);} }

/* ---------- STRIP ---------- */
.strip { background: var(--marinho); color: #fff; }
[data-theme="dark"] .strip { background: #0d1d38; }
.strip-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 30px 0; }
.strip-item { display: flex; gap: 15px; align-items: flex-start; padding: 6px 10px; }
.strip-item strong { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.strip-item span { color: rgba(233,241,250,.72); font-size: .9rem; line-height: 1.45; }
.strip-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; background: rgba(242,163,44,.16); display: grid; place-items: center; }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line-2); }
.sec-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 52px; flex-wrap: wrap; }
.sec-num { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--sol-deep); padding-top: .5em; }
.sec-head h2 { font-size: clamp(1.7rem, 3.8vw, 2.7rem); font-weight: 820; flex: 1 1 300px; }
.sec-head .lede { color: var(--ink-soft); max-width: 48ch; font-size: 1.06rem; flex: 1 1 300px; }

/* ---------- STEPS ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; counter-reset: none; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px 30px; box-shadow: var(--shadow-sm); }
.step-n { position: absolute; top: 26px; right: 28px; font-family: var(--mono); font-weight: 700; font-size: .8rem; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; width: 30px; height: 30px; display: grid; place-items: center; }
.step-ico { width: 52px; height: 52px; border-radius: 14px; background: rgba(242,163,44,.14); display: grid; place-items: center; margin-bottom: 20px; }
.step h3 { font-size: 1.22rem; font-weight: 760; margin-bottom: 9px; }
.step p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- SIMULADOR ---------- */
.section-sim { background: var(--surface-2); }
[data-theme="dark"] .section-sim { background: #0e2039; }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.sim-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 820; }
.sim-copy .lede { color: var(--ink-soft); margin-top: 16px; font-size: 1.06rem; max-width: 40ch; }
.sim-disc { color: var(--ink-faint); font-size: .82rem; margin-top: 20px; max-width: 42ch; }
.sim-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.sim-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 12px; }
.sim-input { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 18px; background: var(--ground); transition: border-color .2s ease; }
.sim-input:focus-within { border-color: var(--sol); }
.sim-input span { font-size: 1.35rem; font-weight: 700; color: var(--ink-faint); }
.sim-input input { border: none; background: none; outline: none; font-family: var(--sans); font-size: 1.9rem; font-weight: 800; color: var(--ink); width: 100%; letter-spacing: -.02em; }
.sim-range { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; background: var(--surface-2); margin: 20px 0 10px; cursor: pointer; }
.sim-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sol); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; }
.sim-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sol); border: 3px solid var(--surface); cursor: pointer; }
.sim-help { font-size: .84rem; color: var(--ink-faint); }
.sim-help b { color: var(--sol-deep); }
.sim-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0; }
.sim-out-block { border-radius: 14px; padding: 18px 18px; background: var(--ground); border: 1px solid var(--line); }
.sim-out-hero { background: var(--marinho); border-color: var(--marinho); }
.sim-out-k { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.sim-out-hero .sim-out-k { color: rgba(255,255,255,.6); }
.sim-out-v { display: block; font-size: 1.7rem; font-weight: 820; letter-spacing: -.02em; margin-top: 6px; }
.sim-out-hero .sim-out-v { color: var(--sol); }
.sim-first { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 13px 16px; border-radius: 12px; background: rgba(242,163,44,.12); border: 1px solid rgba(242,163,44,.35); color: var(--ink); font-size: .92rem; line-height: 1.4; }
.sim-first b { color: var(--sol-deep); }
.sim-first-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; background: rgba(242,163,44,.2); display: grid; place-items: center; }
.sim-first-ico svg { width: 17px; height: 17px; }

/* ---------- CARDS (vantagens) ---------- */
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(44,94,158,.12); }
.card h3 { font-size: 1.12rem; font-weight: 740; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- A USINA ---------- */
.usina-feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: stretch; margin-bottom: 22px; }
.usina-photo { border-radius: var(--radius); min-height: 380px; background-size: cover; background-position: center; box-shadow: var(--shadow); }
.usina-text { display: flex; flex-direction: column; justify-content: center; }
.plate { align-self: flex-start; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin-bottom: 20px; }
.usina-text h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 16px; }
.usina-text p { color: var(--ink-soft); font-size: 1.04rem; }
.usina-stats { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.usina-stats li { border-top: 2px solid var(--sol); padding-top: 12px; }
.usina-stats .n { display: block; font-size: 1.5rem; font-weight: 840; letter-spacing: -.02em; }
.usina-stats .l { display: block; font-size: .82rem; color: var(--ink-soft); margin-top: 3px; }

.gallery { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 14px; }
.g-item { margin: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-item:hover img { transform: scale(1.06); }

/* ---------- PARCEIROS ---------- */
.section-partner { background: var(--marinho); color: #fff; border-top: none; position: relative; overflow: hidden; }
[data-theme="dark"] .section-partner { background: #0d1d38; }
.partner-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; position: relative; z-index: 2; }
.partner-inner h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 820; margin: 6px 0 12px; max-width: 18ch; }
.partner-inner p { color: rgba(233,241,250,.82); max-width: 52ch; font-size: 1.04rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 680; font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.chev { flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint); transform: rotate(45deg); transition: transform .25s ease; margin-top: -4px; }
.faq-item[open] .chev { transform: rotate(225deg); margin-top: 3px; }
.faq-a { padding: 0 24px 22px; }
.faq-a p { color: var(--ink-soft); font-size: 1rem; }

/* ---------- CTA FINAL ---------- */
.cta-final { position: relative; background: linear-gradient(180deg, var(--sky-a), var(--sky-b)); color: #fff; border-top: none; overflow: hidden; text-align: center; }
.hero-scene { position: absolute; inset: 0; z-index: 0; opacity: .9; }
.hero-scene svg { width: 100%; height: 100%; }
.cta-inner { position: relative; z-index: 2; max-width: 720px; }
.cta-inner h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 840; letter-spacing: -.035em; }
.cta-inner p { color: rgba(233,241,250,.85); font-size: 1.12rem; margin: 18px auto 0; max-width: 46ch; }
.cta-inner .hero-cta { justify-content: center; }

/* ---------- FOOTER ---------- */
.footer { background: var(--marinho); color: #fff; padding: 60px 0 30px; }
[data-theme="dark"] .footer { background: #081326; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .wordmark { font-size: 1.7rem; color: #fff; }
.footer-tag { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sol); margin-bottom: 12px; }
.footer-desc { color: rgba(233,241,250,.66); font-size: .92rem; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-h { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(233,241,250,.82); font-size: .95rem; padding: 5px 0; transition: color .2s ease; }
.footer-col a:hover { color: var(--sol); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; color: rgba(233,241,250,.5); font-size: .82rem; }
.footer-legal .mono { font-family: var(--mono); letter-spacing: .12em; }

/* ---------- REVEAL ---------- */
/* Só escondemos quando o JS confirma que vai animar (classe .js no <html>).
   Sem JS, todo o conteúdo aparece normalmente. */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .rise.in { opacity: 1; transform: none; }
.steps .step, .cards .card, .faq .faq-item { transition-delay: calc(var(--i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .hero-scroll span { animation: none; }
  .hero-photo { transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .sim-grid { grid-template-columns: 1fr; gap: 30px; }
  .usina-feature { grid-template-columns: 1fr; }
  .usina-photo { min-height: 280px; }
  .cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile[hidden] { display: none; }
  .nav-mobile.open { display: flex; }
  .strip-grid { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2,1fr); }
  .usina-stats { grid-template-columns: 1fr; gap: 12px; }
  .hero-facts { gap: 26px; }
  .sim-out { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
}

/* ==========================================================================
   PÁGINA DE CONTRATAÇÃO (/contratar)
   ========================================================================== */
.page-contratar { background: var(--ground); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-faint); }

.chead { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px,5vw,48px); background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-2); }
.chead .brand { display: inline-flex; align-items: center; gap: 11px; }
.chead .wordmark { font-size: 1.4rem; color: var(--ink); }
.chead-right { display: flex; align-items: center; gap: 16px; }
.chead-back { font-size: .9rem; font-weight: 560; color: var(--ink-soft); }
.chead-back:hover { color: var(--sol-deep); }

.ctr-wrap { max-width: 760px; margin: 0 auto; padding: clamp(28px,5vw,52px) clamp(20px,5vw,40px) 60px; }
.ctr-head { text-align: center; margin-bottom: 30px; }
.ctr-head h1 { font-size: clamp(1.8rem,4.5vw,2.6rem); font-weight: 840; letter-spacing: -.03em; margin: 6px 0 12px; }
.ctr-head p { color: var(--ink-soft); font-size: 1.05rem; max-width: 46ch; margin: 0 auto; }

/* progresso */
.steps-bar { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 22px; }
.steps-bar li { flex: 1; display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-faint); font-size: .9rem; font-weight: 600; }
.steps-bar .sb-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-faint); font-size: .82rem; font-weight: 700; }
.steps-bar li.on { border-color: var(--sol); color: var(--ink); box-shadow: var(--shadow-sm); }
.steps-bar li.on .sb-n { background: var(--sol); color: #13294B; }
.steps-bar li.done .sb-n { background: var(--verde); color: #fff; }
.steps-bar li.done .sb-n::after { content: "✓"; }
.steps-bar li.done .sb-n { font-size: 0; }
.steps-bar li.done .sb-n::after { font-size: .8rem; }

.ctr-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px,4vw,36px); box-shadow: var(--shadow); }
.ctr-h { font-size: 1.35rem; font-weight: 780; margin: 0 0 6px; }
.ctr-sub { color: var(--ink-soft); font-size: .95rem; margin: 0 0 20px; }

.field { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ctr-label { display: block; font-size: .82rem; font-weight: 620; color: var(--ink-soft); margin-bottom: 6px; }
.ctr-label .opt { color: var(--ink-faint); font-weight: 500; }
.ctr-input { width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 12px 14px; font-family: var(--sans);
  font-size: 1rem; color: var(--ink); background: var(--ground); transition: border-color .18s ease, box-shadow .18s ease; }
.ctr-input:focus { outline: none; border-color: var(--sol); box-shadow: 0 0 0 3px rgba(242,163,44,.16); }
.ctr-input.bad { border-color: #c0392b; }
.ctr-input.good { border-color: rgba(91,138,60,.65); }
.hint { display: block; font-size: .78rem; margin-top: 5px; min-height: 1em; color: var(--ink-faint); }
.hint.ok { color: var(--verde); }
.hint.err { color: #c0392b; }
[data-theme="dark"] .hint.err { color: #ff9b8a; }

.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); }
.seg-btn { border: none; background: transparent; color: var(--ink-soft); font-weight: 620; font-size: .95rem; padding: 9px 18px; border-radius: 9px; cursor: pointer; }
.seg-btn.on { background: var(--sol); color: #13294B; }

/* uploads */
.drop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px; border: 1.5px dashed var(--line); border-radius: 14px; margin-bottom: 14px; background: var(--ground); transition: border-color .18s ease, background .18s ease; }
.drop.over { border-color: var(--sol); background: rgba(242,163,44,.06); }
.drop.has { border-style: solid; border-color: rgba(91,138,60,.5); }
.drop-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(242,163,44,.14); display: grid; place-items: center; }
.drop-txt { flex: 1 1 180px; display: flex; flex-direction: column; }
.drop-txt b { font-size: 1rem; }
.drop-txt span { color: var(--ink-soft); font-size: .86rem; }
.drop-btn { flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.drop-btn:hover { border-color: var(--sol); color: var(--sol-deep); }
.drop-file { flex-basis: 100%; display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .88rem; color: var(--ink); background: var(--surface-2); border-radius: 9px; padding: 8px 12px; }
.ff-ok { color: var(--verde); font-weight: 800; }
.ff-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-size { color: var(--ink-faint); font-size: .8rem; }
.ff-x { margin-left: auto; border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: .9rem; }
.ff-x:hover { color: #c0392b; }

.fatura-dados { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 4px; margin: -4px 0 14px; background: var(--surface-2); }
.fd-status { font-size: .88rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.fd-status.loading { color: var(--ink-soft); }
.fd-status.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--sol); animation: spin .8s linear infinite; flex: none; }
.fd-status.ok { color: var(--verde); font-weight: 600; }
.fd-status.err { color: #a8321f; }
[data-theme="dark"] .fd-status.err { color: #ff9b8a; }

.ctr-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }

/* revisão */
.review { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.rv-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); font-size: .95rem; }
.rv-row:last-child { border-bottom: none; }
.rv-k { color: var(--ink-soft); }
.rv-v { font-weight: 620; text-align: right; }

.termo-box { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; background: var(--ground); }
.termo-head { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin-bottom: 10px; }
.termo-ico { width: 34px; height: 34px; border-radius: 9px; background: rgba(44,94,158,.12); display: grid; place-items: center; }
.termo-list { margin: 0 0 12px; padding-left: 18px; color: var(--ink-soft); font-size: .92rem; }
.termo-list li { margin: 5px 0; }
.termo-view { border: none; background: none; color: var(--azul); font-weight: 620; font-size: .9rem; cursor: pointer; padding: 0; }
.termo-view:hover { color: var(--sol-deep); }

.check { display: flex; align-items: flex-start; gap: 11px; margin: 12px 0; font-size: .93rem; color: var(--ink); cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--sol); flex: none; }

.ctr-erro { background: rgba(192,57,43,.1); border: 1px solid rgba(192,57,43,.3); color: #a8321f; border-radius: 11px; padding: 12px 15px; font-size: .92rem; margin-top: 14px; }
[data-theme="dark"] .ctr-erro { color: #ff9b8a; }

/* sucesso */
.ctr-done { text-align: center; }
.done-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 2rem; display: grid; place-items: center; margin: 4px auto 16px; }
.ctr-done p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 22px; font-size: 1.02rem; }
.ctr-done .btn { margin: 6px; }

.ctr-foot { text-align: center; color: var(--ink-faint); font-size: .86rem; margin-top: 22px; }
.ctr-foot a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }

/* overlay */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(11,22,38,.6); backdrop-filter: blur(4px); display: grid; place-items: center; align-content: center; gap: 16px; color: #fff; }
.overlay p { font-weight: 600; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: var(--sol); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .steps-bar .sb-l { display: none; }
  .steps-bar li { justify-content: center; }
  .chead-back { display: none; }
}
