/* ============================================
   БРЕНД СИСТЕМА — стили
   Палитра: #111111 / #0066FF / #F2F4F8 / #FFFFFF
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #111111;
  --blue:    #0066FF;
  --blue-dk: #0052CC;
  --bg:      #F2F4F8;
  --white:   #FFFFFF;
  --gray:    #6B7280;
  --line:    #E2E5EC;
  --radius:  10px;
  --wrap:    1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

/* ---- УТИЛИТЫ ---- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-bg { background: var(--bg); }
.text-blue { color: var(--blue); }
.text-gray { color: var(--gray); }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(0,102,255,.08);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}

/* ---- КНОПКИ ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .18s, transform .12s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dk); }
.btn-outline { background: transparent; color: var(--black); border: 1.5px solid var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-white { background: var(--white); color: var(--blue); }
.btn-white:hover { background: var(--bg); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---- ХЕДЕР ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img { display: block; height: 32px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray);
  padding: 7px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--black); background: var(--bg); }
.nav-links a.active { color: var(--black); }
.nav-cta { background: var(--blue) !important; color: var(--white) !important; }
.nav-cta:hover { background: var(--blue-dk) !important; }
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ---- HERO ---- */
.hero {
  padding: 150px 0 120px;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/assets/hero-photo.jpg');
  background-repeat: no-repeat;
  background-position: right top;
  background-size: contain;
  mask-image: linear-gradient(to right, transparent 0%, transparent 58%, white 70%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 58%, white 70%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17,17,17,.97) 0%, rgba(17,17,17,.85) 18%, rgba(17,17,17,.4) 30%, rgba(17,17,17,.1) 38%, rgba(17,17,17,0) 45%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}
.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 24px;
}
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,.7);
  margin-bottom: 36px;
  max-width: 480px;
  text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }


/* ---- SERVICES GRID ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.service-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(0,102,255,.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 22px;
}
.service-card h3 { font-size: 18px; font-weight: 700; }
.service-card p { font-size: 14px; color: var(--gray); line-height: 1.6; }
.service-link {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- ПРЕИМУЩЕСТВА АУТСОРСА ---- */
.outsource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}
.outsource-item {
  flex: 1 1 calc(33.333% - 14px);
  min-width: 220px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .outsource-item { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 560px) {
  .outsource-item { flex: 1 1 100%; }
}
.outsource-item h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.outsource-item p { font-size: 14px; color: var(--gray); line-height: 1.55; }

/* ---- ЛИД-МАГНИТ ---- */
.leadmagnet {
  background: var(--blue);
  border-radius: 16px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: var(--white);
  margin-top: 60px;
}
.leadmagnet h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.leadmagnet p { font-size: 15px; opacity: .85; }
.leadmagnet-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  flex-shrink: 0;
  min-width: 180px;
}
.leadmagnet-badge .big { font-size: 28px; font-weight: 800; display: block; }
.leadmagnet-badge .small { font-size: 13px; opacity: .8; }

/* ---- ПОРТФОЛИО ---- */
.portfolio-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.pf-filter {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  color: var(--gray);
}
.pf-filter.active, .pf-filter:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(0,102,255,.06);
}

/* Карусель */
.carousel-wrap { position: relative; overflow: visible; }
.portfolio-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.portfolio-carousel::-webkit-scrollbar { display: none; }
.portfolio-card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.portfolio-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.portfolio-cover {
  height: 180px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.portfolio-cover img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-format-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,.92);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--black);
}
.portfolio-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.portfolio-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.portfolio-card h3 { font-size: 16px; font-weight: 700; line-height: 1.35; }
.portfolio-card p { font-size: 13px; color: var(--gray); line-height: 1.55; }
.portfolio-date { font-size: 12px; color: var(--gray); margin-top: auto; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--black);
  z-index: 5;
  transition: background .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.carousel-btn:hover { background: var(--bg); }
.carousel-btn-prev { left: -20px; }
.carousel-btn-next { right: -20px; }

/* ---- СТРАНИЦА ПОСТА ---- */
.page-hero { padding: 60px 0 40px; background: var(--black); color: var(--white); }
.page-hero h1 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; letter-spacing: -.02em; margin-top: 12px; }
.breadcrumb { font-size: 14px; color: rgba(255,255,255,.5); }
.breadcrumb a { color: rgba(255,255,255,.5); }
.breadcrumb a:hover { color: var(--white); }
.post-body { max-width: 760px; }
.post-body h2 { font-size: 24px; font-weight: 700; margin: 32px 0 12px; }
.post-body h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.post-body p { margin-bottom: 16px; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 16px; }
.post-body li { margin-bottom: 6px; }
.post-body blockquote {
  border-left: 3px solid var(--blue);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--gray);
}
.post-body iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); margin: 24px 0; }

/* ---- ФОРМА ЗАЯВКИ ---- */
.lead-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  max-width: 560px;
}
.lead-form h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.lead-form p { font-size: 14px; color: var(--gray); margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gray); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  color: var(--black);
  background: var(--white);
  transition: border-color .15s;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); }
.field textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: 12px; color: var(--gray); margin-top: 10px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- ОПРОС ---- */
.poll-wrap { margin: 24px 0; }
.poll-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 15px;
}
.poll-option:hover { border-color: var(--blue); background: rgba(0,102,255,.04); }
.poll-bar-wrap { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; display: none; }
.poll-bar { height: 100%; background: var(--blue); border-radius: 3px; transition: width .4s; }
.poll-count { font-size: 13px; color: var(--gray); display: none; min-width: 40px; text-align: right; }

/* ---- КОНТАКТЫ ---- */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(0,102,255,.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 20px;
  flex-shrink: 0;
}
.contact-label { font-size: 13px; color: var(--gray); margin-bottom: 4px; }
.contact-value { font-size: 16px; font-weight: 600; }

/* ---- ФУТЕР ---- */
footer {
  background: var(--black);
  color: rgba(255,255,255,.7);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.footer-logo img { display: block; height: 26px; width: auto; }
.footer-about { font-size: 14px; line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--white); }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--black);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  z-index: 999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---- REVEAL ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- SERVICES PAGE ---- */
.service-detail { padding: 80px 0; }
.service-detail + .service-detail { border-top: 1px solid var(--line); }
.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.service-detail h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.service-detail p { font-size: 16px; color: var(--gray); line-height: 1.7; margin-bottom: 20px; }
.benefits-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.benefits-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
}
.benefits-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,102,255,.1);
  flex-shrink: 0;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%230066FF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ---- АДАПТИВ ---- */
@media (max-width: 900px) {
  .hero-bg { background-position: 75% top; }
  .hero-overlay { background: linear-gradient(100deg, rgba(17,17,17,.96) 0%, rgba(17,17,17,.88) 45%, rgba(17,17,17,.55) 100%); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .service-detail-grid { grid-template-columns: 1fr; }
  .leadmagnet { flex-direction: column; text-align: center; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 16px 24px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .burger { display: flex; padding: 10px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 96px 0 56px; }
  .hero-bg { background-position: 82% top; }
  .hero-overlay { background: linear-gradient(180deg, rgba(17,17,17,.95) 0%, rgba(17,17,17,.9) 55%, rgba(17,17,17,.97) 100%); }
  .portfolio-card { flex: 0 0 280px; }
  .lead-form { padding: 24px; }
  .carousel-btn { display: none; }
}

/* Post page mobile */
@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* Leadmagnet paragraph fix */
.leadmagnet p { color: rgba(255,255,255,.9) !important; }
.leadmagnet .small { color: rgba(255,255,255,.8) !important; }

