/* =========================================================
   HomeStyle.css (consolidated)
   ========================================================= */

/* ========== Design Tokens ========== */
:root {
    --clr-bg-deep: #022033;
    --clr-brand: #c13b37;
    --clr-ink: #bcdce3;
    --clr-white: #ffffff;
    --radius-lg: 25px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.4);
    /* approximate navbar height; tweak if needed */
    --header-height: 4.5rem;
}

/* ========== Global Reset ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--clr-bg-deep);
    color: var(--clr-ink);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    line-height: 1.5;
    overflow-x: hidden; /* avoid 100vw scrollbars */
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ensure main content starts below header, but still works on non-home pages */
main[role="main"] {
    padding-top: var(--header-height);
}

/* =========================================================
   Title / Hero Section
   ========================================================= */
.titleSection {
    position: relative;
    height: 100vh; /* full viewport hero */
    overflow: hidden;
    width: 100%; /* avoid 100vw scroll jump */
    display: flex;
    align-items: stretch;
}

    /* background video */
    .titleSection .titleVideo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

/* optional overlay images */
#bck, #heart {
    position: absolute;
    z-index: 2;
    max-width: 40%;
}

#bck {
    top: 10%;
    left: 5%;
}

#heart {
    top: 20%;
    right: 5%;
}

/* foreground content */
.titleSection .writing {
    position: absolute; /* overrides older relative rules */
    z-index: 3;
    bottom: 10%;
    left: 8%;
    color: var(--clr-white);
    text-align: left;
    margin: 0; /* ensure consistent spacing */
}

.writing #mainTitle {
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: 900;
    color: var(--clr-ink);
    line-height: 1.2;
    margin: 0 0 2rem 0;
}

/* CTA button */
.writing button,
.get-started {
    display: inline-block;
    height: 3rem;
    padding: 0 1.25rem;
    width: min(70vw, 300px);
    background-color: var(--clr-brand);
    color: var(--clr-ink);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border .2s ease, background .2s ease, color .2s ease;
}

    .writing button:hover,
    .get-started:hover {
        border: 4px solid var(--clr-ink);
        transform: translateY(-1px);
    }

/* =========================================================
   Carousel (Tutorial) Section
   ========================================================= */
.tutorialSection {
    background-color: var(--clr-brand);
    min-height: 100vh;
    width: 100%;
    padding-top: 6rem;
}

.tutorialTitle {
    margin: 0;
    padding-top: 2rem;
    font-size: clamp(2.5rem, 7vw, 7rem);
    text-align: center;
    color: var(--clr-ink);
}

.videoWrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1000px;
    margin-inline: auto;
}

.videoMain {
    z-index: 2;
    width: 90vw;
    max-width: 600px;
    height: auto;
}

    .videoMain video {
        width: 100%;
        border-radius: 10px;
        box-shadow: var(--shadow-md);
        transition: opacity .3s ease;
    }

/* side thumbnails */
.videoSmall {
    position: absolute;
    width: 40vw;
    max-width: 280px;
    opacity: 0.9;
    transition: transform .4s ease-in-out, opacity .3s ease;
}

    .videoSmall video {
        width: 100%;
        border-radius: 10px;
        box-shadow: var(--shadow-sm);
    }

    .videoSmall.left {
        left: 5vw;
        top: 50%;
        transform: translateY(-50%);
    }

    .videoSmall.right {
        right: 5vw;
        top: 50%;
        transform: translateY(-50%);
    }

/* centred tutorial navigation */
.tutorialNav {
    display: flex;
    justify-content: center; /* keep items centred */
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem auto 0; /* centre the whole bar */
    max-width: clamp(320px, 80vw, 800px);
}

.navItem {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: var(--clr-ink);
    font-weight: bold;
    gap: 1rem;
    cursor: pointer;
}

/* keep any titles clean */
.leftTitle,
.rightTitle {
    text-align: center;
}

/* =========================================================
   Extra Links Section
   ========================================================= */
.extraLinksPage {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--clr-bg-deep);
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
}

    .extraLinksPage > div {
        background-color: var(--clr-brand);
        border-radius: var(--radius-lg);
        width: 25vw;
        min-width: 260px;
        height: 25rem;
        padding: 20px;
        margin: 5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        text-align: center;
    }

.elpTitle,
.elpText {
    color: var(--clr-ink);
    text-align: center;
    transform: translateY(-5rem);
}

.elpTitle {
    font-size: 1.9rem;
}

.elpText {
    font-size: 1.2rem;
    margin-top: 50px;
}

.extraLinksPage button {
    padding: 10px 25px;
    border: 2px solid var(--clr-ink);
    border-radius: var(--radius-lg);
    color: var(--clr-ink);
    background-color: var(--clr-bg-deep);
    cursor: pointer;
    font-weight: 700;
    transition: background .2s ease, color .2s ease;
}

    .extraLinksPage button:hover {
        background-color: var(--clr-ink);
        color: var(--clr-bg-deep);
    }

/* Only apply this to images that are NOT the circle icons */
.extraLinksPage > div > img:not(.card-image) {
    transform: translateY(-5rem);
    border: 4px solid var(--clr-ink);
}


#te3vBtn {
    transform: translateY(-4.7rem);
}

/* =========================================================
   Utility / Naming Clean-ups
   ========================================================= */
/* Avoid class names starting with digits for easier CSS usage */
.threeDModels,
.threeDScans,
.threeDViewers {
    position: relative;
}

/* =========================================================
   Media Queries
   ========================================================= */
@media (max-width: 768px) {
    .writing #mainTitle {
        font-size: clamp(1.8rem, 10vw, 4rem);
    }

    .videoSmall {
        display: none;
    }

    .tutorialTitle {
        font-size: 2.5rem;
    }

    .extraLinksPage {
        grid-template-columns: 1fr;
    }

        .extraLinksPage > div {
            width: 80vw;
            margin: 2rem auto;
        }

    /* bring hero text a bit higher on small screens */
    .titleSection .writing {
        left: 6%;
        bottom: 12%;
    }
}

@media (min-width: 1200px) {
    .writing #mainTitle {
        font-size: 5rem;
    }

    .writing button,
    .get-started {
        font-size: 1.5rem;
        width: 300px;
    }
}

/* =========================================================
   Motion Accessibility
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* --- Circle image fix: override global img { height:auto } --- */
.extraLinksPage .card-image-wrapper {
    position: absolute;
    top: -2.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 7rem;
    height: 7rem;
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    border: 6px solid #0b2938;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Force image to fill wrapper even with global img rules */
    .extraLinksPage .card-image-wrapper > img.card-image {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover;
        object-position: center;
        border-radius: 9999px;
        transform: none !important; /* cancels your old translateY */
        border: 0 !important; /* cancels your old border */
    }
/* --- Portal gateway styles (VAH vs Life Sciences) --- */
.portalSplit {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 2rem auto 3rem;
    padding: 0 5vw;
    position: relative;
    z-index: 1;
}

/* each half "card" */
.portalCard {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: stretch;
}

/* inner layout */
.portalInner {
    width: min(520px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 620px;
}

.portalImage {
    width: min(340px, 75%);
    margin: 0 auto;
    height: auto;
}

.portalTitle {
    margin: 0;
    font-weight: 900;
    font-size: clamp(2rem, 3vw, 3.25rem);
    line-height: 1.05;
    color: #0b2938;
}

.portalSubtitle {
    margin: 0;
    max-width: 48ch;
    color: #334155;
    line-height: 1.6;
}

.portalHint {
    margin: 0;
    color: rgba(0,0,0,.6);
    font-size: .95rem;
}

/* actions pinned towards bottom */
.portalActions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

/* primary button */
.portalBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    background: #0b2938;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    border: 2px solid #0b2938;
    transition: transform .15s ease, opacity .15s ease;
}

    .portalBtn:hover {
        opacity: .95;
        transform: translateY(-1px);
    }

/* optional secondary button style */
.portalBtn--secondary {
    background: #c13b37;
    border-color: #c13b37;
}

/* secondary CTA as pill link */
.portalLink {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(11,41,56,.25);
    color: #0b2938;
    text-decoration: none;
    font-weight: 700;
    transition: background .15s ease;
}

    .portalLink:hover {
        background: rgba(11,41,56,.06);
    }

/* subtle split styling */
.portalCard--vah {
    background: rgba(255,255,255,0.92);
}

.portalCard--lifesci {
    background: #faf7f2;
    border-left: 1px solid rgba(0,0,0,0.08);
}

/* Enhanced VAH actions alignment (if you use .vahActions on the left card later) */
.vahActions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.exploreHint {
    font-size: 0.9rem;
    font-weight: 600;
    color: #bcdce3;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

    .exploreHint:hover {
        opacity: 1;
        transform: translateY(2px);
    }

/* Responsive tweaks */
@media (max-width: 900px) {
    .portalSplit {
        grid-template-columns: 1fr;
        margin-top: 1.5rem;
    }

    .portalInner {
        min-height: auto;
    }

    .portalCard--lifesci {
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.08);
    }

    .vahActions {
        align-items: center;
    }
}


