/* ==========================================================================
   USA Advanced UI — patterns inspired by 21st.dev
   Aurora · Shimmer · Spotlight · Border beam · Marquee · Magnetic
   Adapted for Laravel Blade (vanilla CSS, no React/Tailwind required)
   ========================================================================== */

/* ── Aurora / animated mesh hero (AuroraBackground-inspired) ───────────── */

.hero-aurora {
    position: absolute;
    inset: -20%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.85;
}

.hero-aurora__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
    mix-blend-mode: screen;
}

.hero-aurora__blob--1 {
    width: 55vw;
    height: 55vw;
    max-width: 720px;
    max-height: 720px;
    top: -10%;
    left: -8%;
    background: radial-gradient(circle, oklch(0.42 0.15 20 / 0.55) 0%, transparent 70%);
    animation: aurora-drift-1 18s ease-in-out infinite alternate;
}

.hero-aurora__blob--2 {
    width: 48vw;
    height: 48vw;
    max-width: 640px;
    max-height: 640px;
    top: 20%;
    right: -12%;
    background: radial-gradient(circle, oklch(0.45 0.1 250 / 0.5) 0%, transparent 70%);
    animation: aurora-drift-2 22s ease-in-out infinite alternate;
}

.hero-aurora__blob--3 {
    width: 40vw;
    height: 40vw;
    max-width: 520px;
    max-height: 520px;
    bottom: -5%;
    left: 30%;
    background: radial-gradient(circle, oklch(0.55 0.08 40 / 0.35) 0%, transparent 70%);
    animation: aurora-drift-3 16s ease-in-out infinite alternate;
}

@keyframes aurora-drift-1 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(8%, 12%) scale(1.15); }
}

@keyframes aurora-drift-2 {
    from { transform: translate(0, 0) scale(1.05); }
    to { transform: translate(-10%, -8%) scale(1.2); }
}

@keyframes aurora-drift-3 {
    from { transform: translate(0, 0) scale(0.95); }
    to { transform: translate(6%, -10%) scale(1.18); }
}

.hero-noise {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
    mix-blend-mode: overlay;
}

.hero-title-gradient {
    background: linear-gradient(
        105deg,
        oklch(1 0 0) 0%,
        oklch(0.95 0.02 80) 40%,
        oklch(1 0 0) 55%,
        oklch(0.88 0.06 25) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: title-shine 8s linear infinite;
}

@keyframes title-shine {
    to { background-position: 200% center; }
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.95rem 0.4rem 0.45rem;
    border-radius: 999px;
    background: oklch(1 0 0 / 0.1);
    border: 1px solid oklch(1 0 0 / 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: oklch(1 0 0 / 0.95);
    margin-bottom: 1.25rem;
}

.hero-pill__dot {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--usa-red), oklch(0.55 0.14 30));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px oklch(0.42 0.15 20 / 0.25);
    animation: pill-pulse 2.4s ease-in-out infinite;
}

.hero-pill__dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

@keyframes pill-pulse {
    0%, 100% { box-shadow: 0 0 0 4px oklch(0.42 0.15 20 / 0.2); }
    50% { box-shadow: 0 0 0 8px oklch(0.42 0.15 20 / 0.08); }
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

/* ── Shimmer button (21st ShimmerButton-inspired) ──────────────────────── */

.btn-shimmer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: none;
    background: linear-gradient(135deg, var(--usa-red) 0%, oklch(0.36 0.14 15) 100%);
    color: #fff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1 !important;
    padding: 0.95rem 1.9rem !important;
    min-height: 3.15rem;
    box-shadow:
        0 0 0 1px oklch(1 0 0 / 0.12) inset,
        0 10px 30px oklch(0.42 0.15 20 / 0.4);
}

.btn-shimmer.btn-lg,
.btn.btn-shimmer.btn-lg {
    padding: 1rem 2rem !important;
    min-height: 3.35rem;
    line-height: 1 !important;
}

.btn-ghost-glass {
    background: oklch(1 0 0 / 0.1);
    border: 1px solid oklch(1 0 0 / 0.28);
    color: #fff !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1 !important;
    padding: 0.95rem 1.9rem !important;
    min-height: 3.15rem;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn-ghost-glass.btn-lg,
.btn.btn-ghost-glass.btn-lg {
    padding: 1rem 2rem !important;
    min-height: 3.35rem;
    line-height: 1 !important;
}

.cta-actions .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1 !important;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    inset: -120%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        oklch(1 0 0 / 0.45) 10%,
        transparent 20%
    );
    animation: shimmer-spin 3.2s linear infinite;
    z-index: -2;
    pointer-events: none;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--usa-red) 0%, oklch(0.36 0.14 15) 100%);
    z-index: -1;
    pointer-events: none;
}

.btn-shimmer:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 0 0 1px oklch(1 0 0 / 0.18) inset,
        0 16px 40px oklch(0.42 0.15 20 / 0.5);
    color: #fff !important;
}

@keyframes shimmer-spin {
    to { transform: rotate(1turn); }
}

.btn-ghost-glass:hover {
    background: oklch(1 0 0 / 0.18);
    border-color: oklch(1 0 0 / 0.45);
    color: #fff !important;
    transform: translateY(-2px);
}

/* ── Spotlight cards (mouse-follow glow) ───────────────────────────────── */

.spotlight-card {
    position: relative;
    --spot-x: 50%;
    --spot-y: 50%;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        420px circle at var(--spot-x) var(--spot-y),
        oklch(0.42 0.15 20 / 0.18),
        transparent 45%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card > * {
    position: relative;
    z-index: 2;
}

/* ── Border beam (rotating gradient edge) ──────────────────────────────── */

.border-beam {
    position: relative;
    overflow: hidden;
}

.border-beam::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: linear-gradient(
        var(--beam-angle, 0deg),
        transparent 30%,
        oklch(0.65 0.14 25) 48%,
        oklch(1 0 0 / 0.85) 50%,
        oklch(0.65 0.14 25) 52%,
        transparent 70%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
    animation: beam-rotate 4s linear infinite;
}

.border-beam:hover::after,
.border-beam.is-active::after {
    opacity: 1;
}

@keyframes beam-rotate {
    to { --beam-angle: 360deg; }
}

@property --beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ── Infinite marquee (trust / services strip) ─────────────────────────── */

.usa-marquee {
    overflow: hidden;
    border-block: 1px solid oklch(0.22 0.06 255 / 0.08);
    background: linear-gradient(90deg, oklch(0.98 0.005 255), #fff 20%, #fff 80%, oklch(0.98 0.005 255));
    padding: 0.9rem 0;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.usa-marquee__track {
    display: flex;
    width: max-content;
    gap: 2.5rem;
    animation: marquee-scroll 32s linear infinite;
    will-change: transform;
}

.usa-marquee:hover .usa-marquee__track {
    animation-play-state: paused;
}

.usa-marquee__item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--usa-navy);
    letter-spacing: -0.01em;
}

.usa-marquee__item span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--usa-red);
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    to { transform: translateX(-50%); }
}

/* ── Magnetic / glow utility ───────────────────────────────────────────── */

.magnetic {
    display: inline-flex;
    will-change: transform;
}

.glow-ring {
    box-shadow:
        0 0 0 1px oklch(0.42 0.15 20 / 0.15),
        0 12px 40px oklch(0.42 0.15 20 / 0.12);
}

/* ── Text reveal line (clip) ──────────────────────────────────────────── */

.clip-reveal {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.clip-reveal > span {
    display: inline-block;
    transform: translateY(110%);
}

/* ── Feature card advanced hover ───────────────────────────────────────── */

.feature-card.border-beam {
    background:
        linear-gradient(165deg, oklch(1 0 0 / 0.14) 0%, oklch(1 0 0 / 0.06) 100%);
}

.feature-card.spotlight-card::before {
    background: radial-gradient(
        380px circle at var(--spot-x) var(--spot-y),
        oklch(0.65 0.12 25 / 0.22),
        transparent 45%
    );
}

.category-card.spotlight-card::before {
    z-index: 2;
}

.category-card.spotlight-card .cat-img-wrap,
.category-card.spotlight-card .cat-body {
    z-index: 3;
}

/* ── Reduced motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .hero-aurora__blob,
    .btn-shimmer::before,
    .border-beam::after,
    .usa-marquee__track,
    .hero-title-gradient,
    .hero-pill__dot {
        animation: none !important;
    }

    .btn-shimmer:hover,
    .btn-ghost-glass:hover {
        transform: none;
    }
}
