/* =========================================================
   Canal de Ética e Denúncias — Enerwatt Engenharia
   Identidade visual: laranja (#F26522) + cinza + branco
   ========================================================= */

:root {
  /* Marca Enerwatt */
  --brand:           #F26522;  /* laranja do wordmark */
  --brand-dark:      #D94E1F;  /* hover / pressionado */
  --brand-light:     #FF8A4C;
  --brand-soft:      #FFF1EA;  /* fundo suave laranja */

  --ink:             #2B2B2B;  /* texto principal */
  --gray-700:        #58595B;  /* "engenharia" / texto secundário */
  --gray-500:        #8C8C8C;
  --gray-300:        #D5D7DA;
  --gray-200:        #E6E7E9;
  --gray-100:        #F4F5F6;
  --white:           #FFFFFF;

  --accent-green:    #1F9E7A;  /* detalhe da lâmpada / confirmação */
  --danger:          #C0392B;

  --radius:          14px;
  --radius-sm:       10px;
  --shadow:          0 10px 30px rgba(43, 43, 43, 0.08);
  --shadow-lg:       0 20px 50px rgba(43, 43, 43, 0.16);
  --maxw:            1120px;

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 12px; } /* base reduzida (16px -> 12px) */

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, legend, .brand-name { font-family: var(--font-head); line-height: 1.2; }
/* Sem negrito: neutraliza o bold padrão de títulos e <strong>/<b> */
h1, h2, h3, h4, h5, h6, legend, strong, b { font-weight: 400; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, 760px); }

.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: -999px; top: 0; z-index: 1000;
  background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.req { color: var(--brand); font-weight: 400; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 400; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: all .18s ease; text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 8px 20px rgba(242,101,34,.32); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 400;
  text-transform: uppercase; letter-spacing: .08em; font-size: .78rem;
  color: var(--brand); margin-bottom: .6rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; gap: 1rem; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 48px; width: auto; }
.brand-fallback { display: none; flex-direction: column; line-height: 1; }
.brand-name { color: var(--brand); font-weight: 400; font-size: 1.6rem; font-style: italic; }
.brand-sub { color: var(--gray-500); font-size: .7rem; letter-spacing: .35em; text-transform: lowercase; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--gray-700); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-nav a.btn { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 90% -10%, var(--brand-soft), transparent 60%),
    linear-gradient(180deg, #fff, var(--gray-100));
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero-inner { display: grid; grid-template-columns: 1.4fr .9fr; gap: 3rem; align-items: center; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 400; margin-bottom: 1rem; }
.lead { font-size: 1.12rem; color: var(--gray-700); max-width: 56ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.8rem; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; }
.hero-badges li { display: flex; align-items: center; gap: .5rem; font-weight: 400; font-size: .92rem; color: var(--gray-700); }
.hero-badges .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-green); }

.hero-card {
  background: var(--white); border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow); border: 1px solid var(--gray-200); text-align: center;
}
.shield { color: var(--brand); display: flex; justify-content: center; margin-bottom: 1rem; }
.shield-title { font-family: var(--font-head); font-weight: 400; font-size: 1.15rem; margin-bottom: .4rem; }
.shield-text { color: var(--gray-700); font-size: .95rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--gray-100); }
.section-head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 400; margin-bottom: .6rem; }
.section-head p { color: var(--gray-700); }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: s; }
.step {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; position: relative; box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--font-head); font-weight: 400; font-size: 1.2rem; margin-bottom: 1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.step p { color: var(--gray-700); font-size: .95rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.6rem; border-left: 4px solid var(--brand); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.card p { color: var(--gray-700); font-size: .95rem; }

/* ---------- Guarantees ---------- */
.guarantees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.guarantee { text-align: center; padding: 1.4rem; }
.g-icon { font-size: 2.2rem; margin-bottom: .6rem; }
.guarantee h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.guarantee p { color: var(--gray-700); font-size: .92rem; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 1.6rem; }
.fieldset {
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.6rem; background: var(--white);
}
.fieldset legend {
  font-weight: 400; font-size: 1.1rem; padding: 0 .6rem;
  color: var(--ink);
}
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field label { font-weight: 400; font-size: .95rem; color: var(--ink); }
.field-help { color: var(--gray-700); font-size: .92rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

input, select, textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .9rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  background: var(--white); transition: border-color .15s ease, box-shadow .15s ease; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,101,34,.15);
}
textarea { resize: vertical; }

.field-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.counter { font-size: .82rem; color: var(--gray-500); white-space: nowrap; }

.error { color: var(--danger); font-size: .85rem; min-height: 0; }
.error:empty { display: none; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }

/* Toggle identificação */
.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toggle-option { cursor: pointer; }
.toggle-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-box {
  display: block; padding: 1.1rem 1.2rem; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm); transition: all .15s ease; height: 100%;
}
.toggle-box strong { display: block; font-family: var(--font-head); }
.toggle-box small { color: var(--gray-700); }
.toggle-option input:checked + .toggle-box {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(242,101,34,.12);
}
.toggle-option input:focus-visible + .toggle-box { box-shadow: 0 0 0 3px rgba(242,101,34,.3); }
.identified-fields { margin-top: 1.4rem; }

/* File upload */
.file-drop {
  position: relative; border: 2px dashed var(--gray-300); border-radius: var(--radius-sm);
  padding: 1.6rem; text-align: center; color: var(--gray-700); transition: all .15s ease; cursor: pointer;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--brand); background: var(--brand-soft); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop small { display: block; margin-top: .3rem; color: var(--gray-500); }
.file-list { list-style: none; margin-top: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.file-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--gray-100); border-radius: 8px; padding: .55rem .8rem; font-size: .9rem;
}
.file-list button { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; line-height: 1; }

/* LGPD */
.lgpd-box {
  background: var(--gray-100); border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm); padding: 1.2rem; font-size: .92rem; color: var(--gray-700);
  margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: .8rem;
}
.check { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; font-size: .95rem; margin-bottom: .3rem; }
.check input { width: auto; margin-top: .25rem; accent-color: var(--brand); flex-shrink: 0; }

.form-foot { text-align: center; color: var(--gray-500); font-size: .88rem; }

/* Inline form (consulta) */
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-inline .field { flex: 1 1 200px; margin-bottom: 0; }
.consulta-result {
  margin-top: 1.6rem; padding: 1.4rem; border-radius: var(--radius);
  background: var(--brand-soft); border: 1px solid var(--brand-light);
}
.consulta-linha { margin-top: .5rem; color: var(--gray-700); }

/* Diálogo (consulta pública) */
.msg-titulo { font-size: .95rem; margin: 1.2rem 0 .6rem; }
.msg-thread { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.msg-vazio { color: var(--gray-500); font-size: .9rem; }
.msg-bubble {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: .7rem .9rem; max-width: 85%;
}
.msg-bubble p { margin: .2rem 0; font-size: .92rem; white-space: pre-wrap; }
.msg-bubble small { color: var(--gray-500); font-size: .75rem; }
.msg-autor { font-weight: 500; font-size: .82rem; color: var(--brand-dark); }
.msg-deles { align-self: flex-start; }
.msg-eu { align-self: flex-end; background: var(--brand-soft); border-color: var(--brand-light); }
.msg-eu .msg-autor { color: var(--gray-700); }
.msg-responder { display: flex; flex-direction: column; gap: .5rem; }
.msg-input {
  width: 100%; padding: .7rem .8rem; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm); font: inherit; resize: vertical;
}
.msg-responder .btn { align-self: flex-start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfd0d2; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: .6rem; }
.footer-col p { font-size: .92rem; margin-bottom: .3rem; }
.footer-logo { height: 50px; width: auto; display: inline-block; margin-bottom: .9rem; }
.footer-inner a { color: var(--brand-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.2rem 0; }
.footer-bottom p { font-size: .85rem; color: var(--gray-500); text-align: center; }

/* ---------- Modais ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(43,43,43,.55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; background: #fff; border-radius: var(--radius); padding: 2.2rem;
  max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); text-align: center;
  max-height: 90vh; overflow-y: auto; animation: pop .2s ease;
}
.modal-card-lg { max-width: 640px; text-align: left; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-green); color: #fff;
  font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.modal-card h2 { margin-bottom: .8rem; }
.modal-card > p { color: var(--gray-700); margin-bottom: 1.4rem; }
.modal-x { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--gray-500); }

.protocolo-box {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--gray-100); border-radius: var(--radius-sm); padding: 1.2rem; margin-bottom: 1.4rem; text-align: left;
}
.protocolo-box > div { flex: 1 1 140px; }
.protocolo-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); }
.protocolo-box strong { font-family: var(--font-head); font-size: 1.1rem; color: var(--ink); word-break: break-all; }

.politica-body { max-height: 50vh; overflow-y: auto; margin-bottom: 1.4rem; padding-right: .5rem; }
.politica-body h3 { font-size: 1.02rem; margin: 1.1rem 0 .3rem; color: var(--brand-dark); }
.politica-body p { color: var(--gray-700); font-size: .94rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 920px) {
  .site-nav a:not(.btn) { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .guarantees { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 560px) {
  .steps, .cards, .guarantees, .grid-2, .toggle-group { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .form-inline { flex-direction: column; align-items: stretch; }
}

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