/* =========================================================================
   МОНУМЕНТ-ПРОЕКТ — монументальные проекты полного цикла
   Архитектурный, минималистичный, фотоцентричный дизайн.
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
/* <picture> должен быть полностью прозрачен для раскладки — иначе его
   собственный display:block ломает процентные размеры/object-fit у
   вложенного <img> (герой, миниатюры проектов). */
picture { display: contents; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Tokens ---------- */
:root {
  --bg: #F7F3EC;
  --bg-alt: #EFE7DA;
  --surface: #FFFFFF;
  --text: #211C17;
  --text-secondary: #6E655A;
  --text-on-ink: #F7F3EC;
  --text-on-ink-secondary: rgba(247, 243, 236, 0.68);
  --ink: #211C17;
  --ink-2: #2A231C;
  --line: rgba(33, 28, 23, 0.14);
  --line-on-ink: rgba(247, 243, 236, 0.18);
  /* Terracotta — primary brand accent (kept under the historic --bronze names
     so every existing component that references them picks it up). */
  --bronze: #EC4716;
  --bronze-dark: #B13511;
  --accent: #EC4716;
  --accent-dark: #B13511;
  --accent-tint: #F9DDC7;

  --font-main: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --container: 1360px;
  --container-narrow: 860px;
  --gutter: 20px;

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

@media (min-width: 768px) { :root { --gutter: 40px; } }
@media (min-width: 1200px) { :root { --gutter: 64px; } }

section { padding: 56px 0; }
@media (min-width: 1024px) { section { padding: 96px 0; } }
.section--tight { padding: 44px 0; }
@media (min-width: 1024px) { .section--tight { padding: 68px 0; } }
.section--flush { padding: 0; }

section[id] { scroll-margin-top: 96px; }

.section--alt { background: var(--bg-alt); }
.section--ink {
  background: var(--ink);
  color: var(--text-on-ink);
}
.section--ink .section-subtitle,
.section--ink p { color: var(--text-on-ink-secondary); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--text-on-ink); }

/* ---------- Focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 12px 18px;
  z-index: 1000;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Type scale ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.08;
}

.h-display { font-size: clamp(2.8rem, 1.6rem + 6vw, 6.6rem); line-height: 0.98; }
h1 { font-size: clamp(2.2rem, 1.5rem + 3.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 1.35rem + 1.7vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); line-height: 1.25; }
h4 { font-size: 1.02rem; line-height: 1.3; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--bronze);
  flex-shrink: 0;
}
.section--ink .eyebrow { color: var(--text-on-ink-secondary); }

.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head.wide { max-width: 920px; }
.section-title { margin-top: 14px; }
.section-subtitle {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
}

.eyebrow + .section-title,
.eyebrow + h2 { margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  text-align: center;
  max-width: 100%;
}
.btn svg { flex-shrink: 0; width: 16px; height: 16px; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }

.btn--dark { background: var(--ink); color: var(--text-on-ink); }
.btn--dark:hover { background: var(--ink-2); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--outline:hover { border-color: var(--text); }

.btn--outline-inverse {
  background: transparent;
  color: var(--text-on-ink);
  border-color: var(--line-on-ink);
}
.btn--outline-inverse:hover { border-color: var(--text-on-ink); }

.btn--ghost { background: transparent; color: var(--text); padding-inline: 0; letter-spacing: 0.08em; }
.btn--ghost svg { transition: transform .2s var(--ease); }
.btn--ghost:hover svg { transform: translateX(4px); }

.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding-block: 22px;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), padding .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(247, 246, 242, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--line);
  padding-block: 14px;
}
.site-header.is-scrolled .logo__name,
.site-header.is-solid .logo__name,
.site-header.is-scrolled .main-nav a,
.site-header.is-solid .main-nav a,
.site-header.is-scrolled .burger span,
.site-header.is-solid .burger span { color: var(--text); }

/* На hero-страницах хедер стартует поверх тёмной фотографии — светлый текст */
.site-header.on-dark:not(.is-scrolled):not(.is-solid) .logo__name,
.site-header.on-dark:not(.is-scrolled):not(.is-solid) .main-nav a,
.site-header.on-dark:not(.is-scrolled):not(.is-solid) .logo__tag { color: #fff; }
.site-header.on-dark:not(.is-scrolled):not(.is-solid) .burger__line { background: #fff; }
.site-header.on-dark:not(.is-scrolled):not(.is-solid) .btn--outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.site-header.on-dark:not(.is-scrolled):not(.is-solid) .btn--outline:hover { border-color: #fff; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
}
.logo__tag {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.main-nav { display: none; }
.main-nav ul { display: flex; gap: 34px; }
.main-nav a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 6px 0;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transition: right .25s var(--ease);
}
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions .btn { padding: 13px 22px; }
.header-actions .btn--outline { display: none; }

@media (min-width: 1100px) {
  .main-nav { display: block; }
  .header-actions .btn--outline { display: inline-flex; }
}

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
@media (min-width: 1100px) { .burger { display: none; } }
.burger__box { position: relative; width: 22px; height: 14px; }
.burger__line {
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--text);
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease), background-color .3s var(--ease);
}
.burger__line:nth-child(1) { top: 0; }
.burger__line:nth-child(2) { top: 6px; }
.burger__line:nth-child(3) { top: 12px; }
.burger[aria-expanded="true"] .burger__line:nth-child(1) { top: 6px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__line:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__line:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.burger[aria-expanded="true"] .burger__line { background: var(--text) !important; }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 199;
  padding: 100px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  overflow-y: auto;
}
.mobile-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.mobile-nav__actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.mobile-nav__actions .btn { padding: 18px 22px; }

@media (min-width: 1100px) { .mobile-nav { display: none !important; } }
body.nav-open, body.modal-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero--page { min-height: 68vh; }
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  z-index: 0;
}
.hero__bg--contain { object-fit: contain; background: var(--ink); }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.18) 30%, rgba(10,10,10,0.55) 75%, rgba(10,10,10,0.86) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: 160px 64px;
}
.hero--page .hero__content { padding-block: 150px 56px; }
.hero .eyebrow { color: rgba(255,255,255,0.72); }
.hero .eyebrow::before { background: #fff; }
.hero__brand {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.86);
  margin-bottom: 22px;
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero__tags {
  margin-top: 22px;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.02em;
}
.hero__subtitle {
  margin-top: 10px;
  max-width: 46ch;
  font-size: clamp(1rem, 0.94rem + 0.25vw, 1.15rem);
  color: rgba(255,255,255,0.86);
}
.hero__actions { margin-top: 36px; }

/* ---------- Split hero: headline + real project photo ---------- */
.hero-split {
  position: relative;
  background: var(--bg);
  overflow: hidden;
  padding-top: 128px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.hero-split__visual { order: 2; }
.hero-split__inner { order: 1; }
@media (min-width: 1024px) {
  .hero-split { padding-top: 150px; display: block; }
}
.hero-split__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 2;
  padding-bottom: 40px;
}
@media (min-width: 1024px) {
  .hero-split__inner { display: block; min-height: 640px; padding-bottom: 76px; }
}
.hero-split__text { position: relative; z-index: 2; }
@media (min-width: 1024px) { .hero-split__text { max-width: 540px; } }
.hero-split__brand {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-split__title { text-transform: uppercase; margin-top: 14px; }
.hero-split__sub {
  margin-top: 22px;
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
}
.hero-split__tags { margin-top: 6px; color: var(--text-secondary); font-size: 0.98rem; }
.hero-split__actions { margin-top: 30px; }
.hero-split__offer {
  margin-top: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 42ch;
}

/* Real project photo: normal flow / contained on mobile, full-bleed to the
   viewport edge on desktop. One img, responsive positioning — no AI art. */
.hero-split__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-alt);
}
.hero-split__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 30%);
}
.hero-split__caption { display: none; }
@media (min-width: 1024px) {
  .hero-split__visual {
    position: absolute;
    inset: 0;
    left: 54%;
    width: auto;
    aspect-ratio: auto;
    border-radius: 0;
    z-index: 1;
  }
  .hero-split__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, var(--bg) 0%, rgba(247, 243, 236, 0) 14%);
  }
  .hero-split__caption {
    display: block;
    position: absolute;
    z-index: 3;
    right: 28px;
    bottom: 36px;
    text-align: right;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  }
  .hero-split__caption::before {
    content: "";
    display: block;
    margin-left: auto;
    margin-bottom: 10px;
    width: 32px;
    height: 2px;
    background: var(--accent);
  }
}

/* ---------- Typographic hero (no background photo) ---------- */
.hero--type { background: var(--ink); align-items: center; }
.hero--type .hero__grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 64px);
}
.hero--type .hero__grid::after {
  content: "";
  position: absolute; top: -14%; right: -8%;
  width: 54vmin; height: 54vmin;
  border: 1.5px solid var(--bronze);
  opacity: 0.35;
  transform: rotate(45deg);
}
.hero--type .hero__grid::before {
  content: "";
  position: absolute; bottom: -18%; left: -10%;
  width: 34vmin; height: 34vmin;
  border: 1.5px solid var(--bronze);
  opacity: 0.22;
  transform: rotate(45deg);
}
.hero--type .hero__content { position: relative; z-index: 2; }

/* ---------- Real production photo split for the "Фигуры из пенопласта"
   hero only (scoped to .hero--foam-split — no other hero--type page is
   affected). Desktop: photo fills the right ~42% with a soft dark-edge
   blend; text keeps the left ~58%. Mobile/tablet: photo drops in normal
   flow below the text (DOM order), no absolute positioning, no overlap. */
.hero--foam-split .hero__grid::after,
.hero--foam-split .hero__grid::before { display: none; }
/* Fully remove the decorative line grid for this hero only — plain, single-tone
   dark background behind the text (the ink color already comes from .hero--type). */
.hero--foam-split .hero__grid { background-image: none; }
/* .hero is display:flex (row) by default — force a column stack below the
   desktop breakpoint so the photo drops BELOW the text instead of
   squeezing beside it as a flex sibling. At ≥1024px the photo switches to
   position:absolute (below) and leaves the flex flow anyway. */
.hero--foam-split { flex-direction: column; }
/* Second hero CTA reads as plain text next to the primary orange button —
   no rectangular outline. Scoped to this hero only; .btn--outline-inverse
   elsewhere on the site (mobile menu, other pages) is untouched. */
.hero--foam-split .btn-row .btn--outline-inverse {
  border-color: transparent;
  padding-inline: 0;
}
.hero--foam-split .btn-row .btn--outline-inverse:hover { border-color: transparent; }
/* Primary CTA stays a flat orange button with no extra outline (the shared
   .btn already uses a transparent border here — restated explicitly and
   scoped to this hero so it can never pick up a visible border). */
.hero--foam-split .btn--primary { border-color: transparent; }
.foam-hero-production {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-top: 32px;
  border-radius: 4px;
}
.foam-hero-production img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 38%);
}
@media (min-width: 1024px) {
  /* Anchor the text block flush-left against the container's own gutter
     instead of letting the inherited .container auto-margins center it
     (previous version compensated for that centering with a fixed
     translateX(-110px) — removed here in favor of the proper fix). */
  .hero--foam-split .hero__content { max-width: 56%; margin-inline: 0; align-self: flex-start; }
  .foam-hero-production {
    position: absolute;
    inset: 0;
    left: 58%;
    width: auto;
    aspect-ratio: auto;
    margin-top: 0;
    border-radius: 0;
    z-index: 1;
  }
  .foam-hero-production::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, var(--ink) 0%, rgba(33,28,23,0) 16%);
  }
}
.hero__meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Featured / large project cards ---------- */
.feature-list { display: flex; flex-direction: column; gap: 20px; }
.feature-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink);
  min-height: 62vh;
}
@media (min-width: 900px) { .feature-card { min-height: 78vh; } }
.feature-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.feature-card:hover img { transform: scale(1.035); }
.feature-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,10,10,0.82) 0%, rgba(10,10,10,0.25) 45%, rgba(10,10,10,0.05) 70%);
}
.feature-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 32px 24px;
  color: #fff;
}
@media (min-width: 768px) { .feature-card__body { padding: 52px; } }
.feature-card__index {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.68);
  text-transform: uppercase;
}
.feature-card__title { color: #fff; margin-top: 12px; max-width: 20ch; }
.feature-card__meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.78);
  text-transform: uppercase;
}
.feature-card__link {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.feature-card:hover .feature-card__link,
.feature-card:focus-visible .feature-card__link { opacity: 1; transform: translateY(0); }
.feature-card__link svg { width: 16px; height: 16px; }

/* ---------- Flagship case blocks ("Реализованные проекты") ----------
   Compact alternating photo/info cards — deliberately NOT full-screen:
   real photos stay modest in scale so 3 real projects read as a normal
   product section, not as a stretched-thin portfolio. */
.case-flagship {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
@media (min-width: 900px) {
  .case-flagship { grid-template-columns: 1.15fr 1fr; align-items: stretch; }
  .case-flagship--reverse .case-flagship__media { order: 2; }
  .case-flagship--reverse .case-flagship__info { order: 1; }
}
.case-flagship__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: var(--ar, 4/3);
}
@media (min-width: 900px) {
  .case-flagship__media { aspect-ratio: auto; min-height: 460px; height: 100%; }
}
.case-flagship__media img {
  width: 100%; height: 100%;
  object-fit: var(--fit, cover);
  object-position: var(--pos, center);
  transition: transform .6s var(--ease);
}
.case-flagship__media--contain { background: linear-gradient(155deg, var(--bg-alt), var(--bg)); }
.case-flagship__media:hover img { transform: scale(1.03); }
.case-flagship__media--contain:hover img { transform: none; }
.case-flagship__info {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
@media (min-width: 768px) { .case-flagship__info { padding: 40px 48px; } }
.case-flagship__index {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.case-flagship__title { font-size: clamp(1.28rem, 1.1rem + 1.2vw, 1.75rem); }
.case-flagship__title a { color: inherit; }
.case-flagship__title a:hover { color: var(--accent); }
.case-flagship__desc { color: var(--text-secondary); font-size: 0.98rem; }
.case-flagship__thumbs { display: flex; gap: 10px; margin-top: 2px; }
.case-flagship__thumbs figure {
  width: 74px; height: 74px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.case-flagship__thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); }
.case-flagship__link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}
.case-flagship__link svg { width: 16px; height: 16px; color: var(--accent); transition: transform .2s var(--ease); }
.case-flagship__link:hover { color: var(--accent); }
.case-flagship__link:hover svg { transform: translateX(3px); }

/* ---------- Davydkovo metro case stat ("420 м²") — scoped to this one
   flagship card only, reuses the section's existing tokens/typography. ---------- */
.davydkovo-case__stat { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.davydkovo-case__stat-num { font-size: clamp(1.7rem, 1.4rem + 1.3vw, 2.3rem); font-weight: 800; line-height: 1; color: var(--accent); }
.davydkovo-case__stat-label { font-size: 0.82rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.davydkovo-case__finish { margin-top: 44px; max-width: 720px; }

/* ---------- Reference flow ("Пришлите картинку") ---------- */
.ref-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.ref-flow__step {
  flex: 1 1 130px;
  padding: 22px 12px;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.92rem;
  color: #fff;
  border: 1.5px solid var(--line-on-ink);
}
.ref-flow__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: var(--accent);
  width: 22px;
}
.ref-flow__arrow svg { width: 20px; height: 20px; }
@media (max-width: 639px) {
  .ref-flow { flex-direction: column; }
  .ref-flow__step { width: 100%; }
  .ref-flow__arrow { width: 100%; justify-content: center; padding: 2px 0; }
  .ref-flow__arrow svg { transform: rotate(90deg); }
}

/* ---------- Small project cards (listing) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 780px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }

.project-card { display: block; }
.project-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}
.project-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transition: transform .6s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.045); }
.project-card__media.is-contain { background: linear-gradient(155deg, var(--bg-alt), var(--bg)); }
.project-card__media.is-contain img { object-fit: contain; }
.project-card:hover .project-card__media.is-contain img { transform: none; }
.project-card__tag {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(247,246,242,0.92);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
}
.project-card__body { padding-top: 18px; }
.project-card__body h3 { font-size: 1.15rem; }
.project-card__meta {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.filter-btn {
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1.5px solid var(--line);
  transition: all .18s var(--ease);
}
.filter-btn:hover { border-color: var(--text); color: var(--text); }
.filter-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--text-on-ink); }

/* ---------- Numbered step list (process) ---------- */
.step-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 720px) { .step-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .step-list { grid-template-columns: repeat(4, 1fr); } }
.step {
  padding: 28px 24px 28px 0;
  border-top: 1px solid var(--line);
}
.section--ink .step { border-top-color: var(--line-on-ink); }
.step__num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bronze);
  letter-spacing: 0.05em;
}
.section--ink .step__num { color: #E8926A; }
.step h3 { margin-top: 14px; font-size: 1.02rem; text-transform: uppercase; letter-spacing: 0.02em; }
.step p { margin-top: 8px; color: var(--text-secondary); font-size: 0.92rem; }

/* Производство: этап с фото */
.stage-list { display: flex; flex-direction: column; }
.stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
@media (min-width: 800px) { .stage { grid-template-columns: 0.9fr 1.4fr; gap: 48px; } }
@media (min-width: 800px) { .stage.stage--wide-media { grid-template-columns: 1.15fr 1.3fr; } }
.stage:nth-child(even) .stage__media { order: 2; }
.stage__media { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); }
.stage__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); }
.stage__media.is-contain { background: linear-gradient(155deg, var(--bg-alt), var(--bg)); }
.stage__media.is-contain img { object-fit: contain; }
.stage__media.is-contain.on-ink { background: linear-gradient(155deg, var(--ink-2), var(--ink)); }
.stage__index { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; color: var(--bronze); text-transform: uppercase; }
.stage__body h3 { margin-top: 12px; }
.stage__body p { margin-top: 12px; color: var(--text-secondary); }

/* ---------- Directions (возможности) ---------- */
.direction {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) { .direction { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; } }
.direction:nth-child(even) .direction__media { order: 2; }
.direction__media { aspect-ratio: 3/2; overflow: hidden; background: var(--bg-alt); }
.direction__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); }
.direction__body h3 { text-transform: uppercase; letter-spacing: 0.01em; }
.direction__body p { margin-top: 14px; color: var(--text-secondary); }
.direction__examples {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.direction__examples a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.direction__examples a:hover { color: var(--bronze-dark); }

/* ---------- Direction rows — text-first list, no photo box ----------
   Used where no real photo exists for the direction: a numbered editorial
   row (number / title / description), never a placeholder image slot. */
.direction-list { border-top: 1px solid var(--line); }
.direction-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
@media (min-width: 640px) { .direction-row { grid-template-columns: 76px 1fr; padding: 30px 0; gap: 28px; } }
.direction-row__num { font-size: 1.3rem; font-weight: 800; color: var(--accent); line-height: 1.3; }
@media (min-width: 640px) { .direction-row__num { font-size: 1.5rem; } }
.direction-row__body h3 { text-transform: uppercase; letter-spacing: 0.01em; font-size: 1.02rem; }
.direction-row__body p { margin-top: 10px; color: var(--text-secondary); }
.direction-row__examples { margin-top: 10px; font-size: 0.85rem; color: var(--text-secondary); }
.direction-row__examples a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.direction-row__examples a:hover { color: var(--accent-dark); }

/* ---------- Typographic "who we work with" list ---------- */
.audience-list { border-top: 1px solid var(--line); }
.section--ink .audience-list { border-top-color: var(--line-on-ink); }
.audience-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 700;
}
.section--ink .audience-row { border-bottom-color: var(--line-on-ink); }
.audience-row span:last-child {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section--ink .audience-row span:last-child { color: var(--text-on-ink-secondary); }

/* ---------- Scale block ---------- */
.scale-block {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}
.scale-block img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.scale-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.55) 55%, rgba(10,10,10,0.25) 100%); }
.scale-block__content { position: relative; z-index: 1; max-width: 620px; color: #fff; }
.scale-block__content .eyebrow { color: rgba(255,255,255,0.7); }
.scale-block__content .eyebrow::before { background: #fff; }
.scale-block__content h2 { color: #fff; margin-top: 14px; }
.scale-block__content p { margin-top: 18px; color: rgba(255,255,255,0.82); font-size: 1.05rem; }

/* ---------- Gallery (case study) ---------- */
.gallery { display: flex; flex-direction: column; gap: 20px; }
.gallery__row { display: grid; grid-template-columns: 1fr; gap: 20px; }
.gallery__row--pair { grid-template-columns: 1fr; }
@media (min-width: 720px) { .gallery__row--pair { grid-template-columns: 1fr 1fr; } }
.gallery__row--split { grid-template-columns: 1fr; }
@media (min-width: 720px) { .gallery__row--split { grid-template-columns: 1.4fr 1fr; } }
.gallery figure { position: relative; overflow: hidden; background: var(--bg-alt); }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); }
.gallery figure.is-contain { background: linear-gradient(155deg, var(--bg-alt), var(--bg)); }
.gallery figure.is-contain img { object-fit: contain; }
.gallery__full { aspect-ratio: 16/9; }
.gallery__full--contain { aspect-ratio: 4/3; }
.gallery__wide { aspect-ratio: 16/8; }
.gallery__square { aspect-ratio: 4/3; }
.gallery__tall { aspect-ratio: 3/4; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.gallery figure:hover figcaption { opacity: 1; }

/* ---------- Case study meta / body ---------- */
.case-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 40px 0;
}
@media (min-width: 720px) { .case-meta { grid-template-columns: repeat(4, 1fr); } }
.case-meta dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.case-meta dd { margin-top: 6px; font-weight: 700; font-size: 1.02rem; }

.role-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.role-tag {
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
}

.prose { max-width: 720px; }
.prose p { color: var(--text-secondary); font-size: 1.02rem; }
.prose p + p { margin-top: 14px; }

/* ---------- CTA band ---------- */
.cta-band {
  padding: 64px 24px;
  text-align: center;
  background: var(--ink);
  color: var(--text-on-ink);
}
@media (min-width: 768px) { .cta-band { padding: 96px 40px; } }
.cta-band h2 { color: #fff; max-width: 18ch; margin-inline: auto; }
.cta-band p { margin-top: 16px; max-width: 52ch; margin-inline: auto; color: var(--text-on-ink-secondary); }
.cta-band .btn-row { justify-content: center; margin-top: 32px; }
.cta-inline {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-inline h3 { max-width: 26ch; }

/* ---------- Modal (Обсудить проект) ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(12,12,12,0.6);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  z-index: 301;
  transform: translateX(100%);
  transition: transform .32s var(--ease);
  overflow-y: auto;
  padding: 90px 28px 40px;
}
@media (min-width: 640px) { .modal { padding: 100px 48px 48px; } }
.modal-overlay.is-open .modal { transform: translateX(0); }

.modal__close {
  position: fixed;
  top: 22px; right: 20px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 302;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
@media (min-width: 640px) { .modal__close { right: 40px; } }
.modal-overlay.is-open .modal__close { opacity: 1; pointer-events: auto; }
.modal__close svg { width: 22px; height: 22px; }

.modal h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
.modal__intro { margin-top: 10px; color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Form ---------- */
.form-row { margin-bottom: 18px; }
.form-row--split { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .form-row--split { grid-template-columns: 1fr 1fr; } }
.form-row--split > * { min-width: 0; }

.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-label .req { color: var(--bronze-dark); }

.form-control {
  width: 100%;
  padding: 13px 4px;
  border: none;
  border-bottom: 1.5px solid var(--line);
  background: transparent;
  font-size: 1rem;
  transition: border-color .18s var(--ease);
}
.form-control:focus { border-color: var(--text); outline: none; }
textarea.form-control { resize: vertical; min-height: 90px; }

.upload-placeholder {
  border: 1.5px dashed var(--line);
  padding: 18px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.86rem;
  background: var(--bg-alt);
}
.upload-placeholder svg { width: 24px; height: 24px; margin-bottom: 8px; }

.upload-field { position: relative; }
.upload-field__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.upload-field__control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1.5px dashed var(--line);
  padding: 18px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.86rem;
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.upload-field__control svg { width: 24px; height: 24px; }
.upload-field__input:hover + .upload-field__control,
.upload-field__input:focus + .upload-field__control {
  border-color: var(--accent);
  color: var(--text);
}
.upload-field__filenames {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 700;
}
.upload-field__filenames[hidden] { display: none; }

.form-hint { margin-top: 10px; font-size: 0.82rem; color: var(--text-secondary); }
.form-note { margin-top: 14px; font-size: 0.82rem; color: var(--text-secondary); }
.form-consent { margin: 16px 0; font-size: 0.82rem; color: var(--text-secondary); }
.form-consent a { color: var(--text); font-weight: 600; text-decoration: underline; }
.form-consent a:hover { color: var(--accent); }

/* Honeypot: скрыто от людей, но остаётся в DOM/разметке для простых ботов */
.hp-field {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  font-size: 0.9rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--info { background: var(--bg-alt); color: var(--text); }
.form-status--error { background: #F3E1DA; color: #6B2E17; }
.form-status a { color: inherit; text-decoration: underline; font-weight: 700; }

.contact-block {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.contact-block a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contact page: embedded form ---------- */
.contact-wrap {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) { .contact-wrap { grid-template-columns: 1.2fr 0.8fr; } }
.contact-wrap > * { min-width: 0; }

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px 22px;
}
@media (min-width: 640px) { .form-panel { padding: 44px; } }

.contact-aside { display: flex; flex-direction: column; gap: 20px; }
.telegram-panel {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 32px 26px;
}
.telegram-panel h3 { color: #fff; margin-bottom: 10px; }
.telegram-panel p { color: var(--text-on-ink-secondary); font-size: 0.94rem; margin-bottom: 20px; }
.contact-note-panel {
  background: var(--bg-alt);
  padding: 26px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.contact-note-panel p + p { margin-top: 10px; }
.contact-note-panel a { color: var(--text); font-weight: 600; }
.contact-note-panel a:hover { color: var(--accent); }

/* ---------- Detail strip (О компании) ---------- */
.detail-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .detail-strip { grid-template-columns: repeat(3, 1fr); } }
.detail-strip figure { aspect-ratio: 1/1; overflow: hidden; background: var(--bg-alt); }
.detail-strip img { width: 100%; height: 100%; object-fit: cover; }
.detail-strip > * { min-width: 0; }

/* ---------- Competence list ---------- */
.competence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 24px;
}
.competence-list li {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
}

/* ---------- Category grid ("Что мы производим") ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-card { display: block; }
.category-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}
.category-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.category-card:hover .category-card__media img { transform: scale(1.045); }
.category-card__title {
  margin-top: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.category-card__desc { margin-top: 6px; font-size: 0.86rem; color: var(--text-secondary); }

/* ---------- Materials — compact text tiles, no photo boxes ---------- */
.material-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 640px) { .material-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 639px) { .material-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 640px) { .material-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.material-tile {
  background: var(--surface);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) { .material-tile { padding: 28px 22px; } }
.material-tile__num { font-size: 1.3rem; font-weight: 800; color: var(--accent); line-height: 1; }
.material-tile__title {
  margin-top: 14px;
  font-size: 0.98rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.material-tile__desc { margin-top: 8px; font-size: 0.83rem; color: var(--text-secondary); line-height: 1.4; }

/* ---------- Typographic panel (used where no product photo exists yet) ----------
   Deliberately graphic, not photo-imitating: a flat warm colour wash with a large
   numeral. No grid/checker pattern — that read as a broken/unloaded image. */
.type-panel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(130% 100% at calc(18% + var(--n, 0) * 7%) 12%, var(--accent-tint) 0%, transparent 62%),
    linear-gradient(155deg, var(--bg-alt) 0%, var(--surface) 100%);
}
.type-panel::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 16px;
  height: 16px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  opacity: 0.55;
}
.type-panel__num {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.8;
}

.type-panel--plain .type-panel__num { display: none; }
.type-panel--plain::after {
  top: 50%;
  left: 50%;
  width: 30%;
  height: 30%;
  border: 1.5px solid var(--accent);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.4;
}
.type-panel--top { align-items: flex-start; padding-top: 18px; }

/* ---------- Spec grid ("Что создаём") — text-first, no photo boxes ----------
   A hairline-ruled grid of cells (number / title / one-line description).
   Deliberately reads as a spec sheet, never as an empty image slot. */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 640px) { .spec-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) { .spec-grid--5 { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 639px) { .spec-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.spec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: 24px 20px;
  min-height: 176px;
  transition: background .22s var(--ease);
}
@media (min-width: 768px) { .spec-card { padding: 30px 24px; min-height: 208px; } }
.spec-card__num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.spec-card__title {
  margin-top: auto;
  padding-top: 18px;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1.15;
  color: var(--text);
}
.spec-card__desc {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.spec-card:hover { background: var(--bg-alt); }
a.spec-card:hover .spec-card__title { color: var(--accent); }
.spec-card--link .spec-card__title::after {
  content: "→";
  margin-left: 8px;
  opacity: 0.6;
}

/* ---------- Grid item overflow safety ---------- */
.category-grid > *,
.material-grid > *,
.spec-grid > *,
.project-grid > *,
.step-list > *,
.gallery__row > *,
.case-meta > *,
.form-row--split > *,
.footer-grid > * {
  min-width: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-on-ink);
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .logo__name { color: #fff; font-size: 1.15rem; }
.footer-brand .logo__tag { color: var(--text-on-ink-secondary); }
.footer-brand p { margin-top: 16px; color: var(--text-on-ink-secondary); font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-ink-secondary);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.94rem; font-weight: 600; color: #fff; }
.footer-col a:hover { color: #E8926A; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-on-ink-secondary);
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal {
  margin-top: 14px;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--text-on-ink-secondary);
  opacity: 0.7;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.mt-0 { margin-top: 0 !important; }
.divider { border-top: 1px solid var(--line); }
.spacer-page-top { height: 0; }

/* ---------- Tablet layout fix (640–1023px) ----------
   Keep desktop untouched; give text-heavy grids enough width on tablets. */
@media (min-width: 640px) and (max-width: 1023px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-grid,
  .material-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .spec-grid,
  .spec-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .material-tile,
  .spec-card {
    overflow-wrap: anywhere;
  }
}

/* ---------- Responsive text grids: narrow desktop / tablet ---------- */
/* Keep text-heavy cards wide enough when the browser window is reduced. */
@media (min-width: 640px) and (max-width: 1199px) {
  .spec-grid,
  .spec-grid--5,
  .material-grid,
  .material-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .spec-grid > :last-child:nth-child(odd),
  .material-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .spec-card__title,
  .material-tile__title {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }
}


/* MONUMENT: unified personal-data consent checkbox */
.consent-check { display:flex; align-items:flex-start; gap:10px; margin:16px 0; font-size:.82rem; line-height:1.45; color:var(--text-secondary); cursor:pointer; }
.consent-check input[type="checkbox"] { flex-shrink:0; width:18px; height:18px; margin-top:2px; accent-color:var(--accent); cursor:pointer; }
.consent-check a { color:var(--text); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.consent-check a:hover { color:var(--accent); }
.cookie-notice { position:fixed; left:16px; right:16px; bottom:16px; z-index:9999; max-width:920px; margin:0 auto; padding:14px 16px; background:#171717; color:#fff; border:1px solid rgba(255,255,255,.16); box-shadow:0 12px 40px rgba(0,0,0,.24); display:flex; gap:16px; align-items:center; justify-content:space-between; font-size:.82rem; line-height:1.45; }
.cookie-notice[hidden] { display:none; }
.cookie-notice a { color:#fff; text-decoration:underline; }
.cookie-notice button { flex:0 0 auto; border:0; padding:10px 16px; font:inherit; font-weight:700; cursor:pointer; background:var(--accent); color:#fff; }
@media (max-width:640px){ .cookie-notice{left:10px;right:10px;bottom:10px;align-items:flex-start;flex-direction:column;} .cookie-notice button{width:100%;} }
