/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0F172A;
    --bg-body: #17191B;
    --bg-surface: #1C1F22;
    --bg-surface-2: #141618;
    --border: #2A2F35;
    --border-light: #334155;
    --primary: #6A7D90;
    --primary-light: #8FA3B4;
    --primary-dark: #4A5D70;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --error: #EF4444;
    --success: #22C55E;
    --warning: #F59E0B;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: inherit; font-weight: 600; border: none; cursor: pointer;
    border-radius: var(--radius-md); transition: all 0.2s; text-decoration: none;
}
.btn-sm { padding: 8px 20px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text); }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.logo-icon {
    width: 36px; height: 36px; background: var(--bg-surface);
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 900; color: var(--primary);
    border: 1px solid var(--border);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-body) 100%);
}
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.badge {
    display: inline-block; padding: 6px 14px; font-size: 13px; font-weight: 600;
    background: rgba(106, 125, 144, 0.15); color: var(--primary-light);
    border-radius: 20px; border: 1px solid rgba(106, 125, 144, 0.3); margin-bottom: 24px;
}
.hero h1 { font-size: 48px; font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.highlight { color: var(--primary-light); }
.hero-subtitle { font-size: 18px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 24px; align-items: center; }
.stat-number { display: block; font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── Hero Card (Revit preview) ──────────────────────────────────────────── */
.hero-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}
.hero-card-header {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; background: var(--bg-surface-2); border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #22C55E; }
.hero-card-title { font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.hero-card-body { padding: 16px; }
.correction-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-md);
    margin-bottom: 8px; background: var(--bg-surface-2); border: 1px solid var(--border);
}
.correction-item div { flex: 1; }
.correction-item strong { display: block; font-size: 13px; font-weight: 600; }
.correction-meta { font-size: 11px; color: var(--text-muted); }
.btn-fix {
    padding: 6px 12px; font-size: 11px; font-weight: 600; border: none; cursor: pointer;
    background: rgba(34, 197, 94, 0.15); color: var(--success);
    border-radius: var(--radius-sm);
}
.hero-card-footer { display: flex; gap: 8px; padding-top: 12px; }
.tag {
    padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 12px;
}
.tag-green { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.tag-yellow { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.tag-red { background: rgba(239, 68, 68, 0.15); color: var(--error); }

/* ── Sections ───────────────────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-primary); }
.section-title { font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.section-subtitle { font-size: 18px; color: var(--text-secondary); max-width: 650px; margin: 0 auto 60px; }

/* ── Problems ───────────────────────────────────────────────────────────── */
.problems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.problem-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px; text-align: left;
}
.problem-icon { font-size: 32px; margin-bottom: 16px; }
.problem-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.problem-card p { font-size: 14px; color: var(--text-secondary); }

/* ── Features ───────────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    position: relative;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px 28px; text-align: left;
    transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.feature-card.featured { border-color: var(--primary); }
.feature-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
    padding: 4px 16px; border-radius: 12px;
}
.feature-icon {
    width: 56px; height: 56px; background: rgba(106, 125, 144, 0.1);
    border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.feature-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.feature-card > p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.feature-list { list-style: none; }
.feature-list li {
    font-size: 13px; color: var(--text-secondary); padding: 6px 0; padding-left: 20px;
    position: relative;
}
.feature-list li::before {
    content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700;
}

/* ── Steps ──────────────────────────────────────────────────────────────── */
.steps-grid { display: flex; align-items: flex-start; justify-content: center; gap: 16px; }
.step {
    flex: 1; max-width: 220px; text-align: center;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px 24px;
}
.step-number {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 20px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--text-secondary); }
.step code { background: var(--bg-surface-2); padding: 2px 8px; border-radius: var(--radius-sm); font-size: 12px; color: var(--primary-light); }
.step-arrow {
    color: var(--text-muted); font-size: 24px; margin-top: 40px; flex-shrink: 0;
}

/* ── Plans ───────────────────────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plans-loading { grid-column: 1 / -1; color: var(--text-secondary); padding: 40px; }
.plan-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 36px 28px; text-align: left;
    display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.3s;
}
.plan-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.plan-card.plan-featured { border-color: var(--primary); position: relative; }
.plan-card.plan-featured::before {
    content: "Mais Popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
    padding: 4px 16px; border-radius: 12px; white-space: nowrap;
}
.plan-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 40px; font-weight: 900; margin-bottom: 4px; }
.plan-price .currency { font-size: 18px; font-weight: 600; color: var(--text-secondary); vertical-align: top; line-height: 2; }
.plan-price .period { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.plan-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 32px; flex: 1; }
.plan-features li {
    font-size: 14px; color: var(--text-secondary); padding: 8px 0; padding-left: 24px;
    position: relative; border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before {
    content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700;
}
.plan-btn { margin-top: auto; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-list { max-width: 720px; margin: 40px auto 0; }
.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    margin-bottom: 12px; overflow: hidden;
}
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; background: var(--bg-surface); border: none;
    color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer;
    font-family: inherit; text-align: left;
}
.faq-question:hover { background: var(--bg-surface-2); }
.faq-toggle { font-size: 20px; color: var(--text-muted); transition: transform 0.3s; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer p {
    padding: 0 24px 20px; font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.faq-answer code {
    background: var(--bg-surface-2); padding: 2px 8px; border-radius: var(--radius-sm);
    font-size: 13px; color: var(--primary-light);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-tagline { color: var(--text-secondary); font-size: 14px; margin-top: 16px; max-width: 320px; }
.footer-links h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.footer-links a { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 10px; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
    z-index: 200; display: flex; align-items: center; justify-content: center;
}
.modal {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 40px; max-width: 440px; width: 100%;
    position: relative;
}
.modal-close {
    position: absolute; top: 16px; right: 20px; background: none; border: none;
    color: var(--text-muted); font-size: 24px; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.modal-plan-name { font-size: 15px; color: var(--primary-light); font-weight: 600; margin-bottom: 24px; }
.modal label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.modal input {
    width: 100%; padding: 14px 16px; font-size: 15px; font-family: inherit;
    background: var(--bg-surface-2); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); color: var(--text); margin-bottom: 20px;
    outline: none;
}
.modal input:focus { border-color: var(--primary); }
.modal-secure { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }

/* ── Success Page ────────────────────────────────────────────────────────── */
.success-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-body); z-index: 300;
    display: flex; align-items: center; justify-content: center;
}
.success-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 48px; max-width: 520px; width: 100%;
    text-align: center;
}
.success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(34, 197, 94, 0.15); color: var(--success);
    font-size: 36px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}
.success-card h2 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.success-card > p { color: var(--text-secondary); margin-bottom: 24px; }
.success-card code {
    background: var(--bg-surface-2); padding: 4px 12px; border-radius: var(--radius-sm);
    font-size: 14px; color: var(--primary-light);
}
.success-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; text-align: left; }
.success-card ol {
    text-align: left; padding-left: 24px; margin-bottom: 32px;
    color: var(--text-secondary); font-size: 14px;
}
.success-card ol li { padding: 6px 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; }
    .hero h1 { font-size: 36px; }
    .hero-visual { display: none; }
    .problems-grid, .features-grid, .plans-grid { grid-template-columns: 1fr; }
    .steps-grid { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); }
    .step { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 28px; }
    .section-title { font-size: 26px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { width: 40px; height: 1px; }
    .hero-actions { flex-direction: column; }
}
