/* ============================================================
   IALTH Checkout — CSS (tokens do DESIGN_SYSTEM.md §4, sem exceções)
   ============================================================ */
:root{
  --ialth-primary:#FF4200; --ialth-secondary:#FFA200; --ialth-deep:#8C1700;
  --ialth-sand:#F2C988; --ialth-navy:#000068;
  --ialth-bg:#060609; --ialth-bg-2:#0B0B12; --ialth-surface:#12121B;
  --ialth-line:rgba(255,255,255,.08);
  --ialth-text:#F4F5F7; --ialth-muted:#A2A7B3;
  --ialth-grad:linear-gradient(92deg,var(--ialth-primary),var(--ialth-secondary));
  --ialth-green:#00CC00;
  --glow:0 8px 30px rgba(255,66,0,.35);
  --ring:0 0 0 2px rgba(255,162,0,.5);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--ialth-bg);color:var(--ialth-text);
  font-family:'IBM Plex Sans',system-ui,sans-serif;font-size:.95rem;line-height:1.65;
  min-height:100vh;display:flex;flex-direction:column;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:var(--ialth-sand)}

/* ---------- Header / Footer ---------- */
.ch-header{border-bottom:1px solid var(--ialth-line);background:rgba(6,6,9,.85);backdrop-filter:blur(10px)}
.ch-brand{display:flex;flex-direction:column;gap:2px;padding:.9rem 4%;text-decoration:none;color:inherit;width:min(1280px,92%);margin:0 auto}
.ch-logo{font-weight:700;font-size:1.15rem;letter-spacing:.14em;text-transform:uppercase}
.ch-decoder{font-size:.62rem;color:var(--ialth-muted);letter-spacing:.05em}
.ch-footer{border-top:1px solid var(--ialth-line);margin-top:auto;padding:1.1rem 4%;text-align:center}
.ch-foot-tag{font-size:.72rem;color:var(--ialth-sand);letter-spacing:.08em}
.ch-foot-legal{font-size:.68rem;color:var(--ialth-muted);margin-top:2px}

/* ---------- Layout ---------- */
.ch-main{width:min(720px,92%);margin:1.6rem auto 3rem;flex:1}
.ch-main.wide{width:min(1080px,94%)}
.ch-grid{display:grid;gap:1rem}
@media(min-width:960px){
  .ch-grid.duas-colunas{grid-template-columns:1fr 1fr;align-items:start;gap:1.5rem}
}

/* ---------- Cards ---------- */
.ch-card{background:var(--ialth-surface);border:1px solid var(--ialth-line);border-radius:16px;padding:1.4rem}
.ch-box{background:var(--ialth-bg-2);border:1px solid var(--ialth-line);border-radius:10px;padding:1rem 1.1rem}

/* ---------- Oferta ---------- */
.ch-badge{display:inline-block;background:var(--ialth-grad);color:#1A0D00;font-size:.68rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.14em;padding:.28rem .7rem;border-radius:100px;margin-bottom:.7rem}
.ch-title{font-size:clamp(1.4rem,2.4vw,1.9rem);font-weight:700;letter-spacing:-.01em;line-height:1.2}
.ch-headline{color:var(--ialth-sand);font-weight:600;margin-top:.35rem}
.ch-sub{color:var(--ialth-muted);margin-top:.3rem;font-size:.9rem}
.ch-cover{border-radius:10px;width:100%;aspect-ratio:16/9;object-fit:cover;border:1px solid var(--ialth-line);margin:.9rem 0}
.ch-meta{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.8rem}
.ch-chip{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;
  border:1px solid var(--ialth-line);border-radius:4px;padding:.25rem .6rem;color:var(--ialth-muted)}
.ch-price-block{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--ialth-line)}
.ch-compare{color:var(--ialth-muted);text-decoration:line-through;font-size:.9rem}
.ch-price{font-size:clamp(2rem,4vw,2.6rem);font-weight:700;line-height:1.1;color:var(--ialth-text)}
.ch-installments{color:var(--ialth-muted);font-size:.85rem;margin-top:2px}
.ch-guarantee{display:flex;align-items:center;gap:.55rem;margin-top:1rem;font-size:.85rem;color:var(--ialth-sand)}
.ch-guarantee svg{flex:none}

/* ---------- Passos ---------- */
.ch-steps{display:flex;gap:.6rem;align-items:center;font-size:.72rem;text-transform:uppercase;
  letter-spacing:.12em;color:var(--ialth-muted);margin-bottom:1rem}
.ch-steps b{color:var(--ialth-text)}
.ch-step-dot{width:22px;height:2px;background:var(--ialth-line);border-radius:2px}
.ch-step-dot.on{background:var(--ialth-primary)}

/* ---------- Form ---------- */
.ch-field{margin-bottom:.9rem}
.ch-field label{display:block;font-size:.72rem;font-weight:600;text-transform:uppercase;
  letter-spacing:.14em;color:var(--ialth-muted);margin-bottom:.35rem}
.ch-field input{width:100%;background:var(--ialth-bg-2);border:1px solid var(--ialth-line);
  border-radius:6px;color:var(--ialth-text);font:inherit;padding:.72rem .85rem;transition:border-color .2s, box-shadow .2s}
.ch-field input:focus{outline:none;box-shadow:var(--ring);border-color:var(--ialth-secondary)}
.ch-field input::placeholder{color:rgba(162,167,179,.55)}
.ch-field .ch-err{display:none;color:#FF8A66;font-size:.76rem;margin-top:.25rem}
.ch-field.invalid .ch-err{display:block}
.ch-field.invalid input{border-color:var(--ialth-primary)}

/* ---------- Botões ---------- */
.btn{display:inline-block;border:0;border-radius:6px;cursor:pointer;font:inherit;font-weight:700;
  padding:.85rem 1.6rem;transition:transform .2s, box-shadow .25s;text-decoration:none;text-align:center}
.btn-primary{background:var(--ialth-grad);color:#1A0D00;box-shadow:var(--glow)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 12px 36px rgba(255,66,0,.45), var(--ring)}
.btn-primary:disabled{opacity:.55;cursor:not-allowed;transform:none}
.btn-block{display:block;width:100%}
.btn-xl{font-size:1.05rem;padding:1rem 1.8rem}

/* ---------- Total + Brick ---------- */
.ch-total{display:flex;justify-content:space-between;align-items:center;gap:1rem;
  background:var(--ialth-bg-2);border:1px solid var(--ialth-line);border-radius:10px;
  padding:.85rem 1.1rem;margin-bottom:1rem}
.ch-total-label{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.14em;color:var(--ialth-muted)}
.ch-total-value{font-size:1.35rem;font-weight:700}
#paymentBrick_container,#statusScreenBrick_container{min-height:120px}
.brick-loading{display:flex;flex-direction:column;align-items:center;gap:.8rem;padding:2.2rem 0;color:var(--ialth-muted)}

/* ---------- Estados ---------- */
.ch-spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--ialth-line);
  border-top-color:var(--ialth-primary);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.ch-loading{display:flex;flex-direction:column;align-items:center;gap:.8rem;padding:3rem 0;color:var(--ialth-muted)}
.ch-box-error{border-color:rgba(255,66,0,.4);background:rgba(140,23,0,.15)}
.ch-box-error b{color:#FF8A66}
.ch-box-info b{color:var(--ialth-sand)}
.ch-box-success{border-color:rgba(0,204,0,.35);background:rgba(0,204,0,.08)}
.ch-box-success b{color:#7dff7d}
.ch-check{width:52px;height:52px;border-radius:50%;background:rgba(0,204,0,.14);
  border:1px solid rgba(0,204,0,.4);display:flex;align-items:center;justify-content:center;margin:0 auto .9rem}
.ch-h2{font-size:clamp(1.4rem,2.4vw,1.9rem);font-weight:700;text-align:center;letter-spacing:-.01em}
.ch-centered{text-align:center}
.ch-muted{color:var(--ialth-muted);font-size:.85rem}
.ch-payid{font-size:.72rem;color:var(--ialth-muted);letter-spacing:.06em}
.ch-retry{margin-top:1rem}

/* ---------- Erro fatal / oferta indisponível ---------- */
.ch-gone{max-width:520px;margin:3rem auto;text-align:center}

/* ---------- Embed (?embed=1) ---------- */
body.embed .ch-header,body.embed .ch-footer{display:none}
body.embed .ch-main{width:min(680px,100%);margin:1rem auto 2rem}
body.embed .ch-card{border-radius:10px}

/* ---------- Acessibilidade ---------- */
:focus-visible{outline:2px solid var(--ialth-secondary);outline-offset:2px}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important}
  html{scroll-behavior:auto}
}
