/**
 * Landing hero layout + style variants (admin → Design → Hero).
 */

.landing-hero-wrap {
    position: relative;
    overflow: hidden;
}

.landing-hero-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(64px);
    contain: strict;
    will-change: transform;
}

.landing-hero-blob--1 {
    top: -8rem;
    left: -8rem;
    width: 38rem;
    height: 38rem;
    background: color-mix(in srgb, var(--brand) 28%, transparent);
}

.landing-hero-blob--2 {
    top: 0;
    right: 0;
    width: 26rem;
    height: 26rem;
    background: color-mix(in srgb, var(--brand-2) 28%, transparent);
}

.landing-hero-wrap--style-white .landing-hero-blob,
.landing-hero-wrap--style-brand_soft .landing-hero-blob {
    display: none;
}

.landing-hero-wrap--style-white {
    background: #fff;
}

.landing-hero-wrap--style-brand_soft {
    background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
}

.dark .landing-hero-wrap--style-white {
    background: rgb(15 23 42);
}

.dark .landing-hero-wrap--style-brand_soft {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 18%, rgb(15 23 42)) 0%, rgb(15 23 42) 100%);
}

.landing-hero-wrap--style-white .landing-hero-badge,
.landing-hero-wrap--style-brand_soft .landing-hero-badge {
    background: var(--brand-soft);
    color: var(--brand);
}

.dark .landing-hero-wrap--style-white .landing-hero-badge,
.dark .landing-hero-wrap--style-brand_soft .landing-hero-badge {
    background: color-mix(in srgb, var(--brand) 22%, transparent);
    color: color-mix(in srgb, var(--brand) 72%, white);
}

.landing-hero-wrap--style-white .landing-hero-search-input,
.landing-hero-wrap--style-brand_soft .landing-hero-search-input {
    border-color: color-mix(in srgb, var(--brand) 18%, #e2e8f0);
}

.landing-hero-wrap--layout-search .landing-hero-inner {
    max-width: 48rem;
    margin-inline: auto;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.landing-hero-wrap--layout-search .landing-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-hero-wrap--layout-search .landing-hero-copy > p {
    margin-inline: auto;
}

.landing-hero-wrap--layout-search .landing-hero-search {
    margin-inline: auto;
    width: 100%;
    max-width: 36rem;
}

.landing-hero-wrap--layout-search .landing-hero-trust {
    justify-content: center;
}

.landing-hero-wrap--layout-search .landing-hero-apps {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-hero-wrap--layout-minimal .landing-hero-inner {
    max-width: 42rem;
    margin-inline: auto;
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.landing-hero-wrap--layout-minimal .landing-hero-mockup {
    display: none;
}

.landing-hero-wrap--layout-split .landing-hero-inner {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .landing-hero-wrap--layout-split .landing-hero-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.landing-hero-wrap .pulse-ring::before {
    border-color: var(--brand-mid);
}

/* ── Scroll reveal (transform + opacity only = GPU composited) ── */

.landing-section-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.landing-section-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hero entrance ── */

.landing-hero-copy h1,
.landing-hero-copy h1 .gradient-text {
    font-weight: 900;
    letter-spacing: -0.025em;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    animation: hero-in 0.7s ease both;
}

/* Greek: keep true black + slightly tighter tracking for a heavier SE-like punch */
html[lang="el"] .landing-hero-copy h1,
html[lang="el"] .landing-hero-copy h1 .gradient-text,
html[lang="el-GR"] .landing-hero-copy h1,
html[lang="el-CY"] .landing-hero-copy h1 {
    font-weight: 900;
    letter-spacing: -0.035em;
}

html[lang="el"] .landing-hero-copy > p,
html[lang="el-GR"] .landing-hero-copy > p,
html[lang="el-CY"] .landing-hero-copy > p {
    font-weight: 500;
}

html[lang="el"] .landing-hero-trust,
html[lang="el-GR"] .landing-hero-trust,
html[lang="el-CY"] .landing-hero-trust {
    font-weight: 600;
}

html[lang="el"] .landing-hero-search-input,
html[lang="el-GR"] .landing-hero-search-input,
html[lang="el-CY"] .landing-hero-search-input {
    font-weight: 600;
}

html[lang="el"] .landing-hero-search button,
html[lang="el-GR"] .landing-hero-search button,
html[lang="el-CY"] .landing-hero-search button {
    font-weight: 700;
}
@keyframes hero-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.landing-hero-copy > p {
    animation: hero-in 0.7s 0.12s ease both;
}
.landing-hero-search {
    animation: hero-in 0.7s 0.22s ease both;
}
.landing-hero-trust {
    animation: hero-in 0.7s 0.32s ease both;
}
.landing-hero-mockup {
    animation: hero-in 0.8s 0.25s ease both;
}

.landing-hero-map-pin {
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
}

/* ── Multi cleaner phone cards ── */

.landing-hero-cards {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
}

.landing-hero-cards--count-1 {
    max-width: 308px;
}

.landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) {
    gap: 0.75rem;
    max-width: min(100%, 52rem);
    padding-inline: 0.25rem;
}

.landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card {
    width: min(260px, 78vw);
    flex: 0 0 auto;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, box-shadow 0.45s ease, z-index 0s;
}

@media (min-width: 1024px) {
    .landing-hero-wrap--layout-split:has(.landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack)) .landing-hero-inner {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    }

    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card:nth-child(1) {
        transform: translateY(10px) rotate(-4deg) scale(0.94);
        z-index: 1;
        opacity: 0.92;
    }
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card:nth-child(2) {
        transform: translateY(0) rotate(0deg) scale(1);
        z-index: 3;
        opacity: 1;
    }
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card:nth-child(3) {
        transform: translateY(10px) rotate(4deg) scale(0.94);
        z-index: 2;
        opacity: 0.92;
    }
}

@media (max-width: 1023px) {
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) {
        flex-wrap: nowrap;
        overflow: hidden;
        justify-content: center;
        max-width: 320px;
        min-height: 34rem;
    }
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card {
        position: absolute;
        left: 50%;
        margin-left: -154px;
        width: 308px;
    }
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card:nth-child(1) {
        transform: translate(-18px, 14px) rotate(-5deg) scale(0.9);
        z-index: 1;
        opacity: 0.75;
    }
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card:nth-child(2) {
        transform: translate(0, 0) rotate(0deg) scale(1);
        z-index: 3;
        opacity: 1;
    }
    .landing-hero-cards--count-3:not(.landing-hero-cards--deck):not(.landing-hero-cards--shuffle-stack) .landing-hero-card:nth-child(3) {
        transform: translate(18px, 14px) rotate(5deg) scale(0.9);
        z-index: 2;
        opacity: 0.75;
    }
}

/* Fade shuffle */
.landing-hero-card.is-fading-out {
    opacity: 0 !important;
    transform: scale(0.96) !important;
}
.landing-hero-card.is-fading-in {
    animation: hero-card-fade-in 0.55s ease both;
}
@keyframes hero-card-fade-in {
    from { opacity: 0; transform: scale(1.03); }
    to { opacity: 1; transform: scale(1); }
}

/* Slide shuffle */
.landing-hero-card.is-sliding-out {
    opacity: 0 !important;
    transform: translateX(-28%) scale(0.95) !important;
}
.landing-hero-card.is-sliding-in {
    animation: hero-card-slide-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hero-card-slide-in {
    from { opacity: 0; transform: translateX(32%) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Deck-of-cards shuffle — overlapping stack with lift-to-back motion */
.landing-hero-cards--deck,
.landing-hero-cards--shuffle-stack {
    position: relative;
    display: block;
    width: min(308px, 86vw);
    max-width: 308px;
    min-height: 36rem;
    margin-inline: auto;
    perspective: 900px;
    gap: 0;
    padding-inline: 0;
}

.landing-hero-cards--deck .landing-hero-card,
.landing-hero-cards--shuffle-stack .landing-hero-card {
    position: absolute;
    left: 50%;
    top: 0;
    margin-left: 0;
    width: min(308px, 86vw);
    max-width: none;
    flex: none;
    transform-origin: 50% 85%;
    transition:
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease,
        box-shadow 0.45s ease,
        filter 0.45s ease;
    will-change: transform;
    animation: none !important; /* kill float — fights deck transforms */
}

/* Resting deck positions (translateX(-50%) centers the absolute cards) */
.landing-hero-cards--deck .landing-hero-card[data-stack="0"],
.landing-hero-cards--shuffle-stack .landing-hero-card[data-stack="0"] {
    transform: translate3d(-50%, 0, 0) rotate(-1.2deg) scale(1);
    z-index: 5;
    opacity: 1;
    filter: none;
    box-shadow:
        0 22px 40px -12px rgba(15, 23, 42, 0.35),
        0 8px 16px -8px rgba(15, 23, 42, 0.2);
}
.landing-hero-cards--deck .landing-hero-card[data-stack="1"],
.landing-hero-cards--shuffle-stack .landing-hero-card[data-stack="1"] {
    transform: translate3d(calc(-50% + 14px), 16px, -20px) rotate(3.8deg) scale(0.965);
    z-index: 4;
    opacity: 0.97;
    filter: brightness(0.98);
    box-shadow:
        0 16px 28px -14px rgba(15, 23, 42, 0.28);
}
.landing-hero-cards--deck .landing-hero-card[data-stack="2"],
.landing-hero-cards--shuffle-stack .landing-hero-card[data-stack="2"] {
    transform: translate3d(calc(-50% - 16px), 28px, -40px) rotate(-4.2deg) scale(0.93);
    z-index: 3;
    opacity: 0.92;
    filter: brightness(0.95);
    box-shadow:
        0 12px 22px -16px rgba(15, 23, 42, 0.22);
}

/* Lift the front card before it flies to the back */
.landing-hero-cards--deck .landing-hero-card.is-lifting,
.landing-hero-cards--shuffle-stack .landing-hero-card.is-lifting {
    z-index: 30 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: translate3d(calc(-50% + 42px), -78px, 60px) rotate(14deg) scale(1.06) !important;
    box-shadow:
        0 40px 70px -10px rgba(15, 23, 42, 0.4),
        0 16px 28px -8px rgba(15, 23, 42, 0.25) !important;
    transition:
        transform 0.32s cubic-bezier(0.22, 1.2, 0.36, 1),
        box-shadow 0.32s ease !important;
}

/* Settle into the back of the deck after re-indexing */
.landing-hero-cards--deck .landing-hero-card.is-settling-back,
.landing-hero-cards--shuffle-stack .landing-hero-card.is-settling-back {
    z-index: 2 !important;
    pointer-events: none;
}

.landing-hero-mockup--deck .hero-mock-nearby-badge {
    bottom: 15.75rem;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .landing-section-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .landing-hero-copy h1,
    .landing-hero-copy > p,
    .landing-hero-search,
    .landing-hero-trust,
    .landing-hero-mockup,
    .float,
    .float-delay {
        animation: none;
    }
    .landing-hero-card.is-fading-out,
    .landing-hero-card.is-fading-in,
    .landing-hero-card.is-sliding-out,
    .landing-hero-card.is-sliding-in {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
