/* ═══════════════════════════════════════════════════════════════
   KATUI — Landing Page + Login Modal
   "Saúde em movimento"
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────────── */
/* tokens.css (importado antes) define: --bg, --primary, --border, --shadow-1..3,
   --radius-card, --radius-input, --gradient-cta, --katui-*, --font-primary */
:root {
  /* Aliases landing-específicos → katui tokens */
  --text-dark:    var(--katui-navy);          /* #205072 */
  --text-gray:    var(--katui-teal-mid);      /* #68B2A0 */
  --text-light:   rgba(32, 80, 114, 0.45);    /* navy transparente */
  --white:        #FFFFFF;
  --support:      var(--katui-green-mid);     /* #56C596 */
  --accent:       var(--katui-mint);          /* #CDE0C9 */
  --complement:   var(--katui-mint-light);    /* #E0ECDE */
  --border-solid: #C8DCC8;             /* mesmo tom de --border pós-unificação (tokens.css); mantido como alias landing-específico */
  --primary-dark: var(--katui-teal-dark);     /* #2C6975 */

  /* Raios landing (modal maior que o app) */
  --radius:    24px;
  --radius-sm: var(--radius-card);            /* 16px */
  --radius-xs: var(--radius-input);           /* 12px */

  /* Sombras via aliases tokens.css */
  --shadow-sm: var(--shadow-1);
  --shadow:    var(--shadow-2);
  --shadow-lg: var(--shadow-3);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--primary); text-decoration: none; }
strong { color: var(--primary); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.landing-header {
  background: rgba(237, 244, 235, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-lockup {
  height: 34px;
  display: block;
}

/* ── Login button no header ─────────────────────────────────────── */
.login-link {
  background: none;
  border: 1px solid var(--border-solid);
  color: var(--muted);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.25s ease;
}

.login-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(93, 112, 95, 0.06);
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 2rem 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 580px;
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 700px;
}

.hero-logo-lockup {
  height: 80px;
  display: block;
  margin: 0 auto 0.4rem;
  animation: fadeInDown 0.8s ease both;
}

/* PR-L4: h1 semântico (era .hero-subtitle <p>). Copy do Lucas 2026-07-14:
   "Saúde mental em movimento". Display token: maior, mais peso. */
.hero-headline {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.875rem;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease 0.2s both;
  letter-spacing: -0.02em;
}

/* PR-L4: h2 semântico (era .hero-description <p>). Copy mantida. */
.hero-subheadline {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 2rem;
  line-height: 1.45;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease 0.4s both;
}

/* PR-L4: micro-CTAs de auto-segmentação (Sou empresa / Sou psicólogo).
   Anchors nativos, smooth scroll, respeita prefers-reduced-motion. */
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}
.hero-cta-row .btn { margin: 0; }

/* ── Shapes fluidas ─────────────────────────────────────────────── */
.hero-shapes { position: absolute; inset: 0; overflow: hidden; z-index: 1; }

.shape {
  position: absolute;
  opacity: 0.14;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  background: var(--primary);
  animation: float 6s ease-in-out infinite;
}
.shape-1 { width: 320px; height: 320px; top: 8%;  right: 8%;  animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; bottom: 12%; left: 4%;  background: var(--support); animation-delay: 2s; }
.shape-3 { width: 260px; height: 260px; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--accent); animation-delay: 4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(18px); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   SEÇÕES
   ═══════════════════════════════════════════════════════════════ */
.section { padding: 100px 2rem; }

.section-container { max-width: 1000px; margin: 0 auto; }

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px; height: 4px;
  background: linear-gradient(90deg, var(--katui-green-mid), var(--katui-teal));
  margin: 0.875rem auto 0;
  border-radius: 2px;
}

.section-text {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 1.5rem;
}
.section-text:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   METODOLOGIA (PR-L5)
   ═══════════════════════════════════════════════════════════════ */
.methodology {
  padding: 100px 2rem;
  background: var(--bg);   /* mint suave — destaque vs branco do hero e das seções seguintes */
  position: relative;
}

.methodology-container {
  max-width: 1100px;
  margin: 0 auto;
}

.methodology-headline {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.methodology-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
  border-top: 3px solid var(--primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.methodology-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.methodology-card-num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.15;
  line-height: 1;
  user-select: none;
}

.methodology-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 16px;
  padding-right: 60px;  /* espaço pro numeral não competir com o título */
  line-height: 1.3;
}

.methodology-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.methodology-card-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.methodology-card-list li:last-child { border-bottom: none; padding-bottom: 0; }
.methodology-card-list li:first-child { padding-top: 0; }

.methodology-card-list-item-title {
  display: block;
  font-weight: 700;
  color: var(--support);
  font-size: 1rem;
  margin-bottom: 4px;
}
.methodology-card-list-item-desc {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.methodology-card-text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.methodology-signature {
  text-align: center;
  font-style: italic;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.4rem;
  margin: 48px 0 0;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .methodology-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .methodology { padding: 60px 1rem; }
  .methodology-headline { font-size: 1.8rem; margin-bottom: 2rem; }
  .methodology-card { padding: 24px; }
  .methodology-card-num { font-size: 2rem; top: 16px; right: 20px; }
  .methodology-signature { font-size: 1.15rem; margin-top: 36px; }
}

.section-companies {
  background: linear-gradient(135deg, rgba(93,112,95,.04), rgba(86,197,150,.06));
  border-radius: 40px 40px 0 0;
  margin-top: 60px;
}

.section-psychologists {
  background: linear-gradient(135deg, rgba(205,224,201,.08), rgba(93,112,95,.04));
  border-radius: 40px 40px 0 0;
}

/* ═══════════════════════════════════════════════════════════════
   BOTÕES
   ═══════════════════════════════════════════════════════════════ */
.cta-container { display: flex; justify-content: center; margin-top: 2.5rem; }

.btn {
  padding: 0.95rem 2.5rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-primary);
  display: inline-block;
  text-align: center;
  min-width: 200px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(93,112,95,.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(93,112,95,.4);
  transform: translateY(-2px);
}
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(205,224,201,.3);
}
.btn-secondary:hover {
  background: var(--katui-mint);
  box-shadow: 0 6px 20px rgba(205,224,201,.4);
  transform: translateY(-2px);
}

/* PR-L4: ghost button — outline para os micro-CTAs do hero.
   Visual distinto do btn-primary/secondary: fundo transparente, borda colorida. */
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(93,112,95,.3);
  transform: translateY(-2px);
}

.btn-full { width: 100%; min-width: auto; }

/* ── Link-button ─────────────────────────────────────────────── */
.link-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.link-btn:hover { color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   MODAL BASE
   ═══════════════════════════════════════════════════════════════ */
.modal {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal.active { display: flex; }

.modal-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.45);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 90%;
  padding: 2.25rem;
  animation: slideUp 0.35s ease both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h4 { color: var(--primary); font-size: 1.15rem; margin: 0; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  margin-left: 1rem;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text-dark); }

/* ── Formulário de contato ──────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.form-group input, .form-group textarea {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-xs);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  background: rgba(205,224,201,.06);
  color: var(--text-dark);
  transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(93,112,95,.1);
}
.form-group input::placeholder { color: var(--text-light); }

.form-disclaimer { text-align: center; font-size: 0.88rem; color: var(--text-light); margin: 0.875rem 0 0; }

/* ── LGPD consent (PR-L3, decisão #5) ─────────────────────────── */
.lgpd-consent-group { gap: 0.5rem; }
.lgpd-consent-label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}
.lgpd-consent-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}
.lgpd-consent-label a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lgpd-consent-label a:hover { color: var(--primary-dark, var(--primary)); }

/* ═══════════════════════════════════════════════════════════════
   MODAL DE LOGIN
   ═══════════════════════════════════════════════════════════════ */
.login-modal-content {
  max-width: 820px;
  padding: 0;
  overflow: hidden;
}

.login-modal-content #login-view,
.login-modal-content #forgot-view {
  padding: 2.25rem;
}

/* ── Header do login ─────────────────────────────────────────── */
.login-modal-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.logo-sm {
  height: 26px;
  display: block;
}

.login-modal-title p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* ── Body do login: 1 coluna (test-users removidos em PR-L2; vivem em /dev-login.html) ── */
.login-modal-body {
  display: block;
}

/* ── Coluna formulário ───────────────────────────────────────── */
.login-form-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-err-box {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  color: #dc2626;
  border-radius: var(--radius-xs);
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.login-ok-box {
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.2);
  color: #059669;
  border-radius: var(--radius-xs);
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.login-footer-links {
  text-align: center;
  margin-top: 0.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Divisor vertical sutil entre links do rodapé.
   Só aparece a partir do 2º filho — a view "Esqueci minha senha"
   tem 1 botão só e fica sem divisor. */
.login-footer-links > *:not(:first-child) {
  position: relative;
  padding-left: 0.75rem;
}

.login-footer-links > *:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1em;
  background: var(--border);
  border-radius: 1px;
}

/* ── Coluna usuários de teste ────────────────────────────────── */
.test-users-col {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.test-users-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.test-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.test-user-row {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.test-user-row:hover {
  background: rgba(93,112,95,.08);
  border-color: var(--border-solid);
}

.test-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.test-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

.test-user-email {
  font-size: 0.8rem;
  color: var(--text-light);
  display: block;
}

/* ── Role badges ─────────────────────────────────────────────── */
.role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.role-admin    { background: rgba(139,92,246,.12); color: #7c3aed; }
.role-company  { background: rgba(59,130,246,.12);  color: #2563eb; }
.role-employee { background: rgba(16,185,129,.12);  color: #059669; }
.role-psi      { background: rgba(245,158,11,.12);  color: #d97706; }

.test-users-group {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.5rem 0.1rem;
  margin-top: 0.4rem;
  border-bottom: 1px solid var(--border-solid);
}
.test-users-group:first-child { margin-top: 0; }

.test-users-footer {
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-solid);
  margin-top: auto;
}
.test-users-footer strong { color: var(--muted); }

/* ── Esqueci minha senha ────────────────────────────────────── */
.forgot-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
}

.forgot-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.landing-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}
.landing-footer p { color: var(--text-light); font-size: 0.9rem; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════════════════════════ */
#toasts {
  position: fixed;
  top: 1.5rem; right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideInRight 0.35s ease both;
  pointer-events: auto;
  max-width: 380px;
}
.toast-success { background: #10b981; color: white; }
.toast-error   { background: #ef4444; color: white; }
.toast-warning { background: #f59e0b; color: white; }
.toast-info    { background: #3b82f6; color: white; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero { padding: 80px 1.5rem 60px; min-height: 460px; }
  .hero-logo-lockup { height: 52px; }
  .hero-headline { font-size: 2.1rem; }
  .hero-subheadline { font-size: 1.1rem; }

  .section { padding: 60px 1.5rem; }
  .section-text { font-size: 1rem; }

  .header-container { padding: 1rem 1.5rem; }

  /* Modal de login: stack em mobile (já é 1 coluna no desktop desde PR-L2) */
  .login-modal-content { max-width: 95vw; }
  .test-users-col {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 1.5rem;
  }

  #toasts { top: 1rem; right: 1rem; left: 1rem; }
  .toast { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-logo-lockup { height: 40px; }
  .hero-headline { font-size: 1.7rem; }
  .section { padding: 48px 1rem; }
  .btn { padding: 0.8rem 1.5rem; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-cta-row .btn { width: 100%; min-width: auto; }
}

/* ── PR-L7: prefers-reduced-motion guard (audit P2) ──────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Floating blob shapes: kill the float animation, keep them static */
  .shape {
    animation: none !important;
  }
}

/* ── PR-L7: a11y — focus-visible for keyboard nav (WCAG 2.1 AA) ── */
.btn:focus-visible,
.cta-btn:focus-visible,
.link-btn:focus-visible,
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--border-focus, var(--primary));
  outline-offset: 2px;
  border-radius: 4px;
}
/* Remove default focus outline when not keyboard (mouse click) */
.btn:focus:not(:focus-visible),
.link-btn:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── PR-L4: scroll-padding for anchor jumps (so header doesn't cover section title) ── */
html { scroll-padding-top: 80px; scroll-behavior: smooth; }
