/* Inter (variable) — свой хостинг, без Google Fonts */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f1f0;
  --paper: #f5f1f0;
  --ink: #111111;
  --muted: #5f5b58;
  --line: #2b2b2b;
  --line-soft: #cfc9c5;
  --error: #a3261c;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 50px;          /* левая вертикальная полоса рамки */
  --pad: 42px;           /* отступ контента от полосы */
  --frame-gap: 24px;     /* отступ рамки от краёв окна */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* ---------- Рамка ---------- */
.frame {
  position: relative;
  max-width: 1320px;
  min-height: calc(100vh - 2 * var(--frame-gap));
  margin: var(--frame-gap) auto;
  border: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: clip;   /* не hidden — иначе ломается sticky-панель кнопок */
}
.frame::before {               /* вертикальная линия слева */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: var(--rail);
  width: 1px;
  background: var(--line);
  z-index: 2;
  pointer-events: none;
}

/* ---------- Шапка ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 46px 22px calc(var(--rail) + var(--pad));
  border-bottom: 1px solid var(--line);
}
.logo { color: var(--ink); text-decoration: none; justify-self: start; display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-weight: 700; font-size: 29px; letter-spacing: -0.02em; }
.logo__sub { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; }
.nav { display: flex; gap: 64px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 4px 0; border-bottom: 1px solid transparent; transition: border-color .15s; }
.nav a:hover, .nav a.is-active { border-bottom-color: var(--ink); }
.lang {
  justify-self: end;
  display: flex; gap: 14px;
  padding-left: 46px;
  border-left: 1px solid var(--line-soft);
  line-height: 28px;
}
.lang__btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 15px; font-weight: 500; color: #9a9591;
  border-bottom: 1px solid transparent;
  transition: color .15s;
}
.lang__btn:hover { color: var(--ink); }
.lang__btn.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Экраны ---------- */
main { flex: 1; display: flex; }
.screen { display: none; width: 100%; }
.screen.is-visible { display: grid; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Типографика ---------- */
.title-xl { font-size: clamp(40px, 5vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 28px; }
.title-q  { font-size: clamp(26px, 3vw, 38px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 20px; }
.lead { font-size: 20px; line-height: 1.5; max-width: 22em; margin: 0 0 16px; }
.meta { font-size: 14px; color: var(--muted); margin: 0 0 40px; }

/* Текстовая кнопка с подчёркиванием */
.link-btn {
  background: none; border: 0; padding: 0 0 8px; cursor: pointer;
  font-size: 20px; font-weight: 600;
  border-bottom: 2px solid var(--ink);
  transition: opacity .15s;
}
.link-btn:hover { opacity: .6; }
.link-btn:disabled { opacity: .25; cursor: default; }

/* Чёрная кнопка */
.btn {
  background: var(--ink); color: var(--paper);
  border: 0; cursor: pointer;
  font-size: 20px; font-weight: 600;
  min-width: 192px; padding: 15px 36px;
  transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: default; }

.pill { display: inline-block; font-size: 15px; padding: 5px 14px; border: 1px solid var(--ink); border-radius: 999px; margin-bottom: 26px; }

/* ---------- Главная / Спасибо ---------- */
.screen--hero { grid-template-columns: minmax(380px, 1fr) 1.15fr; }
.hero__text {
  position: relative;
  padding: 200px 32px 72px calc(var(--rail) + var(--pad));
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
.badge { position: absolute; top: 40px; left: calc(var(--rail) + var(--pad)); width: 136px; height: 136px; fill: var(--ink); }
.badge__txt { font-size: 8px; letter-spacing: 1.3px; font-family: var(--font); }
.badge__shirt { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.hero__media { position: relative; min-height: 560px; }
.hero__media img {
  position: absolute; inset: 0;
  height: 100%; width: 100%;
  object-fit: cover; object-position: 60% 12%;
  /* плавный переход фото в фон слева */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%);
          mask-image: linear-gradient(to right, transparent 0, #000 12%);
}
.hero__media--done img { object-position: center; }

/* Единая приглушённая «плёночная» обработка всех фото */
.hero__media img, .q__media img { filter: saturate(0.72) sepia(0.12) contrast(0.98); }

/* ---------- Вопрос ---------- */
.screen--question { padding: 40px 42px 40px calc(var(--rail) + var(--pad)); }
.q { display: flex; flex-direction: column; width: 100%; }
.q__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; font-size: 17px; }
.q__type { display: inline-block; font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.q__count { font-variant-numeric: tabular-nums; }
.q__grid { display: grid; grid-template-columns: 1fr minmax(280px, 400px); gap: 20px 48px; align-items: start; }
.q__hint { margin: -6px 0 22px; color: var(--muted); font-size: 16px; }
.q__hint:empty { display: none; }
.q__media { display: flex; flex-direction: column; gap: 16px; }
.q__media img { width: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.q__media img + img { aspect-ratio: 9 / 4; }
.q__wide { grid-column: 1 / -1; }
.q__wide:empty { display: none; }

/* Варианты ответа */
.options { display: flex; flex-direction: column; gap: 4px; }
.option { display: flex; align-items: center; gap: 24px; padding: 9px 0; cursor: pointer; font-size: 19px; line-height: 1.35; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__mark {
  flex: none; width: 26px; height: 26px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center;
  transition: background .15s;
}
.option__mark::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .15s; }
.option--multi .option__mark { border-radius: 4px; }
.option--multi .option__mark::after { border-radius: 2px; }
.option input:checked + .option__mark::after { transform: scale(1); }
.option input:focus-visible + .option__mark { outline: 2px solid var(--ink); outline-offset: 3px; }
.option:hover .option__mark { background: rgba(0,0,0,.05); }
.option.is-disabled { opacity: .35; cursor: default; }

.other-input {
  margin: 4px 0 6px 50px; width: calc(100% - 50px); max-width: 440px;
  font: inherit; font-size: 17px; padding: 10px 12px;
  border: 1px solid var(--ink); background: transparent; color: inherit; border-radius: 0;
}
.other-input[hidden] { display: none; }

textarea.free {
  width: 100%; min-height: 150px; margin-top: 8px;
  font: inherit; font-size: 19px; padding: 18px 18px;
  color: inherit; background: transparent;
  border: 1px solid var(--line); border-radius: 0; resize: vertical;
}
textarea.free::placeholder, .other-input::placeholder { color: #8e8986; }
textarea.free:focus, .other-input:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

.q__error { color: var(--error); font-size: 15px; margin: 18px 0 0; }

.q__nav {
  position: sticky; bottom: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 36px; padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.screen--question { padding-bottom: 0 !important; }
.q__media img { max-height: 58vh; }
.q__media img + img { max-height: 22vh; }
@media (max-height: 940px) and (min-width: 761px) {
  .q__media img + img { display: none; }
}
/* Запас снизу под плашку хостинга (появляется только если она есть) */
body.has-host-badge .q__nav { padding-bottom: 80px; }
body.has-host-badge .hero__text { padding-bottom: 96px; }

/* ---------- Простые страницы ---------- */
.screen--page { padding: 64px 42px 64px calc(var(--rail) + var(--pad)); }
.page { max-width: 760px; display: flex; flex-direction: column; align-items: flex-start; }
.page .q__type { margin-bottom: 32px; }
.page .lead { max-width: 32em; }
.page .btn { margin-top: 24px; }

/* ---------- Планшет ---------- */
@media (max-width: 1024px) {
  .nav { gap: 32px; }
  .lang { padding-left: 24px; }
  .q__grid { grid-template-columns: 1fr 300px; }
}

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
  :root { --rail: 0px; --pad: 18px; --frame-gap: 0px; }
  body { font-size: 16px; }
  .frame { border: 0; min-height: 100vh; }
  .frame::before { display: none; }

  .site-header { grid-template-columns: 1fr auto; row-gap: 14px; padding: 16px 18px; }
  .logo__name { font-size: 24px; }
  .logo__sub { font-size: 11px; }
  .nav { grid-column: 1 / -1; grid-row: 2; gap: 24px; }
  .lang { padding-left: 16px; }

  .screen--hero { grid-template-columns: 1fr; }
  .hero__media { order: -1; min-height: 0; height: 40vh; }
  .hero__media img { -webkit-mask-image: none; mask-image: none; object-position: center 20%; }
  .hero__media--done img { object-position: 60% 50%; }
  .hero__text { padding: 28px 18px 40px; justify-content: flex-start; }
  .badge { display: none; }
  .lead { font-size: 18px; }

  .screen--question { padding: 22px 18px 28px; }
  .q__grid { grid-template-columns: 1fr; }
  .q__media { order: -1; }
  .q__media img { aspect-ratio: 16 / 10; }
  .q__media img + img { display: none; }
  .option { font-size: 17px; gap: 16px; }
  .other-input { margin-left: 42px; width: calc(100% - 42px); }
  .q__nav { position: sticky; bottom: 0; background: var(--paper); padding: 16px 0; margin-top: 24px; }
  .btn { min-width: 0; padding: 14px 28px; font-size: 18px; }
  .link-btn { font-size: 18px; }

  .screen--page { padding: 36px 18px; }
}
