/* Index page only — hero, layout width, footer, card entrance */

/* ----- Layout ----- */

.md-main:has(.index-home) .md-content,
.md-main:has(.index-home) .md-content__inner {
    max-width: 1180px;
    position: relative;
    z-index: 1;
}

.md-main:has(.index-home) .md-content {
    margin: 0 auto;
}

.md-main:has(.index-home) .md-sidebar--secondary {
    display: none;
}

@media screen and (min-width: 76.25em) {
    .md-main:has(.index-home) .md-sidebar--primary {
        display: none;
    }
}

.md-main:has(.index-home) .md-main__inner {
    padding-top: 0;
    margin-top: 0;
}

.md-main:has(.index-home) .md-content__inner {
    padding-top: 0.25rem;
    margin-top: 0;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.md-main:has(.index-home) .md-typeset {
    margin-top: 0;
}

.md-main:has(.index-home) .md-content,
.md-main:has(.index-home) .md-typeset,
.md-main:has(.index-home) .index-home {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.md-typeset .index-home {
    margin-top: 0;
    padding-top: 0;
}

.md-typeset .index-home > :first-child {
    margin-top: 0;
}

.md-typeset .index-home > :last-child {
    margin-bottom: 0 !important;
}

.md-typeset .index-home > h1,
.md-typeset .index-home .index-hero > h1 {
    margin: 0;
}

.md-typeset .index-home .index-hero > h1::after {
    display: none;
}

/* ----- Hero ----- */

.index-hero {
    position: relative;
    padding: clamp(0.75rem, 2vw, 1.25rem) 0.5rem clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 -1.2rem 0.5rem;
    padding-left: calc(1.2rem + 0.5rem);
    padding-right: calc(1.2rem + 0.5rem);
    overflow: visible;
    background:
        radial-gradient(ellipse 90% 140% at 0% 35%, var(--index-glow-mid), transparent 58%),
        radial-gradient(ellipse 50% 80% at 18% 0%, var(--index-glow-soft), transparent 55%);
}

.index-hero::before {
    content: "";
    position: absolute;
    top: -20%;
    left: 0;
    width: min(520px, 70vw);
    height: min(420px, 70vw);
    border-radius: 50%;
    background: radial-gradient(circle, var(--index-orb) 0%, transparent 68%);
    filter: blur(18px);
    animation: indexOrbFloat 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.index-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--index-crimson-bright), var(--index-steel), transparent);
    opacity: 0.55;
}

@keyframes indexOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, 16px) scale(1.08); }
}

.md-typeset .index-hero > h1 {
    position: relative;
    z-index: 1;
    font-family: "Bebas Neue", "Impact", sans-serif;
    font-weight: 400;
    font-size: clamp(3.4rem, 10vw, 6.4rem);
    line-height: 0.9;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--index-text);
    display: block;
    margin: 0 0 0.85rem;
    animation: indexRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.md-typeset .index-hero > h1::after {
    display: none;
}

.index-hero__eyebrow {
    position: relative;
    z-index: 1;
    margin: 0 0 0.75rem !important;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--index-crimson-bright);
    animation: indexRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.md-typeset .index-hero__lede {
    position: relative;
    z-index: 1;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 0 1.25rem !important;
    font-family: "Source Sans 3", sans-serif;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 400;
    line-height: 1.55;
    color: var(--index-muted);
    animation: indexRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.index-hero__status {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 !important;
    padding: 0.4rem 0.85rem;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--index-text);
    background: color-mix(in srgb, var(--index-panel) 90%, transparent);
    border: 1px solid var(--index-line);
    border-radius: 6px;
    backdrop-filter: blur(8px);
    animation: indexRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.index-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--index-crimson-bright);
    box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.55);
    animation: indexPulse 1.8s ease-out infinite;
    flex-shrink: 0;
}

@keyframes indexPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(239, 83, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0); }
}

@keyframes indexRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-md-color-scheme="default"] .index-hero {
    background: transparent;
}

[data-md-color-scheme="default"] .index-hero::before {
    display: none;
}

[data-md-color-scheme="default"] .index-hero__status {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ----- Index cards (entrance on top of shared .grid.cards) ----- */

.md-typeset .index-home .index-grid {
    margin-top: 1.5rem;
}

.md-typeset .index-home .index-grid > ul > li,
.md-typeset .index-home .index-grid > ol > li {
    animation: indexCardIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.md-typeset .index-home .index-grid > ul > li:nth-child(1),
.md-typeset .index-home .index-grid > ol > li:nth-child(1) { animation-delay: 0.08s; }
.md-typeset .index-home .index-grid > ul > li:nth-child(2),
.md-typeset .index-home .index-grid > ol > li:nth-child(2) { animation-delay: 0.14s; }
.md-typeset .index-home .index-grid > ul > li:nth-child(3),
.md-typeset .index-home .index-grid > ol > li:nth-child(3) { animation-delay: 0.2s; }
.md-typeset .index-home .index-grid > ul > li:nth-child(4),
.md-typeset .index-home .index-grid > ol > li:nth-child(4) { animation-delay: 0.26s; }
.md-typeset .index-home .index-grid > ul > li:nth-child(5),
.md-typeset .index-home .index-grid > ol > li:nth-child(5) { animation-delay: 0.32s; }
.md-typeset .index-home .index-grid > ul > li:nth-child(6),
.md-typeset .index-home .index-grid > ol > li:nth-child(6) { animation-delay: 0.38s; }

@keyframes indexCardIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-typeset .index-home .index-card__cta {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--index-crimson-bright);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, letter-spacing 0.25s ease;
}

@media (max-width: 600px) {
    .index-hero {
        padding-top: 0.5rem;
        padding-bottom: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-hero::before,
    .index-pulse,
    .md-typeset .index-hero > h1,
    .index-hero__eyebrow,
    .index-hero__lede,
    .index-hero__status,
    .md-typeset .index-home .index-grid > ul > li,
    .md-typeset .index-home .index-grid > ol > li {
        animation: none !important;
    }
}

/* ----- Index footer ----- */

.md-typeset .index-footer {
    width: 100vw;
    max-width: 100vw;
    margin: 3.5rem 0 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--index-line);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--index-ink-soft) 40%, transparent) 0%,
            color-mix(in srgb, var(--index-crimson) 8%, var(--index-ink)) 100%
        );
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.md-typeset .index-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    max-width: 640px;
    margin: 0 auto;
}

.md-typeset .index-footer p,
.md-typeset .index-footer nav {
    margin: 0 !important;
    font-family: "Source Sans 3", sans-serif;
}

.md-typeset .index-footer__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--index-muted);
}

.md-typeset .index-footer__brand {
    font-family: "Bebas Neue", "Impact", sans-serif !important;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.md-typeset .index-footer__brand a {
    color: var(--index-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.md-typeset .index-footer__brand a:hover {
    color: var(--index-crimson-bright);
}

.md-typeset .index-footer__tagline {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--index-muted);
    letter-spacing: 0.01em;
}

.md-typeset .index-footer__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem !important;
    padding: 0.55rem 1rem;
    border: 1px solid var(--index-line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--index-panel) 80%, transparent);
    backdrop-filter: blur(8px);
}

.md-typeset .index-footer__sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--index-crimson-bright);
    opacity: 0.7;
}

.md-typeset .index-footer__link,
.md-typeset .index-footer__nav a {
    color: var(--index-text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.md-typeset .index-footer__link:hover,
.md-typeset .index-footer__nav a:hover {
    color: var(--index-crimson-bright);
}

[data-md-color-scheme="default"] .md-typeset .index-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

[data-md-color-scheme="default"] .md-typeset .index-footer__nav {
    background: #f8fafc;
    border-color: #e2e8f0;
}

@media (max-width: 600px) {
    .md-typeset .index-footer {
        padding: 2rem 1rem 1.5rem;
    }

    .md-typeset .index-footer__nav {
        gap: 0.5rem;
        padding: 0.45rem 0.75rem;
    }
}
