:root {
  --cas-blue: oklch(0.546 0.245 262.881);
  --cas-ink: oklch(0.235 0.015 65);
  --cas-muted: #64748b;
  --cas-border: #dbe4ef;
  --cas-surface: #ffffff;
  --cas-overlay: rgb(15 23 42 / 58%);
}

.cas-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cas-modal-root[hidden] {
  display: none;
}

.cas-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--cas-overlay);
  backdrop-filter: blur(2px);
}

.cas-modal {
  position: relative;
  width: min(100%, 31rem);
  max-height: min(92vh, 46rem);
  overflow: auto;
  color: var(--cas-ink);
  background: var(--cas-surface);
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
}

.cas-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0.75rem;
}

.cas-modal-title {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.2;
}

.cas-modal-description {
  margin: 0.55rem 0 0;
  color: var(--cas-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.cas-modal-close {
  display: grid;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  padding: 0;
  color: var(--cas-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.cas-modal-close:hover,
.cas-modal-close:focus-visible {
  color: var(--cas-ink);
  background: #eef4ff;
}

.cas-modal-form {
  display: grid;
  gap: 1rem;
  padding: 0.75rem 1.5rem 1.5rem;
}

.cas-modal-field {
  display: grid;
  gap: 0.4rem;
}

.cas-modal-label {
  color: var(--cas-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.cas-modal-input,
.cas-modal-select {
  width: 100%;
  min-height: 2.85rem;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  color: var(--cas-ink);
  background: #fff;
  border: 1px solid var(--cas-border);
  border-radius: 8px;
  font: inherit;
  outline: 0;
}

.cas-modal-input::placeholder {
  color: #94a3b8;
}

.cas-modal-input:focus,
.cas-modal-select:focus {
  border-color: var(--cas-blue);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 16%);
}

.cas-modal-help {
  margin: 0;
  color: var(--cas-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.cas-modal-error {
  margin: 0;
  color: #b42318;
  font-size: 0.85rem;
  line-height: 1.35;
}

.cas-modal-submit {
  min-height: 3rem;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--cas-blue);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 120ms ease, filter 120ms ease;
}

.cas-modal-submit:hover,
.cas-modal-submit:focus-visible {
  filter: brightness(0.94);
}

.cas-modal-submit:active {
  transform: translateY(1px);
}

@media (max-width: 480px) {
  .cas-modal-root {
    align-items: end;
    padding: 0;
  }

  .cas-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 16px 16px 0 0;
  }

  .cas-modal-header,
  .cas-modal-form {
    padding-right: 1.1rem;
    padding-left: 1.1rem;
  }
}

/* Escala visual compacta do site: mantém a identidade e reduz excesso de respiro. */
html {
  font-size: 15px;
}

.py-16 {
  padding-block: 3.5rem;
}

.py-12 {
  padding-block: 2.5rem;
}

.text-4xl {
  font-size: 2.15rem;
  line-height: 1.15;
}

.text-2xl {
  font-size: 1.4rem;
  line-height: 1.3;
}

.text-xl {
  font-size: 1.15rem;
  line-height: 1.35;
}

.text-lg {
  font-size: 1rem;
  line-height: 1.45;
}

.text-base {
  font-size: 0.95rem;
  line-height: 1.5;
}

.px-8 {
  padding-inline: 1.75rem;
}

.px-6 {
  padding-inline: 1.25rem;
}

.py-3 {
  padding-block: 0.65rem;
}

.py-2 {
  padding-block: 0.45rem;
}

.mb-12 {
  margin-bottom: 2.5rem;
}

.mb-8 {
  margin-bottom: 1.5rem;
}

.mb-6 {
  margin-bottom: 1.25rem;
}

@media (min-width: 48rem) {
  .md\:py-24 {
    padding-block: 4.5rem;
  }

  .md\:text-5xl {
    font-size: 2.75rem;
    line-height: 1.05;
  }
}

/* Halo pulsante sutil no botão principal de agendamento do hero. */
a.inline-block.bg-blue-600.px-8.py-3.text-lg {
  animation: cas-appointment-pulse 2.4s ease-out infinite;
}

@keyframes cas-appointment-pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(37 99 235 / 42%);
  }

  75%,
  100% {
    box-shadow: 0 0 0 12px rgb(37 99 235 / 0%);
  }
}

/* Halo pulsante verde no botão de contato da seção de dúvidas. */
a.inline-block.bg-green-500.px-8.py-3.text-lg {
  animation: cas-whatsapp-pulse 2.4s ease-out infinite;
}

@keyframes cas-whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(34 197 94 / 45%);
  }

  75%,
  100% {
    box-shadow: 0 0 0 12px rgb(34 197 94 / 0%);
  }
}

@media (prefers-reduced-motion: reduce) {
  a.inline-block.bg-blue-600.px-8.py-3.text-lg,
  a.inline-block.bg-green-500.px-8.py-3.text-lg {
    animation: none;
  }
}
