/* ==========================================================================
   ZELO SAÚDE — base.css
   Typography, buttons, drawer, form (quote card), reveal utility
   ========================================================================== */

/* ---------- Global typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 600;
}
h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
}
p {
  color: var(--ink-soft);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.96rem;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px -12px
    color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px
    color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-block {
  width: 100%;
}
.btn-lg {
  padding: 16px 30px;
  font-size: 1.02rem;
}

/* ---------- Mobile drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(var(--shadow-color) / 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 150;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 84vw);
  background: var(--surface);
  z-index: 160;
  padding: 26px 26px 32px;
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 50px -20px rgb(var(--shadow-color) / 0.4);
}
.drawer.is-open {
  transform: translateX(0);
}
.drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.drawer-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.drawer-close svg {
  width: 18px;
  height: 18px;
}
.drawer nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer nav a {
  display: block;
  padding: 13px 4px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.drawer-cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 900px) {
  .drawer,
  .drawer-backdrop {
    display: none;
  }
}

/* ---------- Quote card (hero form) ---------- */
.quote-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -30px rgb(var(--shadow-color) / 0.45);
  overflow: hidden;
}
.quote-card-stripe {
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--seaglass),
    var(--accent)
  );
}
.quote-card-body {
  padding: 30px 28px 26px;
}
.quote-card-head {
  margin-bottom: 20px;
}
.quote-card-head .kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.quote-card-head h3 {
  margin-top: 6px;
}
.quote-card-head p {
  margin-top: 6px;
  font-size: 0.92rem;
}

.quote-card-perforation {
  position: relative;
  height: 1px;
  margin: 4px 0 22px;
  border-top: 1.5px dashed var(--border-strong);
}
.quote-card-perforation::before,
.quote-card-perforation::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
}
.quote-card-perforation::before {
  left: -28px;
}
.quote-card-perforation::after {
  right: -28px;
}

.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 0.95rem;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.form-field input::placeholder {
  color: var(--ink-faint);
}
.form-field input:focus,
.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}
.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 18px;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.form-consent input {
  margin-top: 3px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.form-consent a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.quote-card-foot svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.form-success {
  display: none;
  text-align: center;
  padding: 24px 4px;
}
.form-success.is-visible {
  display: block;
}
.form-success svg {
  width: 46px;
  height: 46px;
  color: var(--success);
  margin: 0 auto 14px;
}
.form-success h3 {
  margin-bottom: 8px;
}
.quote-form.is-hidden {
  display: none;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  transition-delay: calc(var(--stagger-i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Cookie Popup (Bottom Centered) */
.cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  width: 90%;
  background: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 1050;
  animation: slideUp var(--transition-time) var(--animation-timing);
}

.cookie-content {
  color: var(--text-color);
}

.cookie-content a.text-muted {
  color: var(--primary-color) !important;
}

.cookie-title {
  font-weight: 600;
  color: var(--primary-color);
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  .btn.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
  }

  .btn.btn-outline-primary {
    color: var(--primary-color);
    background: var(--bg-primary);
    &:hover {
      color: var(--primary-color);
      background: var(--bg-secondary);
    }
  }
}

/* Customization Modal */
.modal-content {
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  background: var(--bg-primary);
}

.modal-header {
  background: var(--gradient-green);
  color: var(--text-white);
  border-bottom: none;
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.modal-title {
  font-weight: 600;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.modal-body p {
  color: var(--text-color);
}

.modal-body p.text-muted {
  color: var(--text-color) !important;
}

.modal-body a.text-muted {
  color: var(--text-color) !important;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  .btn.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
  }

  .btn.btn-outline-primary {
    color: var(--primary-color);
    background: var(--bg-primary);
    &:hover {
      color: var(--primary-color);
      background: var(--bg-secondary);
    }
  }
}

/* Animation for Popup */
@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .cookie-popup {
    bottom: 10px;
    width: 95%;
  }
  .cookie-buttons {
    flex-direction: column;
  }
}

.form-agreement {
  a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
  }
  a:hover {
    color: var(--primary-dark);
  }
}

.form-agreement-campaign {
  a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
  }
  a:hover {
    color: var(--text-white);
  }
}

a.whatsapp {
  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 90px;
  right: 10px;
  background-color: #45ca5b;
  color: #fff;
  z-index: 99999;
  box-shadow: 0 0 5px 5px rgba(3, 60, 45, 0.1);
  transition: 400ms ease-in-out;
}

a.whatsapp:hover {
  background-color: rgba(3, 60, 45, 1);
  box-shadow: 0 0 5px 9px rgba(3, 60, 45, 0.1);
}

a.whatsapp svg {
  color: #fff;
  font-size: 28px;
  width: 24px;
  height: 24px;
  transition: 400ms ease-in-out;
}

a.whatsapp:hover svg {
  color: #45ca5b;
  filter: inherit;
}

@media (max-width: 768px) {
  a.whatsapp {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}
