/* HERO */

section.hero::before,
section.hero::after {
    content: "";
    position: absolute;
    inset: -20%;
    pointer-events: none;
}

section.hero::before {
    background: radial-gradient(circle 25px at 10% 20%, var(--brand) 98%, transparent 100%) 0 0/300px 300px,
        radial-gradient(circle 30px at 70% 60%, var(--accent) 98%, transparent 100%) 0 0/250px 250px,
        radial-gradient(circle 45px at 40% 80%, var(--brand-2) 98%, transparent 100%) 0 0/280px 280px,
        radial-gradient(circle 55px at 50% 20%, var(--brand-3) 98%, transparent 100%) 0 0/290px 290px;
    opacity: 0.15;
    filter: blur(4px);
    background-repeat: repeat-x repeat-y;
    animation: circlesFall 12s linear infinite;
}

section.hero::after {
    background: radial-gradient(600px 380px at 70% -10%, rgba(255, 255, 255, 0.20), transparent 60%);
    filter: blur(2px);
    opacity: 0.35;
    animation: glowDrift 24s linear infinite alternate;
}

@keyframes circlesFall {
    0% {
        background-position: 0 0;
    }

    25% {
        background-position: 300px 600px, -250px 500px, -280px 280px, 40px 200px;
    }

    50% {
        background-position: 600px 1200px, -500px 1000px, 120px 420px, 100px 580px;
    }

    75% {
        background-position: 900px 1800px, -750px 1500px, 540px 540px, 200px 700px;
    }

    100% {
        background-position: 1200px 2400px, -1000px 2000px, 280px 280px, 290px 870px;
    }
}

@keyframes glowDrift {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(120px);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-title {
    font-size: clamp(28px, 5vw, 50px);
    line-height: 1.08;
    margin: 10px 0;
}

.hero-subtitle {
    color: var(--muted);
    max-width: 60ch;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
}

.hero-cta-nav {
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
}

.house-bg {
    position: absolute;
    top: -5%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: url("../valorar-casa-solo-casa.png") no-repeat center center;
    background-size: contain;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 0;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-number {
    font-weight: 800;
}

.stat-label {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-visual {
    position: relative;
    height: 100%;
}

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

    .hero-visual {
        margin-top: 20px;
        height: 100px;
        scale: 0.5;
    }
}

/* FEATURES SECTION */
.features {
    padding: clamp(60px, 8vw, 120px) 0;
    background: var(--surface-2);
    position: relative;
    overflow: hidden;
}

.features::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 200px at 20% 30%, var(--brand) 0%, transparent 50%),
        radial-gradient(circle 150px at 80% 70%, var(--accent) 0%, transparent 50%);
    opacity: 0.05;
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 80px);
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-header p {
    font-size: clamp(16px, 2vw, 18px);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(95, 225, 214, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(95, 225, 214, 0.1);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: #06101a;
    box-shadow: 0 8px 24px rgba(95, 225, 214, 0.3);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.feature-card p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 14px;
}

.feature-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.metric-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
}

.metric-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}