/* public/css/home.css
   Unitas home page. Everything is scoped to .uh so the TOKI page and shared layout are unaffected. */

header.scrolled {
    background: rgba(6, 24, 43, .82)
}

.uh {
    --u-display: "Bricolage Grotesque", "Montserrat", system-ui, sans-serif;
    --u-mute: #8ba0b2;
    --u-ease: cubic-bezier(.16, 1, .3, 1)
}

.uh h1, .uh h2, .uh h3 {
    font-family: var(--u-display);
    text-wrap: balance
}

.uh p {
    text-wrap: pretty
}

.uh a:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 4px;
    border-radius: 6px
}

/* ---------- buttons ---------- */
.uh .h-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem
}

.uh .h-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.6rem;
    border: 1px solid rgba(234, 242, 248, .5);
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--cream);
    transition: background .25s, border-color .25s, color .25s
}

.uh .h-btn:hover {
    border-color: var(--cream);
    background: rgba(234, 242, 248, .08)
}

.uh .h-btn-fill {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink)
}

.uh .h-btn-fill:hover {
    background: var(--accent-soft);
    border-color: var(--accent-soft)
}

/* ---------- section scaffolding ---------- */
.uh .h-sec {
    position: relative;
    padding: clamp(4.5rem, 9vw, 8rem) 0;
    scroll-margin-top: 3.5rem
}

.uh .h-sec h2 {
    font-size: clamp(2rem, 3.8vw, 3.4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.03em;
    max-width: 14ch
}

.uh .h-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem 3rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem)
}

.uh .h-head p, .uh .h-services-intro p, .uh .h-voices-head p {
    color: var(--cream-dim);
    line-height: 1.7;
    max-width: 38ch
}

/* ---------- hero ---------- */
.uh .h-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding-top: 7rem;
    overflow: hidden;
    scroll-margin-top: 0
}

.uh .h-hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(58% 70% at 76% 48%, rgba(26, 167, 230, .17), transparent 70%),
    radial-gradient(38% 46% at 6% 92%, rgba(225, 27, 44, .1), transparent 70%)
}

.uh .h-hero-inner {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 3rem);
    padding-bottom: 2rem
}

.uh .h-hero h1 {
    font-size: clamp(2.6rem, 4.3vw, 4.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.035em;
    max-width: none
}

.uh .h-hero h1 .line {
    display: block;
    overflow: hidden;
    padding-bottom: .14em;
    margin-bottom: -.14em
}

.uh .h-hero h1 .line > span {
    display: block;
    transform: translateY(112%);
    animation: hRise 1s var(--u-ease) forwards;
    animation-delay: calc(.15s + var(--n) * .1s)
}

@keyframes hRise {
    to {
        transform: none
    }
}

@keyframes hFade {
    to {
        opacity: 1
    }
}

.uh .h-lead {
    margin-top: 1.7rem;
    max-width: 44ch;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--cream-dim);
    opacity: 0;
    animation: hFade .9s ease .75s forwards
}

.uh .h-hero .h-actions {
    margin-top: 2.2rem;
    opacity: 0;
    animation: hFade .9s ease .95s forwards
}

/* ---------- convergence diagram ---------- */
.uh .h-converge {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible
}

.uh .h-ring {
    fill: none;
    stroke: rgba(234, 242, 248, .16);
    stroke-width: 1.2;
    stroke-dasharray: 2 8;
    stroke-linecap: round
}

.uh .h-ring-in {
    stroke: rgba(234, 242, 248, .09)
}

.uh .h-thread {
    fill: none;
    stroke: rgba(90, 200, 245, .62);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: hDraw 1.3s var(--u-ease) forwards;
    animation-delay: calc(.6s + var(--i) * .14s);
    transition: stroke .25s, stroke-width .25s
}

@keyframes hDraw {
    to {
        stroke-dashoffset: 0
    }
}

.uh .h-link:hover .h-thread,
.uh .h-link:focus-within .h-thread {
    stroke: var(--accent-soft);
    stroke-width: 3.2
}

.uh .h-packet {
    fill: #fff;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(90, 200, 245, .95))
}

.uh a.h-node,
.uh a.h-node:focus-visible {
    outline: none;
    cursor: pointer
}

.uh .h-hit {
    fill: transparent;
    stroke: none;
    pointer-events: all;
    transition: fill .25s
}

.uh .h-node:focus-visible .h-hit {
    fill: rgba(26, 167, 230, .14);
    stroke: var(--accent-soft);
    stroke-width: 1.5
}

.uh .h-dot {
    fill: var(--ink);
    stroke: var(--accent);
    stroke-width: 2.6;
    opacity: 0;
    animation: hFade .5s ease forwards;
    animation-delay: calc(.45s + var(--i) * .14s);
    transition: fill .2s, stroke .2s
}

.uh .h-node:hover .h-dot,
.uh .h-node:focus-visible .h-dot {
    fill: var(--accent);
    stroke: var(--accent-soft)
}

.uh .h-node text {
    fill: var(--cream);
    font-family: var(--u-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.01em;
    opacity: 0;
    animation: hFade .6s ease forwards;
    animation-delay: calc(.6s + var(--i) * .14s);
    transition: fill .2s
}

.uh .h-node:hover text,
.uh .h-node:focus-visible text {
    fill: var(--accent-soft)
}

.uh .h-core circle {
    fill: var(--ink-2);
    stroke-width: 3;
    opacity: 0;
    animation: hFade .8s ease .3s forwards
}

.uh .h-core path {
    fill: none;
    stroke: var(--cream);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    animation: hFade .8s ease .45s forwards
}

/* ---------- clients row ---------- */
.uh .h-proof {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.2rem 2.2rem;
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--line)
}

.uh .h-proof p {
    flex: none;
    font-size: .85rem;
    color: var(--u-mute)
}

.uh .h-proof ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2rem;
    list-style: none
}

.uh .h-proof li {
    font-size: .92rem;
    font-weight: 500;
    color: var(--cream-dim)
}

/* ---------- services ---------- */
.uh .h-services-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start
}

.uh .h-services-intro {
    position: sticky;
    top: 7rem
}

.uh .h-services-intro p {
    margin-top: 1.4rem
}

.uh .h-disc-list {
    list-style: none
}

.uh .h-disc {
    position: relative;
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    column-gap: 1.2rem;
    padding: 2rem 0 2.2rem;
    border-top: 1px solid var(--line);
    scroll-margin-top: 7rem
}

.uh .h-disc:last-child {
    border-bottom: 1px solid var(--line)
}

/* the single thread that runs through all six rows */
.uh .h-disc:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(.8rem - 1px);
    top: 2.9rem;
    width: 2px;
    height: calc(100% + 1px);
    background: linear-gradient(var(--accent), rgba(26, 167, 230, .35));
    opacity: .55
}

.uh .h-disc-dot {
    position: relative;
    z-index: 1;
    justify-self: center;
    width: 11px;
    height: 11px;
    margin-top: calc(.9rem - 5.5px);
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--accent)
}

.uh .h-disc h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.02em;
    transition: color .25s
}

.uh .h-disc-main p {
    margin-top: .6rem;
    max-width: 52ch;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--cream-dim)
}

.uh .h-disc-main .h-disc-tools {
    margin-top: .9rem;
    font-size: .84rem;
    color: var(--u-mute)
}

.uh .h-glyph {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: var(--u-mute);
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .25s
}

.uh .h-disc:hover h3,
.uh .h-disc:target h3 {
    color: var(--accent-soft)
}

.uh .h-disc:hover .h-glyph,
.uh .h-disc:target .h-glyph {
    stroke: var(--accent)
}

/* ---------- work ---------- */
.uh .h-work {
    background: var(--ink-2)
}

.uh .h-work-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1.2rem, 2.5vw, 2.2rem);
    row-gap: clamp(3rem, 5vw, 4.5rem)
}

.uh .h-case {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    color: inherit
}

.uh .h-w7 {
    grid-column: span 7
}

.uh .h-w5 {
    grid-column: span 5
}

.uh .h-case-feat {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(1.5rem, 3.5vw, 3.5rem);
    align-items: center
}

.uh .h-shot {
    position: relative;
    height: clamp(220px, 24vw, 340px);
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--ink-3);
    transition: border-color .3s
}

.uh .h-case-feat .h-shot {
    height: clamp(260px, 32vw, 440px)
}

.uh .h-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, var(--ink-3) 8%, #17405f 18%, var(--ink-3) 33%);
    background-size: 200% 100%;
    animation: hShim 1.4s linear infinite
}

@keyframes hShim {
    to {
        background-position: -200% 0
    }
}

.uh .h-shot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity .6s
}

.uh .h-shot img.loaded {
    opacity: 1
}

.uh .h-case h3 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: .22em;
    transition: text-decoration-color .25s
}

.uh .h-case-feat h3 {
    font-size: clamp(1.9rem, 3vw, 2.6rem)
}

.uh .h-case-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

.uh .h-case-body .h-case-type {
    margin-top: .45rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--accent-soft)
}

.uh .h-case-body p {
    margin-top: .9rem;
    max-width: 48ch;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--cream-dim)
}

.uh .h-case-body .h-case-tags {
    margin-top: .8rem;
    font-size: .84rem;
    color: var(--u-mute)
}

.uh .h-visit {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1.2rem;
    font-size: .9rem;
    font-weight: 600
}

.uh .h-visit svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .25s
}

.uh .h-case:hover .h-shot,
.uh .h-case:focus-visible .h-shot {
    border-color: var(--accent)
}

.uh .h-case:hover h3,
.uh .h-case:focus-visible h3 {
    text-decoration-color: var(--accent)
}

.uh .h-case:hover .h-visit svg {
    transform: translate(2px, -2px)
}

/* ---------- testimonials ---------- */
.uh .h-voices-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start
}

.uh .h-voices-head p {
    margin-top: 1.4rem
}

.uh .h-quotes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
    row-gap: 3rem
}

.uh .h-quote-lead {
    grid-column: 1 / -1
}

.uh .h-quote:not(.h-quote-lead) {
    padding-top: 1.6rem;
    border-top: 1px solid var(--line)
}

.uh .h-quote blockquote p {
    font-family: var(--u-display);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -.01em
}

.uh .h-quote-lead blockquote p {
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.02em
}

.uh .h-quote figcaption {
    margin-top: 1.1rem;
    font-size: .88rem;
    color: var(--u-mute)
}

/* ---------- process ---------- */
.uh .h-process {
    background: var(--ink-2)
}

.uh .h-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    list-style: none
}

.uh .h-steps::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 0;
    top: 17px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft) 70%, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.8s var(--u-ease)
}

.uh .h-steps.in::before {
    transform: scaleX(1)
}

.uh .h-step-n {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 1.6rem;
    border-radius: 50%;
    background: var(--ink-2);
    border: 2px solid var(--accent);
    font-family: var(--u-display);
    font-size: .95rem;
    font-weight: 700;
    color: var(--cream);
    transition: background .4s ease, color .4s ease
}

.uh .h-steps.in .h-step-n {
    background: var(--accent);
    color: var(--ink)
}

.uh .h-steps li:nth-child(2) .h-step-n {
    transition-delay: .5s
}

.uh .h-steps li:nth-child(3) .h-step-n {
    transition-delay: 1s
}

.uh .h-steps li:nth-child(4) .h-step-n {
    transition-delay: 1.5s
}

.uh .h-steps h3 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -.02em
}

.uh .h-steps p {
    margin-top: .6rem;
    max-width: 30ch;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--cream-dim)
}

/* ---------- about ---------- */
.uh .h-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start
}

.uh .h-about-lead {
    font-family: var(--u-display);
    font-size: clamp(1.7rem, 3.2vw, 2.8rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -.025em;
    text-wrap: balance
}

.uh .h-about-body p {
    line-height: 1.75;
    color: var(--cream-dim)
}

.uh .h-about-body p + p {
    margin-top: 1.2rem
}

.uh .h-facts {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--line)
}

.uh .h-facts dt {
    font-family: var(--u-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em
}

.uh .h-facts dd {
    margin-top: .55rem;
    font-size: .82rem;
    color: var(--u-mute)
}

/* ---------- contact ---------- */
.uh .h-cta {
    background: var(--ink-2);
    overflow: hidden
}

.uh .h-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft) 55%, var(--red))
}

.uh .h-cta::after {
    content: "";
    position: absolute;
    right: -12%;
    bottom: -45%;
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 167, 230, .18), transparent 65%);
    pointer-events: none
}

.uh .h-cta .wrap {
    position: relative;
    z-index: 1
}

.uh .h-cta h2 {
    max-width: none;
    font-size: clamp(2.8rem, 8.2vw, 7.4rem);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.045em
}

.uh .h-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem 3rem;
    margin-top: clamp(2rem, 4vw, 3.5rem)
}

.uh .h-cta-row p {
    max-width: 40ch;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--cream-dim)
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .uh .h-hero {
        min-height: 0;
        padding-top: 6rem
    }

    .uh .h-hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem
    }

    .uh .h-converge {
        max-width: 560px;
        justify-self: center
    }

    .uh .h-services-grid,
    .uh .h-voices-grid,
    .uh .h-about-grid {
        grid-template-columns: 1fr
    }

    .uh .h-services-intro {
        position: static
    }

    .uh .h-case-feat {
        grid-template-columns: 1fr
    }

    .uh .h-w7, .uh .h-w5 {
        grid-column: span 6
    }

    .uh .h-shot,
    .uh .h-case-feat .h-shot {
        height: clamp(200px, 38vw, 320px)
    }
}

@media (max-width: 900px) {
    .uh .h-steps {
        grid-template-columns: 1fr;
        gap: 2.2rem
    }

    .uh .h-steps::before {
        left: 17px;
        right: auto;
        top: 18px;
        bottom: 0;
        width: 2px;
        height: auto;
        background: linear-gradient(var(--accent), transparent);
        transform: scaleY(0);
        transform-origin: top
    }

    .uh .h-steps.in::before {
        transform: scaleY(1)
    }

    .uh .h-steps li {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        column-gap: 1.2rem
    }

    .uh .h-step-n {
        grid-row: 1 / span 2;
        margin-bottom: 0
    }

    .uh .h-steps h3, .uh .h-steps p {
        grid-column: 2
    }
}

@media (max-width: 640px) {
    .uh .h-w7, .uh .h-w5 {
        grid-column: 1 / -1
    }

    .uh .h-quotes {
        grid-template-columns: 1fr
    }

    .uh .h-facts {
        grid-template-columns: repeat(2, auto);
        justify-content: start;
        gap: 1.6rem 3rem
    }

    .uh .h-proof {
        flex-direction: column;
        align-items: flex-start
    }

    .uh .h-proof ul {
        gap: .4rem 1.4rem
    }

    .uh .h-node text {
        font-size: 27px
    }

    .uh .h-disc {
        grid-template-columns: 1.6rem minmax(0, 1fr);
        column-gap: 1rem
    }

    .uh .h-glyph {
        display: none
    }

    .uh .h-actions .h-btn {
        justify-content: center
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .uh .h-hero h1 .line > span {
        animation: none;
        transform: none
    }

    .uh .h-lead,
    .uh .h-hero .h-actions,
    .uh .h-dot,
    .uh .h-node text,
    .uh .h-core circle,
    .uh .h-core path {
        animation: none;
        opacity: 1
    }

    .uh .h-thread {
        animation: none;
        stroke-dashoffset: 0
    }

    .uh .h-shimmer {
        animation: none
    }

    .uh .h-steps::before {
        transition: none;
        transform: none
    }

    .uh .h-step-n {
        transition: none
    }
}
