/* ==========================================================================
   Home page hero refinements (index.html #hero)
   Loaded after style.css / responsive.css; everything is scoped to #hero.
   Same photo, text and links - only the presentation is enhanced.
   ========================================================================== */

#hero {
    --hero-accent: var(--color-secondary);
    --hero-accent-soft: color-mix(in srgb, var(--color-secondary) 55%, #FFFFFF);
    --hero-ease: cubic-bezier(0.22, 1, 0.36, 1);
    isolation: isolate;
}

/* ---------- Photo: same image as the section background, slowly zooming ---------- */
#hero .hero-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: inherit;
    background-size: cover;
    background-position: inherit;
    background-repeat: no-repeat;
    transform-origin: 70% 35%;
    animation: hero-zoom 26s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}

/* Softer, longer fade behind the text so the photo shows more */
#hero::before {
    width: 70%;
    background: linear-gradient(to right,
            var(--hero-overlay-start) 0%,
            var(--hero-overlay-mid) 38%,
            color-mix(in srgb, var(--hero-overlay-mid) 45%, transparent) 62%,
            var(--hero-overlay-end) 100%);
}

/* ---------- Ambient light ---------- */
#hero .hero-ambient {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#hero .hero-light {
    position: absolute;
    top: 8%;
    left: -6%;
    width: 46vw;
    max-width: 720px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--hero-accent) 22%, transparent) 0%, transparent 65%);
    filter: blur(20px);
    animation: hero-breathe 9s ease-in-out infinite alternate;
}

@keyframes hero-breathe {
    from { opacity: 0.55; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1.05); }
}

/* Fade the bottom edge into the next section */
#hero .hero-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: linear-gradient(to bottom, transparent, var(--color-bg-body));
    opacity: 0.85;
}

#hero .hero-content {
    z-index: 3;
}

/* ---------- Headline ---------- */
#hero .hero-title {
    text-shadow: 0 2px 30px color-mix(in srgb, var(--color-bg-light) 80%, transparent);
}

html.dark-mode #hero .hero-title,
body.dark-mode #hero .hero-title {
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6) !important;
}

/* "for Your Business" in the brand accent (deeper tones keep it readable on the light photo) */
#hero .hero-title span {
    background: linear-gradient(100deg,
            color-mix(in srgb, var(--hero-accent) 78%, #000000) 0%,
            var(--hero-accent) 45%,
            color-mix(in srgb, var(--hero-accent) 78%, #000000) 90%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* a text-shadow would show through the transparent letters and wash them out */
    text-shadow: none !important;
    animation: hero-shimmer 8s linear infinite;
    padding-bottom: 14px;
}

@keyframes hero-shimmer {
    to { background-position: 200% center; }
}

/* Accent line under the second line grows in */
#hero .hero-title span::after {
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--hero-accent), var(--hero-accent-soft));
    box-shadow: 0 0 12px color-mix(in srgb, var(--hero-accent) 60%, transparent);
    transform-origin: left;
    animation: hero-line 1.2s var(--hero-ease) 0.6s both;
}

@keyframes hero-line {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* [UK Accounts Outsourcing] as a refined label */
#hero .hero-title small {
    display: inline-block !important;
    margin-left: 0.35rem;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--hero-accent) 55%, transparent);
    background: color-mix(in srgb, var(--color-bg-body) 70%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 0.32em !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    vertical-align: middle;
    color: var(--color-text-heading);
    text-shadow: none;
    box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--hero-accent) 60%, transparent);
}

/* ---------- Subtitle: cleaner than the old heavy glow ---------- */
#hero .hero-subtitle {
    font-weight: 500;
    text-shadow: 0 1px 14px color-mix(in srgb, var(--color-bg-light) 90%, transparent);
}

html.dark-mode #hero .hero-subtitle,
body.dark-mode #hero .hero-subtitle {
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.8) !important;
    font-weight: 500 !important;
}

/* ---------- Checklist ---------- */
#hero .hero-points {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: -1.5rem 0 2.5rem;
    padding: 0;
    list-style: none;
}

#hero .hero-points li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-primary);
    opacity: 0;
    animation: hero-rise 0.8s var(--hero-ease) forwards;
    animation-delay: calc(0.55s + var(--d, 0) * 0.15s);
}

#hero .hero-point-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--hero-accent-soft), var(--hero-accent));
    box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--hero-accent) 70%, transparent);
}

#hero .hero-point-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Buttons: fixed positions (no swapping), pill style ---------- */
#hero .hero-buttons {
    opacity: 0;
    gap: 1rem;
    flex-wrap: wrap;
    animation: hero-rise 0.8s var(--hero-ease) 1.05s forwards;
}

#hero .hero-buttons .btn {
    animation: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.8rem;
    border-radius: 999px;
    font-size: 1rem;
    transform: none;
}

#hero .hero-buttons .btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--hero-accent) 75%, transparent);
}

/* Light sweep across the primary button */
#hero .hero-buttons .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: hero-sweep 4.5s ease-in-out 2s infinite;
    pointer-events: none;
}

@keyframes hero-sweep {
    0%, 70% { left: -70%; }
    100% { left: 130%; }
}

#hero .hero-buttons .btn-primary svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.35s var(--hero-ease);
}

#hero .hero-buttons .btn-primary:hover svg {
    transform: translateX(4px);
}

#hero .hero-buttons .btn-outline {
    background: color-mix(in srgb, var(--color-bg-body) 72%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1.5px solid color-mix(in srgb, var(--color-text-heading) 35%, transparent);
    color: var(--color-text-heading);
    box-shadow: 0 10px 26px -14px rgba(15, 23, 42, 0.45);
}

#hero .hero-buttons .btn-outline:hover {
    border-color: var(--hero-accent);
    color: var(--hero-accent);
    background: color-mix(in srgb, var(--color-bg-body) 88%, transparent);
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {

    #hero .hero-light {
        width: 80vw;
    }
}

@media (max-width: 768px) {
    #hero .hero-points {
        margin: -0.5rem 0 2rem;
        gap: 0.65rem;
    }

    #hero .hero-points li {
        font-size: 1rem;
        align-items: flex-start;
    }

    #hero .hero-point-icon {
        width: 24px;
        height: 24px;
    }

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

    #hero .hero-buttons .btn {
        width: 100% !important;
        justify-content: center;
        text-align: center;
    }

    #hero .hero-title small {
        margin: 0.5rem 0 0;
        font-size: 0.45em !important;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    #hero .hero-photo,
    #hero .hero-light,
    #hero .hero-title span,
    #hero .hero-title span::after,
    #hero .hero-buttons .btn-primary::after {
        animation: none !important;
    }

    #hero .hero-points li,
    #hero .hero-buttons {
        opacity: 1;
        animation: none !important;
    }
}

/* Scroll performance: the glow is a soft radial gradient already; drop the live blur. */
#hero .hero-light { filter: none !important; }