/* Google Fonts: Onest (main) + Playfair Display (italic accents). Display swap avoids FOIT. */
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@1,500;1,600&display=swap');

/* ---- Font display fallback: use system font until custom fonts load ---- */
body {
  font-family: 'Onest', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* =====================================================================
   WST — design system (clay.global style)
   Skill: frontend-agency-hero. Warm light bg, oversized type, 3D sphere.
   No build step. Mobile-first.
   ===================================================================== */

/* ---- Design tokens ---- */
:root {
  --bg:        #EEEEEF;   /* warm light grey, NOT pure white */
  --ink:       #0D0D0D;   /* primary text */
  --muted:     #6B6B6E;   /* secondary text */
  --card:      #FFFFFF;
  --line:      rgba(13, 13, 13, .12);
  --line-soft: rgba(13, 13, 13, .07);
  --yellow:    #F5F542;   /* accent 1 */
  --coral:     #FF5C35;   /* accent 2 (rare) */
  --purple:    #7C5CFF;   /* accent 3 (rare) */
  --dark:      #0D0D0D;   /* dark CTA band */

  --fz-display: clamp(48px, 9.5vw, 120px);
  --fz-h2:      clamp(36px, 5.4vw, 72px);
  --fz-h3:      clamp(22px, 2.6vw, 34px);
  --fz-lead:    clamp(18px, 1.5vw, 22px);

  --maxw: 1440px;
  --hero-maxw: 1760px;
  --pad:  clamp(24px, 4vw, 72px);

  --r-pill: 999px;
  --r-card: 24px;
  --r-lg:   40px;

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

  --font: 'Onest', 'Segoe UI', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--hero-maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(72px, 12vw, 160px); }
.section--tight { padding-block: clamp(48px, 7vw, 96px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: .6;
}

/* ---- Typography ---- */
.display {
  font-family: var(--font);
  font-size: var(--fz-display);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.035em;
}
.display .accent {
  font-weight: 800;
}
h2, .h2 {
  font-size: var(--fz-h2);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.03em;
}
h3, .h3 {
  font-size: var(--fz-h3);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.lead {
  font-size: var(--fz-lead);
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}
.muted { color: var(--muted); }

.visually-hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .4s var(--ease), background .3s ease, color .3s ease;
  will-change: transform;
}
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--yellow { background: var(--ink); color: var(--yellow); }

/* ---- Navbar ---- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 76px;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(238, 238, 239, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--hero-maxw);
}

.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: opacity .3s ease;
  position: relative;
}
.nav-links a:hover { opacity: .5; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .btn { padding: 12px 22px; font-size: 15px; }

/* mobile menu toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }

/* mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: 110px var(--pad) 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-size: clamp(32px, 8vw, 56px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  padding: 6px 0;
}
.mobile-menu .btn { margin-top: 22px; align-self: flex-start; }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #e0e0e0;
}
.hero > .wrap {
  max-width: var(--hero-maxw);
  padding-inline: var(--pad);
}
.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  align-items: center;
  gap: clamp(32px, 4vw, 72px);
}
.hero-copy {
  position: relative;
  z-index: 3;
  text-align: left;
}
.hero-copy .display {
  max-width: none;
  font-size: clamp(42px, 4.2vw, 72px);
  line-height: .95;
}
.hero-copy .display-line {
  display: block;
  white-space: nowrap;
}
.hero-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 720px);
  aspect-ratio: 1;
  min-height: 420px;
}
.hero-meta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
}
/* 3D sphere canvas (Three.js) */
.three-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}
.three-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* hero gradient fade separator */
.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 2;
  pointer-events: none;
}

.hero-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: var(--hero-maxw);
  margin-inline: auto;
  padding: 0 var(--pad) 32px;
}

.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #555;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: #555;
}

.section-number {
  font-size: 64px;
  font-weight: 800;
  color: #2a2a2a;
  line-height: 1;
}

.section-label {
  font-size: 64px;
  font-weight: 800;
  color: #2a2a2a;
  line-height: 1;
  text-align: right;
  margin-top: 40px;
  user-select: none;
  opacity: .35;
}

/* marquee removed */

/* ---- Generic section blocks ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.split--asym { grid-template-columns: 0.85fr 1.15fr; }

/* simple counter stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.stat b {
  display: block;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}
.stat span {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}

/* ---- Cards grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 34px 30px;
  border: 1px solid var(--line-soft);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.18);
}
.card .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
}
.card h3 { margin-top: 4px; }
.card p { color: var(--muted); font-size: 16px; }
.card .pill-tag {
  margin-top: auto;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 1px solid var(--line);
}

/* feature row (services detail) */
.row-list { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 64px 1fr 1.2fr 60px;
  gap: 24px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding .4s var(--ease);
}
.row:hover { padding-inline: 12px; }
.row .num { color: var(--muted); font-weight: 600; font-size: 14px; }
.row h3 { letter-spacing: -.02em; }
.row h3,
.row p {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.row p { color: var(--muted); font-size: 16px; }
.row .arr {
  justify-self: end;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: background .3s, color .3s, transform .4s var(--ease);
}
.row:hover .arr { background: var(--ink); color: #fff; transform: rotate(-45deg); }

/* ---- Clients logos grid ---- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.logo-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
  padding: 24px;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: -.02em;
  color: var(--ink);
  opacity: .85;
  transition: background .3s, opacity .3s;
}
.logo-cell:hover { background: var(--card); opacity: 1; }
.logo-cell small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  margin-top: 4px;
}

/* ---- Testimonial ---- */
.testimonial {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(36px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
.testimonial blockquote {
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.testimonial cite { font-style: normal; }
.testimonial cite b { display: block; font-size: 18px; font-weight: 600; }
.testimonial cite span { color: rgba(255,255,255,.6); font-size: 15px; }

/* ---- Process steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.step .num {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}
.step h3 { margin: 16px 0 10px; }
.step p { color: var(--muted); font-size: 15px; }
.step .bar {
  height: 3px; width: 40px;
  background: var(--yellow);
  margin-bottom: 18px;
}

/* ---- About: team grid ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.member {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 22px;
  border: 1px solid var(--line-soft);
  transition: transform .5s var(--ease);
}
.member:hover { transform: translateY(-5px); }
.avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
}
.member h3 { font-size: 20px; }
.member span { font-size: 14px; color: var(--muted); }

/* ---- Contact form ---- */
.form-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line-soft);
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 17px;
  color: var(--ink);
  transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-bottom-color: var(--ink); }
.field .err { display: none; color: var(--coral); font-size: 13px; margin-top: 6px; }
.field.invalid input,
.field.invalid textarea { border-bottom-color: var(--coral); }
.field.invalid .err { display: block; }

.budget-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.budget-chips label {
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
  transition: all .25s ease;
}
.field .budget-chips input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.budget-chips input:checked + label,
.budget-chips label.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 0;
}
.form-success.show { display: block; animation: fadeUp .6s var(--ease); }
.form-success .check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--yellow);
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  font-size: 36px;
}

/* ---- FAQ accordion ---- */
.faq { border-top: 1px solid var(--line); }
.faq item, .faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -.02em;
}
.faq-q .ico {
  flex: none;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform .4s var(--ease), background .3s;
}
.faq-item.open .faq-q .ico { transform: rotate(45deg); background: var(--ink); color: #fff; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s var(--ease);
}
.faq-a p {
  padding-bottom: 26px;
  color: var(--muted);
  font-size: 17px;
  max-width: 60ch;
}

/* ---- Offices ---- */
.offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.office {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.office h3 { font-size: 26px; margin-bottom: 8px; }
.office a { color: var(--muted); font-size: 15px; display: block; }
.office a:hover { color: var(--ink); }

/* ---- Big CTA band (dark) ---- */
.cta-band {
  background: var(--dark);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(48px, 9vw, 120px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.65); max-width: 50ch; margin: 22px auto 34px; }
.cta-band .glow {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,245,66,.32), transparent 65%);
  top: -160px; right: -120px;
  pointer-events: none;
}
.cta-band .glow.two {
  background: radial-gradient(circle, rgba(124,92,255,.3), transparent 65%);
  top: auto; bottom: -180px; right: auto; left: -140px;
}

/* ---- Footer ---- */
.site-footer {
  padding-block: clamp(48px, 7vw, 88px) 32px;
  border-top: 1px solid var(--line-soft);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 56px;
}
.footer-brand .display { font-size: clamp(40px, 7vw, 88px); line-height: .95; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 16px;
  transition: opacity .3s;
}
.footer-col a:hover { opacity: .5; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

/* ---- Reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Page header (inner pages) ---- */
.page-head {
  padding-top: 150px;
  padding-bottom: 12px;
}
.page-head .display { max-width: 16ch; }
.page-head .lead { max-width: 52ch; margin-top: 22px; }

/* breadcrumb-ish tag row */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.tag {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--card);
}

/* ---- Services accordion (Разработка сайтов для бизнеса) ---- */
.services-head {
  margin-bottom: clamp(32px, 5vw, 64px);
  max-width: 16ch;
}
.services-head .display {
  white-space: nowrap;
  max-width: none;
}
@media (max-width: 768px) {
  .services-head {
    max-width: none;
  }
  .services-head .display {
    white-space: normal;
  }
}
.svc-accordion {
  border-top: 1px solid var(--line);
}
.svc-card {
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}

/* ---- Scroll reveal cascade for service cards (second block) ---- */
.svc-card.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.svc-card.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
/* Staggered cascade: each subsequent card appears later */
.svc-accordion .svc-card.reveal:nth-child(1) { transition-delay: 0s; }
.svc-accordion .svc-card.reveal:nth-child(2) { transition-delay: .1s; }
.svc-accordion .svc-card.reveal:nth-child(3) { transition-delay: .2s; }
.svc-accordion .svc-card.reveal:nth-child(4) { transition-delay: .3s; }
.svc-accordion .svc-card.reveal:nth-child(5) { transition-delay: .4s; }

.svc-card:hover { background: rgba(13,13,13,.015); }

.svc-head {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  align-items: center;
  gap: 24px;
  padding: clamp(22px, 3vw, 36px) 0;
  font: inherit;
  color: inherit;
}
.svc-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
}
.svc-title {
  font-size: clamp(22px, 2.8vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
  transition: transform .4s var(--ease);
}
.svc-card:hover .svc-title { transform: translateX(8px); }

.svc-toggle {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  justify-self: end;
  transition: background .3s, color .3s, transform .4s var(--ease);
  position: relative;
}
.svc-toggle span,
.svc-toggle span::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform .4s var(--ease), opacity .3s;
}
.svc-toggle span {              /* horizontal bar */
  width: 16px; height: 2px;
}
.svc-toggle span::after {       /* vertical bar → "+" */
  width: 2px; height: 16px;
  top: -7px; left: 7px;
}
.svc-card.open .svc-toggle { background: var(--ink); }
.svc-card.open .svc-toggle span,
.svc-card.open .svc-toggle span::after { background: #fff; }
.svc-card.open .svc-toggle span::after { transform: rotate(90deg); opacity: 0; }

.svc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s var(--ease);
}
.svc-card.open .svc-body {
  max-height: 800px;
}
.svc-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  max-width: 880px;
  padding: 0 0 clamp(28px, 4vw, 48px) 88px;
}
.svc-desc {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink);
}
.svc-goal {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.svc-goal b { color: var(--ink); font-weight: 600; }

.svc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-list li {
  position: relative;
  padding-left: 24px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.4;
}
.svc-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .6em;
  width: 12px; height: 1px;
  background: var(--ink);
}
.svc-price {
  display: inline-block;
  justify-self: start;
  align-self: start;
  width: fit-content;
  margin-top: 18px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
}

.svc-order {
  margin-top: 24px;
  align-self: start;
  text-transform: lowercase;
}

/* ---- Order modal (заказать) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13,13,13,.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  width: min(440px, 100%);
  padding: clamp(28px, 4vw, 40px);
  position: relative;
  transform: translateY(20px) scale(.98);
  transition: transform .4s var(--ease);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.4);
}
.modal-overlay.open .modal { transform: none; }

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .3s, color .3s, transform .4s var(--ease);
}
.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  width: 14px; height: 2px;
  background: var(--ink);
  transition: background .3s;
}
.modal-close::before { transform: rotate(45deg); }
.modal-close::after  { transform: rotate(-45deg); }
.modal-close:hover { background: var(--ink); transform: rotate(90deg); }
.modal-close:hover::before,
.modal-close:hover::after { background: #fff; }

.modal h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-bottom: 6px;
}
.modal-service {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 26px;
}

.modal .field { margin-bottom: 18px; }
.modal .field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 17px;
  color: var(--ink);
  transition: border-color .3s;
}
.modal .field input:focus { outline: none; border-bottom-color: var(--ink); }
.modal .field input.invalid { border-bottom-color: var(--coral); }
.modal .field input::placeholder { color: var(--muted); opacity: .6; }

/* thick divider to mark the message field as optional */
.modal-divider {
  height: 4px;
  background: var(--line);
  border: none;
  border-radius: 2px;
  margin: 26px 0 20px;
}
.modal-message {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  resize: none;
  min-height: 60px;
  line-height: 1.5;
  transition: border-color .3s;
}
.modal-message:focus { outline: none; border-bottom-color: var(--ink); }

.modal-submit {
  width: 100%;
  justify-content: center;
  margin-top: 26px;
}

/* ---- Modal success state ---- */
.modal-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}
.modal-success.show {
  display: block;
  animation: fadeUp .5s var(--ease);
}
.modal-success-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  position: relative;
}
.modal-success-check svg {
  width: 100%;
  height: 100%;
}
.modal-success-check circle {
  fill: none;
  stroke: #4CAF50;
  stroke-width: 2;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: drawCircle .6s var(--ease) forwards;
}
.modal-success-check path {
  fill: none;
  stroke: #4CAF50;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck .4s var(--ease) .5s forwards;
}
.modal-success h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  margin-bottom: 8px;
}
.modal-success p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* ---- Blog ---- */
.blog-head {
  padding-top: clamp(104px, 9vw, 128px);
  padding-bottom: clamp(14px, 2vw, 28px);
}
.blog-head .display {
  font-size: clamp(44px, 7.2vw, 96px);
}
.blog-head .lead { max-width: 58ch; }
.blog-head + .section--tight {
  padding-top: clamp(20px, 3vw, 42px);
}
.blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 34px);
}
.blog-topics span {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 15px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
}
.blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.blog-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.18);
}
.blog-card-link {
  display: grid;
  gap: 18px;
  padding: clamp(28px, 4vw, 52px);
}
.blog-card-meta,
.article-meta,
.breadcrumbs {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.blog-card h2 {
  max-width: 18ch;
  font-size: clamp(30px, 4vw, 58px);
}
.blog-card p { max-width: 62ch; color: var(--muted); }
.blog-card-cta { font-weight: 700; }

/* ---- Article ---- */
.article-layout {
  background: var(--bg);
}
.breadcrumbs {
  display: flex;
  gap: 10px;
  padding-top: 120px;
}
.breadcrumbs a:hover { color: var(--ink); }
.article-hero {
  padding-block: clamp(42px, 7vw, 92px);
  max-width: 980px;
}
.article-hero .display {
  font-size: clamp(42px, 6.8vw, 92px);
  max-width: 15ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
}
.article-body {
  max-width: 820px;
  padding-bottom: clamp(72px, 10vw, 140px);
}
.article-body p,
.article-body li {
  color: #242426;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.72;
}
.article-body p + p { margin-top: 18px; }
.article-body h2 {
  margin-top: clamp(38px, 6vw, 72px);
  margin-bottom: 16px;
  font-size: clamp(28px, 3.8vw, 46px);
}
.article-body ul {
  list-style: disc;
  padding-left: 1.3em;
  margin: 18px 0 0;
}
.article-body li + li { margin-top: 12px; }
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}
.article-table th,
.article-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  min-width: 180px;
}
.article-table th {
  color: var(--ink);
  font-size: 14px;
  background: rgba(13,13,13,.04);
}
.article-table td { color: var(--muted); font-size: 15px; }
.code-block {
  margin: 24px 0;
  padding: 20px;
  background: #111;
  color: #f4f4f4;
  border-radius: 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}
.article-links a {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  background: var(--card);
  font-weight: 600;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .offices { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-visual { display: none; }
  .hero-copy { text-align: center; }
  .hero-copy .display { max-width: 16ch; margin: 0 auto; }
  .hero-copy .display-line { white-space: normal; }
  .hero-meta { justify-content: center; }
  .testimonial { grid-template-columns: 1fr; gap: 28px; }
  .svc-inner { grid-template-columns: 1fr; gap: 20px; padding-left: 0; }
}

@media (max-width: 768px) {
  .nav-links, .header-cta .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .split, .split--asym { grid-template-columns: 1fr; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 36px; gap: 12px; }
  .row h3 { grid-column: 2 / 4; padding-right: 48px; }
  .row p { grid-column: 2 / 4; padding-top: 6px; padding-right: 48px; }
  .row .arr { grid-row: 1 / 3; grid-column: 3; align-self: center; }
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* Services preview — third block mobile fixes */
  .services-preview .card {
    padding: 24px 20px;
    min-height: auto;
  }
  .services-preview .h2 { font-size: clamp(28px, 6vw, 44px); }
  .services-preview .section-label {
    font-size: 44px;
    margin-top: 28px;
  }
}

@media (max-width: 540px) {
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .cta-band .glow {
    width: 260px;
    height: 260px;
    top: -90px;
    right: -20px;
  }
  .cta-band .glow.two {
    left: -20px;
    bottom: -110px;
  }

  /* Services preview — third block small-screen fixes */
  .services-preview .card { padding: 20px 18px; }
  .services-preview .h2 { font-size: 28px; }
  .services-preview .lead { font-size: 16px; }
  .services-preview .section-label {
    font-size: 32px;
    margin-top: 20px;
  }
  .services-preview .split { gap: 24px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
