:root {
    --color-background: #13212b;
    --color-surface: #1a1e18;
    --color-text: #eaeee8;
    --color-text-muted: #a3b0a5;
    --color-border: #011936;
    --color-menu: #17731e;
    --color-menu-text: #ffffff;
    --color-accent-dark: #0d1820;
    --radius: 8px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --feed-max: 1600px;
    --text-max: 65ch;
    --content-max: 76rem;
    --pano-ratio: 1306 / 602;
    --pano-width: 1306px;
    --card-ratio: 16 / 10;
    --menu-height: 4rem;
    --footer-height: 3.75rem;
    --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 8%);
    --placeholder-fill: repeating-linear-gradient(45deg,
            var(--color-border) 0 12px,
            var(--color-surface) 12px 24px);
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--menu-height) + 1rem);
    scroll-padding-bottom: calc(var(--footer-height) + 1rem);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

a {
    color: inherit;
    text-decoration: none;
}

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

:focus-visible {
    outline: 2px solid var(--color-menu-text);
    outline-offset: 2px;
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}


/* ---------------------------------------------------------------
    Grid
--------------------------------------------------------------- */


.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        'menu'
        'main'
        'footer';
    min-height: 100vh;
    min-height: 100svh;
    gap: 0;
}

/* ---------------------------------------------------------------
   Top menu
   --------------------------------------------------------------- */

.page-menu {
    grid-area: menu;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--color-menu);
    color: var(--color-menu-text);
    box-shadow: 0 1px 0 rgb(0 0 0 / 15%);
}

.menu-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: var(--menu-height);
    max-width: var(--feed-max);
    margin-inline: auto;
    padding: 0.75rem var(--gutter);
}

.site-title {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.page-menu ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0.25rem;
}

.menu-list a {
    display: block;
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
    white-space: nowrap;
    border-radius: var(--radius);
    transition: background-color 150ms ease;
}

.menu-list a:hover {
    background-color: rgb(255 255 255 / 12%);
}

@media (max-width: 40rem) {
    .menu-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
    }

    .menu-list a {
        padding-block: 0.5rem;
        padding-inline: 0.6rem;
    }
}

/* ---------------------------------------------------------------
   Shared section layout
   --------------------------------------------------------------- */

.page-main {
    grid-area: main;
    display: block;
    width: 100%;
    min-width: 0;
    padding-bottom: var(--footer-height);
}

.hero,
.feed,
.services,
.about {
    max-width: var(--feed-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    padding-block: clamp(2rem, 5vw, 3rem);
}

.section-title {
    margin: 0 0 1.5rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */

.hero h1 {
    margin: 0 0 1rem;
    max-width: 20ch;
    font-size: clamp(4rem, 6vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-lede {
    margin: 0 0 1.75rem;
    max-width: var(--text-max);
    font-size: clamp(1.0rem, 1.6vw, 1.15rem);
    color: var(--color-text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
}

.button {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-menu-text);
    background-color: var(--color-menu);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 150ms ease;
}

.button:hover {
    background-color: #1a8a22;
}

.button-quiet {
    background-color: transparent;
    border-color: rgb(255 255 255 / 30%);
}

.button-quiet:hover {
    background-color: rgb(255 255 255 / 10%);
}

/* ---------------------------------------------------------------
   Image feed
   --------------------------------------------------------------- */

.carousel {
    display: flex;
    gap: clamp(1rem, 2vw, 1.5rem);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem;
    margin: -0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.feed-item {
    margin: 0;
    flex: 0 0 auto;
    width: min(80%, var(--pano-width));
    scroll-snap-align: center;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.pano-display {
    display: block;
    width: 100%;
    max-width: var(--pano-width);
    height: auto;
    aspect-ratio: var(--pano-ratio);
    object-fit: cover;
    background: var(--placeholder-fill);
}

.feed-item figcaption {
    padding: 0.85rem 1.15rem 1.05rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ---------------------------------------------------------------
   Services
   --------------------------------------------------------------- */

.services > .section-title,
.card-list {
    max-width: var(--content-max);
    margin-inline: auto;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
    gap: 1.25rem;
    margin-block: 0;
    padding: 0;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface);
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-media {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--card-ratio);
    object-fit: cover;
    background: var(--placeholder-fill);
}

.card-body {
    padding: 1.25rem 1.4rem 1.4rem;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ---------------------------------------------------------------
   Split layout — content left, image right. Used by About and Contact.
   --------------------------------------------------------------- */


.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
    gap: clamp(1.5rem, 4vw, 3rem);
    max-width: var(--content-max);
    margin-inline: auto;
    align-items: center;
}

.split-text > .section-title:not(:first-child) {
    margin-top: clamp(2rem, 4vw, 3rem);
}

.split-text > p {
    max-width: var(--text-max);
    margin: 0 0 1rem;
    color: var(--color-text-muted);
}

.split-media {
    height: 90%;
    min-height: 6rem;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--placeholder-fill);
}

.split-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 55rem) {
    .split {
        grid-template-columns: 1fr;
    }

    .split-media {
        height: auto;
        aspect-ratio: 3 / 4;
        max-width: 26rem;
        margin-inline: auto;
    }
}

/* ---------------------------------------------------------------
   Contact
   --------------------------------------------------------------- */

.contact-form {
    max-width: 32rem;
    margin-block: 1.5rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 1rem;
}

.field label {
    font-size: 0.9rem;
    font-weight: 600;
}

.field input,
.field textarea {
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: var(--radius);
}

.field textarea {
    resize: vertical;
}

/* Honeypot. Positioned off-screen rather than display:none, which
   some bots skip over. */
.field-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.form-status:empty {
    display: none;
}

.form-status.is-ok {
    color: #7fd486;
}

.form-status.is-error {
    color: #f0908a;
}

.button[disabled] {
    opacity: 0.6;
    cursor: default;
}

.contact-direct {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.contact-direct a {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.page-footer {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 2rem;
    padding: 1rem var(--gutter);
    text-align: center;
    color: var(--color-menu-text);
    background-color: var(--color-accent-dark);
    box-shadow: 0 -1px 0 rgb(255 255 255 / 12%);
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-nav a {
    font-size: 0.9rem;
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / 35%);
    text-underline-offset: 0.25em;
}

.footer-nav a:hover {
    text-decoration-color: currentColor;
}

.footer-note {
    margin: 0;
    font-size: 0.85rem;
    color: rgb(255 255 255 / 75%);
}

@media (max-width: 40rem) {
    :root {
        --footer-height: 5.5rem;
    }

    .page-footer {
        flex-direction: column;
        align-items: center;
    }
}
