/*
============================================================
TOZARD RESEARCH LABORATORY - MAIN STYLESHEET

EDITING GUIDE:
- COLOR PALETTE: edit the green variables in :root below.
- TYPOGRAPHY: search for the typography section.
- LAYOUT: page/container and responsive rules are grouped
  into clearly labelled sections.
- COMPONENTS: cards, buttons, navigation, footer, etc.
  are grouped below.
- RESPONSIVE DESIGN: mobile/tablet rules are near the end.

The stylesheet intentionally remains expanded and spaced out
so it is easy to read and modify.
============================================================
*/

:root {
    --ink: #123524;
    --muted: #587064;
    --brand: #176b45;
    --brand2: #2f8a59;
    --accent: #74a942;
    --bg: #f2f8f3;
    --card: #fff;
    --line: #d7e7dc;
    --shadow: 0 14px 35px rgba(18,53,36,.10);
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.65;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: min(var(--max),calc(100% - 36px));
    margin: auto;
}

.topbar {
    background: var(--ink);
    color: #e5f1e9;
    font-size: .86rem;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
}

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.brand img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.brand strong {
    font-size: .98rem;
    line-height: 1.2;
    max-width: 260px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.menu a {
    padding: 10px 11px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 650;
    font-size: .9rem;
    color: #28533d;
}

.menu a:hover,.menu a.active {
    background: #e4f2e8;
    color: var(--brand);
}

.menu .cta {
    background: var(--brand);
    color: #fff;
    padding: 11px 15px;
}

.menu .cta:hover {
    background: #0f5134;
    color: #fff;
}

.hamb {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 1.2rem;
}

.hero {
    background: linear-gradient(120deg,#edf7f0 0%,#fff 55%,#f3f8e8 100%);
    padding: 82px 0 70px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 50px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: .74rem;
    font-weight: 800;
    color: var(--brand2);
    margin-bottom: 15px;
}

.eyebrow:before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--accent);
}

h1 {
    font-size: clamp(2.3rem,5vw,4.8rem);
    line-height: 1.03;
    letter-spacing: -.045em;
    margin: 0 0 22px;
}

h2 {
    font-size: clamp(1.7rem,3vw,2.65rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    margin: 0 0 16px;
}

h3 {
    font-size: 1.18rem;
    line-height: 1.25;
    margin: 0 0 8px;
}

.lead {
    font-size: 1.12rem;
    color: #4b6658;
    max-width: 700px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 17px;
    border-radius: 11px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 750;
}

.btn.primary {
    background: var(--brand);
    color: #fff;
}

.btn.secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.hero-media {
    border-radius: 60%;
    overflow: hidden;
    box-shadow: var(--shadow);
    /* border: 10px solid rgba(16,37,59,.08);
    background: #fff; */
}

.hero-media img {
    border-radius: 110px;
    width: 100%;
    height: 410px;
    object-fit: cover;
}

.hero-media .caption {
    padding: 12px 15px;
    color: var(--muted);
    font-size: .86rem;
}

.section {
    padding: 76px 0;
}

.section.alt {
    background: var(--bg);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 30px;
}

.section-head p {
    max-width: 670px;
    color: var(--muted);
    margin: 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 24px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 6px 20px rgba(16,37,59,.04);
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    transition: .2s;
}

.icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e4f2e8;
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 900;
    margin-bottom: 16px;
}

.metric {
    font-size: 2rem;
    font-weight: 850;
    line-height: 1;
}

.muted {
    color: var(--muted);
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e6f3e9;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 750;
}

.page-hero {
    padding: 62px 0 50px;
    background: linear-gradient(135deg,#edf7f0,#fff);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.05rem;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.split img {
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.list {
    padding-left: 20px;
}

.list li {
    margin: 7px 0;
}

.timeline {
    border-left: 2px solid #cfe3d5;
    padding-left: 24px;
}

.timeline .item {
    position: relative;
    margin-bottom: 24px;
}

.timeline .item:before {
    content: "";
    position: absolute;
    left: -32px;
    top: 7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #cfe3d5;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.table th,.table td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #edf5ef;
    font-size: .86rem;
}

.team {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team .role {
    color: var(--brand2);
    font-weight: 750;
    font-size: .9rem;
}

.team .contact {
    font-size: .85rem;
    color: var(--muted);
}

.publication {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.publication:last-child {
    border-bottom: 0;
}

.publication .meta {
    color: var(--muted);
    font-size: .88rem;
    margin-top: 5px;
}

.facility-list {
    columns: 2;
    column-gap: 40px;
}

.facility-list li {
    break-inside: avoid;
    margin-bottom: 7px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.gallery figure {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    height: fit-content;
}

.gallery img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: #f9faf9;
}

.gallery figcaption {
    padding: 12px 14px;
    font-size: .86rem;
    color: var(--muted);
}

.donate {
    background: linear-gradient(135deg,#123d2b,#20764a);
    color: #fff;
}

.donate .muted {
    color: #d9eee0;
}

.payment {
    background: #fff;
    color: var(--ink);
    border-radius: 18px;
    padding: 24px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding: 11px 0;
}

.payment-row:last-child {
    border-bottom: 0;
}

.copy {
    border: 0;
    background: #e4f2e8;
    color: var(--brand);
    font-weight: 800;
    border-radius: 8px;
    padding: 6px 9px;
    cursor: pointer;
}

.placeholder {
    border: 2px dashed #91b59e;
    background: #f4faf5;
    color: #547463;
    border-radius: 16px;
    padding: 22px;
}

.notice {
    border-left: 4px solid var(--accent);
    background: #f3f8e8;
    padding: 15px 18px;
    border-radius: 10px;
    color: #3e5a47;
}

.footer {
    background: #0d2b1d;
    color: #d8e9de;
    padding: 50px 0 22px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .8fr .9fr .9fr;
    gap: 30px;
}

.footer h3 {
    color: #fff;
}

.footer a {
    text-decoration: none;
    color: #d8e9de;
}

.footer a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
    margin-top: 32px;
    padding-top: 17px;
    font-size: .82rem;
    color: #9ebaa8;
}

.small {
    font-size: .85rem;
}

.backtop {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow);
}

@media(max-width:1050px) {
    .menu a {
        padding: 9px 7px;
        font-size: .83rem;
    }
    .brand strong {
        max-width: 210px;
    }
    .grid-4 {
        grid-template-columns: repeat(2,1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width:820px) {
    .topbar .container {
        flex-direction: column;
        gap: 3px;
    }
    .hamb {
        display: block;
    }
    .menu {
        display: none;
        position: absolute;
        top: 78px;
        left: 18px;
        right: 18px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 10px;
        box-shadow: var(--shadow);
    }
    .menu.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .menu a {
        padding: 12px;
    }
    .hero {
        padding: 55px 0;
    }
    .hero-grid,.split,.grid-2 {
        grid-template-columns: 1fr;
    }
    .hero-media img {
        height: 300px;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .gallery {
        grid-template-columns: 1fr 1fr;
    }
    .section {
        padding: 58px 0;
    }
    .facility-list {
        columns: 1;
    }
    .section-head {
        display: block;
    }
    .section-head p {
        margin-top: 10px;
    }
}

@media(max-width:520px) {
    .container {
        width: min(var(--max),calc(100% - 24px));
    }
    .brand img {
        width: 52px;
        height: 52px;
    }
    .brand strong {
        font-size: .83rem;
    }
    .hero-media img {
        height: 235px;
    }
    .grid-4,.gallery {
        grid-template-columns: 1fr;
    }
    .payment-row {
        display: block;
    }
    .payment-row strong {
        display: block;
        margin-bottom: 3px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2.45rem;
    }
}

/* ============================================================ OUR TEAM - TEAM MEMBER CARDS ------------------------------------------------------------ Each photograph stays inside the same card as the member's information. The photo is intentionally 25% of the card's available width and is placed above the description. ============================================================ */
 .team {
    display: flex;
    flex-direction: column;
    gap: 0px;

}

.team .role {
    color: var(--brand2);
    font-weight: 750;
    font-size: 0.9rem;
}

.team .contact {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Keep every team photo frame the same size and let each image fit neatly inside it. */ .team-photo-placeholder {
    width: 100%;
    max-width: 260px;
    height: fit-content;
    flex: 0 0 auto;
    border: 2px dashed #6baa7f;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        #f2f9f4,
        #e1f1e6
    );
    display: block;
    text-align: center;
    color: #28704a;
    font-weight: 700;
    padding: 0px;
    margin: 0 auto 8px auto;
    box-sizing: border-box;
    overflow: hidden;
}

.team-photo-placeholder img {
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Text shown inside the temporary photo placeholder. */ .team-photo-placeholder small {
    display: block;
    margin-top: 6px;
    font-weight: 400;
    color: #5f806b;
}

/* Keep all team photo frames consistent and responsive on phones. */ @media (max-width: 600px) {
    .team-photo-placeholder {
        width: 100%;
        max-width: 220px;
        height: fit-content;
        flex-basis: auto;
    }
}


/* ============================================================
   GALLERY CAROUSEL
   ============================================================ */
/* .gallery-carousel {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 10px;
    padding: 0 0 px;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: 25px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform .60s ease;
    will-change: transform;
    height: auto;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    background: #f9f8f8;
}

.carousel-slide img {
    width: 100%;
    height: clamp(470px, 52vw, 470px);
    /* height: 600px; 
    object-fit: cover;
    background: #f5f8f6;
}

.carousel-slide figcaption {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 28px;
    text-align: center;
    color: var(--muted);
    font-size: .96rem;
    border-top: 1px solid var(--line);
}

.carousel-control {
    width: 52px;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    font-size: 1.35rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(16,37,59,.10);
    transition: transform .3s, background .3s, color .3s;
    z-index: 2;
}

.carousel-control:hover {
    transform: scale(1.05);
    background: var(--brand);
    color: #fff;
}

.carousel-control:focus-visible,
.carousel-dot:focus-visible {
    outline: 3px solid rgba(47,138,89,.35);
    outline-offset: 3px;
}

.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #b9cfc1;
    cursor: pointer;
    transition: transform .6s, background .6s;
}

.carousel-dot.active {
    transform: scale(1.35);
    background: var(--brand);
} */

/* Home hero: full-section background image while preserving readable content. */
.hero-home {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(90deg, rgba(7,42,27,.82) 0%, rgba(7,42,27,.62) 48%, rgba(7,42,27,.34) 100%),
        url("image3.png") center center / cover no-repeat;
    color: #fff;
}

.hero-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
    z-index: -1;
}

.hero-home .eyebrow,
.hero-home .lead {
    color: #eef8f1;
}

.hero-home .eyebrow::before {
    background: #b8d873;
}

.hero-home .hero-media {
    background: rgba(255,255,255,.96);
}

/* Keep the first home-page image square, but render it at 75% of the box width. */
.hero-home .hero-media img {
    width: 75%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0 auto;
}

@media(max-width:820px) {
    .gallery-carousel {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 6px;
    }

    .carousel-control {
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    .carousel-slide img {
        height: clamp(250px, 65vw, 430px);
    }
}

@media(max-width:520px) {
    .gallery-carousel {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .carousel-viewport {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .carousel-prev,
    .carousel-next {
        grid-row: 2;
    }

    .carousel-prev {
        grid-column: 1;
        justify-self: start;
    }

    .carousel-next {
        grid-column: 2;
        justify-self: end;
    }

    .carousel-dots {
        bottom: 0;
    }

    .carousel-slide figcaption {
        min-height: 90px;
        padding: 15px 18px;
        font-size: .88rem;
    }
}


/* ============================================================
   HOME PAGE-SPECIFIC IMAGE / CAROUSEL ADJUSTMENTS
   ============================================================ */
.hero-home {
    background:
        linear-gradient(90deg, rgba(7,42,27,.82) 0%, rgba(7,42,27,.62) 48%, rgba(25, 131, 85, 0.34) 100%),
        url("lab00.jpg") center center / cover no-repeat;
}

/* Transparent logo artwork sits directly over the hero background.
   Width stays at 75% of the media column from the earlier sizing request. */
.hero-home .hero-media {
    background: transparent;
    box-shadow: none;
}

.hero-home .hero-media img {
    width: 75%;
    height: 410px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* Daniel's portrait fills the same 160px square team frame cleanly. */
.team-photo-placeholder .daniel-photo {
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Facilities carousel uses the same image footprint/aspect ratio as the
   original 4:3 facility photograph, with controls overlaid so they do not
   reduce the displayed image width. */
.facility-carousel {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
}

.facility-carousel .carousel-viewport {
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
}

.facility-carousel .carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 707 / 530;
    object-fit: cover;
    background: #f5f8f6;
}

.facility-carousel .carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    margin: 0;
    background: rgba(255,255,255,.92);
}

.facility-carousel .carousel-control:hover {
    transform: translateY(-50%) scale(1.05);
}

.facility-carousel .carousel-prev {
    left: 12px;
}

.facility-carousel .carousel-next {
    right: 12px;
}

.facility-carousel .carousel-dots {
    bottom: 12px;
    z-index: 3;
}

/* Keep the Research page image in the same visual 4:3 frame as before. */
.research-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

@media(max-width:820px) {
    .hero-home .hero-media img {
        width: 75%;
        height: 300px;
    }
}

@media(max-width:520px) {
    .hero-home .hero-media img {
        width: 75%;
        height: 235px;
    }
}

.crypto-qr{
    width: 220px;
    height: 220px;
    max-width: 100%;
    display: block;
    margin: 20px auto;
    border-radius: 25px;
}

#crypto-address{
    word-break: break-all;
    font-size: 14px;
}