/* ============ Design tokens ============ */
:root {
  --ink: #1c2733;
  --ink-soft: #4a5a68;
  --primary: #2456a6;
  --primary-dark: #1a4080;
  --accent: #e8590c;
  --accent-dark: #c94a08;
  --bg: #faf8f5;
  --card: #ffffff;
  --line: #e8e2d9;
  --ok: #2f9e44;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(28, 39, 51, .08);
  --shadow-lg: 0 10px 32px rgba(28, 39, 51, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  /* space for the sticky mobile bar */
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

img, video { max-width: 100%; display: block; }

.hidden { display: none !important; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(232, 89, 12, .35); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--call { background: var(--primary); color: #fff; }
.btn--call:hover { background: var(--primary-dark); }
.btn--ghost { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink-soft); }
.btn--xl { width: 100%; font-size: 1.05rem; padding: 16px 22px; }

/* ============ Header ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.header__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.header__logo { font-size: 1.7rem; }
.header__text { display: flex; flex-direction: column; line-height: 1.2; }
.header__name { font-weight: 800; font-size: 1.02rem; }
.header__loc { font-size: .78rem; color: var(--ink-soft); }
.header__right { display: flex; align-items: center; gap: 10px; }
.header__status {
  display: none;
  font-size: .82rem; font-weight: 700; color: var(--ok);
  background: #e9f7ec; border: 1px solid #bfe6c8;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.lang-switch { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  border: none; background: transparent; padding: 7px 12px;
  font-size: .8rem; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.lang-switch button.active { background: var(--primary); color: #fff; }

/* ============ Hero ============ */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(20, 32, 48, .78), rgba(20, 32, 48, .86)),
    url("../img/hero.jpg") center / cover no-repeat,
    linear-gradient(135deg, #24344a, #1a2a3d);
  color: #fff;
  padding: 56px 0 64px;
}
.hero__title { font-size: clamp(1.55rem, 5.5vw, 2.6rem); font-weight: 800; line-height: 1.2; max-width: 720px; }
.hero__sub { margin: 16px 0 24px; font-size: clamp(1rem, 3.5vw, 1.2rem); color: #dfe7f0; max-width: 640px; }
.hero .btn--primary { max-width: 480px; }
.hero__badges {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px;
}
.hero__badges li {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
}

/* ============ Sections ============ */
.section { padding: 56px 0; }
.section__title { font-size: clamp(1.35rem, 4.5vw, 2rem); font-weight: 800; text-align: center; }
.section__sub { text-align: center; color: var(--ink-soft); margin: 10px auto 0; max-width: 560px; }

/* ============ Advantages ============ */
.advantages__grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px;
}
.card__icon { font-size: 1.9rem; margin-bottom: 10px; }
.card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.card p { color: var(--ink-soft); font-size: .95rem; }

/* ============ Quiz ============ */
.quiz { background: linear-gradient(180deg, #f2ede5, var(--bg)); }
.quiz__card {
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-width: 560px; margin: 28px auto 0; padding: 26px 22px 22px;
}
.quiz__progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.quiz__bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.quiz__step-label { text-align: right; font-size: .8rem; color: var(--ink-soft); margin: 8px 0 4px; }
.quiz__q { font-size: 1.12rem; margin-bottom: 14px; }
.option {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
  min-height: 48px;
}
.option:hover { border-color: var(--primary); }
.option:has(input:checked) { border-color: var(--accent); background: #fff4ec; }
.option input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 1.05rem; background: #fff; color: var(--ink);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 89, 12, .15); }
.quiz__next, #quiz-submit { width: 100%; margin-top: 6px; }
.quiz__nav { display: flex; gap: 10px; margin-top: 6px; }
.quiz__nav .btn--ghost { flex: 0 0 auto; }
.quiz__nav .btn--primary, .quiz__nav #quiz-submit { flex: 1; }
.quiz__consent { font-size: .78rem; color: var(--ink-soft); margin-top: 10px; }
.quiz__success { text-align: center; padding: 12px 0; }
.quiz__success-icon { font-size: 2.6rem; margin-bottom: 8px; }
.quiz__success h3 { margin-bottom: 8px; }
.quiz__success p { color: var(--ink-soft); margin-bottom: 16px; }
.quiz__error { color: #c92a2a; font-size: .9rem; text-align: center; margin-top: 12px; }

/* ============ Production ============ */
.production { background: var(--card); border-block: 1px solid var(--line); }
.production__media { margin-top: 28px; display: grid; gap: 20px; }
.production__video video { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 16/9; object-fit: cover; }
.production__video figcaption, .production__photos figcaption {
  font-size: .82rem; color: var(--ink-soft); margin-top: 8px; text-align: center;
}
.production__photos { display: grid; grid-template-columns: 1fr; gap: 16px; }
.production__photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); background: #efe9e0; }
.img-missing img { display: none; }
.img-missing::before {
  content: "📷"; display: grid; place-items: center;
  aspect-ratio: 4/3; border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #efe9e0, #efe9e0 12px, #e7e0d5 12px, #e7e0d5 24px);
  font-size: 2rem;
}

/* ============ Location ============ */
.location__grid { display: grid; gap: 20px; margin-top: 28px; }
.location__map iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }
.location__info p { color: var(--ink-soft); margin-bottom: 16px; }
.location__tech h3 { margin-bottom: 6px; }
.location__tech p { margin-bottom: 14px; }

/* ============ Footer ============ */
.footer { background: var(--ink); color: #cfd8e0; padding: 28px 0; }
.footer__inner { text-align: center; }
.footer__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.footer__links a, .footer__links button {
  color: #cfd8e0; background: none; border: none; font-size: .92rem;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.footer__links a:hover, .footer__links button:hover { color: #fff; text-decoration: underline; }
.footer__copy { font-size: .8rem; color: #8fa0b0; }

/* ============ Sticky mobile bar ============ */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(28, 39, 51, .1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sticky-bar__btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; padding: 6px 4px;
  font-size: .72rem; font-weight: 700; color: var(--ink);
  text-decoration: none; border-right: 1px solid var(--line);
}
.sticky-bar__btn:last-child { border-right: none; }
.sticky-bar__btn > span { font-size: .78rem; }
.sticky-bar__btn--viber { color: #7360f2; }
.sticky-bar__btn--tg { color: #229ed9; }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 28, 38, .6); }
.modal__card {
  position: relative; background: #fff; border-radius: var(--radius);
  max-width: 480px; width: 100%; padding: 24px; box-shadow: var(--shadow-lg);
  max-height: 80vh; overflow: auto;
}
.modal__card h3 { margin-bottom: 10px; }
.modal__card p { color: var(--ink-soft); font-size: .92rem; }
.modal__close {
  position: absolute; top: 10px; right: 12px;
  border: none; background: none; font-size: 1.2rem; cursor: pointer; color: var(--ink-soft);
}

/* ============ Tablet ============ */
@media (min-width: 640px) {
  .advantages__grid { grid-template-columns: 1fr 1fr; }
  .production__photos { grid-template-columns: repeat(3, 1fr); }
  .location__map iframe { height: 380px; }
  .hero { padding: 72px 0 80px; }
}

/* ============ Desktop ============ */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .sticky-bar { display: none; }
  .header__status { display: inline-block; }
  .advantages__grid { grid-template-columns: repeat(3, 1fr); }
  .production__media { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .location__grid { grid-template-columns: 1.3fr 1fr; }
  .section { padding: 72px 0; }
  .btn--xl { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .quiz__bar { transition: none; }
}