/* ─── CP Hero Widget ───────────────────────────────────────────────────────── */

.cp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    background-color: var(--color-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Mobile: swap to portrait image if provided */
@media (max-width: 767px) {
    .cp-hero[style*="--cp-hero-bg-mobile"] {
        background-image: var(--cp-hero-bg-mobile) !important;
    }
}

/* ── Overlay ── */
.cp-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--color-bg) 0%,
        rgba(26, 22, 18, 0.85) 40%,
        rgba(26, 22, 18, 0.55) 100%
    );
    z-index: 1;
}

/* ── Parallax layer ── */
.cp-hero__parallax-bg {
    position: absolute;
    inset: -10%;
    background: inherit;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 0;
}

/* ── Content ── */
.cp-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 120px 24px 80px 24px;
}

/* ── Eyebrow ── */
.cp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--color-divider);
    padding: 0.375rem 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--color-community-light);
    opacity: 0;
}

/* ── Headline ── */
.cp-hero__headline {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.cp-hero__headline-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
}

.cp-hero__headline-accent {
    display: block;
    color: var(--color-community-light);
    opacity: 0;
    transform: translateY(40px);
}

/* ── Subheadline ── */
.cp-hero__sub {
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);
    line-height: var(--lh-body);
    color: var(--color-text-muted);
    max-width: 580px;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
}

/* ── CTAs ── */
.cp-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
}

/* ── Buttons ── */
.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: 500;
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
    padding: 0.875rem 1.75rem;
    min-height: 48px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out);
}

.cp-btn--primary {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.cp-btn--primary:hover,
.cp-btn--primary:focus-visible {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

.cp-btn--outline,
.cp-btn--ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-divider);
}

.cp-btn--outline:hover,
.cp-btn--outline:focus-visible,
.cp-btn--ghost:hover,
.cp-btn--ghost:focus-visible {
    border-color: var(--color-text-muted);
}

.cp-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Mobile: full-width buttons */
@media (max-width: 480px) {
    .cp-hero__ctas {
        flex-direction: column;
    }
    .cp-btn {
        width: 100%;
    }
}

/* ── Right image panel ── */
.cp-hero__right-image {
    display: none;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 1;
    overflow: hidden;
}

.cp-hero__right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.cp-hero__right-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--color-bg) 0%,
        rgba(26, 22, 18, 0.85) 20%,
        rgba(26, 22, 18, 0.4) 55%,
        transparent 100%
    );
}

@media (min-width: 768px) {
    .cp-hero--has-image .cp-hero__right-image {
        display: block;
    }
}

/* ── Scroll hint ── */
.cp-hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
}

.cp-hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: var(--color-divider);
    margin: 0 auto;
    transform-origin: top;
    animation: cp-scroll-line 2s var(--ease-out) infinite;
}

@keyframes cp-scroll-line {
    0%   { transform: scaleY(0); opacity: 0; }
    30%  { opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
    .cp-hero__content {
        padding: 140px 48px 100px 48px;
    }
}

@media (min-width: 1280px) {
    .cp-hero__content {
        padding: 160px 0 180px 80px;
    }
}
