.homepage-hero-v2 {
    --homepage-hero-bg: #0b0b0f;
    --homepage-hero-accent: #A70651;
    --homepage-hero-accent-dark: #7E043D;
    --homepage-hero-text-muted: #888888;
    --homepage-hero-white: #ffffff;
    --homepage-hero-transition: .3s ease;
    min-height: calc(100svh - 123px);
    display: flex;
    align-items: center;
    position: relative;
    padding: clamp(24px, 4.5vh, 72px) 0;
    overflow: visible;
    background: var(--homepage-hero-bg);
    color: var(--homepage-hero-white);
}

.homepage-hero-v2__particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.homepage-hero-v2__particles canvas {
    width: 100%;
    height: 100%;
    filter:
        drop-shadow(0 0 6px rgba(255,0,120,.35))
        drop-shadow(0 0 14px rgba(167,6,81,.45));
}

.homepage-hero-v2__inner {
    position: relative;
    z-index: 2;
    width: min(92vw, 2200px);
    max-width: 2200px;
    overflow: visible;
}

.homepage-hero-v2__inner > .row {
    position: relative;
    z-index: 2;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(28px, 4vw, 88px);
    margin: 0;
}

.homepage-hero-v2__inner > .row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}

.homepage-hero-v2__content {
    position: relative;
    z-index: 5;
    max-width: clamp(540px, 44vw, 1100px);
    padding-right: 0;
    text-align: left;
}

.homepage-hero-v2__title {
    margin: 0 0 1.5rem;
    color: var(--homepage-hero-white);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.55rem, 3.15vw, 6rem);
    font-weight: 800;
    line-height: 1.15;
}

.homepage-hero-v2__accent {
    background: linear-gradient(135deg, var(--homepage-hero-accent), #d4497a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.homepage-hero-v2__subtitle {
    max-width: 680px;
    margin: 0 0 2.5rem;
    color: var(--homepage-hero-text-muted);
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.05rem, 1.05vw, 1.5rem);
    line-height: 1.65;
}

.homepage-hero-v2__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.homepage-hero-v2__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 36px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: var(--homepage-hero-transition);
}

.homepage-hero-v2__button--primary {
    border: 0;
    background: linear-gradient(135deg, var(--homepage-hero-accent), var(--homepage-hero-accent-dark));
    color: var(--homepage-hero-white);
}

.homepage-hero-v2__button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(167, 6, 81, .4);
    color: var(--homepage-hero-white);
}

.homepage-hero-v2__button--secondary {
    border: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    color: var(--homepage-hero-white);
}

.homepage-hero-v2__button--secondary:hover {
    border-color: var(--homepage-hero-accent);
    color: var(--homepage-hero-accent);
}

.homepage-hero-v2__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.homepage-hero-v2__logo-stage {
    position: relative;
    isolation: isolate;
    display: flex;
    flex: 0 0 clamp(390px, min(38vw, 68svh), 1200px);
    align-items: center;
    justify-content: center;
    width: clamp(390px, min(38vw, 68svh), 1200px);
    aspect-ratio: 1;
    overflow: visible;
    background: transparent;
}

.homepage-hero-v2__logo-canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.homepage-hero-v2__logo-canvas {
    position: relative;
    z-index: 2;
    background: transparent;
    opacity: 0;
    /* Reveal the first fully rendered 3D frame without a poster cross-fade. */
}

.homepage-hero-v2__logo-stage.is-ready .homepage-hero-v2__logo-canvas {
    opacity: 1;
}

.homepage-hero-v2__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    animation: homepage-hero-v2-bounce 2s infinite;
}

.homepage-hero-v2__scroll i {
    color: var(--homepage-hero-accent);
    font-size: 1.5rem;
}

@keyframes homepage-hero-v2-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Homepage-only wide container: service, team and contact keep Bootstrap's shared width. */
.timeline-section > .container {
    width: min(92vw, 2200px);
    max-width: 2200px;
}

.homepage-services .section-title,
.timeline-heading {
    font-size: clamp(2rem, 1.8vw, 3rem);
}

@media (min-width: 1600px) {
    .hero-zone > .navbar > .container {
        width: min(92vw, 2200px);
        max-width: 2200px;
    }

    .homepage-services .service-card {
        gap: clamp(20px, 1.25vw, 30px);
        padding: clamp(26px, 1.45vw, 36px);
    }

    .homepage-services .service-icon {
        width: clamp(52px, 3vw, 72px);
        height: clamp(52px, 3vw, 72px);
    }

    .homepage-services .service-icon img,
    .homepage-services .service-icon .service-family-icon {
        width: clamp(28px, 1.6vw, 38px);
        height: clamp(28px, 1.6vw, 38px);
    }

    .homepage-services .service-card h5 {
        font-size: clamp(1.08rem, .95vw, 1.35rem);
    }

    .timeline-card {
        padding: clamp(18px, 1.15vw, 28px) clamp(20px, 1.35vw, 32px);
    }

    .timeline-title {
        font-size: clamp(1.15rem, 1vw, 1.4rem);
    }

    .timeline-text,
    .contact-label,
    .contact-input {
        font-size: clamp(.95rem, .8vw, 1.12rem);
    }

    .contact-cta-left,
    .contact-cta-right {
        padding: clamp(3rem, 3vw, 4.5rem);
    }
}

@media (min-width: 2400px) {
    .homepage-hero-v2 {
        min-height: calc(100svh - 136px);
    }

    .hero-zone > .navbar .navbar-brand img {
        width: 14.65rem;
        height: 5.25rem;
    }

    .hero-zone > .navbar .nav-underline {
        font-size: 1.22rem;
    }

    .hero-marquee-text {
        font-size: 1.2rem;
    }
}

/* Short laptop screens need height-aware sizing, not desktop fixed pixels. */
@media (min-width: 992px) and (max-height: 800px) {
    .homepage-hero-v2 {
        min-height: calc(100svh - 123px);
        padding: clamp(16px, 2.8vh, 28px) 0;
    }

    .homepage-hero-v2__inner > .row {
        gap: clamp(24px, 3vw, 48px);
    }

    .homepage-hero-v2__content {
        max-width: 590px;
    }

    .homepage-hero-v2__title {
        margin-bottom: 1rem;
        font-size: clamp(2.25rem, 3vw, 3rem);
        line-height: 1.1;
    }

    .homepage-hero-v2__subtitle {
        margin-bottom: 1.5rem;
        font-size: clamp(1rem, 1.2vw, 1.08rem);
        line-height: 1.55;
    }

    .homepage-hero-v2__button {
        padding: 12px 28px;
    }

    .homepage-hero-v2__logo-stage {
        flex-basis: clamp(360px, min(38vw, 68svh), 540px);
        width: clamp(360px, min(38vw, 68svh), 540px);
    }

    .homepage-hero-v2__scroll {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .homepage-hero-v2 {
        min-height: auto;
        padding: clamp(38px, 7vh, 72px) 0 32px;
    }

    .homepage-hero-v2__inner > .row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(20px, 4vh, 38px);
    }

    .homepage-hero-v2__content {
        max-width: 100%;
        margin-top: 0;
        padding-right: 0;
        text-align: center;
    }

    .homepage-hero-v2__title {
        font-size: clamp(2.1rem, 6vw, 3rem);
    }

    .homepage-hero-v2__subtitle {
        margin-right: auto;
        margin-left: auto;
    }

    .homepage-hero-v2__actions {
        justify-content: center;
    }

    .homepage-hero-v2__logo-wrap {
        min-height: 0;
    }

    .homepage-hero-v2__logo-stage {
        flex-basis: clamp(320px, min(76vw, 52svh), 620px);
        width: clamp(320px, min(76vw, 52svh), 620px);
    }
}

@media (max-width: 575px) {
    .homepage-hero-v2 {
        min-height: auto;
        padding: 32px 0 24px;
    }

    .homepage-hero-v2__inner {
        width: calc(100% - 32px);
    }

    .homepage-hero-v2__title {
        font-size: clamp(1.9rem, 9.5vw, 2.45rem);
    }

    .homepage-hero-v2__subtitle {
        font-size: 1.05rem;
    }

    .homepage-hero-v2__button {
        width: 100%;
    }

    .homepage-hero-v2__logo-wrap {
        min-height: 0;
    }

    .homepage-hero-v2__logo-stage {
        flex-basis: min(92vw, 390px);
        width: min(92vw, 390px);
    }

    .homepage-hero-v2__scroll {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .homepage-hero-v2__scroll {
        animation: none;
    }

    .homepage-hero-v2__button,
    .homepage-hero-v2__logo-canvas {
        transition: none;
    }
}
