/* ============ RESET & TOKENS ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --paper: #f6f7fa;
    --paper-2: #e6ecf7;
    --paper-3: #d8e2f2;
    --ink: #14161c;
    --ink-2: #1a2540;
    --muted: #4a4f5c;
    --muted-2: #6b7080;
    --line: rgba(20, 22, 28, 0.13);
    --line-strong: rgba(20, 22, 28, 0.26);

    --accent: #1e40af;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(30, 64, 175, 0.07);
    --accent-shadow: rgba(30, 64, 175, 0.2);

    --serif: 'Georgia', 'Times New Roman', serif;
    --sans: 'Helvetica Neue', Arial, sans-serif;
    --label: 'Helvetica Neue', Arial, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sidebar-w: 280px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-preload * { animation: none !important; transition: none !important; }
::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.mono {
    font-family: var(--label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.accent { color: var(--accent); }

/* ============ LOGO ============ */
.logo-mark { display: block; width: 100%; max-width: 170px; height: auto; }
.logo-mark .mark-accent { fill: var(--accent); }
.logo-mark .mark-ink { fill: var(--ink-2); }

/* ============ SIDEBAR ============ */
#sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--paper-2);
    border-right: 1px solid var(--line-strong);
    z-index: 100;
    display: flex;
    align-items: center;
    transition: transform 0.5s var(--ease);
}
#sidebar .inner { width: 100%; padding: 44px 34px; }
#sidebar .logo-link { display: block; margin-bottom: 12px; cursor: pointer; }
#sidebar .tagline {
    font-family: var(--label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 56px;
}
#sidebar nav ul li { margin-bottom: 0; }
#sidebar nav ul li a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-2);
    transition: color 0.3s, padding 0.4s var(--ease);
    position: relative;
    cursor: pointer;
}
#sidebar nav ul li:last-child a { border-bottom: 1px solid var(--line); }
#sidebar nav ul li a::before {
    content: attr(data-num);
    font-family: var(--label);
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--muted-2);
    letter-spacing: 0.1em;
}
#sidebar nav ul li a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -1px;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}
#sidebar nav ul li a:hover,
#sidebar nav ul li a.active { color: var(--accent); padding-left: 8px; }
#sidebar nav ul li a:hover::before,
#sidebar nav ul li a.active::before { color: var(--accent); }
#sidebar nav ul li a:hover::after,
#sidebar nav ul li a.active::after { width: 100%; }

#sidebar .sidebar-footer {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-family: var(--label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 2;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 18px; right: 18px;
    z-index: 200;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--paper-3);
    border: 1px solid var(--line-strong);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle span { width: 18px; height: 2px; background: var(--ink); transition: all 0.3s var(--ease); }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ WRAPPER ============ */
#wrapper { margin-left: var(--sidebar-w); }

.wrapper { padding: 100px 0; position: relative; }
.wrapper .inner { max-width: 960px; margin: 0 auto; padding: 0 60px; }
.wrapper.style1 { background: var(--paper); }
.wrapper.style2 { background: var(--paper-2); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.wrapper.style3 { background: var(--paper); }
.wrapper.style1-alt { background: var(--paper-2); border-top: 1px solid var(--line-strong); }

/* ============ HERO ============ */
#intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
#intro::before {
    content: '';
    position: absolute;
    top: -20%; right: -20%;
    width: 700px; height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.09), transparent 65%);
    filter: blur(70px);
    pointer-events: none;
}
#intro .inner { position: relative; z-index: 1; }
#intro .kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
#intro .kicker .line { width: 40px; height: 2px; background: var(--accent); }
#intro h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    letter-spacing: -0.04em;
    line-height: 0.98;
    margin-bottom: 30px;
    max-width: 820px;
    color: var(--ink);
}
#intro h1 .accent { color: var(--accent); }
#intro p {
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--muted);
    max-width: 580px;
    margin-bottom: 40px;
}
#intro p strong { color: var(--ink); font-weight: 700; }

/* ============ КНОПКИ ============ */
.button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 34px;
    border-radius: 40px;
    border: 2px solid var(--ink);
    font-family: var(--label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    transition: all 0.4s var(--ease);
    cursor: pointer;
    background: transparent;
}
.button:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 10px 30px var(--accent-shadow);
}
.button.small { padding: 12px 26px; font-size: 0.66rem; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ SPOTLIGHTS ============ */
.spotlights > section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    border-bottom: 1px solid var(--line-strong);
}
.spotlights > section:last-child { border-bottom: none; }
.spotlights > section:nth-child(even) .image { order: 2; }

.spotlights .image {
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 360px;
    cursor: pointer;
}
.spotlights .image::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: transform 1s var(--ease);
}
.spotlights .image:hover::before { transform: scale(1.05); }

.spotlights .image.pic-1::before { background: linear-gradient(150deg, #1e3a5f 0%, #1e40af 55%, #3b6fd4 100%); }
.spotlights .image.pic-2::before { background: linear-gradient(150deg, #1e2a5f 0%, #2d3f9e 55%, #4a63c9 100%); }
.spotlights .image.pic-3::before { background: linear-gradient(150deg, #16324f 0%, #1d4ed8 55%, #4f83e8 100%); }

.spotlights .image .pic-label {
    position: absolute;
    bottom: 24px; left: 24px;
    z-index: 2;
    font-family: var(--label);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    padding: 7px 16px;
    background: rgba(20, 22, 28, 0.55);
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

.spotlights .content { display: flex; align-items: center; padding: 60px 70px; }
.spotlights .content .inner { padding: 0; max-width: 100%; }
.spotlights .content .num {
    font-family: var(--label);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.spotlights .content h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 18px;
    color: var(--ink);
}
.spotlights .content p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--muted);
    margin-bottom: 28px;
    max-width: 420px;
}
.spotlights .content p strong { color: var(--ink); font-weight: 700; }

/* ============ FEATURES ============ */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--line-strong);
    margin-top: 52px;
}
.features > section {
    padding: 34px 34px 34px 0;
    border-bottom: 1px solid var(--line);
    transition: background 0.4s var(--ease), padding 0.5s var(--ease);
}
.features > section:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 44px; }
.features > section:nth-child(even) { padding-left: 44px; }
.features > section:hover { background: var(--accent-soft); }

.features .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--label);
    letter-spacing: 0.04em;
}
.features h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--ink);
}
.features p { font-size: 0.94rem; line-height: 1.7; color: var(--muted); }

/* ============ CONTACT ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 52px; }
.split form .fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 26px;
}
.split form .field { display: flex; flex-direction: column; }
.split form .field.half { grid-column: span 1; }
.split form .field.full { grid-column: span 2; }
.split form label {
    font-family: var(--label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-bottom: 8px;
}
.split form input,
.split form textarea {
    background: var(--paper);
    border: 2px solid var(--line-strong);
    border-radius: 6px;
    padding: 13px 16px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
}
.split form input:focus,
.split form textarea:focus { border-color: var(--accent); }
.split form input::placeholder,
.split form textarea::placeholder { color: var(--muted-2); }

.contact li { padding: 18px 0; border-top: 1px solid var(--line); }
.contact li:last-child { border-bottom: 1px solid var(--line); }
.contact li h3 {
    font-family: var(--label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.contact li span,
.contact li a { font-size: 1rem; font-weight: 500; color: var(--ink); line-height: 1.6; }
.contact li a:hover { color: var(--accent); }
.contact .icons { display: flex; gap: 10px; margin-top: 8px; }
.contact .icons a {
    width: 40px; height: 40px;
    border-radius: 8px;
    border: 2px solid var(--line-strong);
    display: grid;
    place-items: center;
    font-family: var(--label);
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-2);
    transition: all 0.3s;
}
.contact .icons a:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ============ INNER PAGES ============ */
.page-hero {
    padding: 140px 0 80px;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line-strong);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 64, 175, 0.07), transparent 65%);
    filter: blur(70px);
    pointer-events: none;
}
.page-hero .inner { position: relative; z-index: 1; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
}
.page-hero .inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 60px;
}
.breadcrumb a { transition: color 0.3s; cursor: pointer; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--muted-2); }
.page-hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    letter-spacing: -0.035em;
    line-height: 1;
    margin-bottom: 24px;
    max-width: 820px;
    color: var(--ink);
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero .lead { font-size: 1.1rem; line-height: 1.7; color: var(--muted); max-width: 620px; }

.content-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: start; }
.prose p { font-size: 1.02rem; line-height: 1.8; color: var(--muted); margin-bottom: 22px; }
.prose p strong { color: var(--ink); font-weight: 700; }
.prose h2, .prose h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    margin: 36px 0 14px;
    color: var(--ink);
}
.prose ul { margin-bottom: 22px; }
.prose ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--muted);
}
.prose ul li::before {
    content: '';
    position: absolute;
    left: 0; top: 12px;
    width: 10px; height: 2px;
    background: var(--accent);
}

.aside-card {
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 28px;
    background: var(--paper);
    margin-bottom: 24px;
}
.aside-card .label {
    font-family: var(--label);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.aside-card h3, .aside-card h4 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 8px; color: var(--ink); }
.aside-card p { font-size: 0.9rem; line-height: 1.7; color: var(--muted); margin-bottom: 14px; }
.aside-card p:last-child { margin-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-item { border-top: 1px solid var(--line); padding-top: 14px; }
.stat-item .num { font-family: var(--serif); font-size: 1.8rem; letter-spacing: -0.02em; color: var(--accent); line-height: 1; }
.stat-item .lbl {
    font-family: var(--label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-top: 6px;
}

.timeline { margin-top: 20px; }
.timeline li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.timeline li::before {
    display: none;
}

.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .year { font-family: var(--serif); font-size: 1.3rem; color: var(--accent); letter-spacing: -0.02em; }
.timeline .text { font-size: 0.94rem; line-height: 1.7; color: var(--muted); }
.timeline .text strong { color: var(--ink); font-weight: 700; }

.project-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    margin: 40px 0;
}
.project-facts > div { padding: 24px 24px 24px 0; border-right: 1px solid var(--line); }
.project-facts > div:last-child { border-right: none; }
.project-facts .k {
    font-family: var(--label);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 8px;
}
.project-facts .v { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); line-height: 1.3; }

.project-hero-visual {
    height: 320px;
    border-radius: 10px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.project-hero-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, #1e3a5f 0%, #1e40af 55%, #3b6fd4 100%);
}
.project-hero-visual .pic-label {
    position: absolute;
    bottom: 24px; left: 24px;
    z-index: 2;
    font-family: var(--label);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    padding: 7px 16px;
    background: rgba(20, 22, 28, 0.55);
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

.back-row {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--line-strong);
}

/* ============ FOOTER ============ */
#footer { padding: 44px 0; border-top: 1px solid var(--line-strong); }
#footer .inner { max-width: 960px; margin: 0 auto; padding: 0 60px; }
#footer .menu {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    font-family: var(--label);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
#footer .menu a { color: var(--ink-2); transition: color 0.3s; cursor: pointer; }
#footer .menu a:hover { color: var(--accent); }

/* ============ REVEAL ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ============ UTIL ============ */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    :root { --sidebar-w: 0px; }
    #sidebar { transform: translateX(-100%); width: 290px; }
    #sidebar.open { transform: translateX(0); }
    #wrapper { margin-left: 0; }
    .menu-toggle { display: flex; }
    .wrapper .inner { padding: 0 40px; }
    #footer .inner { padding: 0 40px; }
    .spotlights > section { grid-template-columns: 1fr; }
    .spotlights > section:nth-child(even) .image { order: 0; }
    .spotlights .image { min-height: 280px; }
    .spotlights .content { padding: 48px 40px; }
    .features { grid-template-columns: 1fr; }
    .features > section:nth-child(odd) { border-right: none; padding-right: 0; }
    .features > section:nth-child(even) { padding-left: 0; }
    .split { grid-template-columns: 1fr; gap: 40px; }
    .content-grid { grid-template-columns: 1fr; gap: 40px; }
    .project-facts { grid-template-columns: 1fr; }
    .project-facts > div { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 0; }
    .project-facts > div:last-child { border-bottom: none; }
}
@media (max-width: 640px) {
    .wrapper { padding: 64px 0; }
    .wrapper .inner { padding: 0 22px; }
    #footer .inner { padding: 0 22px; }
    #intro { min-height: auto; padding: 80px 0 60px; }
    #intro h1 { font-size: 2.4rem; }
    .spotlights .content { padding: 36px 22px; }
    .split form .fields { grid-template-columns: 1fr; }
    .split form .field.full { grid-column: span 1; }
    .page-hero { padding: 100px 0 56px; }
    .stat-grid { grid-template-columns: 1fr; }
}