:root {
    --fm-primary: #7b2cbf;
    --fm-accent:  #ff6b6b;
    --fm-dark:    #120a24;
    --fm-text:    #1d1433;
    --fm-muted:   #6b6480;
    --fm-bg:      #faf8ff;
    --fm-radius:  14px;
    --fm-ease:    cubic-bezier(.2,.7,.2,1);
}

.fm-home { overflow-x: hidden; color: var(--fm-text); background: var(--fm-bg); }
.fm-home img { max-width: 100%; height: auto; }

/* ---------- Keyframes ---------- */
@keyframes fm-gradient { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
@keyframes fm-float    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-18px)} }
@keyframes fm-fadeup   { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }
@keyframes fm-marquee  { to{transform:translateX(-50%)} }
@keyframes fm-scroll   { 0%{opacity:0;transform:translateY(0)} 50%{opacity:1} 100%{opacity:0;transform:translateY(14px)} }
@keyframes fm-pulse    { 0%,100%{box-shadow:0 0 0 0 rgba(255,107,107,.5)} 70%{box-shadow:0 0 0 14px rgba(255,107,107,0)} }

/* ---------- Hero ---------- */
.fm-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.25rem 4rem;
    color: #fff;
    background: linear-gradient(120deg, #120a24, #5a189a, #7b2cbf, #ff6b6b, #120a24);
    background-size: 300% 300%;
    animation: fm-gradient 14s ease infinite;
    overflow: hidden;
}
.fm-hero-inner { position: relative; z-index: 2; max-width: 880px; will-change: transform; }

.fm-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    will-change: transform;
}
.fm-blob.b1 { width: 380px; height: 380px; background: #ff6b6b; top: -80px; left: -80px; animation: fm-float 9s ease-in-out infinite; }
.fm-blob.b2 { width: 460px; height: 460px; background: #ffb703; bottom: -120px; right: -100px; animation: fm-float 12s ease-in-out infinite reverse; }
.fm-blob.b3 { width: 260px; height: 260px; background: #4cc9f0; top: 40%; left: 60%; animation: fm-float 7s ease-in-out infinite; }

.fm-eyebrow {
    display: inline-block;
    padding: .4rem 1rem;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}
.fm-hero-title {
    font-size: clamp(2.6rem, 8vw, 6rem);
    line-height: 1.05;
    margin: 1rem 0;
    font-weight: 800;
}
.fm-word {
    display: inline-block;
    opacity: 0;
    animation: fm-fadeup .9s var(--fm-ease) forwards;
    animation-delay: var(--d, 0s);
    margin: 0 .15em;
}
.fm-word.grad {
    background: linear-gradient(90deg, #ffd166, #ff6b6b, #ffd166);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fm-fadeup .9s var(--fm-ease) forwards, fm-gradient 5s linear infinite;
    animation-delay: var(--d, 0s), 0s;
}
.fm-hero-sub { font-size: clamp(1rem, 2.2vw, 1.25rem); opacity: .9; max-width: 600px; margin: 0 auto 2rem; }
.fm-fade { opacity: 0; animation: fm-fadeup .9s var(--fm-ease) forwards; animation-delay: var(--d, 0s); }

/* Top story */
.fm-story {
    display: grid;
    align-items: center;
    justify-content: center;
    gap: 4rem;

    img {
        border-radius: 1rem;
        border-top: 5px solid #005BBB;
        border-right: 5px solid #005BBB;
        border-bottom: 5px solid #FFD500;
        border-left: 5px solid #FFD500;
        /* linear-gradient(90deg, #005BBB 50%, #FFD500 50%); */
    }

    .fm-first-logo {
        flex-shrink: 0;
        display: block;
        width: 20rem;
        height: 20rem;
        border: none;
    }

    p {
        margin-top: 1rem;
        font-size: 1rem;
    }

    @media (min-width: 1024px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        p {
            max-width: 25rem;
        }
    }
}

/* Countdown */
.fm-countdown { margin: 2rem auto; }
.fm-countdown-label { margin-bottom: .75rem; opacity: .9; }
.fm-countdown-grid { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.fm-count-box {
    min-width: 84px;
    padding: .9rem .6rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--fm-radius);
    backdrop-filter: blur(8px);
}
.fm-count-box span { display: block; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fm-count-box small { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; opacity: .8; }

/* Buttons */
.fm-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.fm-btn-primary, .fm-btn-ghost {
    display: inline-block;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .3s var(--fm-ease), box-shadow .3s, background .3s;
}
.fm-btn-primary { background: #fff; color: var(--fm-primary) !important; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.fm-btn-ghost   { border: 2px solid #fff; color: #fff !important; }
.fm-btn-primary:hover, .fm-btn-ghost:hover { transform: translateY(-3px) scale(1.03); }
.fm-btn-ghost:hover { background: #fff; color: var(--fm-primary) !important; }

/* Scroll hint */
.fm-scroll-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 20px;
    z-index: 2;
}
.fm-scroll-hint span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    background: #fff;
    border-radius: 2px;
    animation: fm-scroll 1.8s infinite;
}

/* ---------- Ticker ---------- */
.fm-ticker { background: var(--fm-accent); color: #fff; overflow: hidden; padding: 1rem 0; }
.fm-ticker-track {
    display: flex;
    width: max-content;
    animation: fm-marquee 30s linear infinite;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.fm-ticker-track span, .fm-ticker-track i { padding: 0 1.2rem; white-space: nowrap; font-style: normal; }

/* ---------- Stats ---------- */
.fm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: -50px auto 0;
    padding: 0 1.25rem;
    position: relative;
    z-index: 3;
}
.fm-stat {
    background: #fff;
    border-radius: var(--fm-radius);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(18,10,36,.12);
    transition: transform .4s var(--fm-ease);
}
.fm-stat:hover { transform: translateY(-8px); }
.fm-stat strong { display: block; font-size: 2.8rem; color: var(--fm-primary); font-variant-numeric: tabular-nums; }
.fm-stat span { color: var(--fm-muted); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }

/* ---------- Sections ---------- */
.fm-section { padding: 5rem 1.25rem; max-width: 1200px; margin: 0 auto; }
.fm-section-alt { max-width: none; background: #fff; }
.fm-section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.fm-heading {
    position: relative;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    text-align: center;
    margin: 0 0 2.5rem;
    padding-bottom: .6rem;
}
.fm-heading::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin: .6rem auto 0;
    background: linear-gradient(90deg, var(--fm-primary), var(--fm-accent));
    border-radius: 4px;
    transform: scaleX(0);
    transition: transform .9s var(--fm-ease) .3s;
}
.fm-heading.in::after { transform: scaleX(1); }

/* Override plugin cards for a richer look */
.fm-home .fm-card {
    border: none;
    border-radius: var(--fm-radius);
    padding: 0;
    padding-bottom: 1.25rem;
    box-shadow: 0 6px 20px rgba(18,10,36,.08);
    transition: transform .45s var(--fm-ease), box-shadow .45s var(--fm-ease);
    background: #fff;
    overflow: hidden;

    a {
        display: block;
    }
}
.fm-home .fm-card:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(123,44,191,.22); }
.fm-home .fm-card img { transition: transform .6s var(--fm-ease); }
.fm-home .fm-card:hover img { transform: scale(1.06); }
.fm-home .fm-card h3 a { color: var(--fm-text); text-decoration: none; font-size: 1.3rem; }
.fm-home .fm-date { color: var(--fm-primary); font-weight: 600; }
.fm-home .fm-chip { transition: transform .25s; }
.fm-home .fm-chip:hover { transform: scale(1.05); }
.fm-home .fm-btn { transition: transform .3s var(--fm-ease); }
.fm-home .fm-btn:hover { transform: translateY(-2px); }

.fm-home .fm-calendar { background: #fff; border-radius: var(--fm-radius); padding: 1.25rem; box-shadow: 0 6px 20px rgba(18,10,36,.08); }

.fm-card-content {
    padding: 1rem;
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s var(--fm-ease), transform .9s var(--fm-ease);
    transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- CTA ---------- */
.fm-cta {
    margin: 2rem 1.25rem 5rem;
    padding: 4rem 1.5rem;
    border-radius: 24px;
    text-align: center;
    color: #fff;
    background: linear-gradient(120deg, var(--fm-primary), var(--fm-accent), var(--fm-primary));
    background-size: 200% 200%;
    animation: fm-gradient 8s ease infinite;
    max-width: 1150px;
    margin-left: auto;
    margin-right: auto;
}
.fm-cta h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .5rem; }
.fm-cta p { opacity: .92; margin-bottom: 1.8rem; }
.fm-cta .fm-btn-primary { animation: fm-pulse 2.4s infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    .fm-hero { min-height: 92vh; padding-top: 5rem; }
    .fm-count-box { min-width: 70px; }
    .fm-count-box span { font-size: 1.5rem; }
    .fm-section { padding: 3.5rem 1rem; }
    .fm-stats { margin-top: -30px; }
    .fm-blob { filter: blur(40px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal, .fm-fade, .fm-word { opacity: 1 !important; transform: none !important; }
}
