/* ============================
   Variables y Reset
   ============================ */
:root {
    --orange-primary: #f58220;
    --orange-dark: #e67310;
    --orange-light: #ff9940;
    --white: #ffffff;
    --gray-dark: #0f172a;
    --gray-medium: #475569;
    --gray-light: #e2e8f0;
    --gray-lighter: #f1f5f9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================
   Header
   ============================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-light);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    color: var(--gray-dark);
}

.logo-icon {
    font-size: 28px;
}

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

.nav-link {
    color: var(--gray-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--orange-primary);
}

/* ============================
   Hero Section
   ============================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.85) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23166534" width="1200" height="800"/><g fill-opacity="0.3"><circle fill="%23f58220" cx="200" cy="200" r="180"/><circle fill="%23f58220" cx="1000" cy="600" r="220"/></g></svg>');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-left {
    color: var(--white);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--orange-primary);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-form-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: 48px;
}

.parcel-form {
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.form-label svg {
    color: var(--orange-primary);
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font-family);
    transition: all 0.2s;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.1);
}

.form-input::placeholder {
    color: var(--gray-medium);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    width: 100%;
    padding: 18px 32px;
    font-size: 18px;
}

.form-note {
    font-size: 14px;
    color: var(--gray-medium);
    text-align: center;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--orange-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

/* Hero Right - Demo Report */
.hero-right {
    position: relative;
}

.demo-report-placeholder {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

/* Loading Animation */
.loading-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.loading-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

.loading-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.loading-subtitle {
    font-size: 14px;
    color: var(--gray-medium);
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-light);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange-primary), var(--orange-light));
    border-radius: 999px;
    animation: progress 2s ease-in-out;
}

@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

.progress-text {
    font-size: 13px;
    color: var(--gray-medium);
}

.skeleton-map {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, var(--gray-light) 25%, var(--gray-lighter) 50%, var(--gray-light) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-md);
    margin-top: 20px;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Preliminary Report Card */
.preliminary-report {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-header {
    margin-bottom: 24px;
}

.report-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 4px;
}

.report-location {
    font-size: 14px;
    color: var(--gray-medium);
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-map {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #166534 0%, #15803d 100%);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.map-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-dark);
}

.report-metrics {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--gray-lighter);
    border-radius: var(--radius-md);
}

.metric-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric-icon {
    font-size: 24px;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 13px;
    color: var(--gray-medium);
    margin-bottom: 2px;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-dark);
}

.metric-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.metric-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.metric-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.metric-badge.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.ai-insight {
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 130, 32, 0.05), rgba(245, 130, 32, 0.1));
    border-left: 4px solid var(--orange-primary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.ai-insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--orange-primary);
    margin-bottom: 8px;
}

.ai-insight-text {
    font-size: 14px;
    color: var(--gray-dark);
    line-height: 1.5;
}

.report-cta {
    width: 100%;
}

/* ============================
   Sections
   ============================ */
.section {
    padding: 100px 0;
}

.section-how {
    background: var(--gray-lighter);
}

.section-benefits {
    background: var(--white);
}

.section-cta {
    background: linear-gradient(135deg, var(--gray-dark) 0%, #1e293b 100%);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--gray-dark);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-medium);
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 32px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.step {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

.step:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--orange-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-md);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 12px;
}

.step-description {
    font-size: 15px;
    color: var(--gray-medium);
    line-height: 1.6;
}

.step-arrow {
    font-size: 32px;
    color: var(--orange-primary);
    font-weight: 700;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.benefit-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-light);
    transition: all 0.2s;
}

.benefit-card:hover {
    border-color: var(--orange-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.benefit-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 12px;
}

.benefit-description {
    font-size: 15px;
    color: var(--gray-medium);
    line-height: 1.6;
}

/* CTA Section */
.cta-card {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    color: var(--white);
}

.cta-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
}

.cta-note {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================
   Footer
   ============================ */
.footer {
    background: var(--gray-dark);
    padding: 60px 0;
    color: var(--white);
}

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

.footer-left {
    max-width: 400px;
}

.footer-description {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-right {
    text-align: right;
}

.footer-powered {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.footer-powered a {
    color: var(--orange-primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-powered a:hover {
    text-decoration: underline;
}

.footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================
   Modal
   ============================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-medium);
    transform: rotate(90deg);
}

.modal-close svg {
    color: var(--gray-dark);
}

.modal-header {
    padding: 40px 40px 24px;
    border-bottom: 2px solid var(--gray-light);
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 15px;
    color: var(--gray-medium);
}

.modal-body {
    padding: 40px;
}

/* Report Sections */
.report-section {
    margin-bottom: 40px;
}

.report-visible {
    margin-bottom: 40px;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--gray-lighter);
    border-radius: var(--radius-lg);
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 13px;
    color: var(--gray-medium);
    margin-bottom: 6px;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-dark);
}

.summary-value.success {
    color: var(--success);
}

.summary-value.warning {
    color: var(--warning);
}

.report-text-block {
    margin-bottom: 28px;
}

.report-text-block h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 12px;
}

.report-text-block p {
    font-size: 15px;
    color: var(--gray-medium);
    line-height: 1.7;
}

.report-text-block strong {
    color: var(--gray-dark);
    font-weight: 700;
}

/* Blurred Report Section */
.report-blurred {
    position: relative;
    min-height: 600px;
}

.blurred-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.fake-chart,
.fake-heatmap,
.fake-recommendations,
.fake-predictions {
    background: var(--gray-lighter);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.fake-chart h4,
.fake-heatmap h4,
.fake-recommendations h4,
.fake-predictions h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 16px;
}

.chart-area {
    height: 200px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.heatmap-cell {
    height: 80px;
    border-radius: var(--radius-md);
}

.heatmap-cell.high {
    background: var(--success);
}

.heatmap-cell.medium {
    background: var(--warning);
}

.heatmap-cell.low {
    background: var(--danger);
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.rec-icon {
    font-size: 20px;
}

.rec-text {
    font-size: 14px;
    color: var(--gray-dark);
}

.prediction-bar {
    width: 100%;
    height: 32px;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
}

.prediction-fill {
    height: 100%;
    width: 78%;
    background: linear-gradient(90deg, var(--success), var(--orange-primary));
}

.fake-predictions p {
    font-size: 15px;
    color: var(--gray-dark);
}

/* Blur Overlay */
.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.95) 30%);
}

.blur-cta {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 3px solid var(--orange-primary);
}

.blur-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.blur-cta h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-dark);
    margin-bottom: 16px;
}

.blur-cta p {
    font-size: 15px;
    color: var(--gray-medium);
    margin-bottom: 24px;
    line-height: 1.6;
}

.blur-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-medium);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-right {
        order: -1;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .step-arrow {
        display: none;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        gap: 20px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 32px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 36px;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }

    .report-summary {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
    }

    .modal-header,
    .modal-body {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-form-card {
        padding: 24px;
    }

    .btn-large {
        font-size: 16px;
        padding: 16px 24px;
    }
}
