/* ════════════════════════════════════════════════════════════
   Site institucional (calculista.eng.br).
   Cores e fontes vêm de theme.css / fonts.css, copiados do app
   (src/EngCalc.Web/wwwroot) pelo deploy/publicar-site.sh.
   ════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    background: var(--bg-body);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
h1, h2, h3 { color: var(--text-bright); line-height: 1.2; margin: 0; }

/* ── Logo (mesmas classes do app) ── */
.logo { width: 32px; height: 32px; flex-shrink: 0; display: block; }
.logo-bg { fill: var(--accent); }
.logo-mark { stroke: var(--on-accent); }
.logo-dot { fill: var(--on-accent); }

/* ── Botões ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 20px;
    border-radius: 8px; border: 1px solid transparent;
    font: 600 15px/1 var(--font-body);
    text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-primario { background: var(--accent); color: var(--on-accent); }
.btn-primario:hover { background: var(--accent-strong); }
.btn-secundario { background: var(--bg-card); color: var(--text); border-color: var(--border-light); }
.btn-secundario:hover { border-color: var(--accent); color: var(--accent); }
.btn:focus-visible, .btn-tema:focus-visible, .menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-tema {
    min-height: 40px; padding: 0 12px;
    background: transparent; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 8px;
    font: 500 14px/1 var(--font-body); cursor: pointer;
}
.btn-tema:hover { color: var(--text); border-color: var(--border-light); }

/* ── Topo ── */
.topo {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg-body) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.topo-interno {
    max-width: 1120px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; gap: 24px;
}
.marca {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-bright); text-decoration: none;
    font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
}
.menu { display: flex; gap: 22px; margin-left: 12px; }
.menu a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.menu a:hover { color: var(--text-bright); }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ── Abertura: prancheta nanquim (mesma nos dois temas) ── */
.hero-faixa {
    position: relative; overflow: hidden;
    background-color: #0F1623;
    background-image:
        linear-gradient(rgba(240, 138, 75, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 138, 75, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    color: #EDF0F5;
    border-bottom: 1px solid #2B3850;
}
.hero-faixa::after {
    content: ""; position: absolute; inset: auto -10% -40% auto; width: 60%; height: 90%;
    background: radial-gradient(closest-side, rgba(240, 138, 75, 0.22), transparent);
    pointer-events: none;
}
.hero {
    position: relative; z-index: 1;
    max-width: 1120px; margin: 0 auto; padding: 88px 24px 96px;
    display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.selo {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    background: var(--accent-bg); color: var(--accent);
    font: 600 13px/1.6 var(--font-mono); letter-spacing: 0.02em;
}
.selo-hero { background: rgba(240, 138, 75, 0.14); color: #F5A06B; }
.hero h1 {
    color: #FFFFFF;
    font-size: clamp(40px, 6vw, 68px); letter-spacing: -0.035em; line-height: 1.04;
    margin: 20px 0 22px;
}
.hero h1 em { font-style: normal; color: #F08A4B; }
.lead { font-size: 19px; color: #A7B2C4; margin: 0 0 32px; max-width: 32em; }
.lead b { color: #FFFFFF; font-weight: 600; }
.hero-acoes { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-primario, .cta .btn-primario { background: #F08A4B; color: #1A1205; }
.hero .btn-primario:hover, .cta .btn-primario:hover { background: #F5A06B; }
.hero-confianca {
    list-style: none; margin: 32px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px 22px;
    font: 500 13px/1.4 var(--font-mono); color: #8C97AA;
}
.hero-confianca li::before { content: "✓ "; color: #86E0AE; }

.btn-grande { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-fantasma { background: transparent; color: #EDF0F5; border-color: #3A4A66; }
.btn-fantasma:hover { border-color: #F08A4B; color: #F08A4B; }

/* Folha do memorial (ilustração animada) */
.folha {
    position: relative; margin: 0;
    background: #182236; color: #EDF0F5;
    border: 1px solid #3A4A66; border-radius: 14px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 0 0 6px rgba(240, 138, 75, 0.06);
    padding: 24px 26px;
    transform: rotate(1.2deg);
}
.folha-topo {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 12px; border-bottom: 2px solid #F08A4B;
}
.folha-rotulo { font-weight: 700; color: #FFFFFF; }
.folha-mono, .norma { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.folha .folha-mono { color: #8C97AA; }
.folha-etapas { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.folha-etapas li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-radius: 8px; background: #1F2B42; font-size: 15px;
    animation: entra .5s ease-out both;
}
.folha-etapas li:nth-child(1) { animation-delay: .3s; }
.folha-etapas li:nth-child(2) { animation-delay: .7s; }
.folha-etapas li:nth-child(3) { animation-delay: 1.1s; }
.folha-etapas li:nth-child(4) { animation-delay: 1.5s; }
.folha-etapas li:nth-child(5) { animation-delay: 1.9s; }
.tag { font: 600 12px/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; }
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-border); }
.folha .tag-ok { background: #133B26; color: #86E0AE; border-color: #2C6B47; }
.folha-rodape { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.carimbo {
    font: 700 13px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
    color: #F08A4B; border: 2px solid #F08A4B; border-radius: 6px; padding: 7px 10px;
    transform: rotate(-6deg);
    animation: carimba .35s cubic-bezier(.2, 1.6, .4, 1) 2.5s both;
}
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes carimba { from { opacity: 0; transform: rotate(-6deg) scale(2.2); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
@media (prefers-reduced-motion: reduce) {
    .folha-etapas li, .carimbo { animation: none; }
}

/* ── A dor ── */
.dor { text-align: center; }
.dor-lista { list-style: none; margin: 22px auto 26px; padding: 0; display: grid; gap: 10px; }
.dor-lista li { font-size: clamp(19px, 2.4vw, 26px); color: var(--text-muted); font-weight: 500; }
.dor-lista s { text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.dor-virada {
    margin: 0; font-size: clamp(24px, 3.4vw, 36px); font-weight: 700;
    color: var(--text-bright); letter-spacing: -0.02em;
}

/* ── Diferenciais ── */
.diferenciais { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.diferencial {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 22px; box-shadow: var(--shadow);
    transition: transform .15s, border-color .15s;
}
.diferencial:hover { transform: translateY(-3px); border-color: var(--accent); }
.diferencial svg {
    width: 40px; height: 40px; padding: 8px; border-radius: 10px;
    background: var(--accent-bg); stroke: var(--accent); fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    margin-bottom: 14px;
}
.diferencial h3 { font-size: 17px; margin-bottom: 8px; }
.diferencial p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ── Comparativo ── */
.comparativo { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-card); }
.comp-linha { display: grid; grid-template-columns: 0.8fr 1fr 1fr; }
.comp-linha + .comp-linha { border-top: 1px solid var(--border); }
.comp-linha > span { padding: 14px 20px; }
.comp-cabeca { font-weight: 700; color: var(--text-bright); background: var(--bg-hover); }
.comp-cabeca span:last-child { color: var(--accent); }
.comp-linha [role="rowheader"] { font-weight: 600; color: var(--text-bright); }
.comp-nao { color: var(--text-dim); }
.comp-nao::before { content: "✕ "; color: var(--fail-fg); font-weight: 700; }
.comp-sim { color: var(--text); font-weight: 500; background: var(--accent-bg); }
.comp-sim::before { content: "✓ "; color: var(--ok-fg); font-weight: 700; }

/* ── Chamada final ── */
.cta-faixa {
    background: #0F1623; color: #EDF0F5;
    background-image: radial-gradient(ellipse at 50% 120%, rgba(240, 138, 75, 0.28), transparent 60%);
}
.cta { max-width: 760px; margin: 0 auto; padding: 88px 24px; text-align: center; }
.cta h2 { color: #FFFFFF; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.03em; margin: 18px 0 14px; }
.cta p { color: #A7B2C4; font-size: 18px; margin: 0 0 30px; }
.cta-acoes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Seções ── */
.secao { max-width: 1120px; margin: 0 auto; padding: 72px 24px; }
.secao-faixa {
    max-width: none;
    background: var(--bg-side);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.secao-faixa > * { max-width: 1072px; margin-left: auto; margin-right: auto; }
.secao-cabeca { margin-bottom: 36px; }
.secao-cabeca > * { max-width: 680px; }
.secao-cabeca h2 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.02em; margin: 8px 0 12px; }
.secao-cabeca p { color: var(--text-muted); margin: 0; }
.sobretitulo { font: 600 13px/1 var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }

/* Módulos */
.grupos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grupo {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 22px 24px; box-shadow: var(--shadow);
}
.grupo header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.grupo h3 { font-size: 18px; }
.grupo ul { margin: 0; padding-left: 18px; }
.grupo li { padding: 3px 0; }
.grupo li::marker { color: var(--accent); }
.grupo p { margin: 0 0 14px; color: var(--text-muted); }
.grupo-destaque { border-color: var(--accent); background: linear-gradient(var(--accent-bg), var(--accent-bg)), var(--bg-card); }
.cadeia { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cadeia li {
    font: 500 13px/1 var(--font-mono); padding: 7px 10px; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border-light);
}
.cadeia li + li::before { content: "→ "; color: var(--accent); }

/* Passos */
.passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.passos li { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.passo-num {
    display: inline-flex; width: 34px; height: 34px; border-radius: 8px;
    align-items: center; justify-content: center;
    background: var(--accent); color: var(--on-accent); font: 700 16px/1 var(--font-mono);
    margin-bottom: 14px;
}
.passos h3 { font-size: 17px; margin-bottom: 6px; }
.passos p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* Responsabilidade técnica */
.rt { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.rt-bloco { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.rt-bloco h3 { font-size: 17px; margin-bottom: 10px; }
.rt-bloco p { margin: 0; color: var(--text-muted); }
.rt-bloco .rt-pessoa { color: var(--text-bright); font-weight: 600; font-size: 18px; }
.rt-bloco .rt-cargo { font-family: var(--font-mono); font-size: 13px; margin-bottom: 10px; }
.aviso {
    margin-top: 18px; padding: 14px 18px; border-radius: 8px;
    background: var(--warn-bg); color: var(--warn-fg); font-size: 14px;
}

/* ── Rodapé ── */
.rodape { border-top: 1px solid var(--border); }
.rodape-interno {
    max-width: 1120px; margin: 0 auto; padding: 22px 24px;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    font-size: 14px; color: var(--text-dim);
}

/* ── Página "Entrar" (em breve) ── */
.pagina-entrar { min-height: 100vh; display: flex; flex-direction: column; }
.entrar { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.entrar-cartao {
    width: 100%; max-width: 460px; text-align: center;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 36px 32px; box-shadow: var(--shadow);
}
.entrar-cartao h1 { font-size: 28px; margin: 16px 0 12px; }
.entrar-cartao p { color: var(--text-muted); margin: 0 0 12px; }
.entrar-cartao b { color: var(--text-bright); font-family: var(--font-mono); font-weight: 500; font-size: 15px; }
.entrar-acoes { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 20px; }
.voltar { font-size: 14px; text-decoration: none; }

/* ── Responsivo ── */
@media (max-width: 900px) {
    .menu { display: none; }
    .hero { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 72px; gap: 48px; }
    .folha { transform: none; }
    .diferenciais { grid-template-columns: repeat(2, 1fr); }
    .rt { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .topo-interno, .hero, .secao, .rodape-interno { padding-left: 16px; padding-right: 16px; }
    .secao { padding-top: 56px; padding-bottom: 56px; }
    .hero { padding-top: 40px; }
    .lead { font-size: 17px; }
    .grupos, .diferenciais, .passos { grid-template-columns: 1fr; }
    .hero-acoes .btn, .cta-acoes .btn { width: 100%; }
    .cta { padding: 64px 16px; }
    .comp-linha { grid-template-columns: 1fr 1fr; }
    .comp-linha [role="rowheader"] { grid-column: 1 / -1; padding-bottom: 0; }
    .comp-cabeca [role="columnheader"]:first-child { display: none; }
    .comp-linha > span { padding: 12px 14px; font-size: 14px; }
    .btn { white-space: normal; text-align: center; }
    .btn-tema { padding: 0 10px; font-size: 13px; }
    .marca span { font-size: 17px; }
}
