/* ============================================================
   TOKENS
   ============================================================ */
:root {
    --bg: #ffffff;
    --bg-alt: #f7f8fb;
    --surface: #ffffff;

    --ink: #0f172a;
    --ink-2: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-2: #d1d5db;

    --brand: #1e3a8a;
    --brand-2: #1d4ed8;
    --brand-soft: #eef2ff;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --container: 1160px;

    /* Секции и отступы */
    --section-y: 56px;
    --gap: 20px;
    --gap-lg: 64px;

    /* Тёмная тема для хедера/футера */
    --dark-bg: rgba(20, 20, 20, 0.95);
    --dark-ink: #ffffff;
    --dark-muted: rgba(255, 255, 255, 0.5);

    /* Статусы формы */
    --ok: #15803d;
    --err: #dc2626;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
    outline: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { letter-spacing: -0.01em; }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 12px;
}

.section-sub {
    color: var(--muted);
    font-size: 17px;
    margin: 0;
}

.lead {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
    margin: 0 0 32px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.18s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }

.btn-outline {
    background: #fff;
    border-color: var(--line-2);
    color: var(--ink);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-nav {
    color: #fff;
    border: 2px solid #fff;
}
.btn-nav:hover { color: #fff; background: #333; }

.btn-lg { padding: 14px 24px; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--dark-bg);
    backdrop-filter: saturate(180%) blur(10px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-size: 24px; font-weight: 700; color: #fff; }
.logo-text small  { font-size: 12px; color: #999; }

.nav {
    display: flex;
    align-items: center;
    gap: 26px;
}
.nav a {
    font-size: 15px;
    font-weight: 500;
    transition: 0.15s;
    color: #fff;
}

.burger {
    display: none;
    background: none;
    border: 0;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}
.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: var(--section-y) 0;
    background: var(--bg);
}
.hero-narrow { max-width: 780px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--gap-lg);
}

.hero h1 {
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.1;
    margin: 0 0 20px;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 22px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-photo img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    margin-left: auto;
}

.hero-photo-about img {
    margin-left: auto;
    height: 280px;
    border-radius: 50%;
    border: 1px solid #cacaca;
}

.hero-404 {
    min-height: 60vh;
}

/* Факты в hero */
.hero-facts {
    list-style: none;
    padding: 32px 0 0;
    margin: 48px 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
}
.hero-facts li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 24px 4px 0;
    border-right: 1px solid var(--line);
}
.hero-facts li:last-child { border-right: 0; }
.hero-facts li + li { padding-left: 24px; }
.hero-facts strong {
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
}
.hero-facts span { color: var(--muted); font-size: 14px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: var(--section-y) 0;
    border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-alt); }

.section-head {
    max-width: 640px;
    margin-bottom: 44px;
}
.section h2 {
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 600;
}

.section-cta { margin-top: 36px; }

/* ============================================================
   GRID UTILITIES
   ============================================================ */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   LISTS WITH DASH MARKER
   (объединяет check-list / cta-points / side-checks /
    service-includes / format-list / privacy-content ul)
   ============================================================ */
.list-dash,
.check-list,
.cta-points,
.side-checks,
.service-includes,
.format-list,
.privacy-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.list-dash li,
.check-list li,
.cta-points li,
.side-checks li,
.service-includes li,
.format-list li,
.privacy-content ul li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-2);
}
.list-dash li::before,
.check-list li::before,
.cta-points li::before,
.side-checks li::before,
.service-includes li::before,
.format-list li::before,
.privacy-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 10px;
    height: 2px;
    background: var(--brand);
}

/* Модификаторы списка */
.check-list { margin-bottom: 28px; }
.check-list li { font-size: 15px; margin-bottom: 0; }

.cta-points { margin: 24px 0 0; }

.privacy-content ul {
    gap: 8px;
    margin: 0 0 16px;
}
.privacy-content ul li {
    font-size: 16px;
    line-height: 1.65;
    padding-left: 22px;
}

/* ============================================================
   CARD (базовый компонент)
   ============================================================ */
.card,
.case-card,
.project-card,
.link-card,
.side-card,
.review {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: 0.18s ease;
}
.card:hover,
.case-card:hover,
.project-card:hover,
.link-card:hover{
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.card {
    padding: 26px;
    display: flex;
    flex-direction: column;
}
.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.card p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}
.card-link {
    margin-top: auto;
    color: var(--brand);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.card-link::after { content: "→"; transition: 0.15s; }
.card-link:hover::after { transform: translateX(3px); }

/* ============================================================
   CASE CARD
   ============================================================ */
.case-card {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.case-tag {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 4px 10px;
    border-radius: 6px;
}
.case-card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.case-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.case-metric {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

/* ============================================================
   INDUSTRIES STRIP
   ============================================================ */
.strip {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.strip-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    flex-wrap: wrap;
    font-size: 14px;
}
.strip-label { color: var(--muted); }
.strip-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.strip-list li {
    padding: 5px 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-weight: 500;
    font-size: 14px;
}

.industries-strip {
    padding: 36px 0;
    border-top: 1px solid var(--line);
    background: var(--bg-alt);
}
.industries-label {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 20px;
}
.industries-tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.industries-tags li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    transition: 0.15s;
}
.industries-tags li:hover { border-color: var(--brand); color: var(--brand); }
.tag-icon {
    width: 18px;
    height: 18px;
    color: var(--brand);
    display: grid;
    place-items: center;
}
.tag-icon svg { width: 16px; height: 16px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--gap-lg);
    align-items: center;
}
.about-photo {
    position: relative;
}

.about-photo img {
    border-radius: 50%;
    aspect-ratio: 4/4;
    width: 400px;
    object-fit: cover;
    box-shadow: var(--shadow);
    border: 1px solid #cacaca;
}

.about-lead {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 24px;
}

.contacts-note {
    position: absolute;
    right: -14px;
    bottom: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.contacts-note strong { display: block; font-size: 14px; color: var(--ink); }
.contacts-note small  { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* About page */
.about-text-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--gap-lg);
    align-items: start;
}
.about-text-side h2 {
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.2;
    margin: 8px 0 0;
}
.about-text-main p {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-2);
}
.about-text-main p:last-child { margin-bottom: 0; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    max-width: 760px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 88px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--line);
}
.timeline-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 32px;
    padding: 0 0 32px;
    position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 4px;
}
.timeline-body { position: relative; padding-left: 28px; }
.timeline-body::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line-2);
}
.timeline-item-now .timeline-body::before {
    border-color: var(--brand);
    background: var(--brand);
}
.timeline-item-now .timeline-year { color: var(--brand); }
.timeline-body h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.timeline-body p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ============================================================
   CERTIFICATES
   ============================================================ */

.certs-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:24px;
}

.cert-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    transition:.18s ease;
}
.cert-card:hover{
    border-color:var(--brand);
    box-shadow:var(--shadow);
    transform:translateY(-3px);
}

/* Окошко под изображение в пропорции А4 (вертикальный) */
.cert-image{
    aspect-ratio:1 / 1.414;
    background:var(--bg-alt);
    overflow:hidden;
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    justify-content:center;
}
.cert-image img{
    width:100%;
    height:100%;
    object-fit:contain;   /* сертификат целиком, без обрезки */
    transition:.25s ease;
}
.cert-card:hover .cert-image img{transform:scale(1.02)}

.cert-body{
    padding:14px 16px 18px;
    display:flex;
    flex-direction:column;
    gap:6px;
    flex:1;
}
.cert-area{
    align-self:flex-start;
    font-size:11px;
    font-weight:700;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--brand);
    background:var(--brand-soft);
    padding:4px 8px;
    border-radius:6px;
}
.cert-body h3{
    margin:0;
    font-size:13px;
    font-weight:600;
    color:var(--ink);
    line-height:1.35;
}

/* Сноска про курсы */
.certs-note{
    margin:28px 0 0;
    padding:18px 20px;
    background:var(--bg-alt);
    border-radius:var(--radius);
    font-size:14.5px;
    color:var(--muted);
    line-height:1.6;
}

/* Плашка со ссылкой на паспорт квалификации */
.certs-passport{
    display:flex;align-items:center;gap:16px;
    margin-top:28px;padding:20px 24px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    transition:.18s ease;
}
.certs-passport:hover{
    border-color:var(--brand);
    border-left-color:var(--brand);
    background:var(--brand-soft);
}

.certs-passport-icon{
    width:40px;height:40px;flex-shrink:0;
    border-radius:8px;
    background:var(--brand-soft);color:var(--brand);
    display:grid;place-items:center;
    transition:.18s ease;
}
.certs-passport-icon svg{width:20px;height:20px}
.certs-passport:hover .certs-passport-icon{
    background:var(--brand);color:#fff;
}

.certs-passport-text{
    display:flex;flex-direction:column;gap:2px;
    flex:1;min-width:0;
}
.certs-passport-text strong{
    font-size:15px;font-weight:700;color:var(--ink);
}
.certs-passport-text small{
    font-size:13.5px;color:var(--muted);line-height:1.5;
}

.certs-passport-arrow{
    font-size:18px;color:var(--brand);
    flex-shrink:0;
    transition:.18s ease;
}
.certs-passport:hover .certs-passport-arrow{
    transform:translateX(4px);
}

/* Адаптив */
@media (max-width:600px){
    .certs-passport{padding:16px 18px;gap:12px}
    .certs-passport-icon{width:36px;height:36px}
    .certs-passport-text small{font-size:13px}
}
@media (max-width:1100px){
    .certs-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:760px){
    .certs-grid{grid-template-columns:repeat(2,1fr);gap:16px}
}
@media (max-width:460px){
    .cert-body{padding:12px 12px 14px}
    .cert-body h3{font-size:13px}
    .cert-area{font-size:10px}
}

/* ============================================================
   CONTACTS
   ============================================================ */
.contacts-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--gap-lg);
    align-items: center;
}
.contacts-list {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    border-top: 1px solid var(--line);
}
.contacts-list li {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}
.contacts-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.contacts-list a,
.contacts-list span:not(.contacts-label) {
    font-size: 16px;
    color: var(--ink);
}
.contacts-list a {
    border-bottom: 1px solid transparent;
    transition: 0.15s;
}
.contacts-list a:hover { color: var(--brand); border-color: var(--brand); }

.contacts-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
}
.contacts-photo { position: relative; }
.contacts-photo img {
    border-radius: var(--radius);
    aspect-ratio: 4/5;
    object-fit: cover;
    box-shadow: var(--shadow);
}

/* ============================================================
   SERVICES LIST
   ============================================================ */
.services-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}
.service-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 40px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
    align-items: start;
}
.service-main {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 20px;
    align-items: start;
}
.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.service-icon svg { width: 20px; height: 20px; }
.service-row h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}
.service-row > .service-main > div > p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 640px;
}
.service-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 2px;
    text-align: right;
    align-items: flex-end;
}
.service-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}
.service-price span {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-right: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.service-term { font-size: 14px; color: var(--muted); }
.service-meta .btn { margin-top: 6px; }

/* ============================================================
   PRICE FACTORS
   ============================================================ */
.price-factor {
    padding: 24px 0 0;
    border-top: 2px solid var(--ink);
}
.price-factor-num {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: 0.14em;
    margin-bottom: 12px;
}
.price-factor h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.price-factor p  { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

.price-note {
    margin: 40px 0 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.6;
}

/* ============================================================
   FORMATS (форматы работы)
   ============================================================ */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}
.format-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: 0.18s ease;
}
.format-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.format-card-featured {
    border-color: var(--brand);
    box-shadow: 0 12px 32px rgba(30, 58, 138, 0.12);
}
.format-badge {
    position: absolute;
    top: -11px;
    left: 28px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 6px;
}
.format-card h3 { margin: 0; font-size: 19px; font-weight: 800; }
.format-desc { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.format-list { padding: 16px 0 0; border-top: 1px solid var(--line); }
.format-list li { font-size: 15px; }
.format-price {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
}
.format-card .btn { margin-top: 4px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq {
    max-width: 820px;
    border-top: 1px solid var(--line);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 44px 22px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    position: relative;
    transition: 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: 0.2s;
}
.faq-item[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
    border-color: var(--brand);
}
.faq-item summary:hover { color: var(--brand); }
.faq-body {
    padding: 0 44px 22px 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}
.faq-body p { margin: 0; }

/* ============================================================
   FORMS (общие контролы)
   ============================================================ */
.form-control,
.cta-form input,
.cta-form textarea,
.cta-form select,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 15px;
    background: #fff;
    color: var(--ink);
    transition: 0.15s;
}
.form-control:focus,
.cta-form input:focus,
.cta-form textarea:focus,
.cta-form select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* Select со стрелкой */
.cta-form select,
.form-field select {
    appearance: none;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 12px center;
    background-size: 16px;
    padding-right: 38px;
}

textarea.form-control,
.cta-form textarea,
.form-field textarea {
    resize: vertical;
    line-height: 1.55;
    font-family: inherit;
}
.cta-form textarea { min-height: 80px; }
.form-field textarea { min-height: 110px; }

.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid {
    border-color: var(--err);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #9ca3af; }

/* Поля CTA-формы (label + input) */
.cta-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cta-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
}

/* Honeypot */
.hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* Note + status */
.form-note {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}
.form-status {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    min-height: 18px;
}
.form-status.ok  { color: var(--ok); font-weight: 600; }
.form-status.err { color: var(--err); font-weight: 600; }

/* Hint + error (order) */
.form-hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.form-error {
    font-size: 13px;
    color: var(--err);
    line-height: 1.5;
    min-height: 0;
}
.form-error:not(:empty) { min-height: 16px; }

/* ============================================================
   CTA BLOCK
   ============================================================ */
.section-cta-block {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
}
.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-lg);
    align-items: start;
}
.section-cta-block h2 { color: var(--ink); }
.section-cta-block p  { color: var(--muted); font-size: 17px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--dark-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 56px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 44px;
}
.site-footer .logo-text strong { color: #fff; }
.site-footer .logo-text small  { color: var(--dark-muted); }
.site-footer h4 {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 16px;
    font-weight: 700;
}
.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.site-footer a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    transition: 0.15s;
}
.site-footer a:hover { color: #fff; }
.footer-note {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    margin-top: 14px;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 40px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    flex-wrap: wrap;
}

/* ============================================================
   FAB
   ============================================================ */
.fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.35);
    z-index: 40;
    transition: 0.18s;
}
.fab:hover { background: var(--brand-2); transform: translateY(-2px); }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 28px;
    margin-bottom: 36px;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 88px;
}
.filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
    padding: 7px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    transition: 0.15s;
}
.filter-btn:hover { border-color: var(--line-2); color: var(--ink); }
.filter-btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}
.project-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.project-card[hidden] { display: none; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    background: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
}
.project-tag-industry {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: transparent;
}
.project-company {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: -4px;
}
.project-card h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.3;
}
.project-details {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.project-details dt {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}
.project-details dd {
    margin: 0;
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.55;
}
.project-metric {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    font-weight: 700;
    color: var(--brand);
}
.projects-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

/* Reviews */
.review {
    margin: 0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}
.review::before {
    content: "“";
    position: absolute;
    top: 6px;
    left: 22px;
    font-size: 64px;
    line-height: 1;
    color: var(--brand-soft);
    font-family: Georgia, serif;
    pointer-events: none;
}
.review-text {
    margin: 0;
    position: relative;
    z-index: 1;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
}
.review-author {
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.review-author strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.review-author span   { font-size: 14px; color: var(--muted); }

/* ============================================================
   ORDER PAGE
   ============================================================ */
.order-section { padding: 64px 0 80px; }
.order-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 56px;
    align-items: start;
}
.order-form {
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.form-block {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.form-block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    width: 100%;
    margin-bottom: 16px;
}
.form-block-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}
.form-row { display: grid; gap: 18px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.form-label em { font-style: normal; color: var(--brand); font-weight: 700; }

/* Radio group */
.form-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.form-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--line-2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    transition: 0.15s;
}
.form-radio input {
    appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 2px solid var(--line-2);
    padding: 8px;
    border-radius: 50%;
    position: relative;
    transition: 0.15s;
}
.form-radio input:checked { border-color: var(--brand); }
.form-radio input:checked::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--brand);
    border-radius: 50%;
}
.form-radio:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

/* Checkbox согласия */
.form-checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.55;
}
.form-checkbox input {
    appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    border: 2px solid var(--line-2);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: 0.15s;
}
.form-checkbox input:checked {
    border-color: var(--brand);
    background: var(--brand);
}
.form-checkbox input:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0;
    width: 6px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}
.form-checkbox a { color: var(--brand); border-bottom: 1px solid currentColor; }
.form-checkbox a:hover { color: var(--brand-2); }

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

/* Sidebar order */
.order-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 96px;
}
.side-card { padding: 26px; }
.side-card-title {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.side-card-text {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 14px;
    align-items: start;
}
.step-num {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.step strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
    line-height: 1.35;
}
.step p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.side-card-dark {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}
.side-card-dark .side-card-title { color: #fff; }
.side-card-dark .side-card-text  { color: rgba(255, 255, 255, 0.7); }

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}
.contact-list a {
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: 0.15s;
    align-self: flex-start;
}
.contact-list a:hover { border-color: rgba(255, 255, 255, 0.5); }

/* ============================================================
   PRIVACY
   ============================================================ */
.privacy-updated {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.privacy-section { padding: 64px 0 88px; }
.privacy-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--gap-lg);
    align-items: start;
}
.privacy-toc {
    position: sticky;
    top: 96px;
    border-left: 2px solid var(--line);
    padding-left: 20px;
}
.privacy-toc-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}
.privacy-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.privacy-toc li { counter-increment: toc; }
.privacy-toc a {
    display: block;
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
    transition: 0.15s;
}
.privacy-toc a::before {
    content: counter(toc) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    transition: 0.15s;
}
.privacy-toc a:hover { color: var(--brand); }
.privacy-toc a:hover::before { color: var(--brand); }

.privacy-content { max-width: 760px; }
.privacy-content section {
    scroll-margin-top: 96px;
    margin-bottom: 40px;
}
.privacy-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.3;
    margin: 0 0 16px;
    padding-top: 8px;
}
.privacy-content p {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-2);
}
.privacy-content p:last-child { margin-bottom: 0; }
.privacy-content a {
    color: var(--brand);
    border-bottom: 1px solid rgba(30, 58, 138, 0.25);
    transition: 0.15s;
}
.privacy-content a:hover {
    color: var(--brand-2);
    border-color: var(--brand-2);
}
.privacy-content strong { color: var(--ink); font-weight: 700; }
.privacy-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.section-404-links { padding: 64px 0; }

.link-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px;
}
.link-card:hover { transform: translateY(-3px); }
.link-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    margin-bottom: 4px;
}
.link-card-icon svg { width: 20px; height: 20px; }
.link-card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}
.link-card p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
    line-height: 1.55;
}
.link-card-arrow {
    margin-top: auto;
    padding-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    transition: 0.15s;
}
.link-card:hover .link-card-arrow { transform: translateX(3px); }

.error-contacts {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}
.error-contacts-content h2 { margin: 8px 0 12px; }
.error-contacts-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- 960px --- */
@media (max-width: 960px) {
    .hero-grid,
    .about-grid,
    .about-text-grid,
    .cta-grid,
    .contacts-grid,
    .order-grid,
    .error-contacts,
    .privacy-grid {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4,
    .formats-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr 1fr; }

    .hero-photo,
    .about-photo {
        max-width: 420px;
        margin: 0 auto;
    }

    .contacts-note { right: 0; }

    .hero-facts {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 0;
    }
    .hero-facts li { border-right: 0; padding: 0; }
    .hero-facts li + li { padding-left: 0; }

    .order-side { position: static; }
    .privacy-toc {
        position: static;
        background: #fff;
        border: 1px solid var(--line);
        border-left: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 20px 24px;
    }
    .privacy-toc ol {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 20px;
    }
    .error-contacts-actions { justify-content: flex-start; }
}

/* --- 820px --- */
@media (max-width: 820px) {
    .service-row {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 0;
    }
    .service-meta {
        text-align: left;
        align-items: flex-start;
        border-top: 1px solid var(--line);
        padding-top: 16px;
    }
    .filter-group { flex-direction: column; align-items: flex-start; gap: 8px; }
    .filter-label { min-width: auto; }
}

/* --- 720px --- */
@media (max-width: 720px) {
    .nav {
        position: fixed;
        inset: 68px 0 auto 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 14px;
        border-bottom: 1px solid var(--line);
        transform: translateY(-140%);
        transition: 0.22s;
        box-shadow: var(--shadow);
        z-index: 999999;
    }
    .nav.open { transform: translateY(0); }
    .nav a { color: var(--ink); }
    .nav .btn { width: 100%; color: #fff; }
    .burger { display: flex; }

    .grid-3,
    .grid-4{ grid-template-columns: 1fr; }

    .section { padding: 60px 0; }
    .hero { padding: 56px 0 40px; }
    .hero-facts { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* --- 640px --- */
@media (max-width: 640px) {
    .timeline::before { left: 70px; }
    .timeline-item {
        grid-template-columns: 70px 1fr;
        gap: 20px;
    }
    .timeline-body { padding-left: 20px; }
}

/* --- 600px --- */
@media (max-width: 600px) {
    .form-row-2 { grid-template-columns: 1fr; }
    .form-block-title { font-size: 12px; }
    .order-section { padding: 48px 0 64px; }
    .privacy-toc ol { grid-template-columns: 1fr; }
    .privacy-content h2 { font-size: 19px; }
    .privacy-content p,
    .privacy-content ul li { font-size: 15px; }
    .privacy-section { padding: 48px 0 64px; }
}

/* --- 520px --- */
@media (max-width: 520px) {
    .service-main { grid-template-columns: 1fr; }
    .service-icon { margin-bottom: 4px; }
    .contacts-list li {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}