/* ============================================================
   Kit de Ensaio de Precipitação — Folha de estilos
   Tema: verde-escuro + verde-claro, fundo branco, cinza-claro
   Sistema de espaçamento 8px, tipografia Inter
   ============================================================ */

/* ---------- Tokens de design ---------- */
:root {
  /* Cores (rampas) */
  --green-900: #14301f;
  --green-800: #1c4530;
  --green-700: #21503a;
  --green-600: #2f7d4f;   /* principal */
  --green-500: #3a925f;
  --green-400: #5cb27a;
  --green-300: #8fd2a6;
  --green-200: #c6e7d2;
  --green-100: #e8f5ee;
  --green-50:  #f3faf6;

  --neutral-900: #1a1d1b;
  --neutral-700: #3c4441;
  --neutral-600: #5b635f;
  --neutral-500: #7a827e;
  --neutral-400: #9aa19d;
  --neutral-300: #c7ccc9;
  --neutral-200: #e4e7e5;
  --neutral-100: #f2f4f3;
  --neutral-50:  #f9faf9;
  --white: #ffffff;

  --accent: #25d366;       /* WhatsApp */
  --accent-dark: #1da851;

  --error: #c0392b;
  --error-bg: #fdecea;
  --warning: #b8860b;
  --warning-bg: #fff8e1;

  /* Tipografia */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: 1.875rem;
  --fs-h1: 2.75rem;
  --lh-body: 1.6;
  --lh-head: 1.2;

  /* Espaçamento (base 8px) */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4rem;
  --sp-7: 6rem;

  /* Layout */
  --container: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20,48,31,.06), 0 1px 3px rgba(20,48,31,.08);
  --shadow: 0 4px 12px rgba(20,48,31,.08), 0 2px 6px rgba(20,48,31,.06);
  --shadow-lg: 0 16px 40px rgba(20,48,31,.12);
  --transition: 180ms cubic-bezier(.4,.0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--neutral-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-600); }
ul { list-style: none; }
code { font-family: 'SFMono-Regular', Consolas, monospace; font-size: .85em; background: var(--neutral-100); padding: .1em .35em; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-2); }
.narrow { max-width: 820px; }
.section { padding: var(--sp-7) 0; }
.section-muted { background: var(--neutral-100); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-5); }
.section-head h2 { margin-bottom: var(--sp-2); }
.section-sub { color: var(--neutral-600); font-size: var(--fs-lg); }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: var(--sp-2);
}

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { color: var(--green-900); line-height: var(--lh-head); font-weight: 700; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); }
p { color: var(--neutral-700); }

/* ---------- Aviso de pré-publicação ---------- */
.setup-banner {
  background: var(--warning-bg);
  color: #6b5300;
  border-bottom: 1px solid #f0d878;
  padding: var(--sp-2);
  text-align: center;
  font-size: var(--fs-sm);
}
.setup-banner code { background: rgba(255,255,255,.6); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: inherit;
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1;
  padding: .85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm { padding: .6rem 1rem; font-size: var(--fs-sm); }
.btn-lg { padding: 1.05rem 1.8rem; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 2px 8px rgba(47,125,79,.25);
}
.btn-primary:hover {
  background: var(--green-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(47,125,79,.3);
}
.btn-outline {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-600);
}
.btn-outline:hover { background: var(--green-100); color: var(--green-800); }
.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--neutral-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 72px;
  padding-top: var(--sp-1);
  padding-bottom: var(--sp-1);
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--green-900); }
.brand-logo { display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: var(--fs-lg); color: var(--green-900); }
.brand-product { font-size: var(--fs-sm); color: var(--neutral-500); }

.main-nav { display: flex; align-items: center; gap: var(--sp-3); }
.main-nav a { color: var(--neutral-700); font-weight: 500; font-size: var(--fs-sm); }
.main-nav a:hover { color: var(--green-700); }
.main-nav .header-cta { color: #fff; }
.main-nav .header-cta:hover { color: #fff; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--green-50) 0%, var(--white) 100%); padding: var(--sp-6) 0 var(--sp-7); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-5); align-items: center; }
.hero-text h1 { margin: var(--sp-2) 0; }
.hero-text .lead { font-size: var(--fs-lg); color: var(--neutral-600); max-width: 540px; margin-bottom: var(--sp-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.hero-benefits { display: flex; flex-direction: column; gap: var(--sp-2); }
.hero-benefits li { display: flex; align-items: center; gap: .6rem; color: var(--neutral-700); font-weight: 500; }
.check {
  width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 50%;
  background: var(--green-100);
  position: relative;
}
.check::after {
  content: '';
  position: absolute; left: 7px; top: 4px;
  width: 6px; height: 11px;
  border: solid var(--green-600);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3/2;
  object-fit: cover;
}
.hero-caption { font-size: var(--fs-sm); color: var(--neutral-500); margin-top: var(--sp-1); text-align: center; }

/* ---------- Duas colunas ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: center; }
.two-col-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3/2; object-fit: cover; }
.two-col-text h2 { margin-bottom: var(--sp-2); }
.two-col-text p { margin-bottom: var(--sp-3); }
.two-col-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---------- Cartões (aplicações) ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: var(--sp-3);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-200); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--green-100); color: var(--green-700);
  margin-bottom: var(--sp-2);
}
.card h3 { margin-bottom: .5rem; font-size: var(--fs-lg); }
.card p { font-size: var(--fs-sm); color: var(--neutral-600); }

/* ---------- Diferenciais ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.feature {
  border-top: 3px solid var(--green-400);
  padding: var(--sp-3) 0;
}
.feature-num { display: block; font-size: var(--fs-lg); font-weight: 700; color: var(--green-400); margin-bottom: .5rem; letter-spacing: .05em; }
.feature h3 { font-size: var(--fs-lg); margin-bottom: .5rem; }
.feature p { font-size: var(--fs-sm); color: var(--neutral-600); }

/* ---------- Tabela de especificações ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--neutral-200); }
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); min-width: 480px; }
.spec-table th, .spec-table td { padding: var(--sp-2) var(--sp-3); text-align: left; border-bottom: 1px solid var(--neutral-200); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.spec-table th { background: var(--green-50); color: var(--green-900); font-weight: 600; width: 40%; }
.spec-table td { color: var(--neutral-600); }
.spec-table td[data-spec] { color: var(--neutral-400); font-style: italic; }
.spec-help { text-align: center; margin-top: var(--sp-3); color: var(--neutral-600); }

/* ---------- Formulário ---------- */
.quote-form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.field { margin-bottom: var(--sp-3); display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: var(--fs-sm); color: var(--neutral-700); margin-bottom: .4rem; }
.req { color: var(--error); }
.opt { color: var(--neutral-400); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: var(--fs-body);
  padding: .8rem 1rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--neutral-900);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(92,178,122,.18);
}
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--error); background: var(--error-bg); }
.error { color: var(--error); font-size: var(--fs-sm); margin-top: .3rem; min-height: 1.1em; display: block; }
.form-note { font-size: var(--fs-sm); color: var(--neutral-500); margin: var(--sp-2) 0 var(--sp-3); background: var(--neutral-50); padding: var(--sp-2); border-radius: var(--radius-sm); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: var(--sp-1); }
.faq-item {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  transition: box-shadow var(--transition);
}
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-900);
  list-style: none;
  padding: .3rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--green-600);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: var(--sp-1); color: var(--neutral-600); }

/* ---------- Contato ---------- */
.contact-block { background: var(--green-50); border-radius: var(--radius); padding: var(--sp-4); }
.contact-list { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-3); }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.ci {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 10px;
  background: var(--green-100); color: var(--green-700);
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-list strong { color: var(--green-900); }
.pending { color: var(--warning); font-size: var(--fs-sm); }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--green-900); color: var(--green-200); padding: var(--sp-5) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-4); padding-bottom: var(--sp-4); }
.footer-brand .brand-name { color: #fff; font-size: var(--fs-lg); }
.footer-brand p { color: var(--green-200); font-size: var(--fs-sm); margin-top: .5rem; max-width: 320px; }
.footer-nav { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a { color: var(--green-200); font-size: var(--fs-sm); }
.footer-nav a:hover { color: #fff; }
.footer-contact a { color: var(--green-200); font-size: var(--fs-sm); }
.footer-contact a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: var(--sp-2) 0; font-size: var(--fs-sm); color: var(--green-300); }

/* ---------- Botão flutuante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.wa-float:hover { transform: scale(1.08); background: var(--accent-dark); color: #fff; box-shadow: 0 8px 26px rgba(37,211,102,.5); }
.wa-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,.4);
  animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: .8; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Responsividade ---------- */
@media (max-width: 960px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: var(--sp-4); }
  .two-col-media { order: -1; }
  .cards-grid, .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  :root { --fs-h1: 2.25rem; --fs-h2: 1.625rem; --sp-7: 4.5rem; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
    background: var(--white);
    padding: var(--sp-3);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform var(--transition);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { width: 100%; padding: .5rem 0; font-size: var(--fs-body); }
  .main-nav .header-cta { width: auto; margin-top: var(--sp-1); }
  .menu-toggle { display: flex; }

  .hero-actions .btn, .two-col-actions .btn { flex: 1 1 100%; }
  .cards-grid, .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .quote-form { padding: var(--sp-3); }
  :root { --fs-h1: 2rem; --sp-7: 3.25rem; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}

/* Acessibilidade: foco visível */
:focus-visible { outline: 3px solid var(--green-400); outline-offset: 2px; }

/* Respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .wa-float::before { display: none; }
}
