:root {
  --bg: #ffffff;
  --bg-dark: #0e0e10;
  --bg-near: #0a0a0b;
  --text: #111111;
  --text-inv: #ffffff;
  --muted: #7a7a7a;
  --gold: #ffd385;
  --gold-deep: #f5b942;
  --line: #ececec;
  --line-dark: #232326;
  --container: 1180px;
  --header-h: 72px;
  --radius: 14px;
  --font: "Manrope", "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
ul { list-style: none; }

.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.section { padding: 88px 0; }
.section-dark { background: var(--bg-dark); color: var(--text-inv); }
.section-title {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.muted { color: var(--muted); }
.gold { color: var(--gold-deep); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.site-header .inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav > a, .nav-item > button {
  background: none;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #222;
}
.nav > a:hover, .nav-item > button:hover { color: #000; }
.nav-item { position: relative; }
.nav-drop {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -12px;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
  padding: 10px 0;
}
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: block; }
.nav-drop a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
}
.nav-drop a:hover { background: #faf6ec; }

.header-extras { display: flex; align-items: center; gap: 14px; }
.header-extras .bitrix {
  font-size: 11px;
  line-height: 1.2;
  color: #444;
  max-width: 110px;
  text-decoration: underline;
}
.header-extras .doscar-link {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #111; }
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-1px); }
.btn-ghost { border-color: #111; background: transparent; color: #111; }
.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: rgba(255,255,255,.08); }
.btn-line { border: 0; border-bottom: 1px solid currentColor; padding: 0 0 2px; min-height: 0; background: none; font-weight: 600; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  cursor: pointer;
}
.burger span, .burger span:before, .burger span:after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #111;
  position: relative;
}
.burger span:before, .burger span:after {
  content: "";
  position: absolute;
  left: 0;
}
.burger span:before { top: -6px; }
.burger span:after { top: 6px; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b1220;
  color: #fff;
}
.hero-media, .hero-media video, .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media { z-index: 0; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,10,16,.72) 0%, rgba(8,10,16,.28) 55%, rgba(8,10,16,.12) 100%);
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; padding: 80px 0; }
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 18px;
  opacity: .9;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.page-hero {
  padding: 72px 0 40px;
}
.page-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.page-hero .lead { margin-top: 16px; color: #444; max-width: 46ch; }
.page-hero .time { margin-top: 10px; color: var(--muted); font-weight: 600; }
.page-hero-visual img, .page-hero-visual video {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}
.page-hero-visual.round img {
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1;
  max-height: none;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
}
.about-grid h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* Skills */
.skills { display: grid; gap: 48px; }
.skill-group h3 {
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.skill-list { display: grid; gap: 14px; }
.skill-list a, .skill-list span {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 10px;
  font-size: 18px;
}
.skill-list .more { font-size: 13px; color: var(--gold); font-weight: 700; }

/* Clients */
.clients {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 20px;
  align-items: center;
}
.clients img {
  max-height: 52px;
  width: auto;
  margin: 0 auto;
  filter: grayscale(1) brightness(2);
  opacity: .85;
}

/* Projects */
.project-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 28px 0;
  border-top: 1px solid var(--line-dark);
}
.project-row:last-child { border-bottom: 1px solid var(--line-dark); }
.project-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
}
.project-row h3 { font-size: 22px; font-weight: 700; }
.project-row p { color: #cfcfcf; margin-top: 6px; }
.projects-cta { margin-top: 36px; text-align: center; }

/* Letters */
.letters {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}
.letter-meta { color: #cfcfcf; }
.letter-meta strong { display: block; color: #fff; margin: 6px 0 18px; font-size: 20px; }
.letter-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.letter-track img {
  height: 340px;
  width: auto;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 8px;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.team-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }

/* Contacts */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.messengers { display: flex; gap: 16px; margin: 18px 0 8px; }
.messenger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
}
.messenger.wa { color: #25d366; }
.messenger.tg { color: #2aabee; }
.contact-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.contact-form .row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.field {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d7d7d7;
  background: #fff;
  font-size: 15px;
  border-radius: 12px;
}
.section-dark .field { background: #111; border-color: #333; color: #fff; }
.form-ok { display: none; padding: 16px; background: #1d3a24; color: #c8f5d2; }
.form-ok.show { display: block; }
.phone-big { font-size: 28px; font-weight: 800; margin-top: 22px; }
.contacts-bottom { margin-top: 36px; color: #bdbdbd; display: grid; gap: 6px; }

/* Cards */
.gold-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gold-card {
  background: var(--gold);
  color: #111;
  min-height: 180px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
}
.gold-card h3 { font-size: 22px; font-weight: 800; }
.gold-card p { font-size: 14px; }

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.benefit {
  position: relative;
  padding: 28px 8px 8px;
}
.benefit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold);
  z-index: 0;
  opacity: .9;
}
.benefit p { position: relative; z-index: 1; font-weight: 600; }

.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.exp-card { color: inherit; }
.exp-card img { width: 100%; height: 240px; object-fit: cover; margin-bottom: 16px; filter: grayscale(.25); border-radius: var(--radius); }
.exp-card .num { color: var(--gold); font-weight: 800; font-size: 22px; }
.exp-card h3 { font-size: 20px; margin: 8px 0 6px; }
.exp-card p { color: #cfcfcf; }

.more-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Projects catalog */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
}
.work-card { display: block; }
.work-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform .4s ease;
}
.work-card:hover img { transform: scale(1.03); }
.work-card h3 { margin-top: 12px; font-size: 20px; }
.work-card p { color: #666; }

/* Case */
.case-cover img { width: 100%; max-height: 640px; object-fit: cover; }
.case-block { display: grid; gap: 18px; }
.case-block h2 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.03em; }
.case-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.shot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.shot-grid img { width: 100%; }

/* Footer */
.site-footer {
  background: var(--bg-near);
  color: #fff;
  padding: 40px 0;
}
.site-footer .logo img { border-radius: 8px; }
.site-footer .inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 24px;
  align-items: center;
}
.site-footer a:hover { text-decoration: underline; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 20px;
}
.modal.open { display: grid; }
.modal-card {
  width: min(460px, 100%);
  background: #fff;
  padding: 32px;
  position: relative;
  border-radius: 20px;
}
.modal-card h3 { font-size: 24px; margin-bottom: 16px; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 26px;
  cursor: pointer;
}

/* Mobile nav */
.mobile-panel {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px 24px 20px;
}
.mobile-panel a { display: block; padding: 10px 0; font-weight: 600; }
.mobile-panel .sub { padding-left: 12px; font-weight: 500; color: #444; }
body.nav-open .mobile-panel { display: block; }

.case-block ul, .section ul {
  padding-left: 18px;
  display: grid;
  gap: 8px;
}
.case-block ul li, .section ul li { list-style: disc; }
.case-block h3 { font-size: 22px; margin-bottom: 8px; }

@media (max-width: 1100px) {
  .gold-grid[style*="repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 1180px) {
  .header-extras .bitrix { display: none; }
}

@media (max-width: 980px) {
  .nav, .header-extras { display: none; }
  .burger { display: grid; place-items: center; margin-left: auto; }
  .page-hero-grid, .about-grid, .letters, .contact-grid, .case-cols,
  .gold-grid, .benefits, .exp-grid, .work-grid, .team-grid, .clients,
  .site-footer .inner {
    grid-template-columns: 1fr;
  }
  .clients { grid-template-columns: repeat(3, 1fr); }
  .project-row { grid-template-columns: 48px 1fr; }
  .project-row .btn { grid-column: 2; justify-self: start; }
  .hero h1 { max-width: none; }
  .contact-form .row { grid-template-columns: 1fr; }
  .page-hero-visual { order: -1; }
}
