:root {
    color-scheme: dark;
    --bg: #101513;
    --bg-strong: #0b100e;
    --surface: #17201b;
    --surface-2: #1e2a24;
    --text: #eef4ef;
    --muted: #b7c5ba;
    --line: rgba(225, 237, 227, 0.14);
    --accent: #8bd18d;
    --accent-strong: #4eb268;
    --accent-soft: rgba(139, 209, 141, 0.15);
    --teal: #72c7b8;
    --warm: #d0a45a;
    --danger: #ef767a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    --radius: 8px;
    --header-h: 78px;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f7faf7;
    --bg-strong: #ffffff;
    --surface: #ffffff;
    --surface-2: #edf4ee;
    --text: #1a261f;
    --muted: #5c6b60;
    --line: rgba(28, 60, 38, 0.14);
    --accent: #2f8f4e;
    --accent-strong: #1f713b;
    --accent-soft: rgba(47, 143, 78, 0.12);
    --teal: #317f76;
    --warm: #a7732a;
    --shadow: 0 18px 42px rgba(20, 44, 30, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
    padding: 0.85rem clamp(1rem, 4vw, 3rem);
    background: color-mix(in srgb, var(--bg-strong) 88%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.brand__mark {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--line);
}

.brand__text {
    display: grid;
    line-height: 1.12;
}

.brand__text strong {
    font-size: 1.1rem;
    letter-spacing: 0;
}

.brand__text span {
    max-width: 220px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.site-nav a,
.footer-grid a,
.text-link {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease;
}

.site-nav a {
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.94rem;
    font-weight: 700;
}

.site-nav a:hover,
.text-link:hover,
.footer-grid a:hover {
    color: var(--accent);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.icon-button:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    color: var(--accent);
}

.icon-button svg,
.button svg,
.service-card svg,
.contact-list svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
}

.nav-toggle {
    display: none;
}

.hero {
    min-height: calc(100svh - var(--header-h));
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(9, 14, 12, 0.92), rgba(9, 14, 12, 0.68), rgba(9, 14, 12, 0.24)),
        url("../../tlo.jpg") center / cover no-repeat;
    border-bottom: 1px solid var(--line);
}

[data-theme="light"] .hero {
    background:
        linear-gradient(90deg, rgba(247, 250, 247, 0.92), rgba(247, 250, 247, 0.74), rgba(247, 250, 247, 0.24)),
        url("../../tlo.jpg") center / cover no-repeat;
}

.hero__inner,
.section__inner {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero__inner {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.eyebrow {
    margin: 0 0 0.85rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.section-heading h2,
.two-column h2,
.newsletter-band h2,
.contact-grid h2 {
    margin: 0;
    max-width: 860px;
    color: var(--text);
    font-size: clamp(2.1rem, 6vw, 5rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.hero__lead {
    max-width: 690px;
    margin: 1.25rem 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.72rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--accent-strong);
    color: #fff;
    border-color: var(--accent-strong);
}

.button--ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    max-width: 760px;
    margin: 2.5rem 0 0;
}

.hero-metrics div {
    min-height: 96px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.hero-metrics dt {
    color: var(--accent);
    font-size: 1.6rem;
    font-weight: 800;
}

.hero-metrics dd {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
    background: var(--bg);
}

.section--intro,
.section--muted {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.two-column,
.contact-grid,
.newsletter-band {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 7vw, 5rem);
    align-items: start;
}

.two-column h2,
.section-heading h2,
.newsletter-band h2,
.contact-grid h2 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
}

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

.prose p,
.prose ul,
.prose ol {
    margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
    color: var(--text);
    line-height: 1.18;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading--row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.service-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.service-card,
.news-card,
.contact-form,
.stack-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.service-card {
    min-height: 250px;
    padding: 1.35rem;
}

.service-card svg {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
    color: var(--accent);
}

.service-card h3,
.news-card h3,
.news-card h2 {
    margin: 0 0 0.6rem;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.25;
}

.service-card p,
.news-card p,
.newsletter-band p,
.contact-grid p {
    color: var(--muted);
}

.news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card {
    overflow: hidden;
}

.news-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--surface-2);
}

.news-card > div {
    padding: 1.25rem;
}

.news-card time,
.article-header time {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--warm);
    font-size: 0.82rem;
    font-weight: 800;
}

.news-card a {
    text-decoration: none;
}

.newsletter-band {
    align-items: center;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
}

form label {
    display: grid;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 0.72rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-strong);
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent-soft);
}

.stack-form,
.contact-form {
    display: grid;
    gap: 0.9rem;
    padding: 1.25rem;
}

.checkbox-line {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 0.6rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.checkbox-line input {
    width: 18px;
    min-height: 18px;
    margin-top: 0.2rem;
}

.hp-field {
    position: absolute;
    left: -10000px;
    opacity: 0;
}

.alert {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius);
    font-weight: 700;
}

.alert--success {
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    background: var(--accent-soft);
    color: var(--accent);
}

.alert--error {
    border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
    background: rgba(239, 118, 122, 0.12);
    color: var(--danger);
}

.contact-list {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.contact-list a,
.contact-list span {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

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

.empty-state {
    grid-column: 1 / -1;
    padding: 1.2rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

.page-hero {
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(2rem, 6vw, 4rem);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.page-hero--compact {
    padding-top: clamp(3rem, 6vw, 5rem);
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

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

.article-header {
    padding: clamp(3rem, 7vw, 5rem) 0 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.article-header h1 {
    max-width: 920px;
    margin: 0.6rem 0 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
}

.article-header p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.1rem;
}

.article-media {
    padding-top: 2rem;
}

.article-media img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.article-body {
    padding: 2.5rem 0 5rem;
}

.article-body .prose {
    max-width: 820px;
    color: var(--text);
    font-size: 1.04rem;
}

.article-body .prose a {
    color: var(--accent);
}

.article-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.video-frame {
    width: min(920px, 100%);
    margin-top: 2rem;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.legal {
    max-width: 880px;
}

.site-footer {
    padding: 3rem clamp(1rem, 4vw, 3rem) 1.25rem;
    background: var(--bg-strong);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.8fr;
    gap: 2rem;
    width: min(1160px, 100%);
    margin: 0 auto;
}

.footer-grid h2 {
    margin: 0 0 0.8rem;
    font-size: 1rem;
}

.footer-grid p {
    color: var(--muted);
}

.footer-grid > div:last-child {
    display: grid;
    align-content: start;
    gap: 0.45rem;
}

.brand--footer {
    margin-bottom: 1rem;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
    width: min(1160px, 100%);
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: auto auto 1fr;
    }

    .nav-toggle {
        display: inline-grid;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background: var(--bg-strong);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        padding: 0.85rem 1rem;
    }

    .header-actions {
        justify-self: end;
    }

    .service-grid,
    .news-grid,
    .news-grid--wide,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column,
    .contact-grid,
    .newsletter-band {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 68px;
    }

    .site-header {
        gap: 0.55rem;
        padding-inline: 0.85rem;
    }

    .brand__mark {
        width: 38px;
        height: 38px;
    }

    .brand__text span {
        max-width: 140px;
        font-size: 0.68rem;
    }

    .header-actions .icon-button:not([data-theme-toggle]) {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero__inner {
        padding: 4rem 0;
    }

    .hero__actions,
    .section-heading--row,
    .article-social {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .hero-metrics,
    .service-grid,
    .news-grid,
    .news-grid--wide,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-metrics div {
        min-height: 82px;
    }
}

