@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

:root {
    --maincolor: #015D67;
    --highlightcolor: #00ACB1;
    --bgcolor: #FAFCFC;
    --maintextcolor: #000000;
    --subtextcolor: #737373;
    --whitetextcolor: #ffffff;

    --page-padding-x: 12vw;
    --header-height: 6.6rem;
    --shell-padding-x: 10%;
}

html {
    scrollbar-gutter: stable;
    scroll-padding-top: var(--header-height);
}

body {
    background-color: var(--bgcolor);
}

main {
    position: relative;
    overflow-x: clip;
}

header {
    background-color: white;
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 100;
    min-height: var(--header-height);
    padding: 1rem var(--shell-padding-x);
    display: flex;
    align-items: center;
    justify-content: space-between;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

header nav {
    position: relative;
    margin-left: 2rem;
    color: var(--maincolor);
    font-size: 1.2rem;
    font-weight: 400;
}

header nav a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.25s ease;
}

header nav a:hover {
    color: var(--highlightcolor);
}

header nav a.active {
    color: var(--highlightcolor);
}

.nav-indicator {
    position: absolute;
    bottom: -0.35rem;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--highlightcolor);
    transform: translateX(0);
}

nav.nav-ready .nav-indicator {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle {
    display: none;
    position: relative;
    width: 2.8rem;
    height: 2.8rem;
    border: none;
    background: none;
    cursor: pointer;
}

.nav-toggle-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.6rem;
    height: 2px;
    border-radius: 2px;
    background-color: var(--maincolor);
    transition: transform 0.3s ease, opacity 0.15s ease;
}

.nav-toggle-bar:nth-child(1) {
    transform: translate(-50%, -50%) translateY(-0.45rem);
}

.nav-toggle-bar:nth-child(2) {
    transform: translate(-50%, -50%);
}

.nav-toggle-bar:nth-child(3) {
    transform: translate(-50%, -50%) translateY(0.45rem);
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

header a {
    margin: 0rem 1rem;
}

.span-maincolor {
    color: var(--maincolor);
}

.span-highlightcolor {
    color: var(--highlightcolor)
}

.span-maintextcolor {
    color: var(--maintextcolor);
}

.flex-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap; 
}

.logo {
    font-weight: 600;
    text-decoration: none;
    font-size: 3rem;
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 4.6rem;
    width: auto;
}

section {
    padding: calc(var(--header-height) + 1.4rem) var(--page-padding-x) 0rem;
    display: none;
}

section.active {
    display: block;
    position: relative;
    z-index: 1;
    opacity: 1;
    transform: translate(0, 0);
    transition: opacity 0.16s cubic-bezier(0.2, 0, 0, 1) 0.05s,
                transform 0.16s cubic-bezier(0.2, 0, 0, 1) 0.05s;
}

section.active.is-entering {
    opacity: 0;
    transform: translate(var(--shift-x, 0px), var(--shift-y, 0px));
}

section.active.is-leaving {
    position: absolute;
    top: 0;
    inset-inline: 0;
    z-index: 0;
    opacity: 0;
    transform: translate(0, 0);
    pointer-events: none;
    transition: opacity 0.1s ease-in;
}

h2 {
    padding: 1rem var(--page-padding-x);
    margin: 0 calc(-1 * var(--page-padding-x));
    margin-bottom: 4rem;
    margin-top: 4rem;
    color: var(--whitetextcolor);
    background-color: var(--highlightcolor);
}

.about figure, .home figure {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background-color: var(--maincolor);
}

.about figure img, .home figure img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.about figure figcaption, .home figure figcaption {
    padding: 1rem;
    text-align: center;
    color: var(--whitetextcolor);
}

figcaption h4, figcaption h3 {
    color: var(--whitetextcolor);
}

footer {
    margin: 4rem 0 0;
    padding: 0 calc(var(--shell-padding-x) + 1rem) 4rem;
    min-height: 8rem;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

footer p {
    color: var(--subtextcolor);
    font-size: 0.95rem;
    line-height: 1.6;
}

footer address {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    font-style: normal;
}

footer address a {
    color: var(--maincolor);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

footer address a:hover {
    color: var(--highlightcolor);
}

footer nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

footer nav img {
    height: 2.2rem;
    width: auto;
}

.home hgroup {
    padding: 6rem 0rem;
}

.home hgroup h3 {
    font-size: 4.6rem;
}

.home hgroup h4 {
    padding-top: 0.6rem;
    color: var(--maintextcolor);
    font-weight: 400;
    font-size: 1rem;
}

.home article {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 3rem 0rem;
    max-width: 40rem;
}

.home article h3 {
    font-size: 2rem;
}
.home article h5 {
    font-size: 1rem;
}

.home article p {
    color: var(--subtextcolor);
    font-size: 1.6rem;
    font-weight: 500;
}

.partners-logo {
    width: 20rem;
    height: 20rem; 
}

.partners-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.partners {
    width: 18rem;
}

.partners img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
}

.partners figcaption {
    display: flex;
    flex-direction: column;
    justify-content: top;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-height: 4rem;
    padding: 1.2rem 1rem;
}

.partners figcaption h6 {
    color: var(--highlightcolor);
    font-size: 0.8rem;
}

.partners figcaption h5 {
    color: var(--whitetextcolor);
    font-weight: 200;
    font-size: 0.8rem;
}

.partners-row {
    align-items: stretch;
}

.teamfoto {
    width: min(100%, 48rem);
    margin: 0 auto;
}

section.about.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4rem;
    align-content: start;
}

.about .teamfoto,
.about h2,
.about .teambox {
    grid-column: 1 / -1;
}

.about article {
    flex-direction: column;
    gap: 0;
    margin: 2.5rem 0 1rem;
}

.teambox {
    --teambox-gap: 2rem;
    --teambox-max-cols: 5;
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(
            max(
                12rem,
                (100% - (var(--teambox-max-cols) - 1) * var(--teambox-gap)) / var(--teambox-max-cols)
            ),
            1fr
        )
    );
    gap: var(--teambox-gap);
    align-items: stretch;
}

.teambox figure img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
}

.teambox figcaption h3 {
    white-space: nowrap;
}

.teambox a {
    color: var(--highlightcolor);
    font-weight: 500;
}

.teambox figcaption {
    display: flex;
    flex-direction: column;
    justify-content: top;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-height: 4rem;
    padding: 1.2rem 1rem;
}

h1,
.connect h2 {
    font-size: 4rem;
}

:is(.mission, .about) article {
    display: flex;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

:is(.mission, .about) article h4 {
    margin-bottom: 0.6rem;
    color: var(--maintextcolor);
    font-size: 1.7rem;
    font-weight: 600;
}

:is(.mission, .about) article p {
    max-width: 36rem;
    color: var(--subtextcolor);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.65;
}

.mission article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4rem;
    align-items: center;
    margin: 5rem 0;
}

.mission article hgroup {
    grid-area: 1 / 1;
}

.mission article figure {
    grid-area: 1 / 2;
    justify-self: end;
}

.mission article:nth-of-type(even) hgroup {
    grid-area: 1 / 2;
}

.mission article:nth-of-type(even) figure {
    grid-area: 1 / 1;
    justify-self: start;
}

.mission article:nth-of-type(even) hgroup,
.about article:nth-of-type(2),
.connect {
    text-align: right;
}

.mission article:nth-of-type(even) hgroup p,
.about article:nth-of-type(2) p,
.connect p {
    margin-left: auto;
}

.mission figure {
    max-width: 24rem;
}

.mission figure img {
    width: 100%;
    height: auto;
}

.mission figcaption {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--highlightcolor);
}

.mission figcaption h5 {
    color: var(--subtextcolor);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.support hgroup {
    grid-column: 1;
}

.support hgroup p,
.connect p {
    max-width: 36rem;
    margin-top: 1.6rem;
    color: var(--subtextcolor);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.65;
}

section.support.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4rem;
    align-content: start;
}

.connect {
    grid-column: 2;
}

.connect h2 {
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: var(--maintextcolor);
}

.connect p {
    margin-bottom: 2.2rem;
}

.connect > a:not(.button) {
    display: block;
    color: var(--maincolor);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

.connect > a:not(.button):hover {
    color: var(--highlightcolor);
}

.connect .button {
    margin-top: 2.4rem;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.9rem;
    border-radius: 2rem;
    background-color: var(--maincolor);
    color: var(--whitetextcolor);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.button:hover {
    background-color: var(--highlightcolor);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(1, 93, 103, 0.18);
}

.button svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.timeline-track {
    list-style: none;
    position: relative;
    margin: 5rem 0 6rem;
}

.timeline-track::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, var(--highlightcolor) 0%, var(--highlightcolor) 85%, rgba(0, 172, 177, 0) 100%);
}

.timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4rem;
    padding-bottom: 4rem;
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

.timeline-entry .timeline-card {
    grid-column: 1;
    text-align: right;
}

.timeline-entry:nth-child(even) .timeline-card {
    grid-column: 2;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    top: 1.2rem;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.35s cubic-bezier(0.34, 1.8, 0.64, 1) 0.08s;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--bgcolor);
    border: 3px solid var(--maincolor);
    box-shadow: 0 0 0 6px var(--bgcolor);
}

.timeline-card {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.6rem 1.8rem;
    background-color: var(--whitetextcolor);
    border-radius: 1rem;
    box-shadow: 0 2px 14px rgba(1, 93, 103, 0.08);
}

.timeline-entry.is-visible .timeline-card {
    opacity: 1;
    transform: none;
}

.timeline-entry.is-visible .timeline-marker {
    transform: translate(-50%, -50%) scale(1);
}

.timeline-card h5 {
    color: var(--maincolor);
    font-size: 1rem;
    font-weight: 600;
}

.timeline-card h3 {
    font-size: 1.6rem;
    font-weight: 660;
}

.timeline-card p {
    color: var(--subtextcolor);
    font-size: 1rem;
    font-weight: 500;
}

@media (min-width: 1800px) {
    .teamfoto {
        width: min(100%, 72rem);
    }
}

@media (max-width: 1200px) {
    section.support.active,
    section.about.active,
    .mission article {
        grid-template-columns: 1fr;
    }

    .support hgroup,
    .connect,
    .about .teamfoto,
    .about h2,
    .about .teambox,
    .mission article hgroup,
    .mission article figure,
    .mission article:nth-of-type(even) hgroup,
    .mission article:nth-of-type(even) figure {
        grid-area: auto;
        grid-column: 1;
        grid-row: auto;
    }

    .connect {
        margin-top: 3rem;
    }

    .mission article figure {
        margin-top: 1.5rem;
    }

    .nav-toggle {
        display: block;
    }

    header nav {
        position: fixed;
        top: var(--header-height);
        inset-inline: 0;
        margin-left: 0;
        padding: 1rem 0 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        background-color: white;
        box-shadow: 0 8px 16px rgba(1, 93, 103, 0.08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-0.75rem);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    body.nav-open header nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    header nav a {
        padding: 0.6rem 0;
        margin-inline: var(--shell-padding-x);
        border-left: 2px solid transparent;
    }

    header nav a.active {
        padding-left: 0.8rem;
        border-left-color: var(--highlightcolor);
    }

    .nav-indicator {
        display: none;
    }

    h1,
    .connect h2 {
        font-size: 2.6rem;
    }

    .timeline-track::before {
        left: 0.5rem;
        transform: none;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        padding-left: 2.6rem;
        padding-bottom: 3rem;
    }

    .timeline-entry .timeline-card,
    .timeline-entry:nth-child(even) .timeline-card {
        grid-column: 1;
        text-align: left;
    }

    .timeline-marker {
        left: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-indicator,
    .nav-toggle-bar,
    header nav,
    header nav a,
    section.active,
    section.active.is-leaving,
    .button,
    .connect-mail,
    .timeline-card,
    .timeline-marker {
        transition-duration: 0.01ms;
    }
}

@media (max-width: 640px) {
    :root {
        --shell-padding-x: 1.25rem;
    }

    header .logo {
        margin-left: 0;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        min-height: 0;
        padding: 0 var(--shell-padding-x) 3rem;
    }

    footer {
        gap: 2rem;
    }

    footer nav {
        flex-direction: row;
        gap: 1.5rem;
    }

    .flex-pair {
        flex-direction: column;
    }
    .flex-pair img {
        width: 100%;
        aspect-ratio: 3 / 2;
    }
    .teambox {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .teambox figcaption h3 { font-size: 0.9rem; }
    .teambox figcaption a { font-size: 0.75rem; }
}