/* ==========================================================================
   Home page
   Full-screen microscopy video fixed behind the page. The hero sits on the
   video; the sections below slide over it.
   ========================================================================== */

#movies {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg);
}

#purple {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#movies::after {
    /* darker on the text side so the headline always reads */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 10, 11, 0.9) 0%, rgba(10, 10, 11, 0.7) 35%, rgba(10, 10, 11, 0.3) 62%, rgba(10, 10, 11, 0.05) 88%),
        linear-gradient(rgba(10, 10, 11, 0.5), rgba(10, 10, 11, 0) 25%, rgba(10, 10, 11, 0) 70%, rgba(10, 10, 11, 0.9));
}

@media (max-width: 767px) {
    #movies::after {
        background: linear-gradient(rgba(10, 10, 11, 0.55), rgba(10, 10, 11, 0.45) 40%, rgba(10, 10, 11, 0.8) 75%, rgba(10, 10, 11, 0.95));
    }
}

.nowrap {
    white-space: nowrap;
}

.accent {
    color: var(--accent);
}

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

#home {
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding:
        calc(var(--header-h) + env(safe-area-inset-top) + 2rem)
        max(var(--gutter), env(safe-area-inset-right))
        clamp(4rem, 12vh, 7rem)
        max(var(--gutter), env(safe-area-inset-left));
}

#in--video--logo {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 0.5vw + 0.8rem, 1.2rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #e4e4e4;
}

.hero__eyebrow img {
    width: auto;
    height: clamp(38px, 3vw + 18px, 52px);
}

.hero__title {
    max-width: 15em;
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 3.4vw + 1rem, 4.1rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: #fff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.6);
    text-wrap: balance;
}

.hero__tagline {
    max-width: 38ch;
    margin-top: 1.5rem;
    font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.22rem);
    line-height: 1.65;
    color: #cfcfcf;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.7);
    text-wrap: pretty;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: clamp(2rem, 4vw, 2.75rem);
}

.hero__actions .btn--ghost {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Short landscape screens: tighten the stack */
@media (max-height: 560px) and (orientation: landscape) {
    .hero__title {
        margin-top: 1rem;
        font-size: clamp(1.9rem, 4vw, 2.6rem);
    }

    .hero__tagline {
        margin-top: 1rem;
    }

    .hero__actions {
        margin-top: 1.25rem;
    }
}

@media (max-width: 400px) {
    .hero__actions .btn {
        flex: 1 1 100%;
    }
}

/* --- Sections below the hero ---------------------------------------------- */

.home-section {
    padding:
        clamp(4rem, 9vw, 7rem)
        max(var(--gutter), env(safe-area-inset-right))
        clamp(4rem, 9vw, 7rem)
        max(var(--gutter), env(safe-area-inset-left));
    background-color: rgba(10, 10, 11, 0.94);
}

.home-section + .home-section {
    padding-top: 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.8vw + 1.2rem, 2.75rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--text);
}

.section-intro {
    max-width: 58ch;
    margin-top: 1rem;
    font-size: clamp(1rem, 0.3vw + 0.95rem, 1.1rem);
    color: var(--text-muted);
    text-wrap: pretty;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: clamp(2rem, 4vw, 2.75rem);
    padding: 0.4rem 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--accent);
}

.text-link i {
    font-size: 0.85em;
    transition: transform 0.3s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .text-link:hover i {
        transform: translateX(4px);
    }
}

/* What we do */
.offer--grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.offer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-strong);
}

.offer i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: rgba(209, 157, 46, 0.12);
    color: var(--accent);
    font-size: 1.05rem;
}

.offer h3 {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
}

.offer p {
    margin-top: 0.6rem;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--text-muted);
}

@media (max-width: 1023px) {
    .offer--grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 559px) {
    .offer--grid {
        grid-template-columns: 1fr;
    }
}

/* Technologies preview (tiles come from data/technologies.js) */
#home--tech {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

/* With exactly three technologies: one large tile beside two stacked ones */
@media (min-width: 900px) {
    #home--tech:has(> :nth-child(3):last-child) {
        grid-template-columns: 1.4fr 1fr;
    }

    #home--tech:has(> :nth-child(3):last-child) > :first-child {
        grid-row: span 2;
    }
}

.tech--tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 280px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background-color: #000;
}

.tech--tile video {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.tech--caption {
    width: 100%;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    padding-top: 4rem;
    background: linear-gradient(rgba(10, 10, 11, 0), rgba(10, 10, 11, 0.82) 45%, rgba(10, 10, 11, 0.95));
}

.tech--caption h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 0.6vw + 1rem, 1.35rem);
    font-weight: 500;
    color: #fff;
}

.tech--caption h3 i {
    font-size: 0.8em;
    color: var(--accent);
    transition: transform 0.3s var(--ease-out);
}

.tech--caption p {
    display: -webkit-box;
    max-width: 52ch;
    margin-top: 0.5rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #bdbdbd;
}

.tech--tile:active {
    transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
    .tech--tile:hover video {
        transform: scale(1.04);
    }

    .tech--tile:hover h3 i {
        transform: translateX(4px);
    }
}

/* Closing band: contact + founders (founders come from data/members.js) */
.cta--band {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(2rem, 5vw, 3.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background:
        radial-gradient(ellipse 70% 90% at 0% 0%, rgba(209, 157, 46, 0.13), rgba(209, 157, 46, 0) 60%),
        var(--bg-raised);
}

.cta--band .btn {
    margin-top: 1.75rem;
}

.founders--title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

#home--founders {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.founder--chip {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.founder--chip img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
}

.founder--name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text);
}

.founder--role {
    font-size: 0.9rem;
    color: var(--accent);
}

.founders .text-link {
    margin-top: 1.5rem;
}

@media (max-width: 767px) {
    .cta--band {
        grid-template-columns: 1fr;
    }

    .founders {
        padding-top: 2rem;
        border-top: 1px solid var(--border);
    }
}
