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

:root {
  --bg: #17191c;        /* графит */
  --bg-2: #1e2126;
  --bg-3: #24272d;
  --line: #333841;
  --text: #e8eaed;
  --muted: #9aa1ab;
  --accent: #4a90d9;    /* стальной синий */
  --accent-2: #6ea8e6;
  --accent-ink: #0c1219;
  --radius: 14px;
  --max: 1160px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3, .logo-mark { font-family: 'Oswald', sans-serif; letter-spacing: .02em; }

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

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 50px; font-weight: 600;
  font-size: .95rem; cursor: pointer; transition: all .25s ease;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(74,144,217,.32); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-phone { background: transparent; border-color: var(--line); padding: 10px 20px; font-size: .9rem; }
.btn-phone:hover { border-color: var(--accent); color: var(--accent-2); }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23,25,28,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; line-height: 1; }
.logo-icon { color: var(--accent); display: flex; }
.logo-text { display: flex; flex-direction: column; }
.logo-mark { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.logo-sub { font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: .95rem; color: var(--muted); transition: color .2s; position: relative; white-space: nowrap; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--accent); transition: width .25s; }
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); transition: .3s; }

.mobile-nav { display: none; flex-direction: column; padding: 0 24px; background: var(--bg-2); border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.mobile-nav.open { max-height: 420px; }
.mobile-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.mobile-nav .mobile-phone { color: var(--accent-2); font-weight: 600; border-bottom: none; }

/* ============ HERO ============ */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden; background: linear-gradient(180deg, #1b232c 0%, var(--bg) 100%); }
.hero-bg { position: absolute; inset: 0; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero-overlay { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, rgba(23,25,28,.92) 0%, rgba(23,25,28,.55) 42%, rgba(23,25,28,0) 70%),
  linear-gradient(180deg, rgba(23,25,28,0) 55%, var(--bg) 100%); }
.hero-content { position: relative; z-index: 2; padding: 80px 24px; }
.hero-kicker { text-transform: uppercase; letter-spacing: .3em; font-size: .8rem; color: var(--accent-2); margin-bottom: 20px; }
.hero-title { font-size: clamp(3rem, 10vw, 7rem); line-height: .92; font-weight: 700; text-transform: uppercase; }
.hero-title span { color: var(--accent); -webkit-text-stroke: 1px var(--accent); color: transparent; }
.hero-lead { margin: 26px 0; font-size: clamp(1rem, 2.2vw, 1.2rem); color: #cfd3d9; max-width: 600px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.hero-badge { font-size: .82rem; color: var(--accent-2); border: 1px solid var(--line); border-radius: 50px; padding: 7px 16px; background: rgba(74,144,217,.06); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============ SECTION HEAD ============ */
.section-head { text-align: center; margin-bottom: 50px; }
.section-kicker { text-transform: uppercase; letter-spacing: .3em; font-size: .78rem; color: var(--accent-2); margin-bottom: 12px; }
.section-title { font-size: clamp(2rem, 5vw, 3rem); text-transform: uppercase; font-weight: 600; }

/* ============ ABOUT ============ */
.about { padding: 100px 0; }
.about-lead { max-width: 860px; margin: 0 auto 56px; text-align: center; font-size: 1.1rem; color: #d2d5da; }
.about-goals-title { text-align: center; text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; color: var(--accent-2); margin-bottom: 28px; }
.goals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.goal { padding: 30px 28px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s, border-color .25s; }
.goal:hover { transform: translateY(-4px); border-color: var(--accent); }
.goal-num { font-family: 'Oswald', sans-serif; font-size: 1.7rem; color: var(--accent); opacity: .65; }
.goal h3 { margin: 12px 0 10px; font-size: 1.25rem; }
.goal p { color: var(--muted); font-size: .95rem; }

/* ============ SERVICES ============ */
.services { padding: 100px 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 56px; align-items: stretch; }
.svc-group { padding: 30px 32px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.svc-group-title { font-size: 1.15rem; color: var(--accent-2); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .05em; }
.svc-list { list-style: none; display: flex; flex-direction: column; gap: 14px; flex: 1; justify-content: center; }
.svc-list li { position: relative; padding-left: 26px; color: #d2d5da; font-size: .96rem; }
.svc-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 2px; transform: rotate(45deg); }

.svc-block-title { text-align: center; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 30px; color: var(--text); }
.build-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.build-card { flex: 0 1 340px; padding: 30px 28px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s, border-color .25s; }
.build-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.build-icon { display: inline-flex; width: 54px; height: 54px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(74,144,217,.1); color: var(--accent); margin-bottom: 16px; }
.build-card h4 { font-family: 'Oswald', sans-serif; font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.build-card p { color: var(--muted); font-size: .93rem; }
.services-cta { text-align: center; margin-top: 48px; }

/* ============ STAGES / TIMELINE ============ */
.stages { padding: 100px 0; }
.timeline { max-width: 860px; margin: 0 auto; position: relative; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.stage { display: flex; gap: 24px; padding: 14px 0; position: relative; }
.stage-num { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); color: var(--accent-2); font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 600; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; transition: border-color .25s, background .25s; }
.stage:hover .stage-num { border-color: var(--accent); background: rgba(74,144,217,.12); }
.stage-body { padding-top: 4px; }
.stage-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.stage-body p { color: var(--muted); font-size: .95rem; }
.stage-sub { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stage-sub li { position: relative; padding-left: 20px; color: var(--muted); font-size: .95rem; }
.stage-sub li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }

/* ============ PORTFOLIO ============ */
.portfolio { padding: 100px 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pf-item { overflow: hidden; border-radius: var(--radius); position: relative; aspect-ratio: 4 / 3; }
.pf-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pf-item:hover img { transform: scale(1.06); }
.pf-placeholder {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(74,144,217,.04) 0 12px, transparent 12px 24px),
    var(--bg-3);
  color: var(--muted); font-size: .9rem; letter-spacing: .1em; text-transform: uppercase;
}
.pf-placeholder span { opacity: .7; }
.portfolio-note { text-align: center; margin-top: 28px; color: var(--muted); font-size: .92rem; }

/* ============ CONTACTS ============ */
.contacts { padding: 100px 0; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: stretch; }
.contacts-info { display: flex; flex-direction: column; gap: 22px; }
.contact-label { display: block; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--accent-2); margin-bottom: 6px; }
.contact-value { font-size: 1.15rem; }
.contact-link { color: var(--text); font-weight: 600; transition: color .2s; }
.contact-link:hover { color: var(--accent-2); }
[data-placeholder] { color: var(--muted); font-weight: 500; }
.contacts-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.contacts-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 420px; }
.contacts-map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(.2); }

/* ============ PORTFOLIO ITEMS (dynamic) ============ */
.pf-item { cursor: default; }
.pf-item.has-photo { cursor: pointer; }
.pf-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; background: linear-gradient(0deg, rgba(12,14,17,.92), rgba(12,14,17,0)); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.pf-item.has-photo:hover figcaption { opacity: 1; transform: none; }
.pf-item figcaption b { display: block; font-family: 'Oswald', sans-serif; font-size: 1.05rem; letter-spacing: .02em; }
.pf-item figcaption span { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; }
.pf-count { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; background: rgba(12,14,17,.72); backdrop-filter: blur(3px); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.pf-count svg { opacity: .9; }

/* ============ REQUEST FORM ============ */
.request { padding: 100px 0; }
.request-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.request-intro p { font-size: 1.1rem; color: #d2d5da; margin-bottom: 24px; }
.request-benefits { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.request-benefits li { position: relative; padding-left: 32px; color: #d2d5da; }
.request-benefits li::before { content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(74,144,217,.12); border: 1px solid var(--accent); }
.request-benefits li::after { content: ''; position: absolute; left: 6px; top: 8px; width: 8px; height: 4px; border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); }
.lead-form { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-2); }
.field label .opt { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .85em; }
.field input, .field textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: #6c7480; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,144,217,.15); }
.field textarea { resize: vertical; min-height: 96px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-submit { margin-top: 4px; width: 100%; }
.lead-submit[disabled] { opacity: .6; cursor: default; }
.lead-status { font-size: .92rem; min-height: 1.2em; }
.lead-status.ok { color: #5fd08a; }
.lead-status.err { color: #f0757a; }
.lead-consent { font-size: .78rem; color: var(--muted); }

/* ============ LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 32px 20px; background: rgba(10,12,15,.94); backdrop-filter: blur(5px); }
.lightbox.open { display: flex; }
.lightbox-close { position: absolute; top: 18px; right: 24px; z-index: 3; background: none; border: none; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .8; transition: opacity .2s; }
.lightbox-close:hover { opacity: 1; }

.gallery { width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 14px; }
.gallery-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; background: #0c0e11; border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-stage img { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; object-fit: contain; cursor: pointer; }
.gallery-counter { position: absolute; bottom: 12px; right: 14px; padding: 4px 11px; border-radius: 20px; background: rgba(12,14,17,.7); color: #fff; font-size: .82rem; font-weight: 600; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(12,14,17,.55); color: #fff; font-size: 1.9rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, border-color .2s; }
.gnav:hover { background: var(--accent); border-color: var(--accent); }
.gprev { left: 14px; } .gnext { right: 14px; }
.gallery-meta { text-align: center; }
.gallery-meta b { display: block; font-family: 'Oswald', sans-serif; font-size: 1.25rem; color: #fff; letter-spacing: .02em; }
.gallery-meta span { display: block; color: var(--muted); font-size: .92rem; margin-top: 4px; }
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.gthumb { flex: 0 0 auto; width: 92px; height: 69px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #0c0e11; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb:hover { opacity: .85; }
.gthumb.active { opacity: 1; border-color: var(--accent); }

/* ============ FOOTER ============ */
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand .logo-mark { font-size: 1.35rem; color: var(--accent-2); }
.footer-brand p { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.footer-contacts { display: flex; flex-direction: column; gap: 4px; }
.footer-contacts a { font-weight: 600; transition: color .2s; }
.footer-contacts a:hover { color: var(--accent-2); }
.footer-copy { width: 100%; text-align: center; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; }

/* ============ FAB ============ */
.fab { position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: none; align-items: center; justify-content: center; z-index: 60; box-shadow: 0 8px 24px rgba(74,144,217,.4); animation: pulse 2.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 8px 24px rgba(74,144,217,.4); } 50% { box-shadow: 0 8px 34px rgba(74,144,217,.7); } }

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .goals-grid { grid-template-columns: 1fr; }
  .svc-columns { grid-template-columns: 1fr; }
  .svc-list { justify-content: flex-start; }
  .contacts-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .request-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav, .btn-phone { display: none; }
  .burger { display: flex; }
  .mobile-nav { display: flex; }
  .build-card { flex-basis: 100%; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .fab { display: flex; }
  .hero { min-height: 82vh; }
  .section-head { margin-bottom: 36px; }
  .about, .services, .stages, .portfolio, .contacts, .request { padding: 64px 0; }
  .stage { gap: 16px; }
  .stage-num { width: 48px; height: 48px; font-size: 1rem; }
  .timeline::before { left: 23px; }
}

/* ============ ПРАВОВЫЕ ЭЛЕМЕНТЫ (152-ФЗ) ============ */
/* Владелец сайта / оператор ПД в контактах */
.contacts-owner { color: var(--text); font-size: .95rem; line-height: 1.5; padding: 12px 16px; margin-bottom: 20px;
  background: rgba(74,144,217,.08); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; }

/* Чекбоксы согласия в форме */
.consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); line-height: 1.45; cursor: pointer; }
.consent-check + .consent-check { margin-top: 4px; }
.consent-check input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); cursor: pointer; }
.consent-check a { color: var(--accent-2); text-decoration: underline; }
.consent-optional { opacity: .9; }

/* Ссылки в футере */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 12px; }
.footer-legal a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.footer-legal a:hover { color: var(--accent-2); text-decoration: underline; }

/* Cookie-баннер */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 95; max-width: 720px; margin: 0 auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cookie-banner p { flex: 1 1 340px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.cookie-banner a { color: var(--accent-2); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn-sm { padding: 9px 16px; font-size: .9rem; }
.cookie-banner[hidden] { display: none; }

/* Юридические страницы (privacy.php / consent.php) */
.legal-page { max-width: 860px; margin: 0 auto; padding: 120px 20px 80px; }
.legal-page h1 { font-family: 'Oswald', sans-serif; font-size: 2rem; margin-bottom: 8px; }
.legal-page .legal-date { color: var(--muted); font-size: .9rem; margin-bottom: 32px; }
.legal-page h2 { font-family: 'Oswald', sans-serif; font-size: 1.25rem; margin: 32px 0 12px; color: var(--accent-2); }
.legal-page p, .legal-page li { color: #c9ccd2; line-height: 1.7; font-size: .98rem; }
.legal-page ul, .legal-page ol { margin: 10px 0 10px 22px; display: flex; flex-direction: column; gap: 6px; }
.legal-page a { color: var(--accent-2); }
.legal-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; color: var(--muted); text-decoration: none; }
.legal-back:hover { color: var(--accent-2); }

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn { flex: 1; }
  .legal-page { padding-top: 96px; }
}
