/* =========================================================
   InfinityPulse — páginas públicas
   Landing, /pricing, termos, privacidade, cookies, contato, 404/405.

   Entrou na S03 no lugar do bundle `ic-core` da sharedcode e dos
   dois arquivos que o ajustavam (`brand.css`, que traduzia a marca
   para os tokens `--p-*` do design system, e `app.css`, que remendava
   o header fixo e a coluna vazia do herói). Os nomes de classe `c-*`
   são os das views copiadas do kit; os valores vêm de `tokens.css`,
   os mesmos `--if-*` do painel: landing e app são a mesma marca.

   Carregar DEPOIS de tokens.css (views/layouts/public.php).
   ========================================================= */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;font-family:var(--if-font);font-size:16px;line-height:1.6;color:var(--if-text);background:var(--if-bg-card);-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto}
main{flex:1 0 auto}
a{color:var(--if-primary);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{margin:0;line-height:1.2;letter-spacing:-.02em;color:var(--if-text)}
p{margin:0}
code{font-family:var(--if-font-mono);font-size:.9em;background:var(--if-bg-soft);padding:.1em .35em;border-radius:6px}
:focus-visible{outline:none;box-shadow:var(--if-focus-ring);border-radius:6px}

.c-container{width:100%;max-width:72rem;margin:0 auto;padding:0 1.25rem}

/* ─── Botões ──────────────────────────────────────────────── */
.c-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.7rem 1.25rem;border-radius:var(--if-radius);border:1px solid transparent;font:inherit;font-weight:700;font-size:.95rem;line-height:1.2;cursor:pointer;text-decoration:none;transition:background var(--if-transition),border-color var(--if-transition),color var(--if-transition)}
.c-button:hover{text-decoration:none}
.c-button--primary{background:var(--if-primary);color:#fff}
.c-button--primary:hover{background:var(--if-primary-hover)}
.c-button--secondary{background:var(--if-bg-card);color:var(--if-text);border-color:var(--if-border)}
.c-button--secondary:hover{border-color:var(--if-border-hover);background:var(--if-bg)}
.c-button--sm{padding:.45rem .85rem;font-size:.85rem}
.c-button--lg{padding:.9rem 1.5rem;font-size:1rem}

/* ─── Cabeçalho ───────────────────────────────────────────── */
/* sticky, não fixed: o header ocupa o próprio espaço e o herói não
   precisa de folga calculada (era o remendo do app.css). */
.c-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.9);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--if-border)}
.c-header__inner{max-width:72rem;margin:0 auto;padding:.75rem 1.25rem;display:flex;align-items:center;gap:1.5rem;min-height:60px}
.c-header__nav{display:flex;gap:1.25rem;margin-left:auto;flex-wrap:wrap}
.c-header__nav a{color:var(--if-text-secondary);font-weight:600;font-size:.92rem}
.c-header__nav a:hover{color:var(--if-primary);text-decoration:none}
/* "Entrar" + main call to action: every width. With the anchors gone (phone)
   margin-left:auto still pushes them to the right. */
.c-header__actions{display:flex;align-items:center;gap:.75rem;margin-left:auto;flex-shrink:0}
.c-header__nav+.c-header__actions{margin-left:0}
.c-header__login{color:var(--if-text);font-weight:700;font-size:.92rem;white-space:nowrap}
.c-header__login:hover{color:var(--if-primary);text-decoration:none}
.c-header__actions .c-button{white-space:nowrap}
.c-logo{display:inline-flex;align-items:center;gap:.6rem;font-weight:800;font-size:1.05rem;letter-spacing:-.02em;color:var(--if-text)}
.c-logo:hover{text-decoration:none}
.c-logo__mark{width:32px;height:32px;flex:none;display:block}

/* ─── Seções ──────────────────────────────────────────────── */
.c-section{padding:4.5rem 0}
.c-section--surface{background:var(--if-bg)}
.c-section__head{max-width:44rem;margin-bottom:2.5rem}
.c-section__head--center{margin-left:auto;margin-right:auto;text-align:center}
.c-section__eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--if-primary);margin-bottom:.75rem}
.c-section__title{font-size:clamp(1.6rem,3vw,2.25rem);font-weight:800}
.c-section__lead{margin-top:1rem;font-size:1.08rem;color:var(--if-text-secondary)}

/* ─── Herói ───────────────────────────────────────────────── */
.c-hero{padding:4.5rem 0 4rem;background:linear-gradient(180deg,var(--if-primary-soft) 0%,var(--if-bg-card) 85%)}
.c-hero__grid{display:grid;grid-template-columns:1.1fr 1fr;gap:3rem;align-items:center}
/* Sem captura do canvas, a coluna da direita não existe: o grid vira uma
   coluna. Volta sozinho quando `public/assets/img/hero-canvas.png` existir
   (HomeController::heroImage). */
.c-hero__grid:not(:has(.c-hero__media)){grid-template-columns:1fr;max-width:48rem}
.c-hero__title{font-size:clamp(2rem,5vw,3.25rem);font-weight:800;letter-spacing:-.03em}
.c-hero__title em{font-style:normal;background:var(--if-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.c-hero__text{margin-top:1.25rem;font-size:1.15rem;color:var(--if-text-secondary);max-width:40rem}
.c-hero__actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:2rem}
.c-hero__note{margin-top:1rem;font-size:.9rem;color:var(--if-text-muted)}
.c-hero__media img{display:block;border-radius:var(--if-radius-lg);box-shadow:var(--if-shadow-lg);border:1px solid var(--if-border)}

/* ─── Recursos e passos ───────────────────────────────────── */
.c-features{display:grid;grid-template-columns:repeat(auto-fit,minmax(18rem,1fr));gap:1.25rem}
.c-feature{background:var(--if-bg-card);border:1px solid var(--if-border);border-radius:var(--if-radius-lg);padding:1.5rem;box-shadow:var(--if-shadow)}
.c-feature__title{font-size:1.08rem;font-weight:800;margin-bottom:.5rem}
.c-feature__text{color:var(--if-text-secondary)}
.c-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:1.25rem;counter-reset:step}
.c-step{position:relative;padding:1.5rem;border-radius:var(--if-radius-lg);border:1px solid var(--if-border);background:var(--if-bg-card)}
.c-step::before{counter-increment:step;content:counter(step);display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;background:var(--if-primary-soft);color:var(--if-primary);font-weight:800;margin-bottom:.9rem}
.c-step__title{font-size:1.05rem;font-weight:800;margin-bottom:.4rem}
.c-step__text{color:var(--if-text-secondary)}

/* ─── Planos ──────────────────────────────────────────────── */
.c-pricing{display:grid;grid-template-columns:repeat(auto-fit,minmax(17rem,1fr));gap:1.25rem;align-items:stretch}
.c-plan{position:relative;display:flex;flex-direction:column;gap:1rem;background:var(--if-bg-card);border:1px solid var(--if-border);border-radius:var(--if-radius-lg);padding:1.75rem;box-shadow:var(--if-shadow)}
.c-plan--featured{border:2px solid var(--if-primary);box-shadow:var(--if-shadow-lg);padding:calc(1.75rem - 1px)}
.c-plan__badge{position:absolute;top:-.8rem;left:1.75rem;background:var(--if-primary);color:#fff;font-size:.75rem;font-weight:800;padding:.2rem .7rem;border-radius:999px}
.c-plan__badge--soon{background:var(--if-text-muted)}
.c-plan__name{font-size:1.15rem;font-weight:800}
.c-plan__price{font-size:2.1rem;font-weight:800;letter-spacing:-.03em;color:var(--if-text)}
.c-plan__period{font-size:.95rem;font-weight:600;color:var(--if-text-muted);letter-spacing:0}
.c-plan__text{color:var(--if-text-secondary)}
.c-plan__features{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.55rem;flex:1}
.c-plan__features li{display:flex;gap:.55rem;align-items:flex-start;font-size:.95rem}
.c-plan__features svg{width:1.1rem;height:1.1rem;flex:none;margin-top:.2rem;color:var(--if-success)}
.c-plan__limits{font-size:.85rem;color:var(--if-text-muted)}
.c-plan__cta .c-button{width:100%}
/* S30: cards side by side share their rows (name, price, text, list, trial
   line, button): same height, lists start on the same line, button at the
   foot. Without subgrid the flex column above still keeps the button down. */
@supports (grid-template-rows:subgrid){
    .c-plan{display:grid;grid-row:span 6;grid-template-rows:subgrid;row-gap:1rem}
    .c-plan__name{grid-row:1}.c-plan__price{grid-row:2}.c-plan__text{grid-row:3}
    .c-plan__features{grid-row:4}.c-plan__limits{grid-row:5;align-self:end}.c-plan__cta{grid-row:6}
}

/* ─── Perguntas ───────────────────────────────────────────── */
.c-faq{max-width:48rem;margin:0 auto;display:flex;flex-direction:column;gap:.75rem}
.c-faq__item{background:var(--if-bg-card);border:1px solid var(--if-border);border-radius:var(--if-radius);padding:0 1.25rem}
.c-faq__question{cursor:pointer;padding:1rem 0;font-weight:700;list-style:none;display:flex;justify-content:space-between;gap:1rem}
.c-faq__question::-webkit-details-marker{display:none}
.c-faq__question::after{content:"+";font-weight:800;color:var(--if-primary)}
.c-faq__item[open] .c-faq__question::after{content:"−"}
.c-faq__answer{padding:0 0 1.1rem;color:var(--if-text-secondary)}

/* ─── Fechamento ──────────────────────────────────────────── */
.c-cta{text-align:center;background:var(--if-bg-sidebar);color:var(--if-text-on-dark);border-radius:var(--if-radius-lg);padding:3.5rem 1.5rem}
.c-cta__title{color:#fff;font-size:clamp(1.5rem,3vw,2rem);font-weight:800}
.c-cta__text{margin:1rem auto 0;max-width:38rem}
.c-cta__actions{display:flex;justify-content:center;flex-wrap:wrap;gap:.75rem;margin-top:2rem}

/* ─── Textos legais ───────────────────────────────────────── */
.c-prose-header{max-width:46rem;margin:0 auto 2rem}
.c-prose-header h1{font-size:clamp(1.8rem,4vw,2.5rem);font-weight:800}
.c-prose-header p{margin-top:.75rem;color:var(--if-text-secondary);font-size:1.05rem}
.c-prose{max-width:46rem;margin:0 auto;color:var(--if-text-secondary)}
.c-prose h2{font-size:1.2rem;font-weight:800;margin:2.25rem 0 .75rem}
.c-prose p,.c-prose ul{margin:0 0 1rem}
.c-prose ul{padding-left:1.25rem}
.c-prose li{margin-bottom:.35rem}
.c-prose strong{color:var(--if-text)}
.c-prose table{width:100%;border-collapse:collapse;margin:0 0 1rem;font-size:.95rem}
.c-prose th,.c-prose td{text-align:left;vertical-align:top;padding:.6rem .75rem;border-bottom:1px solid var(--if-border)}
.c-prose th{color:var(--if-text);background:var(--if-bg)}
/* S27: at 390 the 3-column tables (cookies, privacy) passed the screen by ~17px. */
@media(max-width:480px){.c-prose table{font-size:.8125rem;display:block;overflow-x:auto}.c-prose th,.c-prose td{padding:.5rem .4rem}}
.c-prose__meta{margin-top:2.5rem;font-size:.85rem;color:var(--if-text-muted)}

/* ─── Avisos e estado vazio ───────────────────────────────── */
.c-alert{max-width:46rem;margin:0 auto 2rem;padding:1rem 1.25rem;border-radius:var(--if-radius);border:1px solid}
.c-alert--warning{background:var(--if-warning-soft);border-color:#F5D9A8;color:var(--if-warning)}
.c-empty{max-width:40rem;margin:0 auto;text-align:center;padding:2.5rem 1.5rem;border:1px dashed var(--if-border-hover);border-radius:var(--if-radius-lg)}
.c-empty--error{background:var(--if-danger-soft);border-color:#F5C2C2}
.c-empty__title{font-size:1.2rem;font-weight:800;margin-bottom:.5rem}
.c-empty__text{color:var(--if-text-secondary)}

/* ─── Erro (404/405) ──────────────────────────────────────── */
.c-error-page{max-width:36rem;margin:0 auto;padding:6rem 1.25rem;text-align:center}
.c-error-page__code{font-size:4rem;font-weight:800;line-height:1;letter-spacing:-.04em;background:var(--if-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.c-error-page__title{margin-top:1rem;font-size:1.6rem;font-weight:800}
.c-error-page__text{margin-top:.75rem;color:var(--if-text-secondary)}
.c-error-page__actions{margin-top:2rem}

/* ─── Rodapé ──────────────────────────────────────────────── */
.c-footer{border-top:1px solid var(--if-border);background:var(--if-bg);padding:3rem 0 1.5rem;font-size:.92rem}
.c-footer__grid{max-width:72rem;margin:0 auto;padding:0 1.25rem;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:2rem}
.c-footer__brand p{margin-top:.75rem;color:var(--if-text-muted)}
.c-footer__col{display:flex;flex-direction:column;gap:.5rem}
.c-footer__col h4{font-size:.8rem;text-transform:uppercase;letter-spacing:.08em;color:var(--if-text-muted);margin-bottom:.25rem}
.c-footer__col a{color:var(--if-text-secondary)}
.c-footer__bottom{max-width:72rem;margin:2rem auto 0;padding:1.25rem 1.25rem 0;border-top:1px solid var(--if-border);display:flex;justify-content:space-between;flex-wrap:wrap;gap:.75rem;color:var(--if-text-muted)}
.c-footer__bottom a{color:var(--if-text-muted)}

/* ─── Aviso de cookies ────────────────────────────────────── */
.c-cookiebar{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:60;max-width:44rem;margin:0 auto;display:flex;align-items:center;gap:1rem;flex-wrap:wrap;background:var(--if-bg-card);border:1px solid var(--if-border);border-radius:var(--if-radius-lg);box-shadow:var(--if-shadow-lg);padding:1rem 1.25rem}
.c-cookiebar[hidden]{display:none}
.c-cookiebar__text{flex:1 1 18rem;font-size:.9rem;color:var(--if-text-secondary)}
.c-cookiebar__actions{display:flex;gap:.5rem;flex-wrap:wrap}

/* ─── Telas estreitas ─────────────────────────────────────── */
@media (max-width:860px){
    .c-hero__grid{grid-template-columns:1fr}
    .c-footer__grid{grid-template-columns:1fr 1fr}
    .c-footer__brand{grid-column:1/-1}
}
@media (max-width:640px){
    .c-header__nav{display:none}
    .c-header__nav+.c-header__actions{margin-left:auto}
    .c-header__inner{gap:.75rem;padding:.6rem 1rem}
    .c-section{padding:3rem 0}
    .c-hero{padding:3rem 0}
}

/* Mensal | Anual (S41): o mesmo controle segmentado do painel (`views/billing/_cycle_toggle.php`). */
.c-cycles{display:flex;justify-content:center;margin:-1rem 0 2rem}
.cycle-toggle{display:inline-flex;padding:3px;border:1px solid var(--if-border);border-radius:999px;background:var(--if-bg-card)}
.cycle-toggle__opt{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1.1rem;border-radius:999px;font-size:.9rem;font-weight:700;color:var(--if-text-muted);text-decoration:none}
.cycle-toggle__opt:hover{color:var(--if-text);text-decoration:none}
.cycle-toggle__opt.is-on{background:var(--if-primary);color:#fff}
.cycle-toggle__badge{font-size:.72rem;font-weight:700;padding:.12rem .5rem;border-radius:999px;background:var(--if-primary-soft);color:var(--if-primary)}
.cycle-toggle__opt.is-on .cycle-toggle__badge{background:rgba(255,255,255,.2);color:#fff}
.c-plan__annual{display:block;margin-top:.35rem;font-size:.85rem;font-weight:600;letter-spacing:0;color:var(--if-text-muted);line-height:1.45}

/* ─── Desenvolvedores (/developers, S90) ─────────────────────
   Referência gerada do openapi.json. Duas colunas a partir de 960px
   (índice fixo à esquerda); no celular o índice vira lista no topo
   e todo bloco de código rola dentro de si, nunca a página. */
.c-dev{padding-top:2.5rem}
.c-dev__layout{display:grid;grid-template-columns:minmax(0,1fr);gap:2rem}
.c-dev__main{min-width:0}
.c-dev__nav{display:flex;flex-direction:column;gap:.15rem;font-size:.88rem;border:1px solid var(--if-border);border-radius:var(--if-radius);padding:1rem;background:var(--if-bg)}
.c-dev__nav a{color:var(--if-text-secondary);padding:.2rem 0;line-height:1.35}
.c-dev__nav a:hover{color:var(--if-primary);text-decoration:none}
.c-dev__nav-title{margin:.75rem 0 .25rem;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--if-text-muted)}
.c-dev__nav-title:first-child{margin-top:0}
.c-dev__nav-op{display:flex;gap:.45rem;align-items:baseline}
.c-dev__nav-op .c-dev__method{flex:none;min-width:2.9rem;text-align:center}
/* Phone: only the sections; each endpoint is one tap away under "Referência". */
@media(max-width:959px){.c-dev__nav-group,.c-dev__nav-op{display:none}}
/* Narrow: tables keep a readable width and scroll inside their frame. */
@media(max-width:640px){.c-dev__table table{min-width:38rem}}
@media(min-width:960px){
  .c-dev__layout{grid-template-columns:15rem minmax(0,1fr);gap:3rem}
  .c-dev__nav{position:sticky;top:76px;align-self:start;max-height:calc(100vh - 96px);overflow-y:auto}
}
.c-dev__header{margin:0 0 1.5rem;max-width:none}
.c-dev__prose{margin:0;max-width:48rem}
.c-dev__prose h2{scroll-margin-top:80px}
.c-dev__prose ol{padding-left:1.25rem;margin:0 0 1rem}
.c-dev__prose ol li{margin-bottom:.5rem}
.c-dev__meta{font-size:.88rem;color:var(--if-text-muted)}
.c-dev__hash{word-break:break-all}
.c-dev__code{margin:0 0 1rem;padding:1rem 1.1rem;background:#16142B;color:#E8E6F5;border-radius:var(--if-radius);overflow-x:auto;font-size:.82rem;line-height:1.55;max-width:100%}
.c-dev__code code{background:none;padding:0;color:inherit;font-size:inherit;white-space:pre}
.c-dev__pair{display:grid;grid-template-columns:minmax(0,1fr);gap:0 1rem}
@media(min-width:1200px){.c-dev__pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.c-dev__label{margin:.5rem 0 .35rem;font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--if-text-muted)}
.c-dev__details{margin:0 0 .5rem;border:1px solid var(--if-border);border-radius:var(--if-radius);padding:.55rem .85rem;background:var(--if-bg-card)}
.c-dev__details[open]{padding-bottom:.25rem}
.c-dev__details summary{cursor:pointer;font-size:.9rem;color:var(--if-text-secondary);line-height:1.45}
.c-dev__details[open] summary{margin-bottom:.6rem}
.c-dev__details .c-dev__code{margin-bottom:.6rem}
.c-dev__table{overflow-x:auto;margin:0 0 1rem;border:1px solid var(--if-border);border-radius:var(--if-radius)}
.c-dev__table table{width:100%;border-collapse:collapse;font-size:.88rem}
.c-dev__table th,.c-dev__table td{text-align:left;vertical-align:top;padding:.55rem .7rem;border-bottom:1px solid var(--if-border);color:var(--if-text-secondary)}
.c-dev__table tr:last-child td{border-bottom:0}
.c-dev__table th{color:var(--if-text);background:var(--if-bg);font-weight:700;white-space:nowrap}
.c-dev__table td:first-child{white-space:nowrap}
.c-dev__group{margin:2.5rem 0 .4rem;font-size:1.35rem;font-weight:800;scroll-margin-top:80px}
.c-dev__group-hint{margin:0 0 1.25rem;color:var(--if-text-secondary);max-width:48rem}
.c-dev__op{border-top:1px solid var(--if-border);padding:1.75rem 0 1rem;scroll-margin-top:72px}
.c-dev__op.is-deprecated .c-dev__path{text-decoration:line-through;text-decoration-color:var(--if-text-muted)}
.c-dev__op-head{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.6rem}
.c-dev__path{font-size:.95rem;font-weight:700;color:var(--if-text);background:none;padding:0;word-break:break-all}
.c-dev__op-title{font-size:1.1rem;font-weight:800;margin:0 0 .4rem}
.c-dev__op-desc{color:var(--if-text-secondary);font-size:.95rem;margin:0 0 1rem;max-width:52rem}
.c-dev__method{display:inline-block;font-family:var(--if-font-mono);font-size:.72rem;font-weight:800;padding:.15rem .45rem;border-radius:6px;background:var(--if-bg-soft);color:var(--if-text)}
.c-dev__method--get{background:var(--if-success-soft);color:var(--if-success)}
.c-dev__method--post{background:var(--if-bg-soft);color:var(--if-primary)}
.c-dev__badge{font-size:.75rem;font-weight:700;padding:.15rem .5rem;border-radius:999px;border:1px solid var(--if-border);color:var(--if-text-secondary)}
.c-dev__badge--warn{border-color:var(--if-warning);color:var(--if-warning);background:var(--if-warning-soft)}
.c-dev__req{font-size:.72rem;font-weight:700;color:var(--if-danger)}
.c-dev__status{display:inline-block;min-width:2.6rem;text-align:center;font-family:var(--if-font-mono);font-weight:800;font-size:.8rem;padding:.05rem .35rem;border-radius:6px;margin-right:.35rem}
.c-dev__status--2xx{background:var(--if-success-soft);color:var(--if-success)}
.c-dev__status--4xx{background:var(--if-warning-soft);color:var(--if-warning)}
.c-dev__status--5xx{background:var(--if-danger-soft);color:var(--if-danger)}
