/* ===== VARIABLES ===== */
:root {
    --primary: #1e3a5f;
    --primary-dark: #0f2642;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #2c5282 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 45%);
    animation: subtleShift 20s ease-in-out infinite;
}

@keyframes subtleShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 24px;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 100px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 48px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 24px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--border);
    font-size: 0.9rem;
    padding: 10px 20px;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--surface-alt);
}

/* ===== PROPERTIES SECTION ===== */
.properties-section {
    padding: 80px 0;
    background: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.property-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 48px;
    overflow: hidden;
    transition: var(--transition);
}

.property-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.property-visual {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 40px;
    color: white;
    min-height: 280px;
}

.property-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(30, 58, 95, 0.7) 0%, rgba(15, 38, 66, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

.property-badge {
    position: absolute;
    top: 20px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.property-header {
    position: relative;
    z-index: 5;
    margin-top: 40px;
}

.property-badge:nth-child(1) {
    left: 20px;
}

.property-badge:nth-child(2) {
    left: 140px;
}

.property-header h3,
.property-address-link {
    position: relative;
    z-index: 5;
}

.property-address-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    font-size: 0.95rem;
    opacity: 0.85;
}

.property-address-link:hover {
    color: white;
    border-bottom-color: white;
    opacity: 1;
}

.property-address-link .lucide {
    width: 14px;
    height: 14px;
}

.metric-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.metric-label .lucide {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.hero-badge .lucide {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.btn .lucide {
    width: 18px;
    height: 18px;
}

.hero-map {
    margin: 32px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.badge-distress {
    background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
    color: #1a1a1a;
}

.badge-ozone {
    background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
    color: white;
}

.badge-owner {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
}

.property-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.property-address {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ===== METRICS GRID ===== */
.property-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: var(--border);
    padding: 1px;
}

.metric {
    background: var(--surface);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.metric:hover {
    background: var(--surface-alt);
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

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

.metric-negative .metric-value {
    color: var(--danger);
}

/* ===== PROPERTY DETAILS ===== */
.property-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.detail-column h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.detail-column ul {
    list-style: none;
}

.detail-column ul li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text);
    line-height: 1.6;
}

.detail-column ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.details-list li::before {
    content: '•' !important;
    color: var(--accent) !important;
}

.unit-mix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.unit-mix-table thead {
    background: var(--surface-alt);
}

.unit-mix-table th {
    padding: 12px;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.unit-mix-table td {
    padding: 12px;
    border-top: 1px solid var(--border);
}

/* ===== PRO-FORMA SECTION ===== */
.proforma-section {
    border-top: 1px solid var(--border);
    padding: 0;
}

.proforma-toggle {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--surface-alt) 0%, var(--surface) 100%);
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

.proforma-toggle:hover {
    background: var(--bg);
}

.chevron {
    transition: transform 0.3s ease;
    display: inline-block;
}

.proforma-toggle.active .chevron {
    transform: rotate(180deg);
}

.chevron .lucide {
    width: 20px;
    height: 20px;
}

.proforma-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.proforma-content.active {
    max-height: 2000px;
    padding-bottom: 20px;
}

.calculator {
    padding: 40px;
    background: var(--surface);
}

.calc-section {
    margin-bottom: 32px;
}

.calc-section h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.calc-input {
    display: flex;
    flex-direction: column;
}

.calc-input label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.calc-input input {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
    background: var(--surface);
}

.calc-input input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.proforma-results h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.result-item {
    background: var(--surface-alt);
    padding: 16px;
    border-radius: var(--radius);
    border-left: 3px solid var(--border);
    margin-bottom: 8px;
}

.result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.result-value.highlight {
    color: var(--accent);
}

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

/* ===== PROPERTY FOOTER ===== */
.property-footer {
    padding: 24px 40px;
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

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

.cta-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 24px;
    text-align: center;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }

    .hero-content {
        padding: 60px 20px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px 12px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        justify-content: center;
    }

    .property-visual {
        padding: 30px 24px;
    }

    .property-badge:nth-child(1) {
        top: 16px;
        left: 16px;
        font-size: 0.7rem;
    }

    .property-badge:nth-child(2) {
        top: 16px;
        left: 130px;
        font-size: 0.7rem;
    }

    .property-header h3 {
        font-size: 1.5rem;
    }

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

    .property-details {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .calculator {
        padding: 24px;
    }

    .calc-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .calc-input input {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .result-value {
        font-size: 1.1rem;
    }

    .property-footer {
        padding: 20px 24px;
    }

    .proforma-toggle {
        padding: 16px 24px;
    }

    .cta-section {
        padding: 60px 24px;
    }

    .cta-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .property-metrics {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        justify-content: center;
    }
}
