/**
 * Hero Section - Dark Mode Premium
 * Sistema de diseño FastPaw Properties
 */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../../assets/images/backgrounds/hero1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    padding: var(--spacing-2xl) var(--spacing-md);
    padding-top: 100px;
    background-color: var(--primary-dark);
    transform: translateZ(0);
    backface-visibility: hidden;
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: var(--spacing-2xl);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Slightly lighter than before — lets the city photo breathe */
    background: linear-gradient(135deg,
            rgba(13, 13, 13, 0.82) 0%,
            rgba(13, 13, 13, 0.70) 50%,
            rgba(13, 13, 13, 0.58) 100%);
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: var(--container-max-width);
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

@media (min-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-3xl);
    }
}

/* Contenido de texto */
.hero-content {
    color: var(--pure-white);
    text-align: center;
}

@media (min-width: 768px) {
    .hero-content {
        text-align: left;
    }
}

.hero-title {
    font-family: var(--font-family-base);
    font-size: var(--font-size-3xl);
    font-weight: 900;
    margin-bottom: var(--spacing-lg);
    line-height: 1.1;
    color: var(--pure-white);
    letter-spacing: -0.02em;
}

/* While JS splits the title, hide raw text to prevent flash */
.hero-title--splitting {
    visibility: hidden;
}

/* After split, show the container (spans handle visibility) */
.hero-title--split {
    visibility: visible;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: var(--font-size-6xl);
    }
}

/* ── Blur-in word animation ── */
@keyframes wordBlurIn {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(8px);
    }

    60% {
        opacity: 1;
        filter: blur(1px);
        transform: translateY(0);
    }

    100% {
        opacity: 1;
        filter: blur(0px);
        transform: translateY(0);
    }
}

/* Each word span — hidden by default, animation fills forwards */
.word-blur-span {
    display: inline-block;
    opacity: 0;
    will-change: opacity, filter, transform;
    animation: wordBlurIn 0.45s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* Accent span inherits parent color override */
.hero-title .hero-accent .word-blur-span {
    color: var(--accent-orange);
}

/* Reduced-motion: instant reveal, no animation */
@media (prefers-reduced-motion: reduce) {
    .word-blur-span {
        animation: none !important;
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }
}

.hero-subtitle {
    font-family: var(--font-family-base);
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: var(--font-size-xl);
        margin: 0;
        margin-bottom: var(--spacing-lg);
    }
}

/* Lista adicional de beneficios */
.hero-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.hero-benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--pure-white);
    font-size: 1rem;
    font-weight: 500;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-benefit-item {
        justify-content: flex-start;
    }
}

.hero-benefit-check {
    width: 24px;
    height: 24px;
    color: var(--accent-orange);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .hero-benefit-item {
        font-size: 0.9375rem;
    }

    .hero-benefit-check {
        width: 20px;
        height: 20px;
    }
}

/* Beneficios en cápsulas */
.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--spacing-xl);
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-benefits {
        justify-content: flex-start;
    }
}

.hero-benefit-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(20, 20, 20, 0.72);
    border: 1px solid var(--bg-border);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pure-white);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.hero-benefit-pill:hover {
    transform: translateY(-2px);
    background: var(--bg-accent-soft);
    border-color: var(--accent-orange);
}

.hero-benefit-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-orange);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .hero-benefit-pill {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .hero-benefit-icon {
        width: 18px;
        height: 18px;
    }
}

/* Formulario con glassmorphism */
.hero-form-wrapper {
    background: rgba(28, 28, 28, 0.88);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
}

.hero-form-wrapper:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 130, 32, 0.5);
    box-shadow: var(--shadow-glow-orange);
}

.hero-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.hero-form-title {
    font-family: var(--font-family-base);
    font-size: var(--font-size-2xl);
    color: var(--pure-white);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.hero-label {
    font-family: var(--font-family-base);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.02em;
}

.hero-input {
    padding: var(--spacing-md);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 250ms ease, box-shadow 250ms ease;
    background: rgba(255, 255, 255, 0.08);
    color: var(--pure-white);
    width: 100%;
}

.hero-input option {
    color: #111827;
    background: #ffffff;
}

.hero-input option:disabled {
    color: #6b7280;
}

.hero-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.hero-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.hero-submit-btn {
    font-family: var(--font-family-base);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--accent-orange);
    color: var(--pure-white);
    font-size: var(--font-size-lg);
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    margin-top: var(--spacing-sm);
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
}

.hero-submit-btn:hover:not(:disabled) {
    background: var(--accent-orange-hover);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(245, 130, 32, 0.6);
}

.hero-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hero-btn-text,
.hero-btn-loading {
    display: block;
}

/* Modal de retroalimentación */
.hero-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-modal {
    background: var(--secondary-dark);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-modal-icon {
    margin: 0 auto var(--spacing-lg);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-modal-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--pure-white);
    margin-bottom: var(--spacing-md);
}

.hero-modal-message {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
}

.hero-modal-btn {
    background: var(--accent-orange);
    color: var(--pure-white);
    padding: var(--spacing-md) var(--spacing-2xl);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: all var(--transition-fast);
    min-width: 120px;
    border: none;
    cursor: pointer;
}

.hero-modal-btn:hover {
    background: var(--accent-orange-hover);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(245, 130, 32, 0.6);
}

.hero-modal-btn:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════
   AURORA MESH BACKGROUND
   5 morphing blobs at 8-12% opacity — ultra-subtle, lava-lamp feel
   mix-blend-mode: soft-light keeps the city photo visible beneath
   ═══════════════════════════════════════════════════════════════ */

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    /* soft-light applied per-blob so we can stack them */
}

/* Shared blob base */
.hero-orb {
    position: absolute;
    will-change: transform, border-radius;
    mix-blend-mode: soft-light;
    filter: blur(56px);
    /* large blur = smooth, feathered edges */
    opacity: 0;
    /* each blob sets its own opacity */
}

/* ── Blob 1: deep orange — top-left drifting right ── */
.hero-orb--1 {
    width: 680px;
    height: 680px;
    top: -18%;
    left: -12%;
    opacity: 0.11;
    /* 11% */
    background: radial-gradient(ellipse at 40% 40%,
            #f97316 0%,
            #ea580c 45%,
            transparent 75%);
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    animation: aurora-1 28s ease-in-out infinite alternate;
}

/* ── Blob 2: amber — bottom-right, large and slow ── */
.hero-orb--2 {
    width: 780px;
    height: 780px;
    bottom: -22%;
    right: -18%;
    opacity: 0.09;
    /* 9% */
    background: radial-gradient(ellipse at 60% 55%,
            #d97706 0%,
            #b45309 50%,
            transparent 78%);
    border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%;
    animation: aurora-2 32s ease-in-out infinite alternate;
}

/* ── Blob 3: orange-red — center, small accentblob ── */
.hero-orb--3 {
    width: 420px;
    height: 420px;
    top: 38%;
    left: 28%;
    opacity: 0.08;
    /* 8% */
    background: radial-gradient(ellipse at 50% 50%,
            #f97316 0%,
            #c2410c 55%,
            transparent 80%);
    border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%;
    animation: aurora-3 22s ease-in-out infinite alternate;
}

/* ── Blob 4: warm amber — top-right ── */
.hero-orb--4 {
    width: 560px;
    height: 560px;
    top: -8%;
    right: 5%;
    opacity: 0.10;
    /* 10% */
    background: radial-gradient(ellipse at 45% 45%,
            #fbbf24 0%,
            #d97706 48%,
            transparent 76%);
    border-radius: 50% 50% 45% 55% / 55% 45% 60% 40%;
    animation: aurora-4 25s ease-in-out infinite alternate;
}

/* ── Blob 5: deep orange — bottom-left anchor ── */
.hero-orb--5 {
    width: 500px;
    height: 500px;
    bottom: -10%;
    left: 12%;
    opacity: 0.09;
    /* 9% */
    background: radial-gradient(ellipse at 50% 60%,
            #ea580c 0%,
            #9a3412 55%,
            transparent 80%);
    border-radius: 40% 60% 50% 50% / 60% 40% 55% 45%;
    animation: aurora-5 18s ease-in-out infinite alternate;
}

/* ────────────────────────────────────────────────────
   KEYFRAMES — translate + scale + border-radius morph
   All timings 18s–32s for lava-lamp organicness
   ──────────────────────────────────────────────────── */

@keyframes aurora-1 {
    0% {
        transform: translate(0px, 0px) scale(1);
        border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    }

    30% {
        transform: translate(55px, 35px) scale(1.05);
        border-radius: 50% 50% 45% 55% / 60% 40% 55% 45%;
    }

    65% {
        transform: translate(30px, 70px) scale(0.96);
        border-radius: 45% 55% 60% 40% / 45% 55% 40% 60%;
    }

    100% {
        transform: translate(75px, 20px) scale(1.03);
        border-radius: 60% 40% 50% 50% / 50% 50% 60% 40%;
    }
}

@keyframes aurora-2 {
    0% {
        transform: translate(0px, 0px) scale(1);
        border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%;
    }

    35% {
        transform: translate(-60px, -45px) scale(1.07);
        border-radius: 55% 45% 55% 45% / 50% 55% 45% 50%;
    }

    70% {
        transform: translate(-25px, -80px) scale(0.93);
        border-radius: 40% 60% 45% 55% / 55% 40% 60% 40%;
    }

    100% {
        transform: translate(-70px, -30px) scale(1.04);
        border-radius: 50% 50% 40% 60% / 45% 55% 50% 50%;
    }
}

@keyframes aurora-3 {
    0% {
        transform: translate(0px, 0px) scale(1);
        border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%;
    }

    40% {
        transform: translate(-40px, -55px) scale(1.08);
        border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
    }

    80% {
        transform: translate(45px, -30px) scale(0.94);
        border-radius: 60% 40% 45% 55% / 40% 60% 45% 55%;
    }

    100% {
        transform: translate(20px, -65px) scale(1.02);
        border-radius: 50% 50% 55% 45% / 50% 50% 40% 60%;
    }
}

@keyframes aurora-4 {
    0% {
        transform: translate(0px, 0px) scale(1);
        border-radius: 50% 50% 45% 55% / 55% 45% 60% 40%;
    }

    45% {
        transform: translate(-50px, 40px) scale(1.06);
        border-radius: 40% 60% 50% 50% / 50% 50% 45% 55%;
    }

    100% {
        transform: translate(-35px, 65px) scale(0.95);
        border-radius: 55% 45% 40% 60% / 45% 55% 55% 45%;
    }
}

@keyframes aurora-5 {
    0% {
        transform: translate(0px, 0px) scale(1);
        border-radius: 40% 60% 50% 50% / 60% 40% 55% 45%;
    }

    50% {
        transform: translate(50px, -45px) scale(1.09);
        border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%;
    }

    100% {
        transform: translate(30px, -70px) scale(0.96);
        border-radius: 45% 55% 45% 55% / 55% 45% 60% 40%;
    }
}

/* Reduced-motion: freeze blobs in place, keep the subtle tint */
@media (prefers-reduced-motion: reduce) {
    .hero-orb {
        animation: none !important;
    }
}

/* Premium hero entrance choreography */
.hero-section {
    overflow: hidden;
    isolation: isolate;
    background-image: none;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../../assets/images/backgrounds/hero1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    opacity: 0;
    transform: scale(1.08);
    transform-origin: center;
    transition:
        opacity 800ms ease-out,
        transform 2000ms ease-out;
    will-change: opacity, transform;
}

.hero-section.hero-intro-active::before {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay,
.hero-bg {
    z-index: 1;
}

.hero-container {
    z-index: 2;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s cubic-bezier(0.215, 0.61, 0.355, 1),
        transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition-delay: var(--hero-word-delay, 400ms);
    will-change: opacity, transform;
}

.hero-section.hero-intro-active .hero-word {
    opacity: 1;
    transform: translateY(0);
}

.hero-title .hero-accent .hero-word {
    color: var(--accent-orange);
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.6s ease-out 700ms,
        transform 0.6s ease-out 700ms;
}

.hero-section.hero-intro-active .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.hero-benefit-item {
    opacity: 0;
    transform: translateX(-20px);
    transition:
        opacity 0.6s ease-out var(--hero-item-delay, 900ms),
        transform 0.6s ease-out var(--hero-item-delay, 900ms);
}

.hero-benefit-item:nth-child(2) {
    --hero-item-delay: 1050ms;
}

.hero-benefit-item:nth-child(3) {
    --hero-item-delay: 1200ms;
}

.hero-benefit-item:nth-child(4) {
    --hero-item-delay: 1350ms;
}

.hero-benefit-item:nth-child(5) {
    --hero-item-delay: 1500ms;
}

.hero-benefit-item:nth-child(6) {
    --hero-item-delay: 1650ms;
}



.hero-section.hero-intro-active .hero-benefit-item {
    opacity: 1;
    transform: translateX(0);
}

.hero-benefit-pill {
    --hero-pill-delay: 1350ms;
    opacity: 0;
    transform: translateX(-20px);
    transition:
        opacity 0.6s ease-out var(--hero-pill-delay),
        transform 0.6s ease-out var(--hero-pill-delay),
        background var(--transition-fast),
        border-color var(--transition-fast);
}

.hero-benefit-pill:nth-child(2) {
    --hero-pill-delay: 1500ms;
}

.hero-benefit-pill:nth-child(3) {
    --hero-pill-delay: 1650ms;
}

.hero-section.hero-intro-active .hero-benefit-pill {
    opacity: 1;
    transform: translateX(0);
}

.hero-section.hero-intro-active .hero-benefit-pill:hover {
    transform: translateY(-2px);
    transition-delay: 0ms, 0ms, 0ms, 0ms;
}

.hero-form-wrapper {
    opacity: 0;
    transform: translateX(48px) translateY(16px);
    transition:
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) 300ms,
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 300ms,
        border-color var(--transition-base),
        box-shadow var(--transition-base);
    will-change: opacity, transform;
}

.hero-section.hero-intro-active .hero-form-wrapper {
    opacity: 1;
    transform: none;
}

.hero-section.hero-intro-active .hero-form-wrapper:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 130, 32, 0.5);
    box-shadow: var(--shadow-glow-orange);
    transition-delay: 0ms, 0ms, 0ms, 0ms;
}

.hero-form .hero-input {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.5s ease-out var(--hero-field-delay, 600ms),
        transform 0.5s ease-out var(--hero-field-delay, 600ms),
        border-color 250ms ease,
        box-shadow 250ms ease,
        background 250ms ease;
    will-change: opacity, transform;
}

.hero-section.hero-intro-active .hero-form .hero-input {
    opacity: 1;
    transform: translateY(0);
}

.hero-submit-btn {
    opacity: 0;
    transform: scale(0.94);
    transition:
        opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1100ms,
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1100ms,
        background 200ms ease,
        box-shadow 200ms ease;
    will-change: opacity, transform;
}

.hero-section.hero-intro-active .hero-submit-btn {
    opacity: 1;
    transform: scale(1);
}

.hero-section.hero-intro-active .hero-submit-btn:disabled {
    opacity: 0.6;
    transform: scale(1);
    cursor: not-allowed;
}

.hero-section.hero-intro-active .hero-submit-btn:hover:not(:disabled) {
    background: var(--accent-orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.4);
    transition:
        background 200ms ease,
        box-shadow 200ms ease,
        transform 200ms ease;
}

@media (prefers-reduced-motion: reduce) {

    .hero-section::before,
    .hero-word,
    .hero-subtitle,
    .hero-benefit-pill,
    .hero-form-wrapper,
    .hero-form .hero-input,
    .hero-submit-btn {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
        transition: none !important;
    }
}

@media (max-width: 1023px), (hover: none), (pointer: coarse) {
    .hero-benefit-pill,
    .hero-form-wrapper,
    .hero-modal-overlay {
        backdrop-filter: none !important;
    }

    .hero-form-wrapper:hover,
    .hero-section.hero-intro-active .hero-form-wrapper:hover,
    .hero-benefit-pill:hover,
    .hero-section.hero-intro-active .hero-benefit-pill:hover,
    .hero-section.hero-intro-active .hero-submit-btn:hover:not(:disabled) {
        transform: none;
        box-shadow: none;
    }

    .hero-bg {
        opacity: 0.45;
    }

    .hero-orb {
        filter: blur(40px);
        animation-duration: 40s;
    }
}
