/*
  Homer — лендинг. Палитра снята с самого приложения: песочный фон, тёмная охра
  акцентом, тёплое оранжевое свечение ламп. Никаких фреймворков: страница одна,
  и всё, что ей нужно, помещается сюда.
*/

:root {
  --sand: #FDF8F0;
  --sand-deep: #F3E7D3;
  --surface: #FBF3E7;
  --ink: #241C15;
  --ink-soft: #5C4C3C;
  --muted: #7C6A57;
  --gold: #B07D0B;
  --gold-bright: #DE9A2D;
  --line: #E0D2BC;
  --dark: #1B1815;
  --dark-soft: #2A241E;
  --dark-line: #3A322A;
  --shadow: 0 18px 44px rgba(46, 33, 18, .14);
  --radius: 18px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 17px/1.62 "Inter", "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--gold); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ─────────────────────────── первый экран ─────────────────────────── */

.hero {
  position: relative;
  min-height: min(92svh, 860px);
  display: flex;
  align-items: flex-end;
  padding: 0 0 clamp(48px, 7vw, 96px);
  overflow: hidden;
  background: #0E1418;
}

/*
  Фон вынесен отдельным слоем и двигается трансформом: background-attachment: fixed
  на iOS сломан, а перерисовывать фон прокруткой дороже, чем сдвинуть готовый слой.
  Высота с запасом сверху и снизу — иначе при сдвиге снизу вылезет пустота.
*/
.hero__bg {
  position: absolute; inset: -12% 0 -12% 0;
  background-image: image-set(url("/assets/gen/bg-hero.webp?v=1") 1x);
  background-size: cover;
  background-position: center 58%;
  will-change: transform;
}
@media (max-width: 760px) {
  .hero__bg { background-image: url("/assets/gen/bg-hero-sm.webp?v=1"); background-position: 62% 55%; }
}

.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10, 13, 16, .92) 0%, rgba(10, 13, 16, .55) 38%, rgba(10, 13, 16, .12) 70%),
    linear-gradient(to right, rgba(10, 13, 16, .88) 0%, rgba(10, 13, 16, .66) 34%, rgba(10, 13, 16, .12) 74%, rgba(10, 13, 16, 0) 100%);
}

.hero__inner { position: relative; width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(20px, 4vw, 40px); }
.brand__mark { border-radius: 11px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.brand__name {
  color: #F6EEDF; font-weight: 600; font-size: 22px; letter-spacing: .01em;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 16ch;
  color: #FFF8EC;
  font-size: clamp(34px, 6.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -.022em;
  font-weight: 700;
  text-wrap: balance;
}

.lede {
  margin: 0 0 30px;
  max-width: 48ch;
  color: #E7DCCB;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.6;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.btn--gold { background: var(--gold-bright); color: #241905; }
.btn--gold:hover { background: #EBA93C; transform: translateY(-1px); }
.btn--ghost { color: #F1E6D4; border-color: rgba(241, 230, 212, .5); }
.btn--ghost:hover { border-color: #F1E6D4; transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ─────────────────────────── полосы разделов ─────────────────────────── */

.band { padding: clamp(60px, 8.5vw, 116px) 0; }
.band--light { background: var(--sand); }
.band--sand { background: var(--sand-deep); }
.band--dark { background: var(--dark); color: #EFE4D3; }
.band--dark .kicker { color: var(--gold-bright); }
.band--dark .say { color: #CBBCA7; }
.band--dark .shot img { box-shadow: 0 20px 48px rgba(0, 0, 0, .5); }
.band--dark figcaption { color: #9C8E7C; }

.kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.14;
  letter-spacing: -.018em;
  font-weight: 700;
  max-width: 22ch;
  text-wrap: balance;
}

.say { margin: 0 0 16px; max-width: 62ch; color: var(--ink-soft); }
.say--wide { max-width: 72ch; }

/* ─────────────────────────── снимки ─────────────────────────── */

.shot { margin: 28px 0 0; }
.shot img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #EFE6D6;
}
.shot--wide img { border-radius: clamp(12px, 1.6vw, 22px); }
.shot figcaption {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--muted);
}

.shot--phone img { max-width: 340px; margin-inline: auto; border-radius: 26px; }
.shot--tall img { max-width: 420px; }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); margin-top: 30px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid .shot { margin: 0; }

.wrap--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 60px);
  align-items: center;
}
.wrap--split .shot { margin: 0; }
.wrap--narrowpic { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }

/* ─────────────────────────── карточки ─────────────────────────── */

.grid--cards { margin-bottom: 8px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
}
.card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 650; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ─────────────────────────── заявка ─────────────────────────── */

.band--apply {
  background:
    radial-gradient(120% 90% at 18% 0%, #FBE9CB 0%, rgba(251, 233, 203, 0) 62%),
    var(--sand-deep);
}
.wrap--form { max-width: 900px; }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFDF8;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(222, 154, 45, .22);
}
.field textarea { resize: vertical; min-height: 110px; }

/* Поле-ловушка: не display:none — часть роботов такие поля пропускает. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* .field выше задаёт колонку — здесь строка, иначе кнопка и подпись встают столбиком по центру. */
.form__foot { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
.form__note { margin: 0; font-size: 15px; color: var(--muted); }
.form__note--bad { color: #A33A25; }
.form__note--good { color: #2E6B3A; }
.btn[disabled] { opacity: .55; cursor: default; }

/* ─────────────────────────── подвал ─────────────────────────── */

.foot { background: var(--dark); color: #B7A994; padding: 44px 0; }
.foot p { margin: 0 0 6px; }
.foot__small { font-size: 14.5px; color: #8B7E6D; }

/* ─────────────────────────── узкий экран ─────────────────────────── */

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 .shot:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap, .hero__inner { width: min(var(--wrap), 100% - 32px); }
  .grid--2, .grid--3, .wrap--split, .form { grid-template-columns: minmax(0, 1fr); }
  .grid--3 .shot:last-child { grid-column: auto; }
  .hero { min-height: 88svh; align-items: flex-end; }
  h2 { max-width: none; }
  /* Картинку в парных блоках ставим после текста, а не над ним. */
  .wrap--split .shot { order: 2; }
  .wrap--split .col:not(.shot) { order: 1; }
  .shot--tall img, .shot--phone img { max-width: 300px; }
}
