/* Homepage-only layout. Uses the shared palette and button system. */
#main-header {
    background: rgba(8, 8, 10, .56) !important;
    -webkit-backdrop-filter: blur(20px) saturate(125%);
    backdrop-filter: blur(20px) saturate(125%);
    border-bottom: 1px solid rgba(255,255,255,.045) !important;
    box-shadow: none !important;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    #main-header { background: rgba(8, 8, 10, .88) !important; }
}
.home-page {
    --home-header-height: 4rem;
    padding-top: 0 !important;
}
.home-page .home-container { max-width: 72rem; }
.home-page section { scroll-margin-top: 5rem; }
.home-page .home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(var(--home-header-height) + clamp(3rem, 6vw, 5.5rem)) 0 clamp(3rem, 6vw, 5rem);
    background: linear-gradient(180deg, #0d0d10 0%, var(--bg) 84%);
}
.home-page .home-hero .home-container { position: relative; z-index: 2; }
/* Light is drawn by oversized circular layers instead of section-sized gradient rectangles. */
.home-page .home-hero::before {
    content: '';
    position: absolute;
    width: clamp(32rem, 62vw, 58rem);
    aspect-ratio: 1;
    top: -23rem;
    right: -12rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.13) 0%, rgba(255,255,255,.065) 24%, rgba(255,255,255,.022) 46%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.home-page .home-hero::after {
    content: '';
    position: absolute;
    width: clamp(31rem, 54vw, 51rem);
    aspect-ratio: 1;
    top: -43%;
    right: -9%;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 50%;
    box-shadow: 0 0 62px rgba(255,255,255,.035), inset 0 0 54px rgba(255,255,255,.018);
    opacity: .8;
    pointer-events: none;
    z-index: 1;
}
.home-page .home-hero .home-container > * { animation: home-arrive .7s ease-out both; }
.home-page .home-hero h1 { animation-delay: .08s; }
.home-page .home-hero .home-intro { animation-delay: .16s; }
.home-page .home-hero .home-actions { animation-delay: .24s; }
.home-page .home-hero .home-work-link { animation-delay: .32s; }
.home-page .home-section { padding: clamp(3.5rem, 7vw, 6rem) 0; border-top: 1px solid var(--border); }
.home-page .home-eyebrow { margin-bottom: 1.25rem; color: var(--text-2); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.home-page .home-hero h1 { max-width: 64rem; font-size: clamp(2.6rem, 5.8vw, 5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.05em; text-wrap: balance; }
.home-page .home-heading-secondary { color: var(--text-2); }
.home-page .home-hero .home-heading-secondary { color: var(--text); text-shadow: 0 0 28px rgba(255,255,255,.12); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .home-page .home-hero .home-heading-secondary {
        background: linear-gradient(110deg, #fff 15%, #d4d4d8 55%, #a1a1aa);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}
.home-page .home-hero .home-eyebrow::before { content: ''; display: inline-block; width: .5rem; height: .5rem; margin-right: .75rem; border-radius: 50%; background: #e4e4e7; box-shadow: 0 0 12px rgba(255,255,255,.42); }
.home-page .home-intro { max-width: 42rem; margin-top: 1.75rem; color: var(--text-2); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.8; }
.home-page .home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2rem; }
.home-page .home-primary { min-height: 3.25rem; padding: .875rem 1.5rem; gap: .75rem; font-weight: 600; border-color: rgba(255,255,255,.2); background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035)); box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 8px 28px rgba(0,0,0,.32); }
.home-page .home-primary:hover, .home-page .home-primary:focus-visible { border-color: rgba(255,255,255,.36); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 32px rgba(0,0,0,.38); }
.home-page .home-primary svg, .home-page .home-text-link svg, .home-page .home-community-action svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.home-page .home-text-link { display: inline-flex; align-items: center; gap: .75rem; min-height: 2.75rem; color: var(--text); font-weight: 500; }
.home-page a.home-text-link:hover { text-decoration: underline; text-underline-offset: .3em; }
.home-page .home-work-link { display: inline-flex; align-items: center; gap: 1rem; min-height: 2.75rem; margin-top: 2.5rem; color: var(--text-2); font-size: .875rem; }
.home-page .home-work-link:hover { color: var(--text); }
.home-page a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.home-page .home-section-heading { margin-bottom: 2.5rem; }
.home-page .home-section h2 { font-size: clamp(1.875rem, 3.4vw, 2.75rem); line-height: 1.2; font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
.home-page .home-github {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: linear-gradient(145deg, #19191c, #111113);
    box-shadow: 0 22px 60px -36px rgba(0,0,0,.85);
    transition: transform .35s ease, border-color .25s ease, background .25s ease;
}
.home-page .home-github::before {
    content: '';
    display: block;
    position: absolute;
    width: 23rem;
    height: 23rem;
    top: -11rem;
    right: -8rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.09) 0%, rgba(255,255,255,.035) 36%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.home-page .home-github > * { position: relative; z-index: 1; }
.home-page .home-github:hover, .home-page .home-github:focus-visible { border-color: var(--border-2); background: linear-gradient(145deg, #1b1b1e, #121214); }
.home-page .home-github-identity { display: flex; align-items: center; gap: .875rem; margin-bottom: 1rem; }
.home-page .home-github-identity svg { width: 2rem; height: 2rem; flex-shrink: 0; }
.home-page .home-github h3 { font-size: 1.75rem; font-weight: 800; }
.home-page .home-github-copy > p { max-width: 32rem; color: var(--text-2); line-height: 1.8; }
.home-page .home-github-copy > .home-text-link { margin-top: 1.25rem; }
.home-page .home-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.home-page .home-stats > div { display: flex; flex-direction: column; gap: .375rem; padding-top: 1rem; border-top: 1px solid var(--border-2); }
.home-page .home-stats dt { color: var(--text-2); font-size: .75rem; letter-spacing: .06em; }
.home-page .home-stats dd { order: -1; font-family: Manrope, sans-serif; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.home-page .home-section-subtle {
    position: relative;
    isolation: isolate;
    background: var(--surface);
}
.home-page .home-section-subtle::before {
    content: '';
    position: absolute;
    width: 30rem;
    height: 30rem;
    left: -13rem;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.05) 0%, rgba(255,255,255,.018) 38%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.home-page .home-section-subtle > .home-container { position: relative; z-index: 1; }
.home-page .home-approach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
.home-page .home-approach-copy p { color: var(--text-2); font-size: 1.0625rem; line-height: 1.8; }
.home-page .home-approach-copy p + p { margin-top: 1rem; }
.home-page .home-approach-copy blockquote { margin-top: 1.75rem; padding-left: 1rem; border-left: 2px solid var(--border-2); color: var(--text); font-size: .9375rem; line-height: 1.7; }
.home-page .home-capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; }
.home-page .home-capability {
    position: relative;
    isolation: isolate;
    padding: 1.75rem 0 2rem;
    border-top: 1px solid var(--border-2);
    background: transparent;
}
.home-page .home-capability::before { content: ''; position: absolute; top: -1px; left: 0; width: 32%; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.28), transparent); box-shadow: none; pointer-events: none; z-index: 2; }
.home-page .home-capability::after {
    content: '';
    position: absolute;
    width: 13rem;
    height: 13rem;
    left: -4rem;
    top: -5rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.05) 0%, rgba(255,255,255,.018) 38%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.home-page .home-capability > * { position: relative; z-index: 1; }
.home-page .home-capability-number { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1.25rem; border: 1px solid rgba(255,255,255,.12); border-radius: .75rem; background: rgba(255,255,255,.035); box-shadow: inset 0 1px 0 rgba(255,255,255,.045); color: var(--text-2); font-size: .75rem; font-variant-numeric: tabular-nums; }
.home-page .home-capability h3 { margin-bottom: .75rem; font-size: 1.25rem; font-weight: 700; }
.home-page .home-capability p { max-width: 30rem; color: var(--text-2); line-height: 1.8; }
.home-page .home-services-link { margin-top: .75rem; }
.home-page .home-community { border-top: 1px solid var(--border-2); }
.home-page .home-community-link {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border-2);
    background: transparent;
}
.home-page .home-community-link::before {
    content: '';
    position: absolute;
    width: 20rem;
    height: 14rem;
    left: -7rem;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.05) 0%, rgba(255,255,255,.018) 38%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.home-page .home-community-link > * { position: relative; z-index: 1; }
.home-page .home-community-link h3 { margin-bottom: .5rem; font-size: 1.25rem; font-weight: 700; }
.home-page .home-community-link p { color: var(--text-2); line-height: 1.7; }
.home-page .home-community-link .home-community-count { margin-top: .5rem; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.home-page .home-community-action { display: inline-flex; align-items: center; gap: .75rem; flex-shrink: 0; min-height: 2.75rem; font-size: .875rem; transition: color .2s ease; }
.home-page .home-donate::before { background: radial-gradient(circle, rgba(255,221,0,.085) 0%, rgba(255,221,0,.028) 38%, transparent 70%); }
.home-page .home-telegram::before { background: radial-gradient(circle, rgba(42,171,238,.095) 0%, rgba(42,171,238,.03) 38%, transparent 70%); }
.home-page .home-donate .home-community-action { color: #e3d58d; }
.home-page .home-telegram .home-community-action { color: #95bbd1; }
.home-page .home-donate:hover .home-community-action, .home-page .home-donate:focus-visible .home-community-action { color: #ffdd00; }
.home-page .home-telegram:hover .home-community-action, .home-page .home-telegram:focus-visible .home-community-action { color: #64c4f5; }
.home-page .home-contact {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, #121214 0%, var(--bg) 100%);
}
.home-page .home-contact::before { content: ''; position: absolute; top: 0; left: 15%; width: 70%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); box-shadow: none; pointer-events: none; z-index: 2; }
.home-page .home-contact::after {
    content: '';
    position: absolute;
    width: clamp(22rem, 38vw, 34rem);
    aspect-ratio: 1;
    top: -14rem;
    right: 3%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.085) 0%, rgba(255,255,255,.03) 36%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.home-page .home-contact > .home-container { position: relative; z-index: 1; }
/* The existing reveal script opts into hiding only once it is running. */
.home-page .animated-item { opacity: 1; }
@media (min-width: 768px) {
    .home-page { --home-header-height: 5rem; padding-top: 0 !important; }
    .home-page section { scroll-margin-top: 6rem; }
}
@media (max-width: 767px) {
    .home-page .home-github, .home-page .home-approach, .home-page .home-capabilities { grid-template-columns: minmax(0, 1fr); }
    .home-page .home-github, .home-page .home-approach { gap: 2rem; }
    .home-page .home-community-link { align-items: flex-start; flex-direction: column; gap: .75rem; }
    .home-page .home-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 22rem);
        gap: .75rem;
    }
    .home-page .home-actions > a {
        width: 100%;
        justify-content: center;
    }
    .home-page .home-actions > .home-text-link {
        min-height: 3.25rem;
        padding: .875rem 1rem;
        border: 1px solid rgba(255,255,255,.10);
        border-radius: .75rem;
        background: rgba(255,255,255,.025);
        text-decoration: none;
    }
    .home-page .home-actions > a.home-text-link:hover,
    .home-page .home-actions > a.home-text-link:focus-visible {
        border-color: rgba(255,255,255,.18);
        background: rgba(255,255,255,.045);
        text-decoration: none;
    }
    .home-page .home-work-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .home-page .home-hero::before {
        width: 34rem;
        top: -19rem;
        right: -18rem;
    }
    .home-page .home-hero::after {
        width: 30rem;
        top: -17rem;
        right: -17rem;
        opacity: .58;
    }
    .home-page .home-community-link::before {
        width: 15rem;
        height: 11rem;
        left: -6rem;
    }
}
@media (max-width: 479px) {
    .home-page .home-actions { width: 100%; }
    .home-page .home-stats { column-gap: 1rem; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .home-page .home-github:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
    .home-page .home-hero .home-container > * { animation: none; }
    .home-page .home-github, .home-page .home-community-action { transition: none; }
}
@keyframes home-arrive {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}