* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f9fafb;
    --bg-dark: #111827;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none !important; }

/* Navbar */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    font-size: 18px;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-large, .btn-small-pro, .btn-close {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-large {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
}

.btn-small-pro {
    padding: 8px 14px;
    background: var(--warning);
    color: var(--white);
    font-size: 13px;
    margin-top: 10px;
}

.btn-small-pro:hover {
    background: #d97706;
}

.btn-icon {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.2em;
    cursor: pointer;
}

.btn-close {
    background: var(--border);
    color: var(--text);
    width: 100%;
    margin-top: 10px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero .tagline {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero .tagline code {
    background: rgba(255,255,255,0.15);
    padding: 1px 6px;
    border-radius: 4px;
}

.hero .urgency {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 20px;
}

/* Features */
.features {
    padding: 60px 0;
    background: var(--white);
}

.features h2 {
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
}

.problem-grid, .features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.problem-card, .feature {
    background: var(--bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.problem-card:hover, .feature:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.problem-card h3, .feature h4 {
    margin-bottom: 10px;
    color: var(--text);
}

.feature {
    display: flex;
    gap: 15px;
}

.feature .icon {
    font-size: 24px;
    min-width: 40px;
}

/* Comparison table (vs consultores) */
.compare {
    padding: 60px 0;
    background: var(--bg);
}

.compare h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.compare-table th, .compare-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.compare-table th {
    background: var(--bg-dark);
    color: var(--white);
    font-weight: 600;
}

.compare-table td.highlight {
    color: var(--success);
    font-weight: 700;
}

/* Pricing */
.pricing {
    padding: 60px 0;
    background: var(--bg);
}

.pricing h2 {
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.pricing-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: all 0.3s;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    transform: scale(1.05);
}

.pricing-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.pricing-card .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.pricing-card li {
    padding: 8px 0;
    color: var(--text-light);
}

.pro-note {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* CTA */
.cta {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 32px;
    margin-bottom: 25px;
}

/* App layout */
.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    color: var(--text);
}

.app-header h1 {
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pro-status {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--border);
    color: var(--text-light);
}

.pro-status.pro {
    background: var(--success);
    color: var(--white);
}

.app-main-single {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.input-section .hint {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}

.input-section .disclaimer {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
}

.input-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13.5px;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.3s;
}

input[type="text"] {
    min-height: unset;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-actions, .export-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Category grid (selector de tipo de suspensión) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 12px 0 20px;
}

.category-btn {
    text-align: left;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text);
    transition: all 0.2s;
    position: relative;
}

.category-btn:hover {
    border-color: var(--primary);
}

.category-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.category-btn.locked {
    color: var(--text-light);
    background: var(--bg);
}

.category-btn .lock-tag {
    float: right;
    font-size: 11px;
    color: var(--warning);
}

/* Guided form fields */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.form-field .field-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-style: italic;
}

/* Results / summary */
.results-section {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.summary-panel {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    border: 6px solid var(--danger);
    color: var(--danger);
    flex-shrink: 0;
}

.summary-info {
    flex: 1;
    min-width: 220px;
}

.summary-band {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.counts-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.count-badge {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.count-badge.critical {
    background: #fee2e2;
    border-color: var(--danger);
    color: #991b1b;
}

.count-badge.warning {
    background: #ffedd5;
    border-color: #f97316;
    color: #9a3412;
}

.count-badge.info {
    background: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

/* Finding cards */
.perm-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.perm-card {
    border: 1px solid var(--border);
    border-left: 5px solid var(--info);
    border-radius: 8px;
    padding: 18px 20px;
    background: var(--bg);
}

.perm-card.sev-critical { border-left-color: var(--danger); }
.perm-card.sev-serious { border-left-color: #f97316; }
.perm-card.sev-moderate { border-left-color: var(--warning); }
.perm-card.sev-minor { border-left-color: var(--info); }

.perm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.perm-header h3 {
    font-size: 15px;
}

.data-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.perm-desc {
    color: var(--text);
    margin-bottom: 8px;
}

.perm-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.perm-block h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.perm-block .copy-text {
    background: var(--white);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 13.5px;
    white-space: pre-wrap;
}

.evidence-list {
    list-style: none;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evidence-list li {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13.5px;
}

.locked-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
}

.no-perms {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid var(--success);
    color: #065f46;
    padding: 16px;
    border-radius: 8px;
}

.policy-preview {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.policy-text {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    font-size: 13.5px;
    white-space: pre-wrap;
    max-height: 340px;
    overflow-y: auto;
}

.blur-locked {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    max-width: 460px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 12px;
}

.unlock-form {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.unlock-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
}

/* Footer */
footer {
    background: var(--text);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    font-size: 12px;
    margin-top: 60px;
}

footer p {
    opacity: 0.8;
}

/* Print */
@media print {
    .app-header, .input-section, .modal, footer, .btn-small-pro, .export-actions, .category-grid { display: none !important; }
    .summary-panel, .perm-list { break-inside: avoid; }
}

/* Profundidad 3D + micro-interacciones (v1.1 FASE 2) */
.hero {
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    width: 140%;
    height: 140%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.18), transparent 60%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    transition: transform 220ms ease-out;
    transform-style: preserve-3d;
}

.problem-card, .feature, .pricing-card, .category-btn, .perm-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.problem-card:hover, .feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured:hover {
    transform: translateY(-4px) scale(1.05);
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.perm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.btn-primary, .btn-large {
    background-image: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 55%), linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 2px 0 rgba(0,0,0,0.06), 0 6px 16px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover, .btn-large:hover {
    box-shadow: 0 4px 0 rgba(0,0,0,0.05), 0 10px 22px rgba(37, 99, 235, 0.32);
}

.btn-primary:active, .btn-large:active {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 3px 8px rgba(37, 99, 235, 0.25);
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 24px;
    }

    .app-main-single {
        padding: 18px;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .summary-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .compare-table { font-size: 12px; }
    .compare-table th, .compare-table td { padding: 10px; }
}
