/* AGTEC Energia Solar — estilos do site */

:root {
  --white: #ffffff;
  --paper: #fff8f2;
  --ink: #1d1a16;
  --ink-2: #57514a;
  --ink-3: #8a8279;
  --line: #efe6dc;
  --orange: #fc7203;
  --orange-btn: #d95a00;
  --orange-deep: #b04700;
  --orange-ink: #7a2f05;
  --orange-soft: #ffe8d8;
  --blue: #1b4a8a;
  --blue-deep: #12325c;
  --blue-soft: #e6eef9;

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(60, 30, 5, 0.22);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #e7c7ad var(--white);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  caret-color: var(--orange);
  accent-color: var(--orange);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--orange-soft); color: var(--orange-ink); }

img { max-width: 100%; display: block; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.3rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.015em; }

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  color: var(--ink-2);
  max-width: 34em;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--orange-btn); color: var(--white); box-shadow: 0 8px 20px -10px rgba(252, 114, 3, 0.8); }
.btn-primary:hover { background: var(--orange-deep); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #dccfc2; }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); }

.btn-white { background: var(--white); color: var(--orange-ink); }
.btn-white:hover { background: var(--orange-soft); }

.btn-outline-white { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.btn-outline-white:hover { box-shadow: inset 0 0 0 1.5px var(--white); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--orange-deep);
  text-decoration: none;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 50px; width: auto; }
.site-footer .brand img { height: 64px; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.brand-name span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-links a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 3px;
  background: var(--orange);
  border-radius: 2px;
}
.nav-links a.nav-cta {
  display: inline-flex;
  margin-left: 10px;
  min-height: 46px;
  padding: 0 20px;
  color: var(--white);
  background: var(--orange-btn);
  font-weight: 600;
}
.nav-links a.nav-cta:hover { background: var(--orange-deep); color: var(--white); }

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(60, 30, 5, 0.25);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav-links.open { opacity: 1; transform: none; visibility: visible; }
  .nav-links a { padding: 14px 8px; font-size: 1.1rem; border-radius: 10px; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--orange-deep); }
  .nav-links a.nav-cta { display: flex; margin: 10px 0 0; min-height: 52px; border-radius: 999px; }
}

/* ---------- Hero (início) ---------- */

.hero { position: relative; padding: clamp(24px, 4vw, 48px) 0 var(--section); overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 { max-width: 11em; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .lead { margin-top: 22px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-place {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.hero-place svg { width: 18px; height: 18px; color: var(--blue); flex: none; }

.hero-visual { position: relative; margin-top: 64px; }
.hero-photo {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 0.84;
  max-height: min(540px, calc(100svh - 230px));
  width: 100%;
  object-fit: cover;
  object-position: 18% 50%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: var(--orange-soft);
}

/* Arco do sol: o caminho do sol ao longo do dia, nascendo por trás da foto */
.sun-arc {
  position: absolute;
  top: -108px;
  left: -12%;
  width: 124%;
  height: auto;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.sun-arc .path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
  opacity: 0.85;
}
.sun-arc .tick { fill: var(--ink-3); font: 600 13px var(--font-body); }
.sun-arc .sun-core { fill: var(--orange); }
.sun-arc .sun-glow { fill: var(--orange); opacity: 0.18; }

.hero-note {
  position: absolute;
  z-index: 2;
  left: -28px;
  bottom: 28px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  max-width: 250px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.hero-note strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 56px; }
  .hero-photo { aspect-ratio: 4 / 3.3; }
  .hero-note { left: 14px; bottom: -22px; }
  .sun-arc { top: -48px; left: -6%; width: 112%; }
}

/* ---------- Seções ---------- */

.section { padding: var(--section) 0; }
.section-paper { background: var(--paper); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head .lead { margin-top: 16px; }

/* Para quem: três fotos com legenda */
.segments {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}
.segment {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  color: var(--white);
  display: flex;
  align-items: end;
  isolation: isolate;
}
.segment img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.9s var(--ease);
}
.segment::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(20, 12, 4, 0.78) 0%, rgba(20, 12, 4, 0.1) 60%);
}
.segment:hover img { transform: scale(1.04); }
.segment-body { padding: 26px; }
.segment h3 { font-size: 1.6rem; }
.segment p { margin-top: 8px; color: rgba(255, 255, 255, 0.86); font-size: 0.98rem; max-width: 22em; }

@media (max-width: 900px) {
  .segments { grid-template-columns: 1fr; }
  .segment { min-height: 280px; }
}

/* Serviços */
.services {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.services { align-items: center; }
.services-photo {
  border-radius: 20px;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  width: 100%;
}
.service-list { list-style: none; margin: 36px 0 0; padding: 0; }
.service-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.service-list li:last-child { border-bottom: 1px solid var(--line); }
.service-icon {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--orange-soft);
  color: var(--orange-deep);
}
.service-icon svg { width: 26px; height: 26px; }
.service-list p { color: var(--ink-2); }

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
  .services-photo { position: static; aspect-ratio: 4 / 3; }
}

/* Faixa laranja: Bahia */
.sunband {
  background: #ee6a02;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.sunband::after {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  right: -260px;
  top: -320px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.05), 0 0 0 180px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.sunband h2 { max-width: 14em; }
.sunband .lead { color: rgba(255, 255, 255, 0.92); margin-top: 18px; }

.facts {
  list-style: none;
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
}
.facts li {
  padding: 8px 32px 8px 0;
  margin-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
}
.facts li:last-child { border-right: 0; margin-right: 0; }
.fact-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.fact-value small { font-size: 0.42em; font-weight: 600; letter-spacing: -0.01em; margin-left: 4px; }
.facts p { margin-top: 12px; color: rgba(255, 255, 255, 0.95); max-width: 18em; }
.facts-source { margin-top: 36px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); position: relative; z-index: 1; }
.facts-source a { color: var(--white); }
.sunband .band-actions { margin-top: 32px; position: relative; z-index: 1; }

@media (max-width: 900px) {
  .facts { grid-template-columns: 1fr; gap: 28px; }
  .facts li { border-right: 0; margin-right: 0; padding: 0 0 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
  .facts li:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* Etapas do atendimento */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--orange) 0 6px, transparent 6px 14px);
  opacity: 0.6;
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--orange);
  color: var(--orange-deep);
  font: 700 1.1rem var(--font-display);
  margin-bottom: 22px;
  position: relative;
}
.steps li:last-child::before { background: var(--blue); border-color: var(--blue); color: var(--white); }
.steps p { color: var(--ink-2); margin-top: 8px; font-size: 0.98rem; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { top: 24px; bottom: 24px; left: 23px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(to bottom, var(--orange) 0 6px, transparent 6px 14px); }
  .steps li { padding: 0 0 32px 72px; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps h3 { padding-top: 10px; }
}

/* Chamada final */
.closing {
  padding: var(--section) 0;
}
.closing-box {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 32px;
  align-items: center;
  background: var(--blue);
  color: var(--white);
  border-radius: 24px;
  padding: clamp(36px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}
.closing-box::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  bottom: -220px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.95;
}
.closing-box > * { position: relative; z-index: 1; }
.closing-box p { color: rgba(255, 255, 255, 0.9); margin-top: 14px; max-width: 30em; }
.closing-actions { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 900px) {
  .closing-box { grid-template-columns: 1fr; }
  .closing-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Cabeçalho de página interna ---------- */

.page-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 80px); }
.page-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: end;
}
.page-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.page-hero .lead { margin-top: 20px; }
.page-hero-photo {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 20px;
}
.page-hero.simple .page-hero-grid { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Energia solar: como funciona ---------- */

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.flow li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  box-shadow: 0 1px 0 var(--line), 0 12px 28px -18px rgba(60, 30, 5, 0.25);
  position: relative;
}
.flow-art { height: 84px; margin-bottom: 18px; color: var(--orange); }
.flow-art svg { height: 100%; width: auto; }
.flow h3 { font-size: 1.2rem; }
.flow p { color: var(--ink-2); margin-top: 8px; font-size: 0.97rem; }
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 66px;
  right: -16px;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
  transform: rotate(45deg);
  z-index: 1;
}

@media (max-width: 1000px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li::after { display: none; }
}
@media (max-width: 600px) {
  .flow { grid-template-columns: 1fr; }
}

/* Vantagens */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(32px, 6vw, 80px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.benefits li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 18px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.benefits .check {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.benefits .check svg { width: 18px; height: 18px; }
.benefits p { color: var(--ink-2); }

@media (max-width: 760px) { .benefits { grid-template-columns: 1fr; } }

/* Nota sobre a lei */
.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  background: var(--blue-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  margin-top: clamp(40px, 6vw, 64px);
}
.note-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue); color: var(--white); display: grid; place-items: center; }
.note-icon svg { width: 22px; height: 22px; }
.note h3 { font-size: 1.25rem; color: var(--blue-deep); }
.note p { margin-top: 8px; color: #2a3f5e; max-width: 62ch; }

@media (max-width: 600px) { .note { grid-template-columns: 1fr; } }

/* Cenário Bahia */
.bahia {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.bahia-photo { border-radius: 20px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; position: sticky; top: 100px; }
.data-list { list-style: none; margin: 32px 0 0; padding: 0; }
.data-list li {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) 1.6fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.data-list li:last-child { border-bottom: 1px solid var(--line); }
.data-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--orange-deep);
  font-variant-numeric: tabular-nums;
}
.data-num small { font-size: 0.5em; letter-spacing: 0; margin-left: 3px; color: var(--ink-2); }
.data-list p { color: var(--ink-2); }
.data-list p strong { color: var(--ink); font-weight: 600; }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--blue-deep);
  background: var(--blue-soft);
  padding: 6px 12px;
  border-radius: 999px;
}
.updated svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .bahia { grid-template-columns: 1fr; }
  .bahia-photo { position: static; aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) {
  .data-list li { grid-template-columns: 1fr; gap: 8px; }
}

/* Perguntas frequentes */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  font: 600 1.12rem/1.35 var(--font-body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  color: var(--orange-deep);
  transition: transform 0.35s var(--ease), background-color 0.2s;
}
.faq summary .plus svg { width: 18px; height: 18px; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--orange-soft); }
.faq summary:hover .plus { background: var(--orange-soft); }
.faq .answer { padding: 0 54px 24px 0; color: var(--ink-2); max-width: 68ch; }

/* Fontes */
.sources { font-size: 0.92rem; color: var(--ink-2); }
.sources ul { margin: 12px 0 0; padding-left: 18px; }
.sources li { margin: 6px 0; }
.sources a { color: var(--orange-deep); }

/* ---------- Sobre ---------- */

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.story-text p { color: var(--ink-2); margin-top: 18px; font-size: 1.08rem; max-width: 34em; }
.story-text p:first-of-type { margin-top: 22px; }
.story-photo { border-radius: 20px; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.values li { border-top: 3px solid var(--orange); padding-top: 22px; }
.values li:nth-child(3) { border-top-color: var(--blue); }
.values p { color: var(--ink-2); margin-top: 10px; }

.coverage {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.coverage-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.coverage-chips span {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 500;
  font-size: 0.97rem;
}
.coverage-chips span.home { background: var(--orange); color: var(--white); box-shadow: none; }
.coverage-art { color: var(--orange); }

@media (max-width: 900px) {
  .story, .coverage { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
}

/* ---------- Orçamento ---------- */

.quote {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.quote-aside { position: sticky; top: 110px; }
.quote-aside .lead { margin-top: 18px; }
.quote-aside ul { list-style: none; padding: 0; margin: 28px 0 0; }
.quote-aside li { display: flex; gap: 12px; align-items: start; padding: 8px 0; color: var(--ink-2); }
.quote-aside li svg { width: 22px; height: 22px; color: var(--blue); flex: none; margin-top: 2px; }

.form {
  background: var(--white);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -36px rgba(60, 30, 5, 0.35);
}
.field { border: 0; margin: 0; padding: 0; }
.field + .field { margin-top: 28px; }
.field-label, .field legend {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
  padding: 0;
}
.field-label .opt, .field legend .opt { font-weight: 400; color: var(--ink-3); font-size: 0.92rem; margin-left: 4px; }

.input, .textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2d6ca;
  background: var(--white);
  color: var(--ink);
  font: 400 1.02rem var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #8f857b; }
.input:hover, .textarea:hover { border-color: #cdbcab; }
.input:focus, .textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid #e2d6ca;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink-2);
  background: var(--white);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
  user-select: none;
}
.chip:hover span { border-color: #cdbcab; color: var(--ink); }
.chip input:checked + span { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.field.invalid .input { border-color: #c4361b; }
.field.invalid .chip span { border-color: #e7a796; }
.error { display: none; margin-top: 8px; color: #b02e14; font-size: 0.92rem; font-weight: 500; }
.field.invalid .error { display: block; }

.form-foot { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.form-foot .btn { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.form-foot small { color: var(--ink-3); font-size: 0.88rem; max-width: 26em; line-height: 1.45; }

@media (max-width: 900px) {
  .quote { grid-template-columns: 1fr; }
  .quote-aside { position: static; }
  .form-foot .btn { width: 100%; }
}

/* ---------- Contato ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
a.contact-item:hover { background: var(--orange-soft); transform: translateY(-2px); }
.contact-item .ci-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--white); color: var(--orange-deep); margin-bottom: 14px; }
.contact-item .ci-icon svg { width: 24px; height: 24px; }
.contact-item.wa .ci-icon { background: var(--blue); color: var(--white); }
.contact-item span { color: var(--ink-2); font-size: 0.95rem; }
.contact-item strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.015em; font-weight: 700; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Rodapé ---------- */

.site-footer { background: var(--ink); color: #d9d1c8; padding: clamp(56px, 8vw, 88px) 0 32px; }
.site-footer a { color: #f4ede6; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-footer .brand { color: var(--white); }
.site-footer .brand-name span { color: #a9c4ec; }
.footer-about { margin-top: 18px; max-width: 26em; font-size: 0.97rem; color: #bdb4aa; }
.footer-title { font: 600 0.82rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: #9d948a; margin: 0 0 14px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: 5px 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid #3a352f;
  font-size: 0.86rem;
  color: #9d948a;
}

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Botão flutuante do WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px -10px rgba(18, 50, 92, 0.6);
  transition: transform 0.3s var(--ease), background-color 0.2s;
}
.wa-float:hover { transform: scale(1.06); background: var(--blue-deep); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Movimento ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .scroll-hint span { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Topo com placa solar 3D (ativo só quando o 3D carrega) ---------- */

.panel-canvas { display: none; }
.explode { display: none; }

html.has-3d .hero {
  height: 340vh;
  padding: 0;
  overflow: clip;
}
html.has-3d .hero-stage {
  position: sticky;
  top: 76px;
  height: calc(100svh - 76px);
  min-height: 560px;
  overflow: hidden;
}
html.has-3d .hero-stage > .hero-grid { height: 100%; align-items: center; }
html.has-3d .hero-copy { position: relative; z-index: 3; will-change: opacity, transform; }
html.has-3d .hero-visual { height: 100%; margin: 0; }
html.has-3d .hero-photo { display: none; }
html.has-3d .panel-canvas {
  display: block;
  position: absolute;
  inset: 0 -8% 0 -18%;
  width: 126%;
  height: 100%;
  z-index: 1;
}
html.has-3d .sun-arc { top: 6%; left: -10%; width: 120%; z-index: 0; }
html.has-3d .hero-note { bottom: 9%; left: -8%; transition: opacity 0.2s; }

html.has-3d .explode {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  --title: 0;
}
.explode-wrap { padding-top: clamp(28px, 6vh, 64px); }
.explode-title {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  max-width: 11em;
  opacity: var(--title);
  transform: translateY(calc((1 - var(--title)) * 16px));
}
.explode-sub {
  margin-top: 12px;
  color: var(--ink-2);
  max-width: 24em;
  opacity: var(--title);
}
.leaders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.leaders path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.25;
  stroke-dasharray: 400;
  opacity: 0;
}
.layer-labels {
  list-style: none;
  margin: 0;
  padding: 0;
}
.layer-labels li {
  --on: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: min(300px, 30vw);
  opacity: var(--on);
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink-2);
}
.layer-labels strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 1.02rem/1.2 var(--font-body);
  color: var(--ink);
  margin-bottom: 3px;
}
.layer-labels strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
  flex: none;
}
.layer-labels span { display: block; padding-left: 19px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-3);
  opacity: 0;
}
.scroll-hint span {
  width: 2px;
  height: 26px;
  border-radius: 2px;
  background: linear-gradient(var(--orange), transparent);
  animation: hint 1.8s var(--ease) infinite;
}
@keyframes hint {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 900px) {
  html.has-3d .hero { height: 300vh; }
  html.has-3d .hero-stage > .hero-grid {
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 0;
    padding-top: 20px;
  }
  html.has-3d .hero-copy { order: 0; }
  html.has-3d .hero-copy h1 { font-size: 2.3rem; }
  html.has-3d .hero-copy .lead { font-size: 1rem; margin-top: 12px; }
  html.has-3d .hero-actions { margin-top: 18px; }
  html.has-3d .hero-actions { flex-wrap: nowrap; gap: 8px; }
  html.has-3d .hero-actions .btn { min-height: 46px; padding: 0 16px; font-size: 0.95rem; white-space: nowrap; }
  html.has-3d .hero-actions .btn svg { width: 18px; height: 18px; }
  html.has-3d .hero-place { display: none; }
  html.has-3d .hero-visual { position: absolute; inset: 0; height: auto; z-index: 0; }
  html.has-3d .panel-canvas { inset: 0; width: 100%; }
  html.has-3d .sun-arc { top: 46%; left: -4%; width: 108%; }
  html.has-3d .hero-note { display: none; }
  .explode-wrap { padding-top: 22px; }
  .explode-title { font-size: 1.7rem; }
  .explode-sub { font-size: 0.95rem; }
  .explode-sub { display: none; }
  .layer-labels li { width: 44vw; font-size: 0.74rem; line-height: 1.3; }
  .layer-labels strong { font-size: 0.86rem; gap: 7px; margin-bottom: 2px; }
  .layer-labels strong::before { width: 7px; height: 7px; box-shadow: 0 0 0 3px var(--orange-soft); }
  .layer-labels span { padding-left: 14px; }
  .scroll-hint { bottom: 10px; }
}

/* ---------- Degradês e azul das placas ---------- */

:root {
  --navy: #0b1f44;
  --navy-2: #12336b;
  --navy-3: #1b4a8a;
  --scroll: 0;
}

/* A página inteira vai do branco quente (sol) ao azul claro (placa) conforme desce */
body {
  background: linear-gradient(180deg, #ffffff 0%, #fff6ee 10%, #f6f8fd 40%, #edf3fc 75%, #e7effa 100%);
}

/* Cabeçalho com degradê e barra de progresso da rolagem */


.site-header.scrolled { border-bottom-color: transparent; }

/* Topo: luz do sol à esquerda, reflexo azul à direita */
.hero,
html.has-3d .hero-stage {
  background:
    radial-gradient(55% 65% at 12% 18%, #ffeedd 0%, rgba(255, 238, 221, 0) 70%),
    radial-gradient(50% 60% at 88% 85%, #e3ecfa 0%, rgba(227, 236, 250, 0) 72%);
}
html.has-3d .hero { background: none; }

.section-paper {
  background: linear-gradient(165deg, #fff3e8 0%, #fdf6f0 45%, #eef3fc 100%);
}

.sunband {
  background:
    radial-gradient(60% 90% at 90% 0%, rgba(255, 196, 120, 0.55) 0%, rgba(255, 196, 120, 0) 70%),
    linear-gradient(135deg, #ff8a1f 0%, #f26a02 50%, #d9500c 100%);
}

/* Seção azul: o azul das células, com a grade das células ao fundo */
.section-solar {
  position: relative;
  color: #ffffff;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  overflow: hidden;
  isolation: isolate;
}
.section-solar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(80% 90% at 80% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 90% at 80% 0%, #000 0%, transparent 75%);
}
.section-solar::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  top: -220px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 114, 3, 0.35) 0%, rgba(252, 114, 3, 0) 65%);
}
.section-solar h2,
.section-solar h3 { color: #ffffff; }
.section-solar .lead,
.section-solar p { color: #c6d4ec; }
.section-solar .steps li::before { background: var(--navy-2); border-color: var(--orange); color: #ffffff; }
.section-solar .steps li:last-child::before { background: var(--orange); border-color: var(--orange); }
.section-solar .flow li {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.section-solar .flow p { color: #c6d4ec; }
.section-solar .flow-art { color: #ffa53a; }
.section-solar .flow li:not(:last-child)::after { border-color: #ffa53a; }

/* Chamada final e rodapé no azul */
.closing-box {
  background:
    radial-gradient(70% 100% at 0% 0%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, var(--navy-2) 0%, var(--navy-3) 60%, #2a62ad 100%);
}
.closing-box::after { background: radial-gradient(circle at 40% 40%, #ffa53a 0%, var(--orange) 45%, #e05a00 100%); }

.site-footer {
  background: linear-gradient(180deg, var(--navy) 0%, #071430 100%);
  color: #c9d3e6;
}
.footer-about { color: #a9b7d0; }
.footer-title { color: #8798b8; }
.footer-bottom { border-top-color: #1c3260; color: #8798b8; }

.contact-item { background: linear-gradient(160deg, #fff3e8 0%, #eef3fc 100%); }
.services-photo { object-position: 12% 35%; }


/* ---------- Cabeçalho sólido ---------- */

.site-header { background: linear-gradient(90deg, #ffffff 0%, #fff5ec 48%, #edf3fc 100%); }
.site-header.scrolled { border-bottom-color: var(--line); }

/* ---------- Botão do modo escuro ---------- */

.theme-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #ffffff;
  color: var(--navy-2);
  box-shadow: 0 10px 24px -10px rgba(11, 31, 68, 0.45), inset 0 0 0 1px rgba(11, 31, 68, 0.08);
  transition: transform 0.3s var(--ease), background-color 0.3s, color 0.3s;
}
.theme-toggle:hover { transform: scale(1.06); }
.theme-toggle svg { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity 0.3s, transform 0.4s var(--ease); }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-60deg) scale(0.6); }
html[data-theme="dark"] .theme-toggle { background: #13295a; color: #ffb36b; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
html[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(60deg) scale(0.6); }
html[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; transform: none; }

/* ---------- Modo escuro: azul-marinho das placas ---------- */

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef3fb;
  --ink-2: #b9c7df;
  --ink-3: #8c9dbb;
  --line: #233c6e;
  --paper: #0f2550;
  --orange-soft: rgba(252, 114, 3, 0.18);
  --orange-ink: #ffb27a;
  --orange-deep: #ff9b4d;
  --blue-soft: rgba(110, 160, 240, 0.16);
  --shadow: 0 16px 36px -16px rgba(0, 0, 0, 0.65);
  scrollbar-color: #2b4b86 #0b1f44;
}
html[data-theme="dark"] body {
  background: linear-gradient(180deg, #0b1f44 0%, #0c2148 30%, #0a1c3e 65%, #081733 100%);
}
html[data-theme="dark"] ::selection { background: rgba(252, 114, 3, 0.35); color: #ffffff; }
html[data-theme="dark"] .site-header { background: #0b1f44; }
html[data-theme="dark"] .nav-links a:hover { background: rgba(255, 255, 255, 0.06); }
@media (max-width: 900px) {
  html[data-theme="dark"] .nav-links { background: #0d2147; border-bottom-color: #233c6e; }
}
html[data-theme="dark"] .menu-toggle { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
html[data-theme="dark"] .btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px #3a5690; }
html[data-theme="dark"] .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #ffffff; }

html[data-theme="dark"] .hero,
html[data-theme="dark"].has-3d .hero-stage {
  background:
    radial-gradient(55% 65% at 12% 18%, rgba(252, 114, 3, 0.16) 0%, rgba(252, 114, 3, 0) 70%),
    radial-gradient(50% 60% at 88% 85%, rgba(70, 120, 210, 0.28) 0%, rgba(70, 120, 210, 0) 72%);
}
html[data-theme="dark"].has-3d .hero { background: none; }
html[data-theme="dark"] .hero-note { background: #12295a; }

html[data-theme="dark"] .section-paper { background: linear-gradient(165deg, #10275a 0%, #0d2250 50%, #0b1f44 100%); }
html[data-theme="dark"] .section-solar { background: linear-gradient(160deg, #050f26 0%, #081a3b 55%, #0e2a5c 100%); }
html[data-theme="dark"] .closing-box { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .site-footer { background: linear-gradient(180deg, #071733 0%, #040c1f 100%); }

html[data-theme="dark"] .benefits .check { color: #8db6f2; }
html[data-theme="dark"] .note h3 { color: #d3e2ff; }
html[data-theme="dark"] .note p { color: var(--ink-2); }
html[data-theme="dark"] .note-icon { background: #2a5aa8; }
html[data-theme="dark"] .updated { color: #bcd2f7; }

html[data-theme="dark"] .form { background: #10275a; box-shadow: 0 0 0 1px #233c6e, 0 30px 60px -36px rgba(0, 0, 0, 0.7); }
html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea { background: #0b1f44; border-color: #2a4479; color: var(--ink); }
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder { color: #7f91b3; }
html[data-theme="dark"] .input:hover,
html[data-theme="dark"] .textarea:hover { border-color: #3c5a95; }
html[data-theme="dark"] .chip span { background: #0b1f44; border-color: #2a4479; }
html[data-theme="dark"] .chip:hover span { border-color: #3c5a95; }
html[data-theme="dark"] .error { color: #ff9a82; }

html[data-theme="dark"] .contact-item { background: linear-gradient(160deg, #142c60 0%, #0f2550 100%); }
html[data-theme="dark"] .contact-item .ci-icon { background: #0b1f44; }
html[data-theme="dark"] .coverage-chips span { background: #10275a; box-shadow: inset 0 0 0 1px #233c6e; }
html[data-theme="dark"] .coverage-art circle[stroke] { stroke: #284273; }
html[data-theme="dark"] .coverage-art text { fill: var(--ink-2); }
html[data-theme="dark"] .faq summary .plus { background: rgba(255, 255, 255, 0.07); }
html[data-theme="dark"] .steps li::before { background: #0b1f44; }
html[data-theme="dark"] .layer-labels strong::before { box-shadow: 0 0 0 4px rgba(252, 114, 3, 0.25); }

/* No celular o botão do tema vai para o cabeçalho, ao lado do menu */
@media (max-width: 900px) {
  .theme-toggle {
    top: 14px;
    bottom: auto;
    left: auto;
    right: calc(var(--gutter) + 58px);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--paper);
    box-shadow: none;
  }
  html[data-theme="dark"] .theme-toggle { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
}

/* Sol do arco: núcleo com raios */
.sun-arc .sun-rays path { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; }
.sun-arc .sun-glow { opacity: 0.16; }
@media (max-width: 900px) {
  html.has-3d .sun-arc { top: auto; }
  .sun-arc .path { display: none; }
}

/* Sol da logo AGTEC bem de leve no fundo de algumas seções (só no computador) */
@media (min-width: 900px) {
  .deco { position: relative; isolation: isolate; overflow: clip; }
  .deco::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 700px;
    aspect-ratio: 599 / 557;
    background: url("../img/logo-sol.png") center / contain no-repeat;
    opacity: 0.06;
    pointer-events: none;
  }
  /* Metade do sol entrando pela lateral direita */
  .deco-right::before { right: -380px; top: 50%; transform: translateY(-50%) rotate(-12deg); }
  /* Só a parte de cima do sol surgindo da borda de baixo */
  .deco-left::before { left: 4%; bottom: -400px; transform: rotate(8deg); }
  html[data-theme="dark"] .deco::before { opacity: 0.08; }
}

/* Linha fina sempre visível separando o cabeçalho do conteúdo */
.site-header,
.site-header.scrolled { border-bottom: 1px solid rgba(11, 31, 68, 0.1); }
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-header.scrolled { border-bottom-color: rgba(255, 255, 255, 0.1); }

/* ---------- Galerias (sede, projetos, cursos) ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}
.g-item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--paper);
  aspect-ratio: 4 / 3;
}
.g-item:nth-child(7n + 1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.g-item:hover img { transform: scale(1.04); }
.g-item[hidden] { display: none; }
.g-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(11, 31, 68, 0.72);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .g-item:nth-child(7n + 1) { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .g-tag { left: 8px; bottom: 8px; font-size: 0.72rem; padding: 4px 9px; }
}

.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 28px; }
.g-filter {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid #e2d6ca;
  background: transparent;
  color: var(--ink-2);
  font: 500 0.97rem var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.g-filter:hover { border-color: #cdbcab; color: var(--ink); }
.g-filter[aria-pressed="true"] { background: var(--orange-btn); border-color: var(--orange-btn); color: #ffffff; font-weight: 600; }
html[data-theme="dark"] .g-filter { border-color: #2a4479; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  align-items: start;
}
.g-video { margin: 0; }
.g-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: #000;
  display: block;
}
.g-video.is-vertical video { aspect-ratio: 9 / 16; max-height: 560px; }
.g-video figcaption { margin-top: 10px; font-size: 0.95rem; color: inherit; opacity: 0.85; }

/* Foto ampliada */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(5, 12, 28, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 10px; object-fit: contain; }
.lightbox figcaption { margin-top: 12px; color: #d6deec; font-size: 0.95rem; text-align: center; }
.lightbox button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox button svg { width: 24px; height: 24px; }
.lightbox .lb-close { position: absolute; top: 18px; right: 18px; }
.lightbox button[hidden] { visibility: hidden; display: grid; }
html.lb-open { overflow: hidden; }
@media (max-width: 600px) {
  .lightbox { grid-template-columns: 1fr; padding: 60px 10px 90px; }
  .lightbox .lb-prev, .lightbox .lb-next { position: absolute; bottom: 24px; }
  .lightbox .lb-prev { left: calc(50% - 60px); }
  .lightbox .lb-next { right: calc(50% - 60px); }
}

/* Sede: duas fotos lado a lado, ocupando a largura toda */
.gallery[data-gallery="sede"] { grid-template-columns: 1.5fr 1fr; }
.gallery[data-gallery="sede"] .g-item { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
@media (max-width: 600px) { .gallery[data-gallery="sede"] { grid-template-columns: 1fr; } }
.gallery[data-gallery="sede"] .g-item { aspect-ratio: auto; height: clamp(240px, 32vw, 440px); }
@media (min-width: 760px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
  .g-video:not(.is-vertical) { grid-column: span 2; }
  .g-video.is-vertical video { max-height: none; }
}

/* Mapa da sede (página Contato) */
.map-wrap { margin-top: 16px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.map-wrap iframe { display: block; width: 100%; height: clamp(280px, 38vw, 420px); border: 0; }
html[data-theme="dark"] .map-wrap iframe { filter: invert(0.9) hue-rotate(180deg) saturate(0.8); }
.contact-item strong { font-size: 1.2rem; }
