/* ==========================================================================
   Câmara Engenharia + VazãoTech — design tokens
   ========================================================================== */
:root {
  --navy-950: #0f1c30;
  --navy-900: #1a2b4c;
  --navy-800: #223862;
  --navy-700: #2d4a7c;

  --orange-600: #ff6a00;
  --orange-500: #ff8a3d;
  --orange-100: #fff1e5;

  --teal-700: #0b6a7e;
  --teal-600: #10a3bf;
  --teal-100: #e4f6f9;

  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --ink: #16202f;
  --ink-muted: #5c6879;
  --border: #e3e8ef;

  --shadow-sm: 0 2px 10px rgba(15, 28, 48, 0.07);
  --shadow-md: 0 16px 40px rgba(15, 28, 48, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --nav-h: 52px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-900); margin: 0 0 0.5em; line-height: 1.15; }
p { margin: 0 0 1em; }
a { color: inherit; }
button { font-family: inherit; }

.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: 8px; top: -48px;
  background: var(--orange-600); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); font-weight: 600; z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
}
section { scroll-margin-top: calc(var(--nav-h) + 12px); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  margin-bottom: 10px;
}
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; }
.section-lead {
  max-width: 68ch;
  color: var(--ink-muted);
  font-size: 16.5px;
}
.fonte-nota {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 20px;
  opacity: 0.85;
}

/* ==========================================================================
   Header / hero
   ========================================================================== */
.site-header {
  position: relative;
  background: var(--navy-900);
  background-image:
    radial-gradient(560px 320px at 12% -10%, rgba(255,106,0,0.35), transparent 65%),
    radial-gradient(620px 360px at 88% 110%, rgba(16,163,191,0.38), transparent 65%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
  overflow: hidden;
}
.header-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.logo { height: 46px; width: auto; }
.brand-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.25);
}
.tagline {
  color: rgba(255,255,255,0.82);
  font-size: 16px;
  max-width: 46ch;
  margin: 0;
}

/* ==========================================================================
   Sticky nav
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-scroll {
  max-width: 1080px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-scroll::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: none;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--orange-100); color: var(--orange-600); }
.site-nav a.is-active { background: var(--navy-900); color: #fff; }

/* ==========================================================================
   Serviços — cards
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--orange-100);
  margin-bottom: 16px;
}
.card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--orange-600);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { color: var(--ink-muted); font-size: 14.5px; margin: 0; }

/* ==========================================================================
   Media sections (ciclo-ar, produtos)
   ========================================================================== */
.ciclo-ar, .produtos { background: var(--bg-alt); }
.produtos { background: var(--bg); }

.media-frame {
  margin: 28px 0 0;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.media-frame img { width: 100%; height: auto; display: block; }
.media-frame--compact { max-width: 640px; }

.produtos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 640px;
  margin: 28px auto 0;
}
.media-frame--square {
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  aspect-ratio: 1/1;
}
.media-frame--square img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  padding: 22px;
  box-sizing: border-box;
}
.media-frame--square figcaption {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ==========================================================================
   Características — checklist
   ========================================================================== */
.caracteristicas { background: var(--bg-alt); }
.checklist {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14.5px;
}
.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--orange-600);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ==========================================================================
   Ruído — noise scale
   ========================================================================== */
.noise-scale { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.noise-row { display: grid; grid-template-columns: 150px 1fr 76px; align-items: center; gap: 12px; }
.noise-label { font-size: 13.5px; color: var(--ink-muted); }
.noise-track {
  height: 10px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}
.noise-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-700));
  border-radius: 999px;
}
.noise-value { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); text-align: right; }
.noise-row--highlight .noise-label { color: var(--navy-900); font-weight: 700; }
.noise-bar--highlight { background: linear-gradient(90deg, var(--orange-500), var(--orange-600)); }
.noise-row--highlight .noise-value { color: var(--orange-600); font-weight: 700; }

/* ==========================================================================
   Ciclo de aquecimento — gallery + lightbox
   ========================================================================== */
.ciclo-aquecimento { background: var(--bg-alt); }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.gallery-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0;
  cursor: zoom-in;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; aspect-ratio: 1600/797; object-fit: cover; object-position: center; }
.gallery-caption {
  display: block;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-900);
}

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 20, 30, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ==========================================================================
   Calculadora
   ========================================================================== */
.calc-card {
  margin-top: 28px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.calc-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.field input {
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.field input:focus { border-color: var(--teal-600); }
.calc-form button {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--orange-600);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.calc-form button:hover { background: #e65f00; transform: translateY(-1px); }
.calc-resultado:empty { display: none; }
.calc-resultado {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal-600);
  border-radius: var(--radius-sm);
}
.calc-resultado .resultado-numero {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
  display: block;
  margin-bottom: 6px;
}
.calc-resultado .resultado-nota {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}
.calc-resultado.is-erro { border-left-color: var(--orange-600); color: var(--navy-900); }

/* ==========================================================================
   Tabela comparativa
   ========================================================================== */
.tabela-comparativa { background: var(--bg-alt); }
.scroll-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-700);
  margin: 18px 0 0;
}
.tabela-scroll {
  margin-top: 10px;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
thead th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--navy-900);
  padding: 14px 16px;
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
tbody td:first-child { font-family: var(--font-body); font-weight: 600; white-space: normal; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.linha-destaque { background: var(--orange-100); }
tbody tr.linha-destaque td:first-child { color: var(--orange-600); font-weight: 700; }
tbody tr.linha-destaque td:first-child::before {
  content: "★ ";
}

/* ==========================================================================
   Case Florianópolis — stats, gráfico e tabela
   ========================================================================== */
.floripa-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.floripa-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  text-align: center;
}
.floripa-stat-numero {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3.6vw, 32px);
  color: var(--navy-900);
}
.floripa-stat-legenda {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.35;
}
.floripa-stat--destaque {
  background: var(--navy-900);
  border-color: var(--navy-900);
}
.floripa-stat--destaque .floripa-stat-numero { color: var(--orange-500); }
.floripa-stat--destaque .floripa-stat-legenda { color: rgba(255,255,255,0.75); }

.floripa-chart-card {
  margin-top: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 22px;
  box-shadow: var(--shadow-sm);
}
.floripa-chart { height: 220px; }
.floripa-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 100%;
  border-bottom: 1px solid var(--border);
}
.floripa-month {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 10px;
}
.floripa-bargroup {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  width: 60%;
  max-width: 46px;
  justify-content: center;
}
.floripa-bar {
  flex: 1;
  min-height: 3px;
  min-width: 4px;
  border-radius: 3px 3px 0 0;
}
.floripa-bar--glp { background: #aab8ca; }
.floripa-bar--ee { background: linear-gradient(180deg, var(--orange-500), var(--orange-600)); }
.floripa-month-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: capitalize;
}
.floripa-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-dot--glp { background: #aab8ca; }
.legend-dot--ee { background: var(--orange-600); }

.tabela-scroll--floripa { margin-top: 10px; }
#tabela-floripa { min-width: 480px; }
tbody tr.linha-economia td:last-child { color: var(--teal-700); font-weight: 700; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 28px 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.site-footer p { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .calc-form { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section-inner { padding: 48px 20px; }
  .cards { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .produtos-grid { grid-template-columns: 1fr; max-width: 260px; }
  .floripa-stats { grid-template-columns: 1fr; }
  .noise-row { grid-template-columns: 96px 1fr 64px; gap: 8px; }
  .noise-label { font-size: 12px; }
  .header-inner { padding: 32px 20px 36px; }
  .logo { height: 38px; }
  .calc-card { padding: 22px; }
}