/* Слои — веб-студия. Все стили вынесены сюда: инлайновый CSS блокируется CSP. */

:root {
  --bg:          #f2f0ea;
  --ink:         #1a1920;
  --accent:      #3f3ec4;
  --line:        #ddd9cf;
  --line-soft:   #cdc8ba;
  --rule:        #c8c3b4;
  --body:        #4a473f;
  --muted:       #56534a;
  --muted-2:     #7d7969;
  --faint:       #a09b8b;
  --tile:        #e7e4da;
  --tile-2:      #e6e5dd;
  --tile-3:      #e8e3d8;
  --tile-label:  #8b8676;
  --dark-line:   #35333f;
  --dark-text:   #c9c6bd;
  --dark-muted:  #a5a29a;
  --lilac:       #b9b7f2;
  --lilac-soft:  #8d8aa6;
  --lilac-deep:  #6f6c84;
  --on-accent:   #bcbbf0;
  --on-accent-2: #d8d8f6;
  --step-line:   #d9d5c8;

  --font-sans: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 40px;
}

@media (max-width: 760px) { :root { --gutter: 20px; } }
@media (max-width: 520px) { :root { --gutter: 16px; } }

/* --- база --- */

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: #d9d8f7; }
svg { display: block; }

.page { background: var(--bg); min-height: 100vh; overflow-x: hidden; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: 96px; }
.section--tight { padding-top: 88px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.eyebrow--rule { display: flex; align-items: center; gap: 12px; }
.eyebrow--gap-sm { margin-bottom: 8px; }
.eyebrow--gap { margin-bottom: 26px; }
.rule { display: block; width: 40px; height: 1px; background: var(--rule); }
.accent { color: var(--accent); }

/* --- кнопки --- */

.btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.btn--dark { gap: 8px; padding: 10px 20px; background: var(--ink); color: var(--bg); font-size: 14px; }
.btn--dark:hover { background: var(--accent); color: #fff; }
.btn--accent { gap: 10px; padding: 15px 26px; background: var(--accent); color: #fff; font-size: 15px; }
.btn--accent:hover { background: var(--ink); color: #fff; }
.btn--ghost { padding: 15px 24px; border: 1px solid var(--line-soft); color: var(--ink); font-size: 15px; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

/* --- шапка --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(242, 240, 234, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  padding-top: 14px;
  padding-bottom: 14px;
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.logo-mark { display: block; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); }
.logo--sm { font-size: 17px; gap: 9px; }
.logo--sm .logo-mark { width: 8px; height: 8px; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-link:hover { color: var(--ink); }

/* --- первый экран --- */

.hero-grid { padding-top: 96px; display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-end; }
.hero-main { flex: 1 1 460px; }
.hero-aside { flex: 1 1 320px; padding-bottom: 10px; }
.hero-title {
  margin-top: 26px;
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: .96;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}
.lead { font-size: 17px; line-height: 1.6; color: var(--body); max-width: 40ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.stats {
  margin-top: 72px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.stat { padding: 22px 24px 24px; border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat:last-child { padding-right: 0; }
.stat-value {
  display: block;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted-2);
}

/* --- услуги --- */

.service {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: flex-start;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { background: rgba(63, 62, 196, .04); }
.service-num {
  flex: 0 0 56px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  padding-top: 7px;
}
.service-title {
  flex: 1 1 200px;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -.03em;
  line-height: 1.08;
  font-weight: 500;
}
.service-text { flex: 1 1 280px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.service-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--faint);
  text-align: right;
  padding-top: 9px;
}

/* --- как работаем --- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; }
.step { border-top: 2px solid var(--step-line); padding-top: 16px; }
.step--first { border-top-color: var(--accent); }
.step-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: .06em; }
.step--first .step-num { color: var(--accent); }
.step-title { font-size: 18px; letter-spacing: -.02em; margin: 10px 0 8px; font-weight: 600; }
.step-text { font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* --- работы --- */

.works-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.works-count { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.thumb {
  aspect-ratio: 4 / 3;
  background-color: var(--tile);
  background-image: repeating-linear-gradient(135deg, rgba(26, 25, 32, .07) 0 1px, transparent 1px 8px);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.thumb--alt { background-color: var(--tile-2); }
.thumb--alt2 { background-color: var(--tile-3); }
.thumb-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--tile-label); }

.work-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  min-height: 56px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.work-title { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.work-year { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.work-tags {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
}

/* --- разбор проекта (тёмный блок) --- */

.case { margin-top: 96px; background: var(--ink); color: var(--bg); }
.case-inner { padding-top: 80px; padding-bottom: 84px; }
.case-grid { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.case-head { flex: 1 1 340px; }
.case-eyebrow { color: var(--lilac-soft); }
.case-title {
  margin-top: 22px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.02;
  letter-spacing: -.04em;
  font-weight: 500;
  color: var(--bg);
}
.case-meta {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--lilac-deep);
}
.case-body { flex: 1 1 420px; padding-top: 6px; }
.case-p { font-size: 17px; line-height: 1.7; color: var(--dark-text); }
.case-p + .case-p { margin-top: 16px; }
.case-stats {
  margin-top: 56px;
  border-top: 1px solid var(--dark-line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.case-stat { padding: 26px 28px 0; border-left: 1px solid var(--dark-line); }
.case-stat:first-child { padding-left: 0; border-left: 0; }
.case-stat:last-child { padding-right: 0; }
.case-stat-value {
  display: block;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--lilac);
}
.case-stat-label { display: block; margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--dark-muted); }

/* --- о студии --- */

.about-grid { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.about-text { flex: 1 1 420px; }
.about-title {
  margin-top: 22px;
  font-size: clamp(28px, 3.8vw, 50px);
  line-height: 1.02;
  letter-spacing: -.042em;
  font-weight: 500;
  text-wrap: balance;
}
.about-p { margin-top: 24px; font-size: 17px; line-height: 1.7; color: var(--body); }
.about-p + .about-p { margin-top: 16px; }
.about-photo {
  flex: 1 1 320px;
  aspect-ratio: 4 / 3;
  background-color: var(--tile);
  background-image: repeating-linear-gradient(135deg, rgba(26, 25, 32, .07) 0 1px, transparent 1px 8px);
  display: flex;
  align-items: flex-end;
  padding: 18px;
}

.values-block { margin-top: 88px; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.value { border-top: 1px solid var(--ink); padding-top: 20px; }
.value-title { font-size: 21px; letter-spacing: -.025em; font-weight: 500; }
.value-text { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--muted); }

/* --- контакты --- */

.contact-card {
  background: var(--accent);
  color: #fff;
  padding: 64px 56px 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
  align-items: flex-end;
}
@media (max-width: 760px) { .contact-card { padding: 40px 24px 44px; } }

.contact-main { flex: 1 1 420px; }
.contact-eyebrow { color: var(--on-accent); }
.contact-title {
  margin-top: 20px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.03;
  letter-spacing: -.04em;
  font-weight: 500;
  color: #fff;
  max-width: 20ch;
}
.contact-text { margin-top: 20px; font-size: 16.5px; line-height: 1.6; color: var(--on-accent-2); max-width: 50ch; }
.contact-aside { flex: 1 1 300px; }
.contact-email {
  display: block;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -.03em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .45);
  padding-bottom: 12px;
}
.contact-email:hover { color: #fff; border-color: #fff; }
.contact-hours {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--on-accent);
}

/* --- подвал --- */

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); }
.footer-inner { padding-top: 48px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 32px; }
.footer-brand { max-width: 280px; display: flex; flex-direction: column; gap: 14px; }
.footer-tagline { font-size: 14px; line-height: 1.6; color: var(--muted-2); }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-head {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
}
.footer-link { font-size: 14.5px; color: var(--body); }
.footer-link:hover { color: var(--accent); }
.footer-plain { font-size: 14.5px; color: var(--muted-2); }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--faint);
}

/* --- страница 404 --- */

.notfound { padding-top: 140px; padding-bottom: 120px; max-width: 46ch; }
.notfound-code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.notfound-title {
  margin-top: 22px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 600;
}
.notfound-text { margin-top: 22px; font-size: 17px; line-height: 1.7; color: var(--body); }
.notfound-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
