/*
 * Beams Background component
 *
 * The wrapper is a relative container. Three layers, stacked:
 *   1. Canvas (absolute, full size) — the moving beams
 *   2. Overlay (absolute, full size) — a faint pulsing backdrop blur
 *   3. Content (relative, z-index 2) — whatever the user is wrapping
 */

.cc-beams {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a0a0b;
    /* Defensive — full-bleed when the theme wraps us in a constrained column. */
    color: var(--cc-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-beams-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Additional canvas-level blur. The JS also applies blur(35px) via ctx.filter,
       this one is the second pass and is what gives the velvety look. */
    filter: blur(15px);
    /* The canvas is decorative; no pointer events. */
    pointer-events: none;
    z-index: 1;
}

/* The pulsing overlay — a near-transparent layer that breathes. */
.cc-beams-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 11, 0.05);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    pointer-events: none;
    z-index: 2;
    animation: cc-beams-pulse 10s ease-in-out infinite;
}

@keyframes cc-beams-pulse {
    0%, 100% { opacity: 0.05; }
    50%      { opacity: 0.15; }
}

.cc-beams-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 60px 24px;
    box-sizing: border-box;
}

/* Content alignment modifiers */
.cc-beams--align-center .cc-beams-content { text-align: center; }
.cc-beams--align-start  .cc-beams-content { text-align: left; }
.cc-beams--align-end    .cc-beams-content { text-align: right; }

/* Baked-in hero content (only used when no inner shortcode content is provided) */
.cc-beams-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    max-width: 900px;
    margin: 0 auto;
}

.cc-beams--align-start .cc-beams-hero {
    align-items: flex-start;
    margin: 0 auto 0 0;
}
.cc-beams--align-end .cc-beams-hero {
    align-items: flex-end;
    margin: 0 0 0 auto;
}

.cc-beams-hero .cc-eyebrow {
    color: var(--cc-accent);
    margin-bottom: 6px;
}

.cc-beams-headline {
    font-size: clamp(40px, 7vw, 96px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0;
}

.cc-beams-sub {
    font-size: clamp(16px, 2.2vw, 24px);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    letter-spacing: -0.01em;
    max-width: 60ch;
    margin: 0;
    font-weight: 300;
}

@media (max-width: 600px) {
    .cc-beams-content {
        padding: 40px 18px;
    }
}

/* Reduced motion: kill the overlay pulse. The canvas JS also detects this
   preference and switches to a static beam render. */
@media (prefers-reduced-motion: reduce) {
    .cc-beams-overlay {
        animation: none;
        opacity: 0.1;
    }
}
