:root {
    --bg: #F5EFE6;
    --text: #2B1D14;
    --accent: #6F4E37;
    --muted: #75604F;
    --raised: #FBF8F3;
    --sunk: #ECE3D6;
    --line: #E0D4C4;
    --glass: rgba(251, 248, 243, .72);
    --glass-line: rgba(43, 29, 20, .08);
    --feature-bg: #2B1D14;
    --feature-text: #F5EFE6;
    --feature-muted: #C9B8A6;
    --feature-art: #C8A27A;
    --ok: #4F8A52;
    --font: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #1A120D;
        --text: #F2E8DC;
        --accent: #C8A27A;
        --muted: #A8937E;
        --raised: #231913;
        --sunk: #2D2019;
        --line: #3A2B21;
        --glass: rgba(35, 25, 19, .7);
        --glass-line: rgba(242, 232, 220, .08);
        --feature-bg: #C8A27A;
        --feature-text: #1A120D;
        --feature-muted: #4A3526;
        --feature-art: #1A120D;
        --ok: #7DBF7F;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #1A120D;
    --text: #F2E8DC;
    --accent: #C8A27A;
    --muted: #A8937E;
    --raised: #231913;
    --sunk: #2D2019;
    --line: #3A2B21;
    --glass: rgba(35, 25, 19, .7);
    --glass-line: rgba(242, 232, 220, .08);
    --feature-bg: #C8A27A;
    --feature-text: #1A120D;
    --feature-muted: #4A3526;
    --feature-art: #1A120D;
    --ok: #7DBF7F;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); }
.skip:focus { top: 16px; }

/* Navigation */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 100; padding-inline: 12px; }
.nav-bar {
    position: relative;
    width: min(980px, 100%);
    margin-inline: auto;
    height: 52px;
    padding: 0 8px 0 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}
.nav-name { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { padding: 7px 12px; border-radius: 999px; font-size: .9rem; color: var(--muted); transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); background: var(--sunk); }
.nav-tools { display: flex; gap: 4px; }
.tool { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: color .2s, background-color .2s; }
.tool:hover { color: var(--text); background: var(--sunk); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool.lang { font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
.menu { display: none; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 26px; border-radius: 999px;
    font-weight: 600; font-size: 1rem; letter-spacing: -.005em;
    transition: transform .2s, background-color .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { opacity: .88; }
.btn-soft { background: var(--sunk); color: var(--text); }
.btn-soft:hover { background: var(--line); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Hero */
.hero {
    min-height: 100svh;
    padding: 118px 16px 48px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
}
.availability {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .92rem; font-weight: 500; color: var(--muted);
    margin-bottom: 22px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--ok); opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.hero h1 {
    font-size: clamp(3.1rem, 11.5vw, 8.6rem);
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: .95;
}
.hero-lead {
    max-width: 30ch;
    margin-top: 26px;
    font-size: clamp(1.15rem, 2.3vw, 1.5rem);
    line-height: 1.4;
    letter-spacing: -.012em;
    color: var(--muted);
    text-wrap: balance;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

/* Deployment flow (Soregies) */
.flow { width: min(1000px, 100%); margin-top: 60px; display: grid; gap: 16px; text-align: left; }
.flow-row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 22px; }
.flow-tag { font-size: .9rem; font-weight: 600; color: var(--muted); text-align: right; }
.is-after .flow-tag { color: var(--accent); }
.flow ol { display: flex; align-items: center; }
.flow li {
    position: relative;
    display: grid;
    padding: 10px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--raised);
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}
.flow li small { font-size: .76rem; font-weight: 400; color: var(--muted); }
.flow li + li { margin-left: 30px; }
.flow li + li::before {
    content: "";
    position: absolute;
    left: -30px; top: 50%;
    width: 30px; height: 1.5px;
    background: var(--accent);
    transform-origin: left center;
}
.is-before li { background: transparent; border-style: dashed; color: var(--muted); }
.is-before li + li::before { background: var(--line); }
.is-after li { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.is-after .flow-end { background: var(--text); color: var(--bg); border-color: var(--text); }
.flow figcaption { margin-top: 14px; text-align: center; font-size: .9rem; color: var(--muted); }

.js .flow li { opacity: 0; transform: translateY(6px); }
.js .flow li + li::before { transform: scaleX(0); }
.js .flow.is-drawn li { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; transition-delay: var(--d, 0s); }
.js .flow.is-drawn li + li::before { transform: none; transition: transform .35s ease; transition-delay: calc(var(--d, 0s) - .15s); }

/* Video introduction */
.block.film { padding: 56px 0 0; }
.film .wrap { width: min(1240px, 100% - 32px); }
.film-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #1A120D; box-shadow: 0 0 0 1px var(--line); }
.film-frame video { display: block; width: 100%; height: 100%; }
.film-frame video::cue { font-family: var(--font); font-size: 1.05rem; background: rgba(26, 18, 13, .78); }
.film-play { display: none; }
.js .film-play { position: absolute; inset: 0; width: 100%; display: flex; align-items: flex-end; padding: clamp(12px, 2.2vw, 28px); border-radius: inherit; }
.js .film-play[hidden] { display: none; }
.film-pill {
    display: inline-flex; align-items: center; gap: 12px;
    min-height: 52px; padding: 0 22px 0 18px; border-radius: 999px;
    background: rgba(26, 18, 13, .86); color: #F2E8DC;
    font-weight: 600; letter-spacing: -.01em;
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    transition: transform .2s;
}
.film-pill svg { width: 20px; height: 20px; fill: currentColor; }
.film-time { font-weight: 400; color: #C9B8A6; font-variant-numeric: tabular-nums; }
.film-play:hover .film-pill { transform: scale(1.04); }
.film-play:active .film-pill { transform: scale(.98); }
.film-play:focus-visible { outline-offset: -6px; border-radius: 28px; }
.film-note { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.film-note + .film-note { margin-top: 2px; }
.film-note:empty { display: none; }

/* Statement */
.statement { padding: 120px 0 140px; }
.statement p {
    max-width: 22em;
    font-size: clamp(1.55rem, 3.6vw, 2.75rem);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.028em;
    text-wrap: pretty;
}

/* Sections */
.block { padding: 110px 0; }
.block h2 {
    font-size: clamp(2.4rem, 6.4vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1;
    margin-bottom: 48px;
}
.intro { max-width: 58ch; color: var(--muted); font-size: 1.1rem; margin: -24px 0 40px; }

/* Bento */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "net net sys sys"
        "net net sec web"
        "certs certs lang soft";
    gap: 16px;
}
.tile { background: var(--raised); border-radius: 28px; padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.tile h3 { font-size: 1rem; font-weight: 600; color: var(--accent); letter-spacing: -.005em; }
.tile p { color: var(--muted); }
.tile p strong { color: var(--text); font-weight: 600; }
.t-network { grid-area: net; background: var(--sunk); padding: 38px; justify-content: space-between; min-height: 380px; }
.t-systems { grid-area: sys; }
.t-security { grid-area: sec; }
.t-web { grid-area: web; }
.t-certs { grid-area: certs; }
.t-lang { grid-area: lang; }
.t-soft { grid-area: soft; }
.tile-big { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.12; letter-spacing: -.03em; color: var(--text) !important; max-width: 16ch; }
.t-systems p { font-size: 1.15rem; color: var(--text); letter-spacing: -.01em; }
.plain { display: grid; gap: 10px; }
.plain li { padding-top: 10px; border-top: 1px solid var(--line); font-weight: 500; }
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.certs dt { font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; }
.certs dd { color: var(--muted); font-size: .95rem; margin-top: 4px; }

/* Path */
.path { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; }
.path-group h3 { font-size: 1rem; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.rows li { display: grid; grid-template-columns: 128px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); }
.rows time { color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.rows h4 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; }
.where { font-weight: 400; color: var(--muted); }
.rows p { color: var(--muted); margin-top: 6px; }

/* Projects */
.feature {
    display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 32px;
    padding: 52px; border-radius: 32px;
    background: var(--feature-bg); color: var(--feature-text);
    margin-bottom: 28px;
}
.feature h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.feature p { color: var(--feature-muted); margin-top: 14px; font-size: 1.08rem; max-width: 46ch; }
.feature-cta { display: inline-block; margin-top: 26px; font-weight: 600; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.feature-art { width: 100%; max-width: 280px; justify-self: center; overflow: visible; }
.fa-links path { fill: none; stroke: var(--feature-art); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.fa-nodes circle { fill: var(--feature-art); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: center; }
.feature:hover .fa-nodes circle { transform: scale(1.15); }
.feature:hover .fa-nodes circle:nth-child(2) { transform: scale(1.3); }

.project-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.project-list a { display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
.project-list strong { font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; transition: color .2s; }
.project-list span { color: var(--muted); }
.project-list a:hover strong { color: var(--accent); }
.project-list:has(> li:only-child) { grid-template-columns: 1fr; }
.private { margin-top: 56px; padding: 38px; border-radius: 28px; background: var(--raised); }
.private h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: -.025em; }
.private > p { color: var(--muted); max-width: 62ch; margin-top: 10px; }
.themes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; margin-top: 22px; }
.themes li { padding: 14px 0; border-top: 1px solid var(--line); font-weight: 500; }

/* Watch */
.watch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.watch article { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 10px; align-content: start; }
.watch h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.015em; }
.watch p { color: var(--muted); }
.watch small { font-size: .85rem; color: var(--accent); }
.tools-line { margin-top: 44px; color: var(--muted); }
.tools-line span { color: var(--text); font-weight: 600; }

/* Contact */
.contact { padding-bottom: 140px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-text p { color: var(--muted); font-size: 1.15rem; max-width: 36ch; margin-top: -24px; }
.mail {
    display: inline-block; margin-top: 30px;
    font-size: clamp(1.25rem, 2.6vw, 1.9rem); font-weight: 600; letter-spacing: -.025em;
    color: var(--accent); border-bottom: 2px solid currentColor; padding-bottom: 2px;
    overflow-wrap: anywhere;
}
.contact-list { display: grid; gap: 10px; margin-top: 30px; color: var(--muted); }
.contact-list a:hover { color: var(--text); }
.glass {
    background: var(--glass);
    border: 1px solid var(--glass-line);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
}
.form { padding: 30px; border-radius: 28px; display: grid; gap: 16px; background: var(--raised); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: .9rem; font-weight: 500; color: var(--muted); }
.form input, .form textarea {
    width: 100%; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
    padding: 13px 15px; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.form .invalid { border-color: #B4483A; }
.form .btn { width: 100%; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-status { min-height: 1.4em; font-size: .92rem; font-weight: 500; text-align: center; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #B4483A; }
:root[data-theme="dark"] .form-status.err, :root[data-theme="dark"] .form .invalid { color: #E08A7C; border-color: #E08A7C; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .92rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; }
.footer a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 980px) {
    .bento {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "net net" "sys sys" "sec web" "certs certs" "lang soft";
    }
    .t-network { min-height: 0; gap: 28px; }
    .watch { grid-template-columns: 1fr 1fr; row-gap: 36px; }
    .path, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    .flow { grid-template-columns: 1fr 1.2fr; gap: 20px; width: min(560px, 100%); align-items: start; }
    .flow-row { grid-template-columns: 1fr; align-items: start; align-content: start; gap: 12px; }
    .flow-tag { text-align: left; }
    .flow ol { flex-direction: column; align-items: stretch; }
    .flow li { white-space: normal; }
    .flow li + li { margin-left: 0; margin-top: 18px; }
    .flow li + li::before { left: 22px; top: -18px; width: 1.5px; height: 18px; transform-origin: center top; }
    .js .flow li + li::before { transform: scaleY(0); }
    .flow figcaption { grid-column: 1 / -1; margin-top: 4px; }
}

@media (max-width: 760px) {
    .menu { display: grid; }
    .nav-links {
        position: absolute; top: calc(100% + 8px); left: 0; right: 0;
        flex-direction: column; gap: 2px; padding: 10px;
        border-radius: 24px;
        background: var(--glass);
        border: 1px solid var(--glass-line);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        opacity: 0; visibility: hidden; transform: translateY(-6px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: 12px 14px; font-size: 1rem; color: var(--text); }
    .nav-tools { margin-left: auto; }
    .feature { grid-template-columns: 1fr; padding: 34px 26px; }
    .feature-art { max-width: 200px; order: -1; justify-self: start; }
    .project-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .block { padding: 80px 0; }
    .block.film { padding-top: 32px; }
    .block.film h2 { margin-bottom: 28px; }
    .film-frame { border-radius: 18px; }
    .film-pill { min-height: 44px; padding: 0 16px 0 13px; gap: 9px; font-size: .92rem; }
    .film-pill svg { width: 16px; height: 16px; }
    .statement { padding: 72px 0 90px; }
    .bento { grid-template-columns: 1fr; grid-template-areas: "net" "sys" "sec" "web" "certs" "lang" "soft"; }
    .tile, .t-network { padding: 26px; border-radius: 24px; }
    .certs, .field-row, .watch, .themes { grid-template-columns: 1fr; }
    .private { padding: 26px; border-radius: 24px; }
    .flow li { padding: 9px 12px; font-size: .86rem; }
    .rows li { grid-template-columns: 1fr; gap: 6px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .footer-row { flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .flow li { opacity: 1; transform: none; }
    .js .flow li + li::before { transform: none; }
}
