.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, var(--light), var(--light-secondary));
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.02) 0%, transparent 50%);
}

/* ============================================================
   Geometric hero backdrop — a faint blueprint grid plus a few outlined
   shapes drifting behind the hero content. Shared by every page that uses
   .hero. Mostly neutral, with one or two rare-colour accents.
   ============================================================ */
.floating-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero::before {                 /* faint grid, fading out from the centre */
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--hairline) 1px, transparent 1px),
        linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: radial-gradient(ellipse 62% 68% at 50% 36%, #000 0%, rgba(0,0,0,0.35) 58%, transparent 82%);
            mask-image: radial-gradient(ellipse 62% 68% at 50% 36%, #000 0%, rgba(0,0,0,0.35) 58%, transparent 82%);
}

.hero::after {                  /* a large faint ring bleeding off a corner */
    content: '';
    position: absolute;
    z-index: 0;
    width: 340px;
    height: 340px;
    right: -90px;
    top: -110px;
    border-radius: 50%;
    border: 1.5px solid var(--hairline);
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    opacity: 0.75;
    animation: geoDrift 28s ease-in-out infinite;
    will-change: transform;
}
.floating-shape:nth-child(1) {          /* outlined ring */
    width: 220px; height: 220px;
    top: 8%; left: -3%;
    border: 2px solid var(--hairline-strong);
    border-radius: 50%;
    animation-duration: 32s;
}
.floating-shape:nth-child(2) {          /* rotated rounded square — rare blue accent */
    width: 140px; height: 140px;
    top: 52%; right: 3%;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: 16px;
    animation: geoSpin 46s linear infinite;
}
.floating-shape:nth-child(3) {          /* triangle — rare cyan accent */
    width: 0; height: 0;
    bottom: 14%; left: 9%;
    border-left: 64px solid transparent;
    border-right: 64px solid transparent;
    border-bottom: 110px solid rgba(6, 182, 212, 0.14);
    animation-delay: 7s;
    animation-duration: 36s;
}

@keyframes geoDrift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(16px, -22px); }
}
@keyframes geoSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.35;
    animation: particleFloat 8s infinite linear;
}
@keyframes particleFloat {
    0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.35; }
    90%  { opacity: 0.35; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.hero {
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 56px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    max-width: 760px;
    z-index: 10;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
    padding: 7px 16px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.7s ease 0.1s both;
    box-shadow: var(--shadow-sm), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
    position: relative;
    overflow: hidden;
}

.hero-badge i { color: var(--primary); }

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.07), transparent);
    animation: badgeShimmer 3s infinite;
}

@keyframes badgeShimmer {
    0% { left: -100%; }
    50% { left: -100%; }
    100% { left: 100%; }
}

.hero h1 {
    font-size: clamp(2.1rem, 4.8vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.7s ease 0.25s both;
}

/* Accent word — modern gradient lettering in the brand blue→cyan sweep.
   Shared by every hero page so the whole site matches the homepage. */
.hero h1 .accent,
.hero h1 span.grad {
    display: inline-block;
    color: transparent;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.7s ease 0.35s both;
}

.hero-subtitle {
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 32px;
    max-width: 544px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.7s ease 0.4s both;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-primary {
    padding: 15px 34px;
    min-width: 188px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Primary CTA: neutral dark — the colour lives in small accents, not buttons */
.btn-gradient {
    background: var(--dark);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
    border: 1px solid var(--hairline-strong);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-gradient:hover {
    background: var(--dark-secondary);
    box-shadow: var(--shadow-lg);
}

.btn-glass:hover {
    background: #fff;
    border-color: var(--hairline-strong);
    box-shadow: var(--shadow-md);
}

/* On dark sections the neutral-dark CTA would vanish, so it flips to white. */
.signup-section .btn-gradient,
.news-cta .btn-gradient {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}
.signup-section .btn-gradient:hover,
.news-cta .btn-gradient:hover {
    background: var(--light-secondary);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray);
    animation: bounce 2s infinite;
}