/* ==========================================================================
   Keyply — página Catraca e controle de acesso (complementa style.css)
   Mobile-first. Breakpoints: 768px · 1024px
   ========================================================================== */

/* hero */
.cat-hero{padding:calc(var(--header-h) + 36px + env(safe-area-inset-top)) 0 56px;overflow:hidden}
.cat-hero-grid{display:grid;gap:36px;align-items:center}
.cat-hero-grid>*{min-width:0}
.cat-hero h1{font-size:clamp(38px,6vw,60px);line-height:1.05}
.cat-hero .lead{max-width:580px}
.cat-hero-note{margin-top:20px;font-size:14px;line-height:1.5;color:var(--ink-light-muted)}
.cat-live{max-width:520px;width:100%}
.cat-live-card{background:#fff;color:var(--ink);border-radius:var(--radius-lg);padding:16px;box-shadow:0 24px 60px rgba(11,15,58,.35);display:grid;gap:10px}
.cat-live-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 4px}
.cat-live-head p{font-size:15px;font-weight:900}
.cat-live-head span{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--ink-muted)}
.cat-live-head i{width:8px;height:8px;border-radius:50%;background:var(--keyply-sky);animation:cat-pulse 2s ease-in-out infinite}
@keyframes cat-pulse{50%{box-shadow:0 0 0 5px rgba(29,151,241,.2)}}
.cat-live-row{display:flex;align-items:center;gap:12px;padding:12px;border-radius:var(--radius-md);background:var(--surface-raised)}
.cat-live-row>div{flex:1;min-width:0}
.cat-live-row p{font-size:15px;font-weight:700;line-height:1.35}
.cat-live-row p+p{font-size:13px;font-weight:400;color:var(--ink-muted)}
.cat-live-row time{flex:none;font-size:13px;font-weight:700;color:var(--primary)}
.cat-avatar{flex:none;width:40px;height:40px;border-radius:50%;background:var(--primary-soft);color:var(--primary);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:14px}
.cat-live-row.is-blocked{background:var(--accent-soft)}
.cat-live-row.is-blocked .cat-avatar{background:#fff;color:var(--accent)}
.cat-live-row.is-blocked time{color:var(--accent)}
.cat-demo-note{margin-top:10px;font-size:12px;color:var(--ink-light-muted);text-align:right}

/* números */
.cat-stats{background:var(--surface-raised);border-bottom:1px solid var(--line)}
.cat-stats-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 16px;padding-top:28px;padding-bottom:28px}
.cat-stats-row>*{min-width:0}
.cat-stat-num{font-size:clamp(22px,2.6vw,30px);font-weight:900;color:var(--primary);line-height:1.15}
.cat-stats-row p+p{margin-top:4px;font-size:14px;line-height:1.45;color:var(--ink-muted)}

/* blocos em duas colunas */
.cat-split{display:grid;gap:36px;align-items:center}
.cat-split>*{min-width:0}
.cat-gap{margin-top:18px}
.cat-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.cat-chips li{font-size:14px;font-weight:700;padding:10px 14px;border-radius:var(--radius-full);background:var(--primary-soft);color:var(--primary)}
.cat-chips li:last-child{background:var(--accent-soft);color:var(--accent)}
.cat-illus{margin:0}
.cat-illus svg{width:100%;height:auto}
.cat-scan{animation:cat-scan 2.6s ease-in-out infinite;transform-box:fill-box}
@keyframes cat-scan{50%{transform:translateY(76px)}}
.cat-glow{animation:cat-glow 2.6s ease-in-out infinite}
@keyframes cat-glow{0%,100%{opacity:.45}50%{opacity:1}}

/* como funciona */
.cat-steps{display:grid;gap:12px}
.cat-steps li{background:var(--surface-raised);border-radius:var(--radius-lg);padding:22px;border-top:4px solid var(--primary)}
.cat-steps li:nth-child(2){border-top-color:var(--keyply-sky)}
.cat-steps li:nth-child(3){border-top-color:var(--accent)}
.cat-steps li:nth-child(4){border-top-color:var(--keyply-sky)}
.cat-step-num{display:block;font-size:13px;font-weight:900;letter-spacing:.08em;color:var(--keyply-sky)}
.cat-steps h3{margin-top:8px;font-size:20px}
.cat-steps p{margin-top:8px;font-size:15px;line-height:1.55;color:var(--ink-muted)}

/* comparação */
.cat-compare{display:grid;gap:32px}
.cat-compare>*{min-width:0}
.cat-table{border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-card)}
.cat-table table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.45}
.cat-table thead{display:none}
.cat-table tr{display:block;padding:16px;border-bottom:1px solid var(--line)}
.cat-table tr:last-child{border-bottom:0}
.cat-table tbody th{display:block;text-align:left;font-size:16px;font-weight:900;margin-bottom:8px}
.cat-table td{display:block;padding:6px 0 6px 28px;position:relative;color:var(--ink-muted)}
.cat-table td::before{content:attr(data-label);display:block;font-size:11px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-muted);margin-bottom:2px}
.cat-table td::after{content:"";position:absolute;left:0;top:8px;width:18px;height:18px;border-radius:50%;background:#eceef8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c73b3' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center/10px no-repeat}
.cat-table td:last-child{color:var(--ink);font-weight:700}
.cat-table td:last-child::before{color:var(--primary)}
.cat-table td:last-child::after{background:var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat}

/* recursos */
.cat-features{display:grid;gap:12px}
.cat-features article{background:#fff;border-radius:var(--radius-lg);padding:22px;border:1px solid var(--line)}
.cat-features h3{margin-top:14px;font-size:19px}
.cat-features p{margin-top:6px;font-size:15px;line-height:1.55;color:var(--ink-muted)}
.cat-feature-ai .module-icon{background:var(--accent)}

/* família */
.cat-phone-wrap{display:flex;justify-content:center;background:var(--primary);border-radius:var(--radius-xl);padding:28px 16px 0;overflow:hidden}
.cat-phone{width:100%;max-width:300px;background:var(--ink);border-radius:38px 38px 0 0;padding:10px 10px 0}
.cat-phone-screen{background:#fff;border-radius:30px 30px 0 0;padding:20px 14px 18px;display:grid;gap:10px}
.cat-phone-top{display:flex;align-items:center;justify-content:space-between;padding:0 4px 6px}
.cat-phone-top img{height:26px;width:auto}
.cat-phone-top span{font-size:12px;font-weight:700;color:var(--ink-muted)}
.cat-notif{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:14px;background:var(--primary-soft)}
.cat-notif>div{min-width:0}
.cat-notif p{font-size:14px;font-weight:700;line-height:1.3;color:var(--ink)}
.cat-notif p+p{margin-top:2px;font-size:12px;font-weight:400;color:var(--ink-muted)}
.cat-notif-icon{flex:none;width:32px;height:32px;border-radius:10px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center}
.cat-notif.is-violet{background:var(--accent-soft)}
.cat-notif.is-violet .cat-notif-icon{background:var(--accent)}
.cat-phone-note{font-size:11px;color:var(--ink-muted);text-align:center;padding-top:2px}

/* privacidade */
.cat-privacy{background:var(--primary-soft)}
.cat-privacy-grid{display:grid;gap:28px}
.cat-privacy-grid>*{min-width:0}
.cat-privacy-cards{display:grid;gap:12px}
.cat-privacy-cards div{background:#fff;border-radius:var(--radius-lg);padding:20px;border-left:4px solid var(--primary)}
.cat-privacy-cards h3{font-size:18px}
.cat-privacy-cards p{margin-top:6px;font-size:15px;line-height:1.55;color:var(--ink-muted)}

/* implantação */
.cat-impl{display:grid;gap:12px}
.cat-impl>div{background:var(--surface-raised);border-radius:var(--radius-lg);padding:24px}
.cat-impl-label{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
.cat-impl h3{margin-top:8px;font-size:21px}
.cat-impl p+h3+p,.cat-impl h3+p{margin-top:8px;font-size:15px;line-height:1.55;color:var(--ink-muted)}
.cat-impl .cat-impl-dark{background:var(--primary);color:#fff}
.cat-impl .cat-impl-dark .cat-impl-label{color:#9fd3fb}
.cat-impl .cat-impl-dark h3+p{color:var(--primary-soft)}

/* contato */
.cat-contact h2{margin-top:2px}
.cat-next{display:grid;gap:14px;margin-top:26px}
.cat-next li{display:flex;gap:14px;align-items:flex-start}
.cat-next span{flex:none;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;font-weight:900}
.cat-next p{font-size:16px;line-height:1.5;padding-top:4px;color:var(--ink-light)}
.cat-next strong{color:#fff}
.cat-seg-2{grid-template-columns:repeat(2,minmax(0,1fr))}

@media (prefers-reduced-motion:reduce){.cat-scan,.cat-glow,.cat-live-head i{animation:none}}

/* ===================== TABLET ≥ 768px ===================== */
@media (min-width:768px){
  .cat-hero{padding-bottom:88px}
  .cat-stats-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
  .cat-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .cat-steps li{padding:28px}
  .cat-features{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .cat-features article{padding:28px}
  .cat-privacy-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .cat-impl{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .cat-impl>div{padding:28px}
  .cat-table thead{display:table-header-group}
  .cat-table tr{display:table-row;padding:0}
  .cat-table th,.cat-table td{display:table-cell;padding:16px 20px;border-bottom:1px solid var(--line);vertical-align:top;text-align:left}
  .cat-table tbody tr:last-child>*{border-bottom:0}
  .cat-table thead th{background:var(--surface-raised);font-size:13px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-muted)}
  .cat-table thead th:last-child{background:var(--primary);color:#fff}
  .cat-table table{table-layout:fixed}
  .cat-table thead th:first-child{width:28%}
  .cat-table tbody th{display:table-cell;font-size:15px;margin:0}
  .cat-table td{padding-left:48px}
  .cat-table td::before{display:none}
  .cat-table td::after{left:20px;top:18px}
  .cat-table td:last-child{background:#f7f8fd}
  .cat-phone-wrap{background:none;padding:0;overflow:visible}
  .cat-phone{border-radius:44px;padding:12px;box-shadow:0 30px 60px rgba(16,21,79,.25)}
  .cat-phone-screen{border-radius:34px;padding:24px 16px 20px}
}

/* ===================== DESKTOP ≥ 1024px ===================== */
@media (min-width:1024px){
  .cat-hero{padding:calc(var(--header-h) + 72px) 0 112px}
  .cat-hero-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:56px}
  .cat-live{justify-self:end}
  .cat-live-card{padding:20px}
  .cat-split{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:64px}
  #familia .cat-split{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .cat-steps{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cat-compare{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:56px;align-items:center}
  .cat-features{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
  .cat-privacy-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:56px;align-items:center}
  .cat-contact{align-items:start}
}
