/* ==========================================================================
   Caleb Smith Design — Reusable Hero Block Styles
   ========================================================================== */

:root {
    --csd-orange: #C25222;
    --csd-orange-hover: #A33F15;
    --csd-ink: #1F1916;
    --csd-ink-body: #524740;
    --csd-border: #E5DBD0;
    --csd-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --csd-container: 1220px;
}

.csd-hero-block,
.csd-hero-block * {
    box-sizing: border-box;
}

.csd-hero-block {
    position: relative;
    overflow: hidden;
    overflow: clip;
    width: 100%;
    padding: clamp(3.5rem, 6.5vw, 5.5rem) 0;
    font-family: var(--csd-font-sans);
    border-bottom: 1px solid var(--csd-border);

    /* Subtle warm off-white to peach/orange atmospheric wash */
    background-color: #FAF6F0;
    background-image:
        radial-gradient(circle at 84% 30%, rgba(226, 121, 68, 0.18) 0%, rgba(245, 189, 152, 0.11) 42%, rgba(250, 246, 240, 0) 72%),
        linear-gradient(120deg, #FFFDFB 0%, #FAF6F0 55%, #FDF0E4 100%);
}

/* 1400px x 560px Subtle Dot Pattern Behind Hero */
.csd-hero-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1400px;
    max-width: 100%;
    height: 560px;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(194, 82, 34, 0.18) 1.25px, transparent 1.25px);
    background-size: 18px 18px;
    mask-image: radial-gradient(ellipse 72% 76% at 50% 50%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 72% 76% at 50% 50%, #000 35%, transparent 100%);
}

.csd-hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--csd-container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* Two-Column Split: Left Copy | Right 3D Parallax Showcase */
.csd-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(2rem, 4vw, 3.5rem);
    min-height: 450px;
}

.csd-hero-copy {
    position: relative;
    z-index: 2;
    text-align: left;
}

.csd-hero-title {
    margin: 0 0 1.4rem;
    font-family: var(--csd-font-sans);
    font-size: clamp(2.25rem, 4.3vw, 3.55rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    color: var(--csd-ink);
}

.csd-hero-subhead {
    margin: 0 0 2.1rem;
    max-width: 56ch;
    font-size: clamp(1.02rem, 1.25vw, 1.125rem);
    font-weight: 400;
    line-height: 1.72;
    color: var(--csd-ink-body);
}

.csd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.csd-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.1rem;
    font-family: var(--csd-font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: #FFFFFF;
    background-color: var(--csd-orange);
    border: 1.5px solid var(--csd-orange);
    border-radius: 9999px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.csd-hero-btn:hover {
    background-color: var(--csd-orange-hover);
    border-color: var(--csd-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(194, 82, 34, 0.22);
}

.csd-hero-btn:focus-visible {
    outline: 2px solid var(--csd-orange);
    outline-offset: 3px;
}

/* Right Visual Column */
.csd-hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 430px;
}

/* 500x500 Low-Opacity Subtle Moving Ball Behind Devices */
.csd-hero-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    margin-top: -250px;
    margin-left: -250px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        circle at 38% 35%,
        rgba(226, 118, 64, 0.24) 0%,
        rgba(194, 82, 34, 0.11) 55%,
        rgba(194, 82, 34, 0) 100%
    );
    will-change: transform;
    animation: csdHeroOrbDrift 16s ease-in-out infinite alternate;
}

@keyframes csdHeroOrbDrift {
    0% {
        transform: translate3d(-16px, -12px, 0) scale(0.98);
    }
    50% {
        transform: translate3d(14px, 16px, 0) scale(1.03);
    }
    100% {
        transform: translate3d(-8px, 10px, 0) scale(1);
    }
}

/* Desktop Three.js WebGL Mount Container */
.csd-hero-canvas-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csd-hero-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Hidden on Desktop — Shown Only on Mobile */
.csd-hero-mobile-mockups {
    display: none;
}

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

/* ==========================================================================
   Mobile Layout: Large Static Mockups, Zero Effects, Circle Contained Inside
   ========================================================================== */
@media (max-width: 900px) {
    .csd-hero-block {
        padding: 3.25rem 0 3.75rem;
        overflow: hidden;
        overflow: clip;
    }

    .csd-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
    }

    .csd-hero-visual {
        min-height: auto;
        padding: 0.5rem 0;
    }

    /* Keep orb sized & strictly clipped inside the hero section */
    .csd-hero-orb {
        width: min(360px, 84vw);
        height: min(360px, 84vw);
        margin-top: calc(min(360px, 84vw) / -2);
        margin-left: calc(min(360px, 84vw) / -2);
    }

    /* Hide Three.js 3D canvas on mobile */
    .csd-hero-canvas-wrap {
        display: none !important;
    }

    /* Show large, crisp static laptop + phone WebPs with zero effects */
    .csd-hero-mobile-mockups {
        display: block;
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 580px;
        margin: 0 auto;
        padding-right: 6%;
        padding-bottom: 1rem;
    }

    .csd-hero-mobile-laptop {
        display: block;
        width: 100%;
        height: auto;
        filter: drop-shadow(0 16px 28px rgba(31, 25, 22, 0.14));
    }

    .csd-hero-mobile-phone {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 32%;
        max-width: 175px;
        height: auto;
        filter: drop-shadow(0 14px 24px rgba(31, 25, 22, 0.20));
    }
}

@media (max-width: 480px) {
    .csd-hero-btn {
        width: 100%;
    }

    .csd-hero-mobile-mockups {
        padding-right: 5%;
        padding-bottom: 0.75rem;
    }

    .csd-hero-mobile-phone {
        width: 31%;
    }
}