:root {
    --blue:       #00488d;
    --blue-mid:   #005fb8;
    --blue-light: #d6e3ff;
    --orange:     #fc6018;
    --ink:        #0d0f12;
    --ink-soft:   #424752;
    --surface:    #f9f9fc;
    --surface-2:  #f3f3f6;
    --surface-3:  #e8e8ea;
    --surface-4:  #e2e2e5;
    --border:     #c2c6d4;
    --white:      #ffffff;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'DM Sans', sans-serif; background: var(--surface); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

/* NAV */
nav { position: sticky; top: 0; z-index: 100; background: var(--surface-4); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 2rem; height: 56px; justify-content: space-between; }
.nav-left { display: flex; align-items: center; gap: 2.5rem; }
.nav-brand { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--blue); letter-spacing: -0.03em; text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-family: 'Syne', sans-serif; font-size: .875rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; padding-bottom: 2px; transition: color .15s; }
.nav-links a.active { color: var(--blue); border-bottom: 2px solid var(--blue); }
.nav-links a:hover { color: var(--blue); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; border-radius: 4px; color: var(--ink); transition: background .15s; }
.nav-toggle:hover { background: var(--surface-3); }
.nav-drawer { display: none; position: fixed; top: 56px; left: 0; right: 0; background: var(--surface-4); border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; flex-direction: column; gap: .25rem; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.nav-drawer.open { display: flex; }
.nav-drawer a { font-family: 'Syne', sans-serif; font-size: .9rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; padding: .65rem .75rem; border-radius: 6px; transition: background .15s, color .15s; }
.nav-drawer a:hover { background: var(--surface-3); color: var(--blue); }
.nav-drawer a.active { color: var(--blue); background: var(--surface-3); }

/* HERO */
.hero { background: var(--ink); color: var(--white); padding: 5rem 2rem 0; position: relative; overflow: hidden; text-align: center; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 80% -10%, rgba(0,95,184,.3) 0%, transparent 70%), radial-gradient(ellipse 40% 40% at 20% 110%, rgba(252,96,24,.12) 0%, transparent 60%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; padding-bottom: 5rem; }
.hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(1.75rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -.04em; margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #60a5fa, #93c5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 1rem; line-height: 1.7; color: rgba(255,255,255,.6); max-width: 520px; margin: 0 auto; }
.hero-wave { display: block; width: 100%; height: 48px; background: var(--surface); clip-path: ellipse(55% 100% at 50% 100%); }

/* MAIN */
.content { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; flex: 1; width: 100%; }
.sec-label { font-family: 'DM Mono', monospace; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); font-weight: 500; margin-bottom: .4rem; }
.sec-title { font-family: 'Syne', sans-serif; font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 2.5rem; display: flex; align-items: center; gap: 1rem; }
.sec-title::after { content: ''; flex: 1; height: 2px; background: var(--orange); max-width: 48px; }

/* BENTO — desktop */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; margin-bottom: 4rem; }

.step-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 2rem; overflow: hidden; position: relative; transition: border-color .2s; }
.step-card:hover { border-color: var(--blue); }
.step-num { font-family: 'Syne', sans-serif; font-size: 3.5rem; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: .75rem; letter-spacing: -.05em; }
.step-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; color: var(--blue); text-transform: uppercase; margin-bottom: .75rem; }
.step-desc { font-size: .85rem; line-height: 1.65; color: var(--ink-soft); }

.step-upload { grid-column: span 7; }
.step-upload .bg-icon { position: absolute; right: -1.5rem; bottom: -1.5rem; font-size: 9rem; opacity: .06; line-height: 1; font-family: 'DM Mono', monospace; color: var(--blue); font-weight: 500; pointer-events: none; }

.chip-row { display: flex; gap: .5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: .4rem; background: var(--white); border: 1px solid var(--border); font-family: 'DM Mono', monospace; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; padding: .4rem .8rem; border-radius: 4px; color: var(--ink-soft); }
.chip svg { color: var(--blue); flex-shrink: 0; }

.step-visual { grid-column: span 5; background: linear-gradient(135deg, var(--blue-mid), var(--ink)); border-radius: 10px; padding: 2rem; display: flex; flex-direction: column; justify-content: flex-end; min-height: 240px; position: relative; overflow: hidden; }
.step-visual::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 24px 24px; }
.step-visual-label { font-family: 'DM Mono', monospace; font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: .5rem; }
.step-visual-bar { height: 2px; width: 40px; background: rgba(255,255,255,.3); margin-bottom: .75rem; }
.step-visual p { font-size: .8rem; color: rgba(255,255,255,.75); line-height: 1.6; font-style: italic; position: relative; z-index: 1; }

.step-ai { grid-column: span 12; background: var(--white); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.step-ai-inner { display: grid; grid-template-columns: 1fr 1fr; }
.step-ai-left { padding: 2.5rem; border-right: 1px solid var(--border); }
.step-ai-right { padding: 2.5rem; background: var(--surface-2); display: flex; flex-direction: column; gap: 1rem; }

.check-list { list-style: none; display: flex; flex-direction: column; gap: .85rem; margin-top: 1.5rem; }
.check-list li { display: flex; align-items: flex-start; gap: .75rem; font-family: 'Syne', sans-serif; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; word-break: break-word; overflow-wrap: break-word; }
.check-list li::before { content: '✓'; min-width: 20px; width: 20px; height: 20px; background: rgba(252,96,24,.12); border: 1px solid rgba(252,96,24,.3); color: var(--orange); border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }

.ai-stat { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.25rem; }
.ai-stat-label { font-family: 'DM Mono', monospace; font-size: .55rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .3rem; }
.ai-stat-val { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--orange); }
.ai-stat-sub { font-size: .7rem; color: var(--ink-soft); margin-top: .15rem; }

.step-export { grid-column: span 4; }
.csv-preview { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.25rem; margin-top: 1.5rem; }
.csv-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.csv-filename { font-family: 'DM Mono', monospace; font-size: .62rem; letter-spacing: .08em; color: var(--ink-soft); }
.csv-dl { width: 22px; height: 22px; min-width: 22px; background: var(--blue); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.csv-dl svg { color: var(--white); }
.csv-line { height: 6px; border-radius: 3px; background: var(--surface-3); margin-bottom: .4rem; }

.step-authority { grid-column: span 8; background: var(--surface-4); border: 1px solid var(--border); border-radius: 10px; padding: 2rem; display: flex; gap: 2.5rem; align-items: center; }
.authority-text { flex: 1; min-width: 0; }
.authority-text h4 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 800; text-transform: uppercase; color: var(--blue); margin-bottom: .6rem; }
.authority-text p { font-size: .82rem; line-height: 1.65; color: var(--ink-soft); }
.authority-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; flex-shrink: 0; }
.auth-stat { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: .85rem 1rem; text-align: center; }
.auth-stat-val { font-family: 'Syne', sans-serif; font-size: .9rem; font-weight: 800; color: var(--orange); }
.auth-stat-label { font-family: 'DM Mono', monospace; font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: .2rem; }

/* DEMO TABLE */
.demo-section { margin-bottom: 4rem; }
.table-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 520px; }
thead tr { background: var(--surface-4); }
thead th { padding: .9rem 1.25rem; font-family: 'DM Mono', monospace; font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; text-align: left; white-space: nowrap; }
tbody tr { border-top: 1px solid rgba(194,198,212,.3); transition: background .15s; }
tbody tr:nth-child(even) { background: var(--white); }
tbody tr:hover { background: #eef4ff; }
tbody td { padding: .85rem 1.25rem; font-size: .82rem; vertical-align: middle; }
td.mono { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--ink-soft); }
td.id { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--blue); font-weight: 500; }
.score { display: inline-block; font-family: 'DM Mono', monospace; font-size: .62rem; font-weight: 500; background: var(--surface-4); border: 1px solid var(--border); padding: .2rem .5rem; border-radius: 3px; color: var(--orange); }

/* CTA */
.cta { background: var(--blue); color: var(--white); border-radius: 10px; padding: 4rem 2.5rem; text-align: center; position: relative; overflow: hidden; margin-bottom: 4rem; }
.cta::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.08) 1px, transparent 0); background-size: 32px 32px; pointer-events: none; }
.cta h2 { font-family: 'Syne', sans-serif; font-size: clamp(1.25rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .75rem; position: relative; }
.cta p { font-size: .9rem; color: rgba(255,255,255,.65); max-width: 480px; margin: 0 auto 2rem; line-height: 1.6; position: relative; }
.btn-cta { display: inline-flex; align-items: center; gap: .5rem; background: var(--orange); color: var(--white); font-family: 'Syne', sans-serif; font-size: .875rem; font-weight: 700; padding: .85rem 2rem; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; transition: opacity .15s, transform .1s; box-shadow: 0 4px 16px rgba(252,96,24,.4); position: relative; }
.btn-cta:hover { opacity: .9; }
.btn-cta:active { transform: scale(.97); }

/* FOOTER */
footer { background: var(--surface-3); border-top: 1px solid var(--border); padding: 1.75rem 2rem; display: flex; justify-content: space-between; align-items: center; margin-top: auto; flex-wrap: wrap; gap: 1rem; }
.footer-brand { font-family: 'Syne', sans-serif; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.footer-copy { font-size: .72rem; color: var(--ink-soft); margin-top: .2rem; }
.footer-link { font-family: 'DM Mono', monospace; font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; transition: color .15s; }
.footer-link:hover { color: var(--blue); }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.bento > * { animation: fadeUp .5s ease both; }
.bento > *:nth-child(1) { animation-delay: .05s; }
.bento > *:nth-child(2) { animation-delay: .1s; }
.bento > *:nth-child(3) { animation-delay: .15s; }
.bento > *:nth-child(4) { animation-delay: .2s; }
.bento > *:nth-child(5) { animation-delay: .25s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    nav { padding: 0 1.25rem; }
    .nav-links  { display: none; }
    .nav-toggle { display: flex; }

    .hero { padding: 3rem 1.25rem 0; }
    .hero-inner { padding-bottom: 3rem; }
    .hero h1 { font-size: clamp(1.6rem, 8vw, 2.25rem); }
    .hero-wave { margin-top: 0; }

    .content { padding: 2rem 1.25rem; }
    .sec-title { font-size: 1.25rem; }

    /* Abandona grid de 12 colunas — empilha tudo */
    .bento {
        display: flex;
        flex-direction: column;
        gap: .75rem;
    }

    .step-upload,
    .step-visual,
    .step-ai,
    .step-export,
    .step-authority { width: 100%; }

    .step-card { padding: 1.5rem; }
    .step-num  { font-size: 2.5rem; }
    .step-title { font-size: .95rem; }
    .step-upload .bg-icon { display: none; }
    .step-visual { min-height: 160px; }

    /* step-ai: empilha os dois painéis */
    .step-ai-inner {
        display: flex;
        flex-direction: column;
    }
    .step-ai-left {
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .step-ai-right { padding: 1.5rem; }
    .check-list li { font-size: .72rem; }

    /* authority: empilha */
    .step-authority { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
    .authority-stats { width: 100%; }

    .cta { padding: 2rem 1.25rem; }
    .btn-cta { width: 100%; justify-content: center; }

    footer { flex-direction: column; align-items: flex-start; }
}