/* ===========================================================================
   all.css — applies to every page in the Innovation and AI Lab micro-site.
   Page-specific rules belong in components/css/<page>.css.
   =========================================================================== */

/* Global Variables */

:root {
    --standard-text-shadow: 1px 1px 1px #00000055;
    --image-text-shadow: 1px 1px 2px rgb(0 0 0 / 90%);
    --medium-box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, 0.2);
    --thin-box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.2);
    --floating-medium-box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    --standard-border-radius: 8px;
    --small-border-radius: 4px;
    --max-border-radius: 999px;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 72px;
    --space-3xl: 96px;
}

#page-overview {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-items: center;
    padding: 20px;
    background-color: var(--bright-bg);

    p {
        max-width: 1200px;
        margin: 0 auto;
        color: var(--titan-blue);
        font-size: 1.2rem;
        font-weight: bold;
        text-align: center;
        text-wrap: balance;
    }
}

/* Overrides */

#GlobalNavWrapper {
    /* Each page sets its own --hero-image in components/css/<page>.css */
    --hero-image: url(../../assets/sgmh-flowers-01.jpg);
    --hero-height: 355px;
    --hero-mobile-height: 300px;
    height: var(--hero-height);
    background-image: linear-gradient(to top, rgb(0 0 0 / 72%) 0%, rgb(0 0 0 / 0%) 32%), var(--hero-image);
    background-position: center;
    background-size: cover;

    @media (max-width: 950px) {
        height: min(var(--hero-height), var(--hero-mobile-height));
        background-image: linear-gradient(to top, rgb(0 0 0 / 80%) 0%, rgb(0 0 0 / 0%) 55%), var(--hero-image);
        background-position: center 86px;
        background-size: cover;
    }

    @media print {
        height: auto;
        background: none;
    }
}

#HomeCallout {
    right: 0;
    left: 0;
    height: auto;
    border-top: none;
    background-color: rgb(0 0 0 / 0);
    text-align: center;

    .callout-content h1 {
        color: white;
        font-family: "museo-sans-display", sans-serif;
        font-size: 4rem;
        font-weight: 700;
        text-transform: uppercase;
        text-shadow: 2px 2px 2px black;
        text-wrap: balance;
    }

    h1 > span {
        color: white;
    }

    &.fade-away {
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.1s ease-out, visibility 0s linear 0.1s !important;
    }

    @media (max-width: 950px) {
        display: flex !important;
        min-width: 100px !important;
        height: 100%;
        padding-inline: 10px;
        flex-direction: column;
        justify-content: center;
        opacity: 1;
        transition: opacity 0.1s ease-out;

        .callout-content h1 {
            font-size: 2rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        &,
        &.fade-away {
            transition: none !important;
        }
    }
}

.limited-width,
.content-area,
.callout-content {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 0.5rem;
}

main section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#site-footer {
    margin-top: 0 !important;
}

/* AI Lab Navigation */

#AiLabNavigation {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    flex-flow: row wrap;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding-top: 10px;
    padding-bottom: 20px;
    padding-inline: 10px;
    color: white;
    background-color: var(--titan-blue);
    box-shadow: var(--floating-medium-box-shadow);
    animation: navReveal 250ms ease;
    transition: transform 0.3s ease-out;
    transform: translateX(0);

    a {
        color: white;
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }

        &.cta {
            color: black;
            background-color: var(--titan-orange);
            text-transform: none;

            &:hover {
                color: white;
                background-color: var(--titan-blue);
            }
        }
    }

    @media (prefers-reduced-motion: reduce) {
        animation: none;
        transition: none;
    }
}

@keyframes navReveal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fly-right {
    max-height: 148px !important;
    overflow-y: hidden !important;
    transform: translateX(100vw) !important;
}

/* Global Section Styles */

:where(#Default > section) {
    min-height: 80px;
    padding-block: var(--space-2xl);
    color: var(--titan-blue);
    background-color: white;

    /* The canonical section heading.
       Every page sheet used to restate these same six properties; they live
       here now, and a page overrides only what genuinely differs — in practice
       just font-size, on the two headings that are deliberately larger.
       Blue rather than orange, matching the original mock-up.
       The clamp floor (34px) already covers small screens, so no separate
       portrait rule is needed. */
    h2 {
        margin: 0 0 var(--space-xl);
        color: var(--titan-blue);
        font-size: clamp(34px, 4vw, 44px);
        font-weight: 900;
        line-height: 1.08;
        letter-spacing: -0.8px;
    }

    /* Shared inner gutter below desktop — also previously repeated per page. */
    @media screen and (max-width: 1200px) {
        padding-block: var(--space-xl);

        .content-area,
        .limited-width {
            padding-inline: var(--space-md);
        }
    }

    .section-label {
        display: inline-block;
        margin: 10px auto 10px 10px;
        padding: 6px 14px;
        border-radius: var(--max-border-radius);
        color: white;
        background-color: var(--titan-blue);
        font-size: 0.8rem;
        font-weight: 700;
    }

    &.alternate {
        color: white;
        background-color: var(--titan-blue);

        h2 {
            color: white;
        }

        .section-label {
            color: var(--titan-blue);
            background-color: white;
        }
    }

    /* .bright needs no h2 rule — blue is already the default. */
    &.bright {
        color: black;
        background-color: var(--bright-bg);
    }
}

#Default {
    /* Lead paragraph under a section heading. Width and leading were repeated
       per page; set once here. */
    .section-intro {
        max-width: 56ch;
        margin: 0 0 var(--space-xl);
        font-size: 1.1rem;
        line-height: 1.6;
    }
}

/* ---------------------------------------------------------------------------
   Shared AI Lab components
   Used across several pages, so they live here rather than in a page sheet.
--------------------------------------------------------------------------- */

/* Small uppercase eyebrow above a heading */
.eyebrow {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--titan-blue);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.alternate .eyebrow {
    color: var(--titan-orange-ati);
}

/* Term tags on activity rows.
   Boxy, not pills — matching the prototype, where --radius-md resolved to 0.
   Geometry (inline-flex, 11px, 3px/10px padding, 0.02em tracking) is taken
   from the original computed style so these read the same as the approved
   design; a pill shape at this size clipped the text on its own corners. */
.tag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tag-neutral {
    color: #444141;
    background-color: #eae7e7;
}

.tag-accent {
    color: #7c1405;
    background-color: #fff2ef;
}

/* Key figures row (boardroom capacity, workstations, etc.) */
.lab-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);

    > div {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: var(--space-sm);
        border-top: 4px solid var(--titan-orange);
    }

    .stat-figure {
        color: var(--titan-blue);
        font-family: "museo-sans-display", sans-serif;
        font-size: 2.8rem;
        font-weight: 900;
        line-height: 1;
    }

    .stat-label {
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
}

/* Image + caption cards (lab spaces, equipment) */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: var(--space-md);
}

.media-card {
    display: flex;
    flex-direction: column;
    gap: 12px;

    .media-frame {
        position: relative;
        overflow: hidden;
        aspect-ratio: 4 / 3;
        border-radius: var(--standard-border-radius);
        box-shadow: var(--medium-box-shadow);

        img {
            position: absolute;
            inset: 0;
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    h3 {
        margin: 0;
        color: var(--titan-blue);
        font-size: 1.2rem;
        font-weight: 900;
    }

    p {
        margin: 0;
        font-size: 0.95rem;
    }
}

/* Numbered cards (the five-part workshop series) */
.numbered-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: var(--space-md);
}

.numbered-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: var(--space-md) var(--space-sm);
    border-top: 4px solid var(--titan-orange);
    background-color: var(--bright-bg);

    .card-number {
        color: var(--titan-blue);
        font-family: "museo-sans-display", sans-serif;
        font-size: 2.5rem;
        font-weight: 900;
        line-height: 1;
    }

    h3 {
        margin: 0;
        color: var(--titan-blue);
        font-size: 1.15rem;
        font-weight: 900;
    }

    p {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Rule-separated definition rows (four communities, ways to engage) */
.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0 var(--space-lg);
}

.rule-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding-block: var(--space-sm);
    border-top: 2px solid currentColor;

    h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 900;
    }

    p {
        margin: 0;
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Quick Links — injected on every page by all.js */

#quick-links {
    padding: 50px 20px 40px;
    border-top: 5px solid var(--titan-orange);
    color: white;
    background-color: var(--titan-blue);

    h2 {
        color: var(--titan-orange-ati);
        font-family: "museo-sans-display", sans-serif;
        font-size: 3.7rem;
        font-style: normal;
        font-weight: 900;
        text-align: center;
        text-transform: uppercase;
    }

    .content.quick-links {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        align-content: center;
        align-items: center;
        justify-content: center;
        max-width: 1000px;
        margin: 60px auto;
    }

    a.quick-link-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 175px;
        height: 175px;
        margin-bottom: 0;
        border-bottom: 5px solid var(--titan-orange);
        border-radius: var(--standard-border-radius);
        color: white;
        background-color: rgba(200, 200, 200, 0.2);
        font-weight: bold;
        text-decoration: none;
        cursor: pointer;
        transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;

        &:hover,
        &:focus-visible {
            transform: translateY(-4px);
            border-bottom-color: var(--titan-orange-darkbg);
            background-color: rgba(255, 255, 255, 0.28);
            box-shadow: var(--floating-medium-box-shadow);

            .quick-link-desc {
                text-decoration: underline;
                text-decoration-color: var(--titan-orange);
                text-underline-offset: 3px;
            }

            .link-icon {
                transform: scale(1.08);
            }
        }

        &:focus-visible {
            outline: 3px solid white;
            outline-offset: 4px;
        }

        @media (prefers-reduced-motion: reduce) {
            transition: none;

            &:hover,
            &:focus-visible {
                transform: none;

                .link-icon {
                    transform: none;
                }
            }
        }
    }

    .quick-link-desc {
        margin: 5px auto;
        padding: 0 5px;
        text-align: center;
    }

    .link-icon {
        display: grid;
        place-items: center;
        width: 46px;
        height: 46px;
        margin: 16px auto;
        border: 5px solid white;
        border-radius: 50%;
        background-color: var(--titan-orange-ati);
        transition: transform 0.15s ease;

        svg {
            width: 22px;
            height: 22px;
            fill: none;
            stroke: var(--titan-blue);
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
    }

    @media screen and (max-width: 1200px) {
        overflow-x: hidden;

        h2 {
            font-size: 3.4rem;
        }
    }
}

/* Screen Reader Only */
.sr-only {
    color: white !important;
    background-color: black !important;
}
