:root {
    --primary-dark: #000;
    --primary-light: #fff;
    --secondary-color: #333;
    --background-color: #000;
    --text-color-dark: #000;
    --text-color-light: #fff;
    --border-radius-sm: .5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 5rem;
    --font-size-sm: .875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;
    --global-container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { 
    scroll-behavior: smooth; 
} 

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6;
    color: var(--text-color-dark);
}

section {
    padding: 10rem 0;
}

/* Header styles */

.main-header {
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    padding: var(--spacing-sm);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 86px;
}

.nav-container {
    max-width: var(--global-container-width);
    padding: 0 var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    width: auto;
    height: 32px;
}

.logo-wrapper img {
    aspect-ratio: auto;
    height: 100%;
    margin: auto 0;
}

.nav-links a:hover {
    background-color: rgba(0, 102, 204, 0.1);
}

.hero {
    background: url(img/gradbckg.png) center/cover no-repeat;
    background-position: 50%;
    color: white;
    height: calc(100vh - 86px);
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.hero-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 500;
}

.main-cta {
    background-color: var(--primary-light);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 0;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    box-sizing: border-box;
    transition: .2s all;
}

.main-cta:hover {
    background-color: #e0e0e0;
    transition: .2s all;
}

.main-cta a {
    text-decoration: none;
    color: var(--text-color-dark);
    font-size: var(--font-size-md);
}

/* Main content styles */

.container {
    max-width: var(--global-container-width);
    margin: 0 auto;
}

.container-small {
    max-width: calc(var(--global-container-width) / 2);
    margin: 0 auto;
    text-align: center;
}

h2 {
    font-size: var(--font-size-xxl);
    margin-bottom: var(--spacing-xl);
    color: var(--secondary-color);
    text-align: center;
}

.life-at-instil {
    background-color: var(--primary-dark);
    color: var(--text-color-light);
}

.life-at-instil h2 {
    color: var(--text-color-light);
}

/* Benefits section */

.col-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-md);
}

.benefit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.benefit-card p {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 1.25rem;
    line-height: 1.5rem;
    color: var(--text-color-light);
}

.benefit-icon {
    font-size: 2rem;
}

/* Gallery section */

.gallery-section {
    padding: 0;
    width: 100vw;
    overflow: hidden;
}

.gallery-section-row-split {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: auto;
    background: var(--primary-light);
}


/* .gallery-section-row-third {
    display: grid;
    grid-template-columns: 2fr 1fr;
} */

/* Ensure flex/grid children can shrink and don't force overflow.
   Fixes the common flexbox/grid min-width:auto issue so images
   respect the parent's 100vw width. */
.gallery-section-row-split > *,
.gallery-section-row-third > * {
    min-width: 0;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Make images block-level and cap their intrinsic width so
       they will never overflow their container. */
    display: block;
    max-width: 100%;
}

/* Video Section */

.video-section {
    background-color: var(--background-color);
}

.video-section-wrapper {
    height: 720px;
    width: 100%;
    margin-bottom: var(--spacing-xl);
}

.video-section-wrapper iframe {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-sm);
}

.article-card {
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    color: var(--text-color-light);
    display: flex;
    height: 480px;
}

.article-card p {
    font-size: var(--font-size-xl);
    bottom: var(--spacing-lg);
    max-width: 100%;
    align-self: flex-end;
    font-size: var(--font-size-xl);
    font-weight: 500;
}

.article a {
    text-decoration: none;
}

#one {
    background: url(img/emma.png) center/cover no-repeat;
    background-position: 50%;
}

#two {
    background: url(img/kelvin.png) center/cover no-repeat;
    background-position: 50%;
}

#three {
    background: url(img/niall.png) center/cover no-repeat;
    background-position: 50%;
}

/* About Section */

.about {
    background-color: var(--primary-light);
}

.about-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
}

.about-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* Footer */

.footer-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
    padding: var(--spacing-lg) 0;
    max-width: var(--global-container-width);
    margin: 0 auto;
    border-top: 1px solid #f5f5f5;
    justify-content: space-between;
    font-size: var(--font-size-sm);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.social-links a img {
    width: 24px;
    height: 24px;
}

/* Media Queries */

@media (max-width: 1280px) {
    :root {
        --global-container-width: 1100px;
    }

    section {
        padding: var(--spacing-xl);
    }

    .col-3 {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-section-row-third {
        display: none;
    }

    .footer-wrapper {
        flex-direction: column-reverse;
        padding: var(--spacing-xl);
    }

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

    .about-links {
        padding-bottom: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    :root {
        --global-container-width: 668px;
    }

    .hero {
        height: calc(75vh - 86px);
    }

    .hero h1 {
        text-align: center;
        font-size: var(--font-size-xxl);
    }

    section {
        padding: var(--spacing-lg);
    }

    h2{
        font-size: var(--font-size-xl);
    }

    .benefit-card p{
        font-size: 1rem;
    }

    .col-3 {
        grid-template-columns: 1fr;
    }

    .gallery-section-row-split {
        flex-direction: column;
    }

    .footer-wrapper {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .container-small {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }
}