/* ═══════════════════════════════════════════════════════════════
   LoveCats — Global Styles & Utilities
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Shell ── */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: pageFade var(--dur-slow) var(--ease-out) both;
}

main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--s-4), 5vw, var(--s-12));
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--c-primary-hover); }

.btn-secondary {
  background: var(--c-surface-raised);
  color: var(--c-text-1);
  border: 1px solid var(--c-border-strong);
}
.btn-secondary:hover {
  background: var(--c-surface-high);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--c-primary);
  border: 1px solid var(--c-primary);
}
.btn-ghost:hover { background: var(--c-primary-dim); }

.btn-lg {
  padding: var(--s-4) var(--s-8);
  font-size: var(--text-md);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}

.badge-vac  { background: var(--c-badge-vac); color: var(--c-badge-vac-text); }
.badge-neu  { background: var(--c-badge-neu); color: var(--c-badge-neu-text); }

/* ── Section Labels ── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--s-3);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-primary);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--c-text-1);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: var(--text-md);
  color: var(--c-text-2);
  line-height: 1.7;
  margin-top: var(--s-4);
  max-width: 56ch;
  margin-inline: auto;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: clamp(var(--s-12), 8vw, var(--s-24)) 0 clamp(var(--s-10), 6vw, var(--s-20));
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, var(--c-primary-dim) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero__eyebrow { margin-bottom: var(--s-4); }

.page-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--c-text-1);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-5);
}

.page-hero__desc {
  font-size: var(--text-lg);
  color: var(--c-text-2);
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: var(--s-8);
}

.page-hero__actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* ── Cards base ── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--c-border-strong);
}

/* ── Scroll-reveal animation system ── */
[data-animate] {
  opacity: 1;
  transform: none;
}

html.has-js [data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

html.has-js [data-animate].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pageFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── Light-mode: hero descriptions bold & high-contrast ──────── */
[data-theme="light"] .section-desc,
[data-theme="light"] .guide-hero__desc,
[data-theme="light"] .sobre-hero__desc,
[data-theme="light"] .api-hero__desc,
[data-theme="light"] .page-hero__desc {
  color: var(--c-text-1);
  font-weight: 600;
}

/* ── Visually hidden (for screen readers) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Termos de Uso Modal (global — available on every page) ─── */
.modal-termos-uso {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px) saturate(1.2);
}

.modal-termos-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  background: var(--c-surface-raised);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: termsSlideIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes termsSlideIn {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.modal-termos-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface-raised);
}
.modal-termos-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-primary);
  margin-bottom: var(--s-1);
}
.modal-termos-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--c-text-1);
  line-height: 1.2;
  margin: 0;
}

.btn-fechar-modal {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface-high);
  color: var(--c-text-3);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast);
  line-height: 1;
}
.btn-fechar-modal:hover {
  background: var(--c-primary-dim);
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.modal-termos-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-6);
}
.modal-termos-body::-webkit-scrollbar { width: 4px; }
.modal-termos-body::-webkit-scrollbar-track { background: transparent; }
.modal-termos-body::-webkit-scrollbar-thumb {
  background: var(--c-border-strong);
  border-radius: var(--r-full);
}

.modal-termos-body .terms-updated {
  font-size: var(--text-xs);
  color: var(--c-text-3);
  margin-bottom: var(--s-5);
}
.modal-termos-body p {
  font-size: var(--text-sm);
  color: var(--c-text-2);
  line-height: 1.7;
  margin-bottom: var(--s-3);
}
.modal-termos-body h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-text-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--s-5) 0 var(--s-2);
}
.modal-termos-body hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: var(--s-4) 0;
}
.modal-termos-body ul {
  padding-left: var(--s-5);
  margin-bottom: var(--s-3);
}
.modal-termos-body li {
  font-size: var(--text-sm);
  color: var(--c-text-2);
  line-height: 1.65;
  margin-bottom: var(--s-1-5);
  list-style: disc;
}
.modal-termos-body strong {
  color: var(--c-text-1);
  font-weight: 600;
}
.terms-closing {
  font-size: var(--text-sm);
  line-height: 1.7;
  padding: var(--s-4) var(--s-5);
  background: var(--c-primary-dim);
  border: 1px solid rgba(224, 117, 53, 0.22);
  border-radius: var(--r-md);
  color: var(--c-text-1);
  margin-top: var(--s-5);
}

.modal-termos-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-raised);
}

@media (max-width: 600px) {
  .modal-termos-uso { padding: 0; align-items: flex-end; }
  .modal-termos-panel {
    max-height: 92vh;
    max-width: 100%;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .modal-termos-header,
  .modal-termos-body,
  .modal-termos-footer { padding-left: var(--s-4); padding-right: var(--s-4); }
  .modal-termos-title { font-size: var(--text-md); }
}

