/* ============================================================
   INSTITUTO GRAAL — Termo de Ciência (modal antes da compra)
   ============================================================ */

.termo__overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(10, 20, 16, 0.62);
  backdrop-filter: blur(3px);
}
.termo__overlay.is-open { display: flex; }

.termo__card {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--pergaminho);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  transform: translateY(14px);
  opacity: 0;
  transition: transform var(--t-med), opacity var(--t-med);
}
.termo__overlay.is-open .termo__card {
  transform: translateY(0);
  opacity: 1;
}

.termo__head {
  padding: 1.6rem 1.9rem 1.2rem;
  border-bottom: 1px solid rgba(16, 56, 44, 0.12);
  background: var(--pergaminho-escuro);
}
.termo__eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dourado-escuro);
}
.termo__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  color: var(--verde-floresta);
  margin: 0.25rem 0 0;
}
.termo__servico {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--verde-suave);
  margin-top: 0.2rem;
}

.termo__body {
  padding: 1.5rem 1.9rem;
  overflow-y: auto;
  flex: 1;
}

.termo__texto {
  max-height: 220px;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  margin-bottom: 1.4rem;
  background: var(--branco);
  border: 1px solid rgba(16, 56, 44, 0.14);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--carvao);
}
.termo__texto p { margin: 0 0 0.85rem; }
.termo__texto p:last-child { margin-bottom: 0; }
.termo__texto strong { color: var(--verde-floresta); }

.termo__field {
  margin-bottom: 1rem;
}
.termo__field label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--verde-floresta);
  margin-bottom: 0.35rem;
}
.termo__field input[type="text"],
.termo__field input[type="tel"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--carvao);
  background: var(--branco);
  border: 1.5px solid rgba(16, 56, 44, 0.18);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.termo__field input:focus {
  outline: none;
  border-color: var(--dourado);
  box-shadow: 0 0 0 3px rgba(193, 162, 101, 0.25);
}
.termo__field input.is-invalid {
  border-color: #b3452f;
}
.termo__erro {
  display: none;
  font-size: 0.78rem;
  color: #b3452f;
  margin-top: 0.3rem;
}
.termo__field.is-invalid .termo__erro { display: block; }

.termo__servico-fixo {
  padding: 0.7rem 0.85rem;
  background: var(--salvia);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--verde-floresta);
}

.termo__grupo {
  border-top: 1px dashed rgba(16, 56, 44, 0.2);
  padding-top: 1rem;
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}
.termo__grupo-titulo {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--dourado-escuro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
}

.termo__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
}
.termo__radios label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--carvao);
  cursor: pointer;
}

.termo__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.9rem 1rem;
  background: var(--salvia);
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
}
.termo__checkbox input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--verde-floresta);
  flex-shrink: 0;
}
.termo__checkbox span {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--carvao);
}
.termo__checkbox--opcional {
  background: transparent;
  border: 1px solid rgba(16, 56, 44, 0.14);
}

.termo__foot {
  padding: 1.1rem 1.9rem 1.5rem;
  border-top: 1px solid rgba(16, 56, 44, 0.12);
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.termo__foot .btn { flex: 1; justify-content: center; }

.termo__oculto { display: none !important; }

@media (max-width: 560px) {
  .termo__head, .termo__body, .termo__foot { padding-left: 1.2rem; padding-right: 1.2rem; }
  .termo__foot { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  .termo__card { transition: none; }
}
