/* ==========================================================================
   Николай Бузовский — сайт-визитка фрилансера
   Стиль вдохновлён vk.com: скруглённые карточки, синий акцент,
   плотная сетка, спокойная светлая/тёмная тема.
   ========================================================================== */

:root {
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;

  --container: 1160px;
  --gap: 20px;

  --shadow-card: 0 1px 2px rgba(15, 30, 60, 0.06), 0 8px 24px rgba(15, 30, 60, 0.06);
  --shadow-hover: 0 4px 10px rgba(15, 30, 60, 0.08), 0 16px 32px rgba(15, 30, 60, 0.10);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Light theme (default) ---------- */
:root,
html[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-alt: #F4F6F9;
  --bg-elevated: #FFFFFF;
  --bg-inverse: #101B2E;
  --text-primary: #05070A;
  --text-secondary: #616D7C;
  --text-tertiary: #8B96A3;
  --text-on-accent: #FFFFFF;
  --border: #E7EAF0;
  --border-strong: #D3D9E3;
  --accent: #0077FF;
  --accent-hover: #0062D6;
  --accent-soft: #EAF2FF;
  --accent-soft-strong: #D9E9FF;
  --success: #2FA84F;
  --header-bg: rgba(255, 255, 255, 0.86);
  --code-bg: #F0F3F8;
}

html[data-theme="dark"] {
  --bg: #16181C;
  --bg-alt: #1D2024;
  --bg-elevated: #212429;
  --bg-inverse: #0E1526;
  --text-primary: #EDEFF2;
  --text-secondary: #9AA4B2;
  --text-tertiary: #767F8C;
  --text-on-accent: #FFFFFF;
  --border: #2C3036;
  --border-strong: #383D45;
  --accent: #4C97FF;
  --accent-hover: #6FADFF;
  --accent-soft: #1D2C42;
  --accent-soft-strong: #223454;
  --success: #49C46B;
  --header-bg: rgba(22, 24, 28, 0.86);
  --code-bg: #1B1E23;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.3), 0 20px 40px rgba(0, 0, 0, 0.34);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s var(--ease), color .25s var(--ease);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(32px, 5vw, 46px); }
h2 { font-size: clamp(26px, 3.4vw, 34px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; color: var(--text-secondary); max-width: 62ch; }

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

section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow-none {} /* deliberately no tracked-out eyebrow labels used in this design */

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1.5px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: var(--accent-soft); color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft-strong); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* Blur lives on a pseudo-element rather than .site-header itself: a
   backdrop-filter on the header would make it a containing block for its
   position:fixed children, which breaks the fixed-positioned mobile menu. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  z-index: -1;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--text-primary);
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.logo-sub { display: block; font-weight: 500; font-size: 12px; color: var(--text-secondary); font-family: var(--font-body); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-secondary);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.main-nav a:hover { background: var(--bg-alt); color: var(--text-primary); }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:active { transform: scale(0.92); }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 17px;
}

@media (max-width: 900px) {
  .main-nav { position: fixed; z-index: 100; inset: 72px 0 0 0; background: var(--bg); flex-direction: column; align-items: stretch; padding: 12px 20px; gap: 4px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); border-top: 1px solid var(--border); overflow-y: auto; }
  .main-nav a { padding: 14px 16px; font-size: 16px; }
  body.nav-open .main-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .header-actions .btn-ghost.contact-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: 18px; color: var(--text-secondary); max-width: 52ch; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--text-primary); }
.hero-stat span { font-size: 13.5px; color: var(--text-tertiary); }

.hero-visual {
  background: var(--bg-alt);
  border-radius: var(--radius-l);
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero-visual .anim-wrap { width: 100%; max-width: 320px; margin: 0 auto; }
.hero-visual .anim-wrap svg, .hero-visual .anim-wrap canvas { width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 360px; margin: 0 auto; }
}

/* ---------- Service groups / cards ---------- */
.group-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  padding-top: 8px;
}
.group-label:first-of-type { padding-top: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 44px;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .card-grid, .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid, .card-grid.cols-2 { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.service-card .icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}
.service-card h3 { margin-bottom: 8px; font-size: 19px; }
.service-card p { font-size: 14.5px; margin-bottom: 18px; flex-grow: 1; }
.service-card .card-link { font-weight: 700; color: var(--accent); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.service-card .card-link i { transition: transform .18s var(--ease); }
.service-card:hover .card-link i { transform: translateX(3px); }

/* ---------- Process ---------- */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  counter-reset: step;
}
@media (max-width: 900px) { .process-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-list { grid-template-columns: 1fr; } }
.process-step { position: relative; padding-top: 8px; }
.process-step .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  background: var(--accent-soft);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.process-step h3 { font-size: 17px; margin-bottom: 6px; }
.process-step p { font-size: 14px; }

/* ---------- Feature / why-me rows ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
@media (max-width: 700px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-item {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-m);
  background: var(--bg-alt);
}
.feature-item .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  border: 1px solid var(--border);
}
.feature-item h3 { font-size: 16.5px; margin-bottom: 4px; }
.feature-item p { font-size: 14px; margin: 0; }

/* ---------- Panel / CTA band ---------- */
.panel {
  background: var(--bg-inverse);
  border-radius: var(--radius-l);
  padding: 52px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.panel h2 { color: #fff; margin-bottom: 8px; }
.panel p { color: rgba(255,255,255,0.72); margin: 0; max-width: 46ch; }
.panel .btn-primary { background: var(--accent); }

/* ---------- Contacts ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card .icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.contact-card .label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 2px; }
.contact-card .value { font-weight: 700; font-size: 16px; }

/* ---------- Breadcrumb (service pages) ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-tertiary); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-secondary); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Service page hero ---------- */
.svc-hero { padding: 44px 0 8px; }
.svc-hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.svc-hero .lede { font-size: 17px; max-width: 68ch; }
.svc-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-secondary); font-size: 15px; }
.check-list li i { color: var(--success); margin-top: 3px; flex-shrink: 0; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.price-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 28px;
}
.price-card .price { font-family: var(--font-display); font-weight: 800; font-size: 28px; margin-bottom: 4px; }
.price-card .price span { font-size: 15px; color: var(--text-tertiary); font-weight: 600; }
.price-card .note { font-size: 13.5px; color: var(--text-tertiary); margin-top: 14px; margin-bottom: 0; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { color: var(--accent); font-size: 20px; transition: transform .2s var(--ease); flex-shrink: 0; margin-left: 12px; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .a { padding-top: 10px; font-size: 14.5px; margin: 0; }

.related-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 860px) { .related-services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .related-services { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  background: var(--bg-alt);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } }
.footer-col h4 { font-size: 14px; color: var(--text-tertiary); margin-bottom: 14px; font-family: var(--font-body); font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-secondary); font-size: 14.5px; font-weight: 500; }
.footer-col a:hover { color: var(--accent); }
.footer-brand p { font-size: 14px; max-width: 34ch; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-tertiary);
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
