/* ==========================================================================
   Sorum — главная страница (макет Figma «Main page», 1920px)
   ========================================================================== */

:root {
  --c-bg: #ffffff;
  --c-warm: #efedeb;
  --c-accent: #a39e9a;
  --c-muted: #928d8a;
  --c-text: #000000;
  --c-title: #1d1d1d;
  --c-error: #b3261e;

  --font: "Gilroy", "Manrope", "Helvetica Neue", Arial, sans-serif;

  --container: 1482px;
  --gutter: clamp(16px, 5vw, 219px);
  --section-y: clamp(64px, 7.3vw, 140px);
  --header-h: 96px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

main > section { position: relative; overflow-x: clip; isolation: isolate; }
.section--warm { background: var(--c-warm); }

/* ---------- Typography ---------- */
.h-xl {
  font-size: clamp(34px, 3.125vw, 60px);
  line-height: 1.1334;
  font-weight: 300;
}

.h-lg {
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.1667;
  font-weight: 300;
}

/* Плашка-подложка под строкой текста (полосы из макета) */
.mark { position: relative; white-space: nowrap; }
.mark::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  background: var(--c-bg);
}
.mark--help::before { left: -100vw; right: -0.6em; height: 0.867em; }
.mark--story::before { left: -3em; right: -2.7em; height: 1.05em; background: var(--c-warm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 10px 32px;
  border: 0;
  border-radius: 40px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 20px;
  line-height: 32px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease, transform .2s ease;
}
.btn img { width: 24px; height: 24px; flex: none; transition: transform .2s ease; }
.btn:hover img { transform: translateX(4px); }
.btn:focus-visible { outline: 2px solid var(--c-text); outline-offset: 3px; }

.btn--white { background: #fff; color: var(--c-text); }
.btn--white:hover { background: #f7f6f5; }
.btn--accent { background: var(--c-accent); color: #fff; }
.btn--accent:hover { background: #948f8a; }
.btn--lg { padding-inline: 40px; }
.btn--sm { height: 48px; font-size: 17px; }
.btn--wide { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--c-warm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}
.header__logo img { width: 136px; height: 56px; }
.header__nav {
  display: flex;
  align-items: center;
  gap: 48px;
  font-size: 18px;
  line-height: 26px;
  white-space: nowrap;
}
.header__nav a, .footer__nav a { transition: opacity .2s; }
.header__nav a:hover, .footer__nav a:hover { opacity: .6; }
.header__contacts { display: flex; align-items: center; gap: 40px; }
.header__phone { font-size: 18px; line-height: 26px; letter-spacing: 0.18px; white-space: nowrap; }

.socials { display: flex; align-items: center; gap: 16px; }
.socials a { display: block; width: 24px; height: 24px; transition: opacity .2s; }
.socials a:hover { opacity: .65; }
.socials img { width: 24px; height: 24px; }

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  background: none;
  cursor: pointer;
}
.header__burger span { display: block; height: 1.5px; background: var(--c-text); transition: transform .25s, opacity .25s; }
.header--open .header__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.header--open .header__burger span:nth-child(2) { opacity: 0; }
.header--open .header__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- 1. Hero ---------- */
.hero {
  height: clamp(560px, 51.25vw, 984px);
  color: #fff;
  background: #2b2a28;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  z-index: -2;
}
video.hero__bg { object-position: 62% 50%; pointer-events: none; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(103.16deg, rgba(0, 0, 0, .5) 28.08%, rgba(0, 0, 0, 0) 97.67%);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(32px, 2.97vw, 57px);
  height: 100%;
  padding-bottom: 56px;
}
.hero__text { display: flex; flex-direction: column; gap: clamp(20px, 2.08vw, 40px); }
.hero__title {
  font-weight: 300;
  max-width: 12.1em;
  font-size: clamp(38px, 3.334vw, 64px);
  line-height: 1.125;
}
.hero__lead {
  max-width: 18.6em;
  font-weight: 300;
  font-size: clamp(20px, 1.667vw, 32px);
  line-height: 1.25;
}

/* ---------- Collage (absolutely positioned images inside a ratio box) ---------- */
.collage { position: relative; }
.collage__item { position: absolute; object-fit: cover; }
/* В макете эти изображения растянуты по рамке (Figma: object-bottom без cover) */
.img-fill { object-fit: fill !important; }

/* ---------- 2. Help ---------- */
.help { padding-block: var(--section-y) clamp(60px, 6.93vw, 133px); }
.help__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 41.7%;
  align-items: start;
  column-gap: 40px;
  padding-right: 2.77%;
}
.help__text { padding-top: clamp(16px, 2.08vw, 40px); }
.help__kicker { font-weight: 300; font-size: clamp(22px, 1.667vw, 32px); line-height: 1.375; }
.help__title { max-width: 11.3em; margin-top: clamp(24px, 2.5vw, 48px); }
.help__sub { margin-top: 24px; font-weight: 300; font-size: clamp(18px, 1.25vw, 24px); line-height: 1.5; }
.help .btn-row { margin-top: clamp(40px, 5vw, 96px); }
.help__collage { aspect-ratio: 618 / 595; }
.help__img-main { left: 0; top: 0; width: 54.85%; height: 91.43%; }
.help__img-cross { left: 61.33%; top: 6.72%; width: 38.67%; height: 53.28%; }
.help__img-detail { left: 61.33%; top: 66.72%; width: 33.17%; height: 33.28%; }

/* ---------- 3. Story ---------- */
.story { padding-block: var(--section-y); }
.story__inner {
  display: grid;
  grid-template-columns: 45.07% 1fr;
  align-items: start;
}
.story__img-wide { width: 100%; aspect-ratio: 668 / 445; object-fit: cover; }
.story__text {
  max-width: 630px;
  margin-top: clamp(32px, 3.125vw, 60px);
  font-weight: 300;
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 1.5;
}
.story__quote {
  max-width: 12.4em;
  margin: clamp(16px, 2.45vw, 47px) 0 0 14.74%;
  font-weight: 300;
  font-size: clamp(26px, 2.084vw, 40px);
  line-height: 1.2;
}
.story__img-tall {
  width: 45.45%;
  margin: clamp(40px, 5.05vw, 97px) 0 0 auto;
  aspect-ratio: 370 / 491;
}

/* ---------- 4. Process ---------- */
.process {
  display: grid;
  grid-template-columns: 52.71% 1fr;
  min-height: clamp(480px, 31.67vw, 608px);
}
.process__img { width: 100%; height: 100%; }
.process__steps {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(32px, 3.125vw, 60px);
  max-width: calc(609px + 80px);
  padding: 48px var(--gutter) 48px clamp(32px, 4.17vw, 80px);
}
.step__title {
  display: flex;
  gap: 16px;
  font-weight: 400;
  font-size: clamp(20px, 1.25vw, 24px);
  line-height: 1.334;
}
.step__text { margin-top: 16px; font-weight: 300; font-size: 18px; line-height: 26px; }

/* ---------- Section head (title + right-aligned aside) ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.section-head__aside {
  max-width: 561px;
  font-size: 20px;
  line-height: 28px;
  text-align: right;
}

/* ---------- 5. 3D visualisation ---------- */
.viz { padding-block: var(--section-y); }
.viz .section-head__aside { margin-top: clamp(8px, 2.7vw, 52px); }
.viz__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin-top: clamp(40px, 3.75vw, 72px);
}
.viz-step__label {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 300;
  font-size: clamp(20px, 1.25vw, 24px);
  line-height: 32px;
  white-space: nowrap;
}
.viz-step__label img { flex: none; max-width: none; height: auto; }
.viz-step__media {
  position: relative;
  margin-top: 32px;
  aspect-ratio: 348 / 394;
  overflow: hidden;
}
.viz-step__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.viz-step__media::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }
.viz-step__num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  color: #fff;
  font-weight: 300;
  font-size: clamp(40px, 3.125vw, 60px);
  line-height: 1.067;
}
.viz__cta {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: clamp(40px, 3.96vw, 76px);
}
.viz__cta p { max-width: 325px; font-size: 20px; line-height: 26px; }

/* ---------- 6. CTA ---------- */
.cta { padding-block: clamp(64px, 6.25vw, 120px); }
.cta__row { display: flex; align-items: center; flex-wrap: wrap; gap: 24px 40px; margin-top: 40px; }
.cta__text { min-width: min(100%, 732px); font-size: clamp(22px, 1.667vw, 32px); line-height: 1.25; }

/* ---------- 7. Works slider ---------- */
.works { padding-block: var(--section-y); }
.works__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.works__title { max-width: 1054px; }
.slider-arrows {
  position: relative;
  flex: none;
  width: 274px;
  margin-bottom: -7.36px;
}
.slider-arrows img { width: 274px; height: auto; }
.slider-arrows__btn {
  position: absolute;
  top: -16px;
  bottom: -16px;
  width: 50%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.slider-arrows__btn--prev { left: 0; }
.slider-arrows__btn--next { right: 0; }
.slider-arrows__btn:disabled { cursor: default; }
.slider-arrows__btn:focus-visible { outline: 2px solid var(--c-text); outline-offset: 2px; }

.works__track {
  --track-start: max(var(--gutter), (100% - var(--container)) / 2);
  display: flex;
  gap: 30px;
  margin-top: 60px;
  padding-inline: var(--track-start) var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--track-start);
  scrollbar-width: none;
}
.works__track::-webkit-scrollbar { display: none; }

.work-card {
  flex: none;
  width: clamp(260px, 20.84vw, 400px);
  scroll-snap-align: start;
}
.work-card__media { position: relative; aspect-ratio: 400 / 540; overflow: hidden; }
.work-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.work-card:hover .work-card__media > img { transform: scale(1.03); }
.work-card__media::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); pointer-events: none; }
.work-card__more {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  padding: 8px;
  border: 0;
  border-radius: 40px;
  background: var(--c-warm);
  cursor: pointer;
  transition: transform .2s;
}
.work-card__more:hover { transform: rotate(90deg); }
.work-card__more img { width: 24px; height: 24px; }
.work-card__caption { margin-top: 16px; padding-inline: 8px; }
.work-card__title { color: var(--c-title); font-weight: 500; font-size: 20px; line-height: 28px; }
.work-card__subtitle { font-size: 17px; line-height: 24px; }

/* ---------- 8. Stones ---------- */
.stones { padding-block: var(--section-y); }
.stones .section-head__aside { max-width: 533px; margin-top: 16px; }
.stones__list {
  display: grid;
  grid-template-columns: 55.33% 1fr;
  align-items: start;
  margin-top: 48px;
}
.stone { display: flex; align-items: flex-start; }
.stone--granite { max-width: 689px; margin-left: -1.5%; gap: 29px; }
.stone--marble { max-width: 678px; margin-right: -16px; gap: 23px; margin-top: 6px; }
.stone__img { position: relative; z-index: 1; flex: none; overflow: hidden; }
.stone__img img { position: absolute; max-width: none; }
.stone--granite .stone__img { width: 47%; aspect-ratio: 324 / 332; }
.stone--granite .stone__img img { width: 134.31%; height: 169.88%; left: -18.23%; top: -32.23%; }
.stone--marble .stone__img { width: 47%; aspect-ratio: 319 / 327; }
.stone--marble .stone__img img { width: 139.94%; height: 150.9%; left: -20.43%; top: -27.71%; }
.stone__body { flex: 1 1 336px; max-width: 336px; }
.stone--granite .stone__body { padding-top: clamp(40px, 5.1vw, 98px); }
.stone--marble .stone__body { padding-top: clamp(32px, 4.17vw, 80px); }
.stone__title { position: relative; font-weight: 500; font-size: 24px; line-height: 36px; }
.stone__title::before {
  content: "";
  position: absolute;
  top: 50%;
  height: 48px;
  transform: translateY(-50%);
  z-index: -1;
  background: var(--c-bg);
}
.stone--granite .stone__title::before { left: -100vw; right: 10px; }
.stone--marble .stone__title::before { left: -153px; right: -100vw; }
.stone__text { margin-top: 16px; font-weight: 300; font-size: 17px; line-height: 24px; }
.stones__cta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px 64px;
  margin-top: clamp(48px, 4.74vw, 91px);
}
.stones__cta p { max-width: 1165px; font-size: 20px; line-height: 28px; }

/* ---------- 9. Support ---------- */
.support { padding-block: var(--section-y) clamp(64px, 7.6vw, 146px); }
.support__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40.5%;
  align-items: center;
  column-gap: 40px;
  padding-right: 3.24%;
}
.support__text { display: flex; flex-direction: column; align-items: flex-start; max-width: 657px; }
.support__text .h-xl { max-width: 10.95em; }
.support__lead {
  max-width: 496px;
  margin: 32px 0 clamp(32px, 3.125vw, 60px);
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 1.5;
}
.support__collage { aspect-ratio: 600 / 576; }
.support__img-1 { left: 0; top: 15.28%; width: 46.67%; height: 84.72%; }
.support__img-2 { left: 53.33%; top: 0; width: 46.67%; height: 84.72%; }

/* ---------- Footer ---------- */
.footer { background: var(--c-warm); }
.footer__inner {
  display: grid;
  grid-template-columns: 207px auto 360px 373px;
  column-gap: clamp(32px, 5.625vw, 108px);
  align-items: start;
  padding-block: 100px 64px;
}
.footer__logo img { width: 156px; height: 64px; }
.footer__socials { margin-top: 42px; }
.icon-dzen { position: relative; overflow: hidden; }
.icon-dzen__flip {
  position: absolute;
  inset: 7.14% 10.68% 10.71% 7.14%;
  transform: scaleY(-1);
}
.icon-dzen__flip img {
  position: absolute;
  inset: -5.07% -5.07% -5.15% -5.45%;
  width: auto;
  height: auto;
  max-width: none;
}
.footer__disclaimer { width: 214px; margin-top: 12px; font-weight: 300; font-size: 10px; line-height: 14px; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 24px; white-space: nowrap; }
.footer__contacts { display: flex; flex-direction: column; gap: 32px; font-weight: 300; font-size: 17px; line-height: 24px; }
.footer__contacts li { display: flex; align-items: flex-start; gap: 16px; }
.footer__contacts img { flex: none; width: 24px; height: 24px; }
.footer__contacts a:hover { text-decoration: underline; }
.footer__form-text { font-weight: 300; font-size: 17px; line-height: 24px; }

.callback-form { display: flex; flex-direction: column; gap: 24px; width: 368px; max-width: 100%; margin-top: 16px; }
.callback-form__fields { display: flex; flex-direction: column; gap: 8px; }
.input {
  width: 100%;
  height: 48px;
  padding: 10px 32px;
  border: 1px solid var(--c-accent);
  border-radius: 40px;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  line-height: 32px;
  color: var(--c-text);
  transition: border-color .2s;
}
.input::placeholder { color: var(--c-muted); opacity: 1; }
.input:focus { outline: none; border-color: var(--c-text); }
.input--error { border-color: var(--c-error); }

.checkbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 300;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
}
.checkbox input { position: absolute; width: 16px; height: 16px; margin: 0; opacity: 0; cursor: pointer; }
.checkbox__box { flex: none; width: 16px; height: 16px; border-radius: 4px; transition: background-color .15s; }
.checkbox input:checked + .checkbox__box {
  background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.checkbox input:focus-visible + .checkbox__box { outline: 2px solid var(--c-text); outline-offset: 2px; }
.checkbox a { text-decoration: underline; }

.field-error { color: var(--c-error); font-size: 12px; line-height: 16px; padding-left: 4px; }
.form-message { margin-top: 12px; font-size: 15px; line-height: 20px; }
.form-message--success { color: #2e6b3a; }

.footer__bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-height: 44px;
  padding: 12px var(--gutter);
  background: #fff;
  font-weight: 300;
  font-size: 15px;
  line-height: 20px;
}
.footer__bottom a { text-decoration: underline; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1440px) {
  .header__nav { gap: 32px; font-size: 17px; }
  .header__contacts { gap: 24px; }
  .footer__inner { grid-template-columns: 180px auto minmax(0, 1fr) minmax(0, 340px); }
  .footer__disclaimer { width: auto; max-width: 214px; }
}

@media (max-width: 1200px) {
  :root { --header-h: 72px; }
  .header__logo img { width: 110px; height: 45px; }
  .header__burger { display: flex; }
  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px var(--gutter) 32px;
    background: var(--c-warm);
    border-top: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
    font-size: 20px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .header--open .header__nav { visibility: visible; opacity: 1; transform: none; }
  .header__contacts { margin-left: auto; }

  .viz__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }

  .stones__list { grid-template-columns: 1fr; row-gap: 48px; }
  .stone--granite, .stone--marble { margin: 0; }
  .stone__img { width: min(40%, 324px) !important; }
  .stone--marble .stone__title::before { left: -100vw; right: -100vw; }

  .footer__inner { grid-template-columns: 1fr 1fr; row-gap: 48px; }
}

@media (max-width: 960px) {
  .help__inner, .story__inner, .support__inner { grid-template-columns: 1fr; padding-right: 0; row-gap: 48px; }
  .help__collage { width: min(100%, 618px); }
  .support__collage { width: min(100%, 600px); }
  .story__quote { width: auto; margin-left: 0; margin-top: 48px; }
  .story__img-tall { width: min(60%, 370px); margin-top: 32px; }

  .process { grid-template-columns: 1fr; }
  .process__img { aspect-ratio: 1012 / 608; height: auto; }
  .process__steps { max-width: none; padding: 48px var(--gutter); }

  .section-head { flex-direction: column; gap: 16px; }
  .section-head__aside { text-align: left; margin-top: 0 !important; }
  .works__head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .slider-arrows { margin-bottom: 0; }
  .viz__cta, .stones__cta { flex-direction: column; }
}

@media (max-width: 600px) {
  .header__phone { display: none; }
  .hero { height: auto; min-height: min(100svh - var(--header-h), 720px); }
  .hero__inner { padding-block: 64px; }
  .btn { height: 52px; padding-inline: 24px; font-size: 18px; }
  .btn-row .btn { flex: 1 1 100%; }
  .viz__steps { grid-template-columns: 1fr; }
  .viz-step__media { aspect-ratio: 4 / 3; }
  .stone { flex-direction: column; gap: 16px !important; }
  .stone__img { width: 60% !important; margin-inline: auto; }
  .stone__body { flex: none; max-width: none; padding-top: 0 !important; }
  .stone__title::before { left: -100vw !important; right: -100vw !important; }
  .slider-arrows { width: 200px; }
  .slider-arrows img { width: 200px; }
  .footer__inner { grid-template-columns: 1fr; padding-block: 56px 40px; }
  .callback-form { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
