@font-face {
    font-family: "Allura";
    src: url("https://static.igem.wiki/teams/6081/wiki/allura-regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
:root {
    /* Official Lillieum palette */
    --deep-teal: #2f6975;
    --olive-green: #88934e;
    --forest-green: #496e2b;
    --berry: #aa2b62;
    --sage: #a6b88e;
    --dusty-rose: #ddafcc;
    --cream: #f1e6d0;
    --white: #ffffff;
    --dark-text: #1f2421;
    --body-text: #536467;
    --border: #d8d6c9;

    /* Signature accent: hero titles and brand moments only. */
    --font-brand: "Allura", "Segoe Script", cursive;
    --font-display: Georgia, "Times New Roman", serif;
    --font-body: Arial, Helvetica, sans-serif;

    --nav-height: 5.25rem;
    /* Where sticky in-page navigation docks; drops to 0 while the site nav is scroll-hidden. */
    --sticky-top: var(--nav-height);
    /* Vertical rhythm between a page hero and its content, and between page sections. */
    --section-space: clamp(3.5rem, 7vw, 6rem);
    --radius-small: 0.5rem;
    --radius-medium: 1rem;
    --shadow-soft: 0 1rem 2.5rem rgba(31, 36, 33, 0.12);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 1.5rem);
}

html.site-nav-hidden {
    --sticky-top: 0px;
}

body {
    padding-top: var(--nav-height);
    background-color: var(--cream);
    color: var(--body-text);
    font-family: var(--font-body);
    line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--deep-teal);
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.025em;
}

a {
    color: var(--berry);
    text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
    color: var(--deep-teal);
}

button,
input,
select,
textarea {
    font-family: var(--font-body);
}

/* Shared navigation */
.brand-nav {
    z-index: 1100;
}

.brand-nav,
.bg-dark {
    min-height: var(--nav-height);
    background-color: rgba(241, 230, 208, 0.64) !important;
    border-bottom: 1px solid rgba(47, 105, 117, 0.2);
    box-shadow: 0 0.35rem 1.25rem rgba(31, 36, 33, 0.07);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    transition: transform 260ms ease, opacity 220ms ease, background-color 180ms ease, box-shadow 180ms ease;
    will-change: transform;
}

.brand-lockup {
    min-width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-right: 1.2rem;
    padding-block: 0.2rem;
}

.brand-mark {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.brand-wordmark {
    width: 6.2rem;
    height: 2.25rem;
    object-fit: contain;
}

.brand-nav .navbar-nav {
    gap: 0.15rem;
}

.brand-nav .nav-link {
    position: relative;
    padding: 0.65rem 0.8rem !important;
    color: var(--dark-text) !important;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.brand-nav .nav-link::after {
    position: absolute;
    right: 0.8rem;
    bottom: 0.4rem;
    left: 0.8rem;
    height: 2px;
    background: var(--berry);
    content: "";
    opacity: 0;
    transform: scaleX(0.45);
    transition: opacity 180ms ease, transform 180ms ease;
}

.brand-nav .nav-link:hover::after,
.brand-nav .nav-link:focus-visible::after,
.brand-nav .nav-link[aria-current="page"]::after {
    opacity: 1;
    transform: scaleX(1);
}

.brand-nav .dropdown-toggle::after {
    position: static;
    width: auto;
    height: auto;
    margin-left: 0.35em;
    background: transparent;
    opacity: 1;
    transform: none;
}

/* Dropdown toggles use ::after for the caret, so mark the current section
   with a background underline drawn in the same place as the link underline. */
.brand-nav .dropdown-toggle.active {
    background: linear-gradient(var(--berry), var(--berry)) no-repeat 0.8rem calc(100% - 0.4rem) / calc(100% - 1.6rem) 2px;
}

.brand-nav .dropdown-menu {
    padding: 0.55rem;
    border: 1px solid rgba(47, 105, 117, 0.18);
    border-radius: var(--radius-small);
    background: var(--cream);
    box-shadow: var(--shadow-soft);
}

.brand-nav .dropdown-item {
    border-radius: 0.35rem;
    color: var(--dark-text);
    font-size: 0.82rem;
}

.brand-nav .dropdown-item:hover,
.brand-nav .dropdown-item:focus {
    background: var(--dusty-rose);
    color: var(--dark-text);
}

.brand-nav .dropdown-item[aria-current="page"] {
    background: rgba(221, 175, 204, 0.45);
    font-weight: 700;
}

.brand-nav .navbar-toggler {
    border-color: rgba(47, 105, 117, 0.35);
}

/* Shared default hero for pages without a custom hero. */
.bg-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 18%, rgba(221, 175, 204, 0.72) 0 8rem, transparent 8.1rem),
        linear-gradient(135deg, var(--cream), rgba(166, 184, 142, 0.62));
}

.bg-hero::after {
    position: absolute;
    width: 18rem;
    aspect-ratio: 1;
    right: -7rem;
    bottom: -11rem;
    border: 1px solid rgba(47, 105, 117, 0.25);
    border-radius: 50%;
    content: "";
}

.bg-hero h1 {
    color: var(--deep-teal) !important;
    font-family: var(--font-brand);
    font-weight: 400;
    letter-spacing: 0;
}

.bg-hero .lead {
    color: var(--body-text) !important;
}

/* Shared page title hero ----------------------------------------------------
   Centered Allura title over the brand rings, with the menu section named in
   the corner. Home, Human Practices, Education and Team keep their own hero
   compositions. */
body:has(.page-hero) {
    overflow-x: hidden;
}

body:has(.page-hero) > header.bg-hero {
    display: none;
}

/* A hero placed directly in the layout container runs full width. */
body > .container:has(> .page-hero) {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.page-hero {
    position: relative;
    min-height: min(50rem, calc(100vh - var(--nav-height)));
    display: grid;
    place-items: center;
    align-content: center;
    /* Visible so the ring flows into the content below instead of being cut flat. */
    overflow: visible;
    isolation: isolate;
    padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 6vw, 6rem);
    /* Keep both blobs fully inside the hero so neither is sliced at its bottom edge. */
    background:
        radial-gradient(circle at 9% 16%, rgba(221, 175, 204, 0.42) 0 7rem, transparent 7.1rem),
        radial-gradient(circle at 92% calc(100% - 10.5rem), rgba(166, 184, 142, 0.38) 0 10rem, transparent 10.1rem),
        var(--cream);
    text-align: center;
}

/* Same composition with the blob colors swapped. */
.page-hero--sage {
    background:
        radial-gradient(circle at 9% 16%, rgba(166, 184, 142, 0.38) 0 7rem, transparent 7.1rem),
        radial-gradient(circle at 92% calc(100% - 10.5rem), rgba(221, 175, 204, 0.38) 0 10rem, transparent 10.1rem),
        var(--cream);
}

.page-hero::before {
    position: absolute;
    z-index: -1;
    width: clamp(24rem, 48vw, 47rem);
    aspect-ratio: 1;
    border: 1px solid rgba(170, 43, 98, 0.25);
    border-radius: 50%;
    content: "";
    box-shadow:
        0 0 0 5rem rgba(170, 43, 98, 0.035),
        0 0 0 10rem rgba(170, 43, 98, 0.025);
}

.page-hero h1 {
    margin: 0;
    color: var(--dark-text);
    font: 400 clamp(5rem, 11vw, 10rem)/0.95 var(--font-brand);
    letter-spacing: 0;
    text-wrap: balance;
}

.page-hero-lead {
    max-width: 40rem;
    margin: 1.75rem 0 0;
    color: var(--body-text);
    font: clamp(1.05rem, 1.5vw, 1.25rem)/1.7 var(--font-display);
}

.page-hero-index {
    position: absolute;
    right: clamp(1.25rem, 3vw, 3rem);
    bottom: 1.5rem;
    margin: 0;
    color: rgba(31, 36, 33, 0.48);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

/* Default content column for pages that follow a .page-hero. */
.page-content {
    width: min(calc(100% - 2.5rem), 84rem);
    margin: 0 auto;
    padding: var(--section-space) 0;
}

/* Shared horizontal section navigation that docks under the site nav. */
html:has(.section-nav) {
    scroll-padding-top: calc(var(--nav-height) + 6rem);
}

.section-nav {
    position: sticky;
    top: var(--sticky-top);
    z-index: 1000;
    border-bottom: 1px solid rgba(47, 105, 117, 0.2);
    background: rgba(241, 230, 208, 0.94);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    transition: top 260ms ease;
}

.section-nav-inner {
    max-width: 1250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 15px 25px;
    overflow-x: auto;
}

.section-nav a {
    display: inline-block;
    flex-shrink: 0;
    padding: 9px 15px;
    border-radius: 24px;
    color: var(--deep-teal);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.section-nav a:hover,
.section-nav a.active {
    background: var(--deep-teal);
    color: var(--white);
    transform: translateY(-2px);
}

/* Shared calls to action and utility components. */
.btn-primary {
    border-color: var(--berry);
    background: var(--berry);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    border-color: var(--deep-teal);
    background: var(--deep-teal);
}

.bd-callout {
    padding: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-left: 0.25rem solid var(--deep-teal);
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.36);
}

.bd-callout h4 {
    margin-bottom: 1.25rem;
}

.bd-callout p:last-child {
    margin-bottom: 0;
}

.bd-callout + .bd-callout {
    margin-top: -0.25rem;
}

.bd-callout-info { border-left-color: var(--deep-teal); }
.bd-callout-warning { border-left-color: var(--olive-green); }
.bd-callout-danger { border-left-color: var(--berry); }

/* Shared footer */
.bg-footer {
    background-color: var(--deep-teal) !important;
}

footer {
    border-top: 0.35rem solid var(--berry);
    font-family: var(--font-body);
}

footer h4 {
    color: var(--cream);
}

footer a {
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
    color: var(--dusty-rose);
    text-decoration: underline;
}

footer .footer-sponsor-carousel {
    max-width: 44rem;
    margin-inline: auto;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.06);
}

/* Keep differently proportioned sponsor logos from resizing the footer. */
footer .carousel-inner {
    height: 16rem;
}

footer .carousel-item,
footer .carousel-item > a {
    height: 100%;
}

footer .carousel-item > a {
    display: flex;
    align-items: center;
    justify-content: center;
}

footer .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

footer .footer-link-list {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: center;
    justify-content: start;
    gap: 0.85rem 1rem;
}

footer .footer-link-list li:nth-child(-n + 2) {
    grid-column: 1 / -1;
    max-width: 20rem;
}

footer .footer-link-list li:nth-last-child(-n + 2) a {
    display: inline-flex;
    padding: 0.35rem;
    border-radius: 50%;
}

footer .footer-link-list li:nth-last-child(-n + 2) a:hover,
footer .footer-link-list li:nth-last-child(-n + 2) a:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

footer .footer-legal p:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    footer .carousel-inner {
        height: 12rem;
    }
    footer .footer-links {
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        text-align: center;
    }

    footer .footer-link-list {
        justify-content: center;
    }

    footer .footer-link-list li:nth-child(-n + 2) {
        text-align: center;
    }


    .brand-nav .navbar-collapse {
        max-height: calc(100vh - var(--nav-height));
        padding: 0.75rem 0 1rem;
        overflow-y: auto;
        background: rgba(241, 230, 208, 0.96);
    }

    .brand-nav .nav-link {
        padding-inline: 0 !important;
    }

    .brand-nav .nav-link::after {
        right: auto;
        left: 0;
        width: 2.5rem;
    }

    .brand-nav .dropdown-toggle.active {
        background-position: 0 calc(100% - 0.4rem);
        background-size: 2.5rem 2px;
    }
}

@media (max-width: 800px) {
    .section-nav-inner {
        justify-content: flex-start;
        padding: 10px 15px;
    }

    .section-nav a {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 760px) {
    .page-hero {
        min-height: 34rem;
        padding: 5rem 1rem;
    }

    /* Sized so the longest single word ("Commercialization") fits a 360px screen. */
    .page-hero h1 {
        font-size: clamp(3.25rem, 14vw, 7rem);
    }

    .page-hero::before {
        width: 85vw;
    }

    .page-hero-index {
        display: none;
    }
}
@media (min-width: 992px) {
    footer .footer-links {
        padding-left: 3rem;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
    }

    .brand-nav.is-scroll-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(-100% - 0.75rem));
    }

    .brand-nav:focus-within {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}
