:root {
    --ground: #f2ede2;
    --surface: #e8e1d1;
    --ink: #17180f;
    --ink-dim: #5c5947;
    --accent: #b8611c;
    --accent-ink: #fff8ef;
    --line: #cfc6ae;
    --mono-tint: rgba(23, 24, 15, 0.04);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ground: #121309;
        --surface: #1b1c11;
        --ink: #f2ede2;
        --ink-dim: #a49d84;
        --accent: #e08a3e;
        --accent-ink: #171204;
        --line: #37361f;
        --mono-tint: rgba(242, 237, 226, 0.05);
    }
}

:root[data-theme="dark"] {
    --ground: #121309;
    --surface: #1b1c11;
    --ink: #f2ede2;
    --ink-dim: #a49d84;
    --accent: #e08a3e;
    --accent-ink: #171204;
    --line: #37361f;
    --mono-tint: rgba(242, 237, 226, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: 'Archivo', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: 'Big Shoulders Display', 'Archivo Narrow', sans-serif;
    text-wrap: balance;
    margin: 0;
    letter-spacing: 0.01em;
}

.mono {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.logo-domain {
    font-size: 13px;
    color: var(--ink-dim);
    font-weight: 400;
    margin-left: 4px;
}

a { color: inherit; }

[lang="ua"] { display: none; }

html[data-lang="ua"] [lang="en"] { display: none; }
html[data-lang="ua"] [lang="ua"] { display: revert; }
html[data-lang="ua"] span[lang="ua"] { display: inline; }
html[data-lang="ua"] p[lang="ua"],
html[data-lang="ua"] div[lang="ua"] { display: block; }

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 56px);
}

/* ---------- header ---------- */
header.site {
    border-bottom: 1px solid var(--line);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--ground);
    transform: translateY(0);
    transition: transform .35s ease;
}

header.site.is-hidden { transform: translateY(-100%); }

@media (prefers-reduced-motion: reduce) {
    header.site { transition: none; }
}

.site-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(20px, 4vw, 56px);
    gap: 24px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Big Shoulders Display', sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo .bolt { color: var(--accent); font-size: 20px; }

nav.primary {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 36px);
}

nav.primary a {
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color .15s ease, border-color .15s ease;
}

nav.primary a:hover,
nav.primary a:focus-visible {
    color: var(--ink);
    border-color: var(--accent);
}

.lang-toggle {
    display: flex;
    flex-shrink: 0;
    border: 1px solid var(--line);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    border-radius: 999px;
    overflow: hidden;
}

.lang-toggle button {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--ink-dim);
    padding: 7px 14px;
    cursor: pointer;
    font: inherit;
}

.lang-toggle button[aria-pressed="true"] {
    background: var(--accent);
    color: var(--accent-ink);
}

.lang-toggle button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background-image:
        repeating-linear-gradient(90deg, var(--mono-tint) 0, var(--mono-tint) 1px, transparent 1px, transparent 88px),
        repeating-linear-gradient(0deg, var(--mono-tint) 0, var(--mono-tint) 1px, transparent 1px, transparent 88px);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
    padding: clamp(56px, 10vw, 120px) clamp(20px, 4vw, 56px) clamp(48px, 8vw, 88px);
}

.hero-copy { min-width: 0; }

.hero-visual {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .eyebrow .dot { animation: none; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.72); }
}

h1.hero-h {
    font-size: clamp(40px, 6.2vw, 82px);
    line-height: 0.96;
    font-weight: 900;
    max-width: 16ch;
}

.hero-sub {
    margin-top: 28px;
    max-width: 56ch;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.6;
    color: var(--ink-dim);
}

.freq-readout {
    margin-top: 44px;
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
}

.freq-readout .value {
    font-size: 20px;
    font-weight: 500;
    color: var(--accent);
}

.freq-readout .caption {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

/* ---------- section shell ---------- */
section {
    border-bottom: 1px solid var(--line);
    padding: clamp(48px, 8vw, 88px) 0;
}

section:last-of-type { border-bottom: none; }

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: clamp(32px, 5vw, 52px);
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    max-width: 22ch;
}

.target-copy {
    margin: 14px 0 0;
    font-size: 16px;
    color: var(--ink-dim);
    max-width: 56ch;
    line-height: 1.6;
}

.target-copy strong { color: var(--ink); }

/* Static image block (not a video player) */
.project-image {
    width: 100%;
    margin: 0 0 clamp(32px, 5vw, 52px);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}

.project-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: cover;
}

/* ---------- about ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media(min-width:760px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 56px;
    }
}

.about-grid p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.72;
    color: var(--ink-dim);
    max-width: 62ch;
}

.about-grid p:last-child { margin-bottom: 0; }
.about-grid strong { color: var(--ink); font-weight: 600; }

/* ---------- numbers ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

@media(min-width:760px) {
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 150px;
    justify-content: flex-end;
}

.stat .num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 500;
    color: var(--accent);
    line-height: 1;
}

.stat .unit { font-size: 0.5em; }

.stat .label {
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
    line-height: 1.4;
}

.stat-note {
    margin-top: 20px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--ink-dim);
    letter-spacing: 0.02em;
}

/* ---------- contact / footer ---------- */
footer.site { padding: clamp(48px, 8vw, 88px) 0 40px; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: end;
}

@media(min-width:760px) {
    .contact-grid { grid-template-columns: 1.3fr 1fr; }
}

footer.site h2 {
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 700;
    max-width: 16ch;
}

footer.site .lede {
    margin-top: 16px;
    color: var(--ink-dim);
    font-size: 16px;
    line-height: 1.6;
    max-width: 44ch;
}

.contact-details {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-details a {
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
    width: fit-content;
}

.contact-details a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.contact-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 4px;
}

.foot-bottom {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--ink-dim);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .site-bar { gap: 16px; }
    nav.primary { gap: 14px; }
    nav.primary a { font-size: 11px; }
}

@media (max-width: 700px) {
    .site-bar {
        flex-wrap: wrap;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 12px;
    }

    nav.primary {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        overflow-x: auto;
    }

    nav.primary a {
        white-space: nowrap;
        font-size: 10px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 54px;
    }

    .hero-visual { grid-row: 1; }
    .hero-visual img { max-height: 300px; }
    .hero-copy { grid-row: 2; }
    h1.hero-h { max-width: 18ch; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat { min-height: 120px; }
}
