/* ==========================================================================
   Clopix — Homepage Hero
   ========================================================================== */

/* ── Shell ──────────────────────────────────────────────────────────────── */
.hero {
    display: flex;
    flex-direction: column;
    background: var(--color-black);
    overflow: hidden;
}

/* ── Copy band ──────────────────────────────────────────────────────────── */
.hero__copy {
    position: relative;
    background: var(--color-black);
    padding-block: var(--space-24) var(--space-16);
    overflow: hidden;
}

.hero__copy-inner {
    position: relative; /* sit above the background image */
    z-index: 2;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ── Right-side background image ────────────────────────────────────────── */
/*
 * Using CSS background-image instead of <img> so the image has no hard left
 * pixel edge. background-size: auto 100% scales to the container height while
 * keeping natural proportions — no zoom. background-position: right top pins
 * the subject to the right. The mask on the container fades from fully
 * transparent on the left to fully opaque well into the right half, so the
 * image always materialises gradually regardless of how wide it renders.
 */
.hero__bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;

    background-size: 55% auto;
    background-position: right top;
    background-repeat: no-repeat;

    /* Mask stays fully transparent past the image's left edge (45%), then
       crawls up with tiny initial stops so the transition is imperceptible. */
    -webkit-mask-image: linear-gradient(to right,
        transparent              0%,
        transparent             48%,
        rgba(0,0,0, 0.01)      54%,
        rgba(0,0,0, 0.04)      60%,
        rgba(0,0,0, 0.12)      66%,
        rgba(0,0,0, 0.28)      72%,
        rgba(0,0,0, 0.52)      78%,
        rgba(0,0,0, 0.78)      85%,
        black                  93%
    );
    mask-image: linear-gradient(to right,
        transparent              0%,
        transparent             48%,
        rgba(0,0,0, 0.01)      54%,
        rgba(0,0,0, 0.04)      60%,
        rgba(0,0,0, 0.12)      66%,
        rgba(0,0,0, 0.28)      72%,
        rgba(0,0,0, 0.52)      78%,
        rgba(0,0,0, 0.78)      85%,
        black                  93%
    );
}

/* Bottom fade */
.hero__bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        #0a0a0a                0%,
        rgba(10,10,10, 0.65)  10%,
        rgba(10,10,10, 0.15)  25%,
        transparent           40%
    );
    pointer-events: none;
}

/* Eyebrow */
.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-6);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.hero__eyebrow-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}
.hero.is-visible .hero__eyebrow { opacity: 1; transform: none; }

/* Headline */
.hero__headline {
    font-family: var(--font-heading);
    font-size: clamp(3.2rem, 6.5vw, 7.5rem);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin: 0 0 var(--space-8);
    max-width: 14ch;
}
.hero__headline-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.12em; /* prevent descenders and bottom of glyphs from clipping */
    margin-bottom: -0.12em; /* cancel the extra spacing so line-height stays intact */
}
.hero__headline-inner {
    display: block;
    opacity: 0;
    transform: translateY(60%);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero__headline-line:nth-child(2) .hero__headline-inner {
    transition-delay: 0.1s;
}
.hero.is-visible .hero__headline-inner { opacity: 1; transform: none; }

/* Sub */
.hero__sub {
    font-size: var(--fs-md);
    color: rgba(255, 255, 255, 0.48);
    max-width: 42ch;
    line-height: 1.65;
    margin-bottom: var(--space-10);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 0.25s, transform 0.6s ease 0.25s;
}
.hero.is-visible .hero__sub { opacity: 1; transform: none; }

/* Actions */
.hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s;
}
.hero.is-visible .hero__actions { opacity: 1; transform: none; }

.hero__btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-accent);
    color: var(--color-black);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease;
    white-space: nowrap;
}
.hero__btn-primary:hover {
    background: #d4b48a;
    transform: translateY(-1px);
}
.hero__btn-primary svg { transition: transform 0.2s ease; }
.hero__btn-primary:hover svg { transform: translateX(3px); }

.hero__btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.hero__btn-ghost:hover {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Social proof */
.hero__proof {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease 0.45s, transform 0.6s ease 0.45s;
}
.hero.is-visible .hero__proof { opacity: 1; transform: none; }

.hero__proof-avatars {
    display: flex;
}
.hero__proof-avatar {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--color-black);
    overflow: hidden;
    margin-left: -8px;
}
.hero__proof-avatar:first-child { margin-left: 0; }
.hero__proof-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero__proof-text {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.45);
}
.hero__proof-text strong { color: var(--color-white); }



/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero__copy { padding-block: var(--space-16) var(--space-10); }
}

@media (max-width: 480px) {
    /* Hide on phones — copy needs full contrast on small screens */
    .hero__bg-image { display: none; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__btn-primary,
    .hero__btn-ghost { justify-content: center; }

    /* Ghost button becomes a proper outline button on mobile */
    .hero__btn-ghost {
        border: 1.5px solid rgba(255,255,255,0.22);
        border-bottom: 1.5px solid rgba(255,255,255,0.22);
        border-radius: var(--radius-full);
        padding: 0.9rem 1.75rem;
        color: rgba(255,255,255,0.7);
    }
    .hero__btn-ghost:hover {
        border-color: rgba(255,255,255,0.55);
        color: var(--color-white);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__headline-inner,
    .hero__eyebrow,
    .hero__sub,
    .hero__actions,
    .hero__proof { opacity: 1; transform: none; transition: none; }
}
