/* =========================================================
   ATLAS ARCHITECTS · style.css
   Design tokens — grid — typography — sections — motion
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Palette — warm-neutral monochrome, no accent color */
  --ink:      #0A0A0A;
  --graphite: #1F1F1D;
  --smoke:    #3A3835;
  --fog:      #8A8681;
  --line:     #D4CFC5;
  --bone:     #E8E4DC;
  --paper:    #F5F3EE;
  --paper-2:  #EDE9E0;

  /* Redline — the drafting pencil that marks revisions and current state.
     Used only where it means exactly that: the sheet you are on, how far
     through you are, and where the keyboard is. Never decorative. */
  --mark:     #B23A24;
  --mark-lit: #E8735A;

  /* Type */
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Scale (fluid, clamp) — sized for Cyrillic word lengths, which run
     roughly 1.5–2× longer than the English equivalents. */
  --fs-display-xl: clamp(2rem, 6vw, 6.25rem);
  --fs-display-l:  clamp(1.5rem, 4vw, 4rem);
  --fs-h3:         clamp(1.25rem, 1.5vw, 1.625rem);
  --fs-body-l:     clamp(1.05rem, 1.2vw, 1.175rem);
  --fs-body:       1rem;
  --fs-mono:       0.75rem;
  --fs-mono-s:     0.6875rem;

  /* Space */
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --pad-x:  clamp(1.5rem, 5vw, 5rem);
  --pad-y:  clamp(5rem, 10vw, 9rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Header height */
  --header-h: 78px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

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

/* Keyboard focus, in the same redline the stamp uses for current state.
   :focus-visible only, so a mouse click never paints a ring. */
:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.services :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible,
.menu-overlay :focus-visible { outline-color: var(--mark-lit); }

/* ---------- Typography helpers ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--smoke);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smoke);
}

.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-l);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h-display em {
  font-style: italic;
  color: var(--fog);
}

/* Authored line breaks. Each span is one typographic line; if a long Cyrillic
   phrase still wraps, balance splits it evenly instead of dropping one orphan
   word onto its own line. */
.h-display > span {
  display: block;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Sheet stamp (signature element) ----------
   Reads like a drawing's title block: which sheet of how many, its name, and
   a rule measuring how far through the document you are. */
/* Sits in the header row rather than floating over the page: a fixed overlay
   inevitably lands on the nav or on body copy, whatever corner it is given. */
.hud {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 0.625rem;
  row-gap: 0.375rem;
  min-width: 8.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-s);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.72;
}

.hud__sheet { font-variant-numeric: tabular-nums; }
.hud__num { font-size: 0.8125rem; color: var(--mark); }
.site-header--dark:not(.site-header--scrolled) .hud__num { color: var(--mark-lit); }
.hud__total { opacity: 0.5; }
.hud__name { justify-self: end; }

/* Progress rule spans both columns, like the scale bar under a title block.
   The dim track is a pseudo-element so its opacity does not also fade the fill
   drawn on top of it — a child would inherit the parent's alpha and vanish. */
.hud__rule {
  grid-column: 1 / -1;
  position: relative;
  height: 1px;
  overflow: hidden;
}
.hud__rule::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0.22;
}
.hud__rule-fill {
  position: relative;
  display: block;
  height: 100%;
  width: 0;
  background: var(--mark);
  transition: width 0.25s linear;
}
.site-header--dark:not(.site-header--scrolled) .hud__rule-fill { background: var(--mark-lit); }


/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--pad-x);
  height: var(--header-h);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header--scrolled {
  background: rgba(245, 243, 238, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(10, 10, 10, 0.08);
}
.site-header--dark:not(.site-header--scrolled) {
  color: var(--bone);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.95rem;
  font-family: var(--font-display);
  transform: translateY(0.15em);
}

.nav {
  display: flex;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  padding: 0.4rem 0;
  transition: opacity 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.nav a:hover::after { transform: scaleX(1); }

/* Переключатель языка: обе метки видны сразу, активная выделена —
   посетитель понимает, что доступно, не открывая меню */
.lang {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-s);
  letter-spacing: 0.1em;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.75;
  transition: opacity 0.3s var(--ease);
}
.lang:hover { opacity: 1; }
.lang__opt { opacity: 0.45; transition: opacity 0.3s var(--ease), color 0.3s var(--ease); }
.lang__opt.is-active { opacity: 1; color: var(--mark); }
.site-header--dark:not(.site-header--scrolled) .lang__opt.is-active { color: var(--mark-lit); }
.lang__sep { opacity: 0.35; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: inherit;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: currentColor;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Mobile overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: var(--ink);
  color: var(--paper);
  padding: calc(var(--header-h) + 2rem) var(--pad-x) 2rem;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-out);
  display: none;
}
.menu-overlay.is-open { transform: translateY(0); }
.menu-overlay__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.menu-overlay__nav a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.menu-overlay.is-open .menu-overlay__nav a { opacity: 1; transform: translateY(0); }
.menu-overlay.is-open .menu-overlay__nav a:nth-child(1) { transition-delay: 0.15s; }
.menu-overlay.is-open .menu-overlay__nav a:nth-child(2) { transition-delay: 0.22s; }
.menu-overlay.is-open .menu-overlay__nav a:nth-child(3) { transition-delay: 0.29s; }
.menu-overlay.is-open .menu-overlay__nav a:nth-child(4) { transition-delay: 0.36s; }
.menu-overlay.is-open .menu-overlay__nav a:nth-child(5) { transition-delay: 0.43s; }
.menu-overlay.is-open .menu-overlay__nav a:nth-child(6) { transition-delay: 0.50s; }
.menu-overlay__nav .idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fog);
  letter-spacing: 0.1em;
}
.menu-overlay__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  color: var(--fog);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.menu-overlay__meta a { color: var(--bone); display: inline-block; margin-top: 0.4rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1rem 1.75rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn svg {
  width: 16px; height: 16px;
  transition: transform 0.5s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn:hover svg { transform: translateX(4px); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--ink);
}
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--full { width: 100%; justify-content: space-between; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  color: var(--paper);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(var(--header-h) + 2rem) var(--pad-x) 2rem;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 6s var(--ease-out);
  will-change: transform;
}
body.loaded .hero__img { transform: scale(1); }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.15) 30%, rgba(10,10,10,0.5) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.5) 0%, transparent 50%);
}

.hero__content {
  align-self: end;
  max-width: 62rem;
  padding-bottom: 3rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-xl);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 1.25rem 0 1.5rem;
}
.hero__title span { display: block; }
.hero__title em { font-style: italic; color: var(--line); }

.hero__lede {
  max-width: 40rem;
  font-size: var(--fs-body-l);
  color: var(--bone);
  line-height: 1.55;
  margin-bottom: 2.25rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero__actions .btn--ghost {
  --btn-fg: var(--paper);
  --btn-border: var(--paper);
}
.hero__actions .btn--ghost::before { background: var(--paper); }
.hero__actions .btn--ghost:hover { color: var(--ink); }

/* Занятость календаря — настоящее ограничение студии, а не выдуманный таймер */
.hero__avail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  border: 1px solid rgba(232, 228, 220, 0.28);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* Плашка — одна строка: в inline-flex текст иначе сжимается и рвётся */
.hero__avail .mono { color: var(--bone); white-space: nowrap; }
.hero__avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--mark-lit);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero__avail-dot { animation: pulse 2.6s var(--ease) infinite; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-top: 2rem;
  border-top: 1px solid rgba(232, 228, 220, 0.2);
  gap: 1.5rem;
}
.hero__foot-col { max-width: 26rem; }
.hero__foot-col p { color: var(--bone); font-size: 0.95rem; margin-top: 0.35rem; }
.hero__scroll {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone);
}
.hero__scroll svg { width: 16px; height: 16px; animation: bob 2.2s var(--ease) infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ---------- Section head ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  margin-bottom: 3.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.section-head--light { border-top-color: rgba(232, 228, 220, 0.18); }

/* ---------- Studio ---------- */
.studio {
  padding: var(--pad-y) 0;
  background: var(--paper);
}
.studio__grid {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.studio__figure { margin: 0; }
.studio__figure img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.studio__figure figcaption { margin-top: 0.75rem; }
.studio__body { padding-top: 2rem; }
.studio__body p {
  font-size: var(--fs-body-l);
  color: var(--smoke);
  margin-bottom: 1.25rem;
  max-width: 34rem;
}
.studio__body .h-display { margin-bottom: 2rem; }

.studio__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.studio__facts div { margin: 0; }
.studio__facts dt { margin-bottom: 0.35rem; }
.studio__facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- Approach ---------- */
.approach {
  padding: var(--pad-y) 0;
  background: var(--paper-2);
}
.approach__heading {
  padding: 0 var(--pad-x);
  max-width: 60rem;
  margin-bottom: 4rem;
}

.pillars {
  list-style: none;
  padding: 0 var(--pad-x);
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.pillar {
  padding: 2.5rem 2rem;
  background: var(--paper-2);
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  transition: background 0.4s var(--ease);
}
.pillar:hover { background: var(--paper); }
.pillar__num { color: var(--fog); padding-top: 0.4rem; }
/* Heading and copy both belong in the wide column; without this the paragraph
   falls into the next row's narrow first column and wraps a word per line. */
.pillar h3,
.pillar p { grid-column: 2; }
.pillar h3 { margin-bottom: 0.75rem; }
.pillar p { color: var(--smoke); }

/* ---------- Works ---------- */
.works {
  padding: var(--pad-y) 0;
  background: var(--paper);
}
.works__heading {
  padding: 0 var(--pad-x);
  max-width: 60rem;
  margin-bottom: 4rem;
}
.projects {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Крупный вертикальный шаг: проекты читаются как отдельные листы,
     а не как плитки одной галереи */
  gap: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 3vw, 2.5rem);
}
.project {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project--wide { grid-column: span 2; }

/* Номер листа на линейке над фотографией — граница между проектами */
.project__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--ink);
}
.project__head-num {
  color: var(--ink);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
}
.project__head-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.project__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bone);
}
.project--wide .project__media { aspect-ratio: 16/10; }
.project__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.6s var(--ease);
  filter: saturate(0.85) brightness(0.98);
}
.project__media:hover img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}
.project__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
}
.project__meta h3 { grid-column: 1 / -1; margin-bottom: 0.5rem; }
.project__meta dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.project__meta dl div { display: flex; flex-direction: column; gap: 0.25rem; }
.project__meta dt { color: var(--fog); }
.project__meta dd { margin: 0; color: var(--ink); font-size: 0.925rem; }

/* ---------- Чертёж / постройка ----------
   Обе картинки лежат стопкой; верхняя обрезается по ширине шторки.
   Управление — настоящий <input type="range">: работает и мышью, и с клавиатуры,
   и читается скринридером без единой строки ARIA-костылей. */
.compare {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bone);
  touch-action: pan-y;
  --seam: 50%;
}
.compare__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Режем отрисовку, а не раскладку: при обрезке шириной внутренний чертёж
   сжимался бы вместе со шторкой, clip-path же оставляет его на месте. */
.compare__clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--seam)) 0 0);
}
.compare__seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--seam);
  width: 1px;
  background: var(--paper);
  transform: translateX(-0.5px);
  pointer-events: none;
}
.compare__seam::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--paper);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.compare__tag {
  position: absolute;
  top: 1rem;
  color: var(--paper);
  background: rgba(10, 10, 10, 0.5);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.compare__tag--l { left: 1rem; }
.compare__tag--r { right: 1rem; }

/* Ползунок растянут на весь кадр и невидим — видимой ручкой служит шов */
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
  background: transparent;
}
.compare__range::-webkit-slider-thumb {
  appearance: none;
  width: 44px;
  height: 44px;
}
.compare__range::-moz-range-thumb {
  width: 44px;
  height: 44px;
  border: 0;
}
.compare__range:focus-visible ~ .compare__seam::after {
  outline: 2px solid var(--mark-lit);
  outline-offset: 3px;
}

@media (max-width: 780px) {
  .compare { aspect-ratio: 4/3; }
  .compare__tag { font-size: var(--fs-mono-s); }
}

.works__more {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 4rem var(--pad-x) 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.4s var(--ease-out);
}
.works__more:hover { gap: 1.25rem; }
.works__more svg { width: 20px; height: 20px; }

/* ---------- Services ---------- */
.services {
  padding: var(--pad-y) 0;
  background: var(--ink);
  color: var(--paper);
}
.services .section-head {
  border-top-color: rgba(232, 228, 220, 0.18);
}
.services .mono { color: var(--fog); }
.services__intro {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 4rem;
}
.services__intro p {
  max-width: 26rem;
  color: var(--line);
}
.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(232,228,220,0.15);
}
.service {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 2rem;
  padding: 2rem var(--pad-x);
  border-bottom: 1px solid rgba(232,228,220,0.15);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  align-items: start;
  position: relative;
}
.service:hover { background: var(--graphite); }
.service__num { color: var(--fog); padding-top: 0.35rem; }
.service h3 { color: var(--paper); }
.service p { color: var(--line); max-width: 42rem; }
.service__plus {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--fog);
  transition: transform 0.6s var(--ease-out), color 0.4s var(--ease);
}
.service:hover .service__plus {
  transform: rotate(90deg);
  color: var(--paper);
}

/* ---------- Why (stats) ---------- */
.why {
  padding: var(--pad-y) 0;
  background: var(--paper);
}
.why__grid {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.why__intro p {
  max-width: 26rem;
  color: var(--smoke);
  margin-top: 1.5rem;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  margin: 0;
  border: 1px solid var(--line);
}
.stat {
  background: var(--paper);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 12rem;
  justify-content: space-between;
}
.stat dt {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat dd {
  margin: 0;
  color: var(--smoke);
  font-size: 0.95rem;
  max-width: 20rem;
}

/* ---------- Process ---------- */
.process {
  padding: var(--pad-y) 0;
  background: var(--paper-2);
}
.process__heading {
  padding: 0 var(--pad-x);
  max-width: 60rem;
  margin-bottom: 4rem;
}
.process-list {
  list-style: none;
  padding: 0 var(--pad-x);
  margin: 0;
  display: grid;
  gap: 0;
}
.phase {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.phase:last-child { border-bottom: 1px solid var(--line); }
.phase__num { color: var(--fog); }
.phase h3 {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  margin-bottom: 0.75rem;
}
.phase p { color: var(--smoke); max-width: 42rem; font-size: var(--fs-body-l); }

/* ---------- Team ---------- */
.team {
  padding: var(--pad-y) 0;
  background: var(--paper);
}
.team__heading {
  padding: 0 var(--pad-x);
  max-width: 60rem;
  margin-bottom: 4rem;
}
.team__grid {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.member { margin: 0; }
.member__media {
  overflow: hidden;
  background: var(--bone);
  aspect-ratio: 4/5;
}
.member__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 1s var(--ease-out), filter 0.7s var(--ease);
}
.member:hover .member__media img {
  transform: scale(1.04);
  filter: grayscale(0);
}
.member figcaption { padding-top: 1rem; }
.member figcaption h3 { margin-bottom: 0.25rem; }
.member figcaption .mono { display: block; margin-bottom: 0.4rem; }
.member figcaption p { color: var(--smoke); font-size: 0.925rem; }

/* ---------- Voices ---------- */
.voices {
  padding: var(--pad-y) 0;
  background: var(--paper-2);
}
.quote {
  padding: 3.5rem var(--pad-x);
  margin: 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
}
.quote:last-child { border-bottom: 1px solid var(--line); }
.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  max-width: 44rem;
}
.quote footer { color: var(--fog); }

/* ---------- FAQ ---------- */
.faq {
  padding: var(--pad-y) 0;
  background: var(--paper);
}
.faq__heading {
  padding: 0 var(--pad-x);
  max-width: 60rem;
  margin-bottom: 4rem;
}
.faq-list {
  list-style: none;
  padding: 0 var(--pad-x);
  margin: 0;
}
.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item__q {
  display: grid;
  grid-template-columns: 4rem 1fr 2rem;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 0;
  width: 100%;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}
.faq-item__q:hover { color: var(--smoke); }
.faq-item__q .mono { color: var(--fog); }
.faq-icon {
  width: 20px; height: 20px;
  justify-self: end;
  transition: transform 0.5s var(--ease-out);
}
.faq-item__q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}
.faq-item__a p {
  padding: 0 2rem 2rem 5.5rem;
  color: var(--smoke);
  font-size: var(--fs-body-l);
  max-width: 44rem;
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--pad-y) 0;
  background: var(--ink);
  color: var(--paper);
}
.contact__grid {
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.contact__intro p {
  max-width: 30rem;
  color: var(--line);
  margin-bottom: 3rem;
  font-size: var(--fs-body-l);
}
.contact__address {
  font-style: normal;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(232, 228, 220, 0.18);
}
.contact__address p { color: var(--paper); font-size: 0.95rem; line-height: 1.6; }
.contact__address .mono { display: inline-block; margin-bottom: 0.5rem; color: var(--fog); }
.contact__address .contact__coord { margin: 0.5rem 0 0; }
.contact__address a:hover { color: var(--line); }

.contact__form {
  display: grid;
  gap: 1.25rem;
}
.field { display: grid; gap: 0.5rem; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
}
.field input,
.field textarea,
.field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(232, 228, 220, 0.24);
  padding: 0.85rem 0;
  color: var(--paper);
  font-size: var(--fs-body-l);
  font-family: var(--font-body);
  border-radius: 0;
  transition: border-color 0.3s var(--ease);
  outline: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-bottom-color: var(--paper);
}
.field textarea { resize: vertical; min-height: 6rem; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8E4DC' stroke-width='1.4'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  background-size: 18px;
  padding-right: 2rem;
}
.field select option { background: var(--ink); color: var(--paper); }
.field__note { color: var(--fog); margin-top: 0.5rem; }

/* Место под ответ занято всегда: иначе появление строки сдвигает сноску
   под кнопкой ровно в тот момент, когда человек на неё смотрит. */
.form-status {
  min-height: 1.1rem;
  color: var(--fog);
  transition: color 0.3s var(--ease);
}
.form-status[data-tone='ok'] { color: var(--paper); }
.form-status[data-tone='error'] { color: var(--mark); }

.contact__form button[disabled] { opacity: 0.55; cursor: progress; }

.contact .btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-border: var(--paper);
}
.contact .btn::before { background: var(--graphite); }
.contact .btn:hover { color: var(--paper); border-color: var(--paper); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 5rem var(--pad-x) 2rem;
  background: var(--ink);
  color: var(--bone);
  border-top: 1px solid rgba(232,228,220,0.12);
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1.15fr 1.85fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(232,228,220,0.12);
}
.colophon__sheet { color: var(--fog); }
.site-footer__manifesto {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.6vw, 2.375rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 1rem;
  color: var(--paper);
  max-width: 34rem;
}

/* Spec cells, the way a title block records a drawing's particulars */
.colophon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 2.5rem;
  margin: 0;
  align-content: start;
}
.colophon dt { margin-bottom: 0.6rem; color: var(--fog); }
.colophon dd {
  margin: 0;
  color: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.45;
}

/* Local time in each studio — real data, not decoration */
.offices {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  background: rgba(232, 228, 220, 0.12);
  border-block: 1px solid rgba(232, 228, 220, 0.12);
}
.office {
  background: var(--ink);
  padding: 2rem 1.75rem 2.25rem;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.office__city { color: var(--fog); }
.office__time {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.office__role {
  color: var(--bone);
  font-size: 0.875rem;
  opacity: 0.75;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  padding-top: 2rem;
  flex-wrap: wrap;
  color: var(--fog);
}
.site-footer__bottom a:hover { color: var(--paper); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-links a {
  color: var(--bone);
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.footer-links a:hover { color: var(--paper); border-bottom-color: var(--paper); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 45;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover { background: var(--graphite); }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}
/* Wipe each line in from the top. clip-path masks the element itself, so a line
   that wraps to two rows still reveals correctly — a translateY mask cannot,
   because it assumes every span is exactly one row tall. */
[data-reveal-lines] > span {
  display: block;
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.28em);
  transition: clip-path 1s var(--ease-out), transform 1s var(--ease-out);
}
[data-reveal-lines].is-in > span {
  clip-path: inset(0 0 -25% 0);
  transform: translateY(0);
}
[data-reveal-lines] > span:nth-child(2) { transition-delay: 0.1s; }
[data-reveal-lines] > span:nth-child(3) { transition-delay: 0.2s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  /* Brand + five nav items already fill the header row at this width */
  .hud { display: none; }
  .studio__grid { grid-template-columns: 1fr; }
  .studio__body { padding-top: 0; }
  .why__grid { grid-template-columns: 1fr; align-items: start; }
  .services__intro { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .phase { grid-template-columns: 1fr; gap: 1rem; }
  .project__meta dl { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  :root { --header-h: 68px; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .menu-overlay { display: block; }
  .projects { grid-template-columns: 1fr; }
  .project--wide { grid-column: auto; }
  .pillars { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .studio__facts { grid-template-columns: 1fr; }
  .contact__address { grid-template-columns: 1fr; }
  .offices { grid-template-columns: 1fr; }
  .office { padding: 1.5rem var(--pad-x) 1.75rem; }
  .quote { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem var(--pad-x); }
  .services__intro { margin-bottom: 2.5rem; }
  .service { grid-template-columns: 4rem 1fr auto; padding: 1.5rem var(--pad-x); gap: 1rem; }
  .faq-item__q { grid-template-columns: 2.25rem 1fr 1.25rem; gap: 0.75rem; font-size: 1.0625rem; }
  .faq-item__a p { padding-left: 3rem; padding-right: 0; }

  .hero__foot { flex-direction: column; align-items: start; gap: 1.5rem; }
  .hero__content { padding-bottom: 1.5rem; }
}

@media (max-width: 540px) {
  .team__grid { grid-template-columns: 1fr; }
  .colophon { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-lines] > span { opacity: 1; transform: none; }
}
