:root {
    --ink: #1a1612;
    --ink-soft: #3a322a;
    --cream: #f3ebe0;
    --cream-dim: #e6d9c8;
    --oak: #8b5e3c;
    --oak-deep: #5c3b24;
    --oak-bright: #c48955;
    --surface: #f7f1e8;
    --surface-alt: #ebe1d3;
    --line: rgba(26, 22, 18, 0.12);
    --shadow: 0 24px 60px rgba(26, 22, 18, 0.18);
    --radius: 2px;
    --font-display: "Fraunces", "Times New Roman", serif;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
    --header-h: 72px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--oak-deep);
}

.container {
    width: min(1120px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oak);
}

h1,
h2 {
    font-family: var(--font-display);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.55rem);
    max-width: 18ch;
}

.lead {
    max-width: 62ch;
    margin: 0;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

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

/* Header */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.site-header.is-scrolled {
    background: rgba(26, 22, 18, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
    width: min(1120px, calc(100% - 2.5rem));
    height: 100%;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-brand img {
    width: 132px;
    height: auto;
    filter: brightness(0) invert(1);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}

.site-nav a {
    color: rgba(243, 235, 224, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav a:hover {
    color: #fff;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(243, 235, 224, 0.35);
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    margin: 5px auto;
    background: var(--cream);
    transition: transform 0.3s var(--ease);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.btn--primary {
    background: var(--oak);
    color: #fff;
    box-shadow: 0 10px 28px rgba(139, 94, 60, 0.35);
}

.btn--primary:hover {
    background: var(--oak-deep);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    border-color: rgba(243, 235, 224, 0.55);
    color: var(--cream);
}

.btn--ghost:hover {
    background: rgba(243, 235, 224, 0.1);
    color: #fff;
}

.btn--small {
    min-height: 40px;
    padding: 0.45rem 1rem;
    font-size: 0.88rem;
}

.btn--block {
    width: 100%;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--cream);
    background: var(--ink);
}

.hero__media {
    position: absolute;
    inset: 0;
}

.hero__grain {
    position: absolute;
    inset: -4%;
    background-size: cover;
    background-position: center;
    filter: saturate(0.75) contrast(1.05);
    transform: scale(1.08);
    animation: heroDrift 22s ease-in-out infinite alternate;
}

.hero__veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 22, 18, 0.55) 0%, rgba(26, 22, 18, 0.72) 45%, rgba(26, 22, 18, 0.92) 100%),
        radial-gradient(ellipse at 30% 20%, rgba(196, 137, 85, 0.22), transparent 55%);
}

.hero__content {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100% - 2.5rem));
    text-align: center;
    padding: calc(var(--header-h) + 2rem) 0 5rem;
}

.hero__mark {
    width: min(220px, 55vw);
    margin: 0 auto 1.75rem;
    filter: brightness(0) invert(1);
}

.hero__content p {
    margin: 0 auto 2rem;
    max-width: 42ch;
    color: rgba(243, 235, 224, 0.86);
    font-size: 1.12rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    width: 24px;
    height: 38px;
    margin-left: -12px;
    border: 1px solid rgba(243, 235, 224, 0.45);
    border-radius: 999px;
    text-decoration: none;
}

.hero__scroll span {
    display: block;
    width: 4px;
    height: 8px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: var(--cream);
    animation: scrollPulse 1.8s var(--ease) infinite;
}

@keyframes heroDrift {
    from { transform: scale(1.08) translate3d(0, 0, 0); }
    to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}

@keyframes scrollPulse {
    0% { opacity: 0; transform: translateY(0); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translateY(12px); }
}

/* Sections */
.section {
    padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.section--services {
    background:
        linear-gradient(135deg, rgba(139, 94, 60, 0.08), transparent 45%),
        var(--surface);
}

.section--partners {
    background: var(--ink);
    color: var(--cream);
}

.section--partners .eyebrow {
    color: var(--oak-bright);
}

.section--partners .lead {
    color: rgba(243, 235, 224, 0.82);
    margin-bottom: 1.75rem;
}

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

.section__head {
    margin-bottom: 2.5rem;
}

.section--funding {
    background:
        radial-gradient(circle at 85% 15%, rgba(139, 94, 60, 0.12), transparent 40%),
        var(--surface);
}

.funding-quote {
    margin: 0 0 1.25rem;
    max-width: 48ch;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink);
}

.funding-amount {
    margin: 0 0 1rem;
    color: var(--ink-soft);
}

.funding-amount strong {
    color: var(--oak-deep);
    font-weight: 600;
}

.section--contact {
    background: var(--ink);
    color: var(--cream);
}

.section--contact .eyebrow {
    color: var(--oak-bright);
}

.section--contact .lead {
    color: rgba(243, 235, 224, 0.82);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.company-details {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    color: rgba(243, 235, 224, 0.78);
}

.company-details li + li {
    margin-top: 0.45rem;
}

.company-details a {
    color: var(--cream);
}

/* Gallery + testimonials */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-item {
    margin: 0;
    position: relative;
    overflow: hidden;
    background: var(--ink);
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.1rem 1rem 0.9rem;
    background: linear-gradient(transparent, rgba(26, 22, 18, 0.85));
    color: var(--cream);
    font-size: 0.92rem;
}

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

.testimonials--spaced {
    margin-top: 2rem;
}

.testimonial {
    margin: 0;
    padding: 1.5rem 1.4rem;
    background: rgba(255, 255, 255, 0.55);
    border-left: 3px solid var(--oak);
}

.testimonial p {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.45;
}

.testimonial cite {
    font-style: normal;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--oak-deep);
}

/* Form */
.contact-form-wrap {
    background: rgba(243, 235, 224, 0.06);
    border: 1px solid rgba(243, 235, 224, 0.14);
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.contact-form {
    display: grid;
    gap: 0.95rem;
}

.form-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.form-tab {
    min-height: 42px;
    border: 1px solid rgba(243, 235, 224, 0.25);
    background: transparent;
    color: rgba(243, 235, 224, 0.8);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.form-tab.is-active {
    background: var(--oak);
    border-color: var(--oak);
    color: #fff;
}

.contact-form label {
    display: grid;
    gap: 0.4rem;
}

.contact-form label span {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(243, 235, 224, 0.7);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(243, 235, 224, 0.22);
    background: rgba(26, 22, 18, 0.35);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 0.85rem 0.95rem;
    font: inherit;
    outline: none;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--oak-bright);
    background: rgba(26, 22, 18, 0.55);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.alert--success {
    background: rgba(70, 130, 80, 0.2);
    border: 1px solid rgba(120, 180, 130, 0.45);
    color: #d7efd8;
}

.alert--error {
    background: rgba(140, 50, 40, 0.25);
    border: 1px solid rgba(220, 120, 100, 0.45);
    color: #ffd7cf;
}

.alert--error p {
    margin: 0;
}

.alert--error p + p {
    margin-top: 0.35rem;
}

/* Footer */
.site-footer {
    background: #fff;
    color: var(--ink-soft);
    padding: 3.5rem 0 2.5rem;
}

.funding-logos {
    display: grid;
    gap: 1.75rem;
    justify-items: center;
    margin-bottom: 2.75rem;
}

.funding-logos img {
    width: min(196px, 70%);
    height: auto;
    background: transparent;
    padding: 0;
}

.footer-meta {
    text-align: center;
    border-top: 1px solid var(--line);
    padding-top: 2rem;
}

.footer-brand {
    width: 140px;
    margin: 0 auto 1rem;
    filter: none;
    opacity: 0.95;
}

.footer-meta p {
    margin: 0.25rem 0;
    font-size: 0.92rem;
}

.footer-meta a {
    color: var(--oak-deep);
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid,
    .testimonials {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem 1.25rem 1.25rem;
        background: rgba(26, 22, 18, 0.96);
        border-bottom: 1px solid rgba(243, 235, 224, 0.1);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(243, 235, 224, 0.08);
    }

    .site-nav .btn {
        margin-top: 0.75rem;
        justify-content: center;
    }

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

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero__grain,
    .hero__scroll span,
    .reveal,
    .btn,
    .gallery-item img {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
