/* ==========================================================================
   HÁBILIS CONSULTORIA AMBIENTAL — ESPELEOLOGIA
   ========================================================================== */

/* ============================================================
   DESIGN SYSTEM
   ============================================================ */
:root {
  --cave-black:   #000000;
  --cave-deep:    #0A0A0A;
  --cave-surface: #141414;
  --cave-card:    #1A1A1A;

  --gold-primary: #B4DB2F;
  --gold-warm:    #EDFF9C;
  --gold-glow:    rgba(180,219,47,0.12);
  --gold-border:  rgba(180,219,47,0.25);

  --green-accent:  #9ACC1A;
  --green-light:   #B4DB2F;
  --green-glow:    rgba(180,219,47,0.10);
  --green-border:  rgba(180,219,47,0.25);

  --text-primary:   #FFFFFF;
  --text-secondary: #CCCCCC;
  --text-muted:     #888888;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --fs-h2:    clamp(1.9rem, 4vw, 3.2rem);
  --lh-tight: 1.08;
  --lh-base:  1.65;

  --sec-pad:    110px 0;
  --max-w:      1200px;
  --gap:        28px;
  --radius:     14px;
  --radius-btn: 8px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cave-black);
  color: var(--text-primary);
  line-height: var(--lh-base);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--gold-primary); color: var(--cave-black);
  padding: 8px 16px; border-radius: 4px; z-index: 9999;
  font-weight: 700; transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 34px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  border: none;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--gold-primary);
  outline-offset: 3px;
}
.btn-primary {
  background: linear-gradient(135deg, #B4DB2F, #EDFF9C);
  color: #000000;
  box-shadow: 0 0 28px rgba(180,219,47,0.4), 0 4px 18px rgba(0,0,0,0.5);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 40px rgba(180,219,47,0.55), 0 8px 24px rgba(0,0,0,0.5);
}
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 18px 42px; font-size: 1.1rem; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding: 80px 0;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 3;
}

/* Grain overlay */
#hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* LADO ESQUERDO */
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 32px 80px 0;
  position: relative;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
.hero-eyebrow-line {
  width: 32px; height: 1px;
  background: var(--gold-primary);
  flex-shrink: 0;
}
.hero-eyebrow-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.75s cubic-bezier(0.22,1,0.36,1) 0.25s both;
}
.hero-h1 .accent  { color: var(--gold-primary); }
.hero-h1 .line-thin { font-weight: 300; color: rgba(255,255,255,0.55); }

.hero-sub {
  font-size: 0.975rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 400px;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.4s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.55s both;
}

/* LADO DIREITO */
.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Glow radial atrás da imagem */
.hero-right::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,219,47,0.08) 0%, transparent 65%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.hero-img {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-img img {
  width: 100%;
  height: 100%;
  max-height: 82vh;
  object-fit: cover;
  object-position: center top;
  display: block;
  mix-blend-mode: screen;
  filter: contrast(1.08) saturate(1.08);
  opacity: 0;
  animation:
    imgFlash 1.1s ease-out 0.2s both,
    imgFloat 6s ease-in-out 1.6s infinite;
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%,   black 22%),
    linear-gradient(to left,   transparent 0%,   black 16%),
    linear-gradient(to bottom, transparent 0%,   black 14%),
    linear-gradient(to top,    transparent 0%,   black 30%),
    radial-gradient(ellipse 62% 50% at 2% 98%,   transparent 0%, black 62%);
  -webkit-mask-composite: source-in, source-in, source-in, source-in;
  mask-image:
    linear-gradient(to right,  transparent 0%,   black 22%),
    linear-gradient(to left,   transparent 0%,   black 16%),
    linear-gradient(to bottom, transparent 0%,   black 14%),
    linear-gradient(to top,    transparent 0%,   black 30%),
    radial-gradient(ellipse 62% 50% at 2% 98%,   transparent 0%, black 62%);
  mask-composite: intersect, intersect, intersect, intersect;
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes imgFlash {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  16%  { opacity: 0.15; }
  24%  { opacity: 1; }
  32%  { opacity: 0.2; }
  42%  { opacity: 1; }
  52%  { opacity: 0.3; }
  65%  { opacity: 1; }
  80%  { opacity: 0.7; }
  100% { opacity: 1; }
}
@keyframes imgFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ============================================================
   RESPONSIVO HERO
   ============================================================ */
@media(max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  #hero { min-height: auto; padding: 40px 0 56px; }
  .hero-left {
    padding: 56px 0 32px;
    order: 2;
  }
  .hero-right {
    order: 1;
    height: 60vw;
    max-height: 360px;
  }
  .hero-img { height: 100%; max-width: 100%; }
  .hero-img img { max-height: 360px; }
  .hero-h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
}
@media(max-width: 480px) {
  .hero-left { padding: 40px 0 28px; }
  .hero-actions { flex-direction: column; }
  .hero-right { height: 70vw; max-height: 300px; }
}

/* ============================================================
   SEÇÃO GENÉRICA
   ============================================================ */
.section { padding: var(--sec-pad); }
.section-dark { background: var(--cave-deep); }
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: var(--lh-tight);
  color: var(--text-primary);
  margin-bottom: 20px;
}
.section-title span.gold { color: var(--gold-primary); }
.section-sub {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--cave-card);
  border: 1px solid rgba(180,219,47,0.1);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 32px rgba(180,219,47,0.12);
  border-color: var(--gold-border);
}
.card-icon {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.5rem;
}
.card-icon--gold { background: var(--gold-glow); border: 1px solid var(--gold-border); }
.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.card-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

/* ============================================================
   SEÇÃO PROBLEMA
   ============================================================ */
#problema { background: var(--cave-deep); }

.problema-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 64px;
}
.problema-texto .label-danger {
  color: #E74C3C;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.problema-texto h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.problema-texto p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}
.problema-visual {
  background: var(--cave-card);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: var(--radius);
  padding: 32px;
}
.risk-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.risk-item:last-child { border-bottom: none; }
.risk-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.3);
  font-size: 1rem;
}
.risk-title { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); margin-bottom: 3px; }
.risk-text  { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }

/* ============================================================
   SEÇÃO PRIVADO — TIMELINE
   ============================================================ */
#privado { background: var(--cave-deep); }

.privado-timeline {
  position: relative;
  padding-left: 40px;
}
.privado-timeline::before {
  content: '';
  position: absolute; left: 10px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-primary), var(--green-accent), transparent);
  border-radius: 2px;
}
.timeline-step { position: relative; margin-bottom: 32px; }
.timeline-step::before {
  content: '';
  position: absolute; left: -34px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold-primary);
  border: 2px solid var(--cave-deep);
  box-shadow: 0 0 12px rgba(180,219,47,0.4);
}
.timeline-step h4 { font-weight: 700; font-size: 1.02rem; color: var(--text-primary); margin-bottom: 6px; }
.timeline-step p  { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   MÉTRICAS
   ============================================================ */
#metricas {
  background: var(--cave-deep);
  text-align: center;
  position: relative;
  overflow: hidden;
}
#metricas::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(180,219,47,0.06), transparent 60%);
  pointer-events: none;
}
.metricas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  position: relative; z-index: 1;
}
.metrica-item {
  padding: 32px 20px;
  background: var(--cave-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.metrica-num {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold-primary);
  display: block;
  line-height: 1;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.metrica-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* ============================================================
   FAQ
   ============================================================ */
#faq { background: var(--cave-black); }

.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.07); }
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 0;
  text-align: left;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s;
}
.faq-question:hover { color: var(--gold-warm); }
.faq-question:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 2px; }
.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--gold-primary);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   FORMULÁRIO CONTATO
   ============================================================ */
#contato {
  background: var(--cave-surface);
  position: relative;
  overflow: hidden;
}
#contato::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(180,219,47,0.07), transparent 60%);
  pointer-events: none;
}
.contato-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  position: relative; z-index: 1;
}
.contato-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
}
.contato-info p {
  font-size: 1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px;
}
.contato-bullets { list-style: none; }
.contato-bullets li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.92rem; color: var(--text-secondary);
  padding: 8px 0;
}
.contato-bullets li span.check {
  color: var(--green-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.form-card {
  background: var(--cave-card);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 40px;
}
.form-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--cave-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--cave-card); color: var(--text-primary); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(180,219,47,0.12);
}
.form-group input.field-error,
.form-group input.field-error:focus {
  border-color: #E74C3C;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.15);
}
.form-group input.field-ok,
.form-group input.field-ok:focus {
  border-color: var(--green-accent);
  box-shadow: 0 0 0 3px rgba(154,204,26,0.12);
}
.field-msg {
  font-size: 0.78rem;
  margin-top: 5px;
  min-height: 1em;
  line-height: 1.4;
  display: none;
}
.field-msg.show { display: block; }
.field-msg.error { color: #E74C3C; }
.field-msg.ok    { color: var(--green-accent); }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-privacy {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-muted);
  margin-top: 14px;
}
.form-privacy svg { flex-shrink: 0; color: var(--green-accent); }

/* Widget Funil de Vendas — tema escuro */
#FormFunildeVendas,
#FormFunildeVendas form,
#FormFunildeVendas > div { background: transparent !important; box-shadow: none !important; border: none !important; padding: 0 !important; }
#FormFunildeVendas label,
#FormFunildeVendas legend { color: rgba(255,255,255,0.82) !important; font-family: var(--font-body) !important; font-size: 0.82rem !important; font-weight: 600 !important; letter-spacing: 0.04em !important; text-transform: uppercase !important; margin-bottom: 7px !important; display: block !important; }
#FormFunildeVendas input,
#FormFunildeVendas select,
#FormFunildeVendas textarea { background: var(--cave-surface) !important; color: var(--text-primary) !important; border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 8px !important; padding: 12px 16px !important; font-family: var(--font-body) !important; font-size: 0.95rem !important; width: 100% !important; margin-bottom: 18px !important; }
#FormFunildeVendas input::placeholder,
#FormFunildeVendas textarea::placeholder { color: var(--text-muted) !important; }
#FormFunildeVendas input:focus,
#FormFunildeVendas select:focus,
#FormFunildeVendas textarea:focus { border-color: var(--gold-primary) !important; outline: none !important; box-shadow: 0 0 0 3px rgba(180,219,47,0.12) !important; }
#FormFunildeVendas button[type="submit"],
#FormFunildeVendas input[type="submit"],
#FormFunildeVendas [type="submit"] {
  background: linear-gradient(135deg, #B4DB2F, #EDFF9C) !important;
  color: #000000 !important;
  box-shadow: 0 0 28px rgba(180,219,47,0.4), 0 4px 18px rgba(0,0,0,0.5) !important;
  border-radius: var(--radius-btn) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 15px 34px !important;
  cursor: pointer !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
  border: none !important;
  width: 100% !important;
  line-height: 1 !important;
  margin-top: 8px !important;
}
#FormFunildeVendas button[type="submit"]:hover,
#FormFunildeVendas input[type="submit"]:hover,
#FormFunildeVendas [type="submit"]:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 0 40px rgba(180,219,47,0.55), 0 8px 24px rgba(0,0,0,0.5) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--cave-deep);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0 28px;
}

/* ============================================================
   ANIMAÇÕES
   ============================================================ */
.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media(max-width: 768px) {
  :root { --sec-pad: 70px 0; }
  .grid-3, .grid-2, .problema-intro, .contato-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .metricas-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .form-card { padding: 28px 20px; }
  .contato-wrap { gap: 40px; }
}
