/* ============================================================
   AutonoIQ v2 — home.css
   Page-specific layout for index.html only.
   Tokens + components live in core.css — never duplicate them.
   ============================================================ */

/* ----- Shared section headings (this page only) ----- */
.home-section-title {
    font-size: var(--text-h2);
    max-width: 24ch;
    margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
}
.home-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 3rem;
}
.home-section-head .home-section-title { margin-bottom: 0; }
.home-section-lede {
    max-width: 46ch;
    font-size: var(--text-small);
    margin-bottom: 0.35rem;
}
.home-section-head + .capabilities-grid { margin-top: clamp(2.25rem, 5vw, 3.75rem); }

/* ===== HERO ===== */
.home-hero {
    position: relative;
    min-height: 92vh;
    min-height: 92svh;
    display: flex;
    flex-direction: column;
    padding-top: 76px; /* fixed header height */
    background: var(--paper);
    overflow: hidden;
}
.home-hero__canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.home-hero__layout {
    position: relative;
    z-index: 1;
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(340px, 1.14fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5.5rem);
    padding-block: clamp(3rem, 8vh, 6rem) clamp(2rem, 5vh, 4rem);
}
.home-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
}
.home-hero__label { margin-bottom: 1.5rem; }
.home-hero__headline {
    font-size: var(--text-display);
    max-width: 12ch;
    margin-bottom: 1.75rem;
}
.home-hero__sub {
    max-width: 50ch;
    color: var(--muted);
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}
.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.home-hero__visual {
    position: relative;
    z-index: 1;
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.home-hero__bot {
    position: relative;
    width: min(100%, 46rem);
    height: clamp(28rem, 48vw, 39rem);
    margin-inline: auto clamp(-3rem, -3vw, -1rem);
    overflow: hidden;
    isolation: isolate;
}
.home-hero__bot::before {
    content: '';
    position: absolute;
    left: 12%;
    right: 4%;
    bottom: 5.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(19, 18, 16, 0.16);
    filter: blur(22px);
    z-index: -1;
}
.home-hero__spline {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
}
.home-hero__fallback {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 15rem;
    height: 21rem;
    transform: translate(-50%, -52%);
}
.home-hero__bot.is-loaded .home-hero__fallback {
    display: none;
}
.home-hero__fallback-head,
.home-hero__fallback-body {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid var(--ink-border-strong);
    background: rgba(246, 243, 237, 0.76);
    backdrop-filter: blur(3px);
}
.home-hero__fallback-head {
    top: 0;
    width: 8.25rem;
    height: 6.2rem;
    border-radius: 2.1rem 2.1rem 1rem 1rem;
}
.home-hero__fallback-head span {
    position: absolute;
    top: 2.55rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--ember);
    box-shadow: 0 0 0 0.55rem var(--ember-soft);
}
.home-hero__fallback-head span:first-child { left: 2.15rem; }
.home-hero__fallback-head span:last-child { right: 2.15rem; }
.home-hero__fallback-body {
    top: 7.15rem;
    width: 10.6rem;
    height: 11.4rem;
    border-radius: var(--radius);
}
.home-hero__fallback-body i {
    position: absolute;
    left: 2rem;
    height: 1px;
    background: var(--ink);
}
.home-hero__fallback-body i:nth-child(1) {
    top: 2.4rem;
    width: 6rem;
}
.home-hero__fallback-body i:nth-child(2) {
    top: 4.2rem;
    width: 4rem;
    background: var(--ember);
}
.home-hero__fallback-body i:nth-child(3) {
    top: 6rem;
    width: 6.8rem;
    opacity: 0.45;
}
.home-hero__foot {
    position: relative;
    z-index: 1;
    width: 100%;
}
.home-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 3rem;
    border-top: 1px solid var(--ink-border);
    padding-block: 1.4rem 2rem;
    font-family: var(--font-mono);
    font-size: var(--text-label);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.home-hero__stats strong {
    font-weight: 500;
    color: var(--ink);
    margin-right: 0.35rem;
}

/* ===== MARQUEE separators ===== */
.marquee__sep { color: var(--ember); }

/* ===== CAPABILITIES [ 01 ] ===== */
.capability {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}
.capability__index { color: var(--ember); }
.capability__title { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
.capability__body {
    color: var(--muted);
    font-size: var(--text-small);
    max-width: 52ch;
}
.capability__link {
    margin-top: auto;
    padding-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: var(--text-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-decoration: none;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.25s var(--ease-out);
}
.capability__link span {
    display: inline-block;
    transition: transform 0.3s var(--ease-out);
}
.capability__link:hover { color: var(--ember); }
.capability__link:hover span { transform: translateX(5px); }

/* ===== SELECTED WORK [ 02 ] ===== */
.work-list { border-top: 1px solid var(--cream-border); }
.work-row {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr auto;
    gap: 1rem 3rem;
    align-items: start;
    padding-block: clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--cream-border);
    text-decoration: none;
    color: inherit;
}
.work-row__client { padding-top: 0.55rem; }
.work-row__title {
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    margin-bottom: 0.85rem;
    transition: color 0.3s var(--ease-out);
}
.work-row:hover .work-row__title { color: var(--ember-bright); }
.work-row__outcome {
    color: var(--muted-dark);
    max-width: 56ch;
    margin-bottom: 1.2rem;
}
.work-row__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted-dark);
}
.work-row__tags li { position: relative; }
.work-row__tags li:not(:last-child)::after {
    content: '\00B7';
    position: absolute;
    right: -0.95rem;
    color: var(--ember-bright);
}
.work-row__arrow {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--cream);
    opacity: 0.4;
    padding-top: 0.35rem;
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out),
                color 0.3s var(--ease-out);
}
.work-row:hover .work-row__arrow {
    transform: translateX(8px);
    opacity: 1;
    color: var(--ember-bright);
}
.work-all { margin-top: clamp(2.25rem, 4vw, 3rem); }

/* ===== PROOF [ 03 ] ===== */
.proof-grid {
    border-top: 1px solid var(--ink-border);
    padding-top: clamp(2rem, 4vw, 3rem);
}
.proof-grid .stat__caption { max-width: 18ch; }

/* ===== PROCESS [ 04 ] ===== */
.process-list { border-top: 1px solid var(--ink-border); }
.process-row {
    display: grid;
    grid-template-columns: minmax(90px, 200px) 1fr;
    gap: 1rem 3rem;
    align-items: start;
    padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
    border-bottom: 1px solid var(--ink-border);
}
.process-row__num {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1;
    color: var(--ember);
    font-variant-numeric: tabular-nums;
}
.process-row__title {
    font-size: var(--text-h3);
    margin-bottom: 0.5rem;
}
.process-row__text {
    color: var(--muted);
    max-width: 58ch;
    font-size: var(--text-small);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .home-hero__layout {
        display: block;
    }
    .home-hero__inner {
        padding-block: clamp(3rem, 8vh, 6rem) clamp(2rem, 5vh, 4rem);
    }
    .home-hero__visual {
        display: none;
    }
    .work-row {
        grid-template-columns: 1fr auto;
    }
    .work-row__client {
        grid-column: 1 / -1;
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .home-hero { min-height: 88vh; min-height: 88svh; }
    .home-hero__actions .btn--lg {
        padding: 1rem 1.6rem;
        font-size: 0.9375rem;
    }
    .home-hero__stats { gap: 0.75rem 1.75rem; }
    .work-row { grid-template-columns: 1fr; }
    .work-row__arrow { display: none; }
    .process-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .process-row__num { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__spline {
        display: none;
    }
    .home-hero__fallback {
        display: block;
    }
}
