/* =========================================================================
   Cardoso Engineering — premium quiz/landing styling
   Brand palette taken from cardoso.ae:
     - sage / primary:   #5C6F69
     - mint background:  #DFECE7
     - deep dark green:  #1A2520
   Typography (free Google Fonts substitutes for Cardoso's paid Typekit):
     - Playfair Display (serif)  — заголовки      ≈ miller-display
     - Inter (sans-serif)        — текст/UI       ≈ elza
   ========================================================================= */

:root {
  --c-bg:           #ffffff;
  --c-bg-alt:       #f7f4ef;   /* warm cream — мягкий фон для секций */
  --c-bg-mint:      #dfece7;   /* брендовый светло-мятный */
  --c-bg-dark:      #1a2520;   /* премиум deep dark green */
  --c-text:         #1a2520;
  --c-text-body:    #3d4844;
  --c-text-muted:   #6b7975;
  --c-text-onDark:  #f3f1ec;
  --c-text-onMint:  #1a2520;
  --c-brand:        #5c6f69;
  --c-brand-hover:  #475651;
  --c-border:       #e5eae7;
  --c-border-strong:#c9d2cd;
  --c-accent-gold:  #b89968;   /* лёгкий золотистый акцент */
  --c-whatsapp:     #25d366;
  --c-whatsapp-h:   #1ebe5b;
  --c-success:      #5c6f69;
  --c-danger:       #b14747;

  --shadow-sm: 0 1px 2px rgba(26, 37, 32, 0.05);
  --shadow-md: 0 8px 28px rgba(26, 37, 32, 0.08);
  --shadow-lg: 0 22px 60px rgba(26, 37, 32, 0.14);

  --radius-sm: 4px;
  --radius:    10px;
  --radius-lg: 18px;

  --container:   1280px;
  --container-n: 1080px;

  --font-serif: "Playfair Display", "Times New Roman", Times, serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ----------- Reset & base ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text-body);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--c-brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--c-brand-hover); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.12; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.25; }
p  { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--c-brand);
  vertical-align: middle;
  margin-right: 12px;
  transform: translateY(-2px);
}

.container { width: 100%; max-width: var(--container); padding: 0 28px; margin: 0 auto; }
.container--narrow { max-width: var(--container-n); }

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--dark { background: var(--c-bg-dark); color: var(--c-text-onDark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--mint { background: var(--c-bg-mint); color: var(--c-text-onMint); }
.section--cream { background: var(--c-bg-alt); }

/* ----------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--c-brand);
  color: #fff;
  text-decoration: none;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--c-brand-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
.btn--ghost:hover { background: var(--c-text); color: #fff; border-color: var(--c-text); }
.btn--onDark { background: #fff; color: var(--c-text); }
.btn--onDark:hover { background: var(--c-bg-mint); color: var(--c-text); }
.btn--whatsapp { background: var(--c-whatsapp); }
.btn--whatsapp:hover { background: var(--c-whatsapp-h); }
.btn--large { padding: 20px 44px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

/* ----------- Header / Nav ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--c-text);
  text-transform: uppercase;
}
.brand:hover { color: var(--c-text); }
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--c-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--c-brand);
}
.brand__sub {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--c-text-muted);
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}
.nav { display: inline-flex; gap: 28px; align-items: center; }
.nav a { color: var(--c-text); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.nav a:hover { color: var(--c-brand); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lang-switch a, .lang-switch span { padding: 4px 6px; color: var(--c-text-muted); }
.lang-switch .is-active { color: var(--c-text); font-weight: 600; }

@media (max-width: 800px) {
  .nav { display: none; }
  .site-header__inner { height: 64px; }
}

/* ----------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  background-color: #1a2520;
  background-image:
    linear-gradient(180deg, rgba(26, 37, 32, 0.55) 0%, rgba(26, 37, 32, 0.78) 100%),
    url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=2000&q=80");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
/* hero__inner делит контейнер с .container — задаём ТОЛЬКО вертикальный padding,
   чтобы не обнулять горизонтальный padding контейнера через shorthand. */
.hero__inner { position: relative; z-index: 2; padding-top: 140px; padding-bottom: 120px; max-width: 920px; }
.hero h1 { color: #fff; margin-bottom: 24px; }
.hero p.lead {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: rgba(243, 241, 236, 0.92);
  max-width: 680px;
  margin-bottom: 36px;
}
.hero .eyebrow { color: #d4dfd8; }
.hero .eyebrow::before { background: #d4dfd8; }
.hero__cta { display: inline-flex; flex-wrap: wrap; gap: 14px; }
.hero__meta {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  color: rgba(243, 241, 236, 0.85);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero__meta strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 32px;
  color: #fff;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 4px;
}

/* ----------- Generic sections / cards ----------------------------------- */
.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--c-text-muted); font-size: 18px; }
.section--dark .section-head p { color: rgba(243, 241, 236, 0.78); }

.grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--c-border-strong); box-shadow: var(--shadow-md); }
.card__num {
  display: inline-flex;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-brand);
  align-items: center; justify-content: center;
  color: var(--c-brand);
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; font-size: 22px; }
.card p { color: var(--c-text-muted); margin: 0; font-size: 15px; line-height: 1.55; }

.section--dark .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--c-text-onDark);
}
.section--dark .card p { color: rgba(243, 241, 236, 0.7); }
.section--dark .card__num { border-color: rgba(255, 255, 255, 0.5); color: #fff; }

/* ----------- "Why us" stats --------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.stat {
  padding: 36px 28px;
  background: var(--c-bg-mint);
  border-radius: var(--radius-lg);
  text-align: center;
}
.stat__num {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1;
  color: var(--c-text);
  margin-bottom: 8px;
}
.stat__label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-text-body);
}

/* ----------- Process steps ---------------------------------------------- */
.steps { counter-reset: step; }
.steps__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps__item {
  position: relative;
  padding: 28px;
  border-left: 1px solid var(--c-border-strong);
  background: var(--c-bg);
}
.steps__item::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--c-brand);
  opacity: 0.6;
}
.steps__item h4 { margin: 0 0 6px; }
.steps__item p { margin: 0; color: var(--c-text-muted); font-size: 14px; }

/* ----------- Final landing CTA block ------------------------------------ */
.final-cta {
  background: var(--c-bg-dark);
  color: var(--c-text-onDark);
  padding: 96px 28px;
  border-radius: 0;
  text-align: center;
}
.final-cta h2 { color: #fff; max-width: 760px; margin: 0 auto 18px; }
.final-cta p { max-width: 600px; margin: 0 auto 32px; color: rgba(243, 241, 236, 0.82); font-size: 18px; }

/* ----------- Footer ----------------------------------------------------- */
.site-footer {
  background: #11181a;
  color: rgba(243, 241, 236, 0.6);
  padding: 56px 0 36px;
  font-size: 14px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.site-footer a { color: rgba(243, 241, 236, 0.78); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(243, 241, 236, 0.12);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(243, 241, 236, 0.5);
}
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; gap: 12px; }
}

/* =========================================================================
   QUIZ
   ========================================================================= */
.quiz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(92, 111, 105, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(223, 236, 231, 0.55), transparent 60%),
    #fafaf7;
}
.quiz-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 80px;
}
.quiz {
  width: 100%;
  max-width: 760px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 56px 56px;
}
@media (max-width: 600px) {
  .quiz { padding: 32px 22px 36px; border-radius: 14px; }
  .quiz-shell { padding: 32px 16px 60px; }
}

.quiz__progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.quiz__bar {
  height: 3px;
  background: var(--c-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 36px;
}
.quiz__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--c-brand);
  transition: width .35s cubic-bezier(.4,.0,.2,1);
}

.quiz__step { display: none; animation: fadeIn .4s ease both; }
.quiz__step.is-active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.quiz__step h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-bottom: 10px;
}
.quiz__step .hint {
  color: var(--c-text-muted);
  margin-bottom: 28px;
  font-size: 15px;
}

.options { display: grid; gap: 12px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  color: var(--c-text);
  transition: border-color .2s ease, background .2s ease, transform .15s ease;
  text-align: left;
  width: 100%;
}
.option:hover { border-color: var(--c-brand); background: #f6faf8; }
.option.is-selected {
  border-color: var(--c-brand);
  background: var(--c-bg-mint);
  color: var(--c-text);
}
.option .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border-strong);
  position: relative;
  transition: border-color .2s ease, background .2s ease;
}
.option.is-selected .check { border-color: var(--c-brand); background: var(--c-brand); }
.option.is-selected .check::after {
  content: "";
  position: absolute;
  top: 6px; left: 7px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.option__text { flex: 1; }
.option__tag {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  background: var(--c-bg-alt);
  padding: 4px 10px;
  border-radius: 999px;
}

.quiz__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 14px;
}
.quiz__back {
  background: none;
  border: 0;
  padding: 10px 4px;
  color: var(--c-text-muted);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quiz__back:hover { color: var(--c-text); }
.quiz__back[disabled] { visibility: hidden; }
.quiz__next { min-width: 180px; }
.quiz__next[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ----------- Result / contact step -------------------------------------- */
.result-card {
  background: var(--c-bg-dark);
  color: var(--c-text-onDark);
  padding: 32px 32px 36px;
  border-radius: 14px;
  margin: 4px 0 28px;
}
.result-card .label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, 0.7);
  margin-bottom: 10px;
}
.result-card .estimate {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.result-card .estimate small {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, 0.6);
  margin-top: 6px;
}
.result-card .note {
  font-size: 14px;
  color: rgba(243, 241, 236, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  margin-top: 18px;
}

.form-row { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.field input {
  background: #fff;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(92, 111, 105, 0.15);
}
.field--error input,
.field--error select,
.field--error .phone-row { border-color: var(--c-danger); }
.field__error { color: var(--c-danger); font-size: 13px; min-height: 16px; }
.field__hint { color: var(--c-text-muted); font-size: 13px; margin-top: 4px; }

/* Country select */
.select-country {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  padding: 14px 40px 14px 16px;
  font: inherit;
  color: var(--c-text);
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%235c6f69' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.select-country:focus {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(92, 111, 105, 0.15);
}

/* Phone row: префикс-чип + цифровой инпут */
.phone-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.phone-row:focus-within {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(92, 111, 105, 0.15);
}
.phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: var(--c-bg-mint);
  color: var(--c-text);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-right: 1px solid var(--c-border-strong);
  font-variant-numeric: tabular-nums;
}
.phone-input {
  flex: 1;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 14px 16px !important;
  background: transparent;
  font-variant-numeric: tabular-nums;
  outline: none !important;
  box-shadow: none !important;
}
.phone-input:focus { box-shadow: none !important; }
.quiz__submit[disabled] { opacity: 0.45; cursor: not-allowed; }

.consent {
  margin-top: 18px;
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.5;
}
.consent a { color: var(--c-text-muted); border-bottom: 1px dotted currentColor; }

.quiz__submit { margin-top: 22px; width: 100%; }

/* ----------- Thank you step --------------------------------------------- */
.thanks { text-align: center; padding: 32px 4px; }
.thanks__icon {
  width: 72px; height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--c-bg-mint);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-brand);
  font-family: var(--font-serif);
  font-size: 36px;
}
.thanks h2 { margin-bottom: 14px; }
.thanks p { color: var(--c-text-muted); margin-bottom: 24px; }
.thanks__actions { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.thanks .result-card { text-align: left; margin: 0 0 28px; }
.thanks__cta-text {
  max-width: 540px;
  margin: 0 auto 22px;
  color: var(--c-text);
  font-size: 17px;
  line-height: 1.55;
}
.thanks__followup {
  margin-top: 28px !important;
  font-size: 13px;
  color: var(--c-text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ----------- Misc utilities --------------------------------------------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

/* =========================================================================
   RESPONSIVE — tablet → phone (iPhone 11 / 12 / 13 / SE)
   Breakpoints:
     ≤960  tablet
     ≤640  large phone (iPhone 11/12/13/14 Pro Max)
     ≤420  standard iPhone width (375–414)
     ≤360  narrow phones (iPhone SE 1, small Android)
   ========================================================================= */

/* ----- Tablet ----- */
@media (max-width: 960px) {
  .container { padding: 0 22px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 48px; }
  .hero__inner { padding-top: 120px; padding-bottom: 100px; max-width: none; }
  .hero__meta { gap: 32px; margin-top: 44px; }
}

/* ----- Header: hide nav links entirely on mid breakpoint ----- */
@media (max-width: 900px) {
  .nav { display: none; }
  .site-header__inner { height: 64px; }
}

/* ----- Large phone (iPhone 11/12/13/14 + Plus/Pro Max ≤ 640px) ----- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  /* Базовый padding 28px остаётся — этого достаточно для воздуха по краям. */

  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head p { font-size: 16px; }

  /* Header */
  .site-header__inner { gap: 12px; }
  .brand { font-size: 17px; gap: 8px; letter-spacing: 0.05em; }
  .brand__mark { width: 26px; height: 26px; font-size: 12px; }
  .brand__sub { display: none; }   /* subtitle ENGINEERING — лишний на узких */
  .lang-switch { font-size: 12px; }
  .lang-switch a, .lang-switch span { padding: 4px; }

  /* Hero */
  .hero { min-height: 0; }
  .hero__inner { padding-top: 96px; padding-bottom: 84px; max-width: 100%; }
  .hero h1 {
    font-size: 30px;
    line-height: 1.16;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
  }
  .hero p.lead { font-size: 15.5px; line-height: 1.55; margin-bottom: 28px; }
  .hero__cta { display: flex; flex-direction: column; gap: 12px; width: 100%; }
  .hero__cta .btn { width: 100%; }
  .hero__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
    margin-top: 36px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .hero__meta > div:nth-child(3) { grid-column: 1 / -1; }
  .hero__meta strong { font-size: 22px; margin-bottom: 2px; }

  /* Buttons */
  .btn { padding: 14px 24px; font-size: 14px; }
  .btn--large { padding: 16px 28px; font-size: 15px; }

  /* Sections */
  .stats { gap: 16px; }
  .stat { padding: 28px 22px; }
  .stat__num { font-size: 40px; }
  .stat__label { font-size: 11px; letter-spacing: 0.12em; }

  .grid { gap: 18px; }
  .card { padding: 26px 22px; }
  .card h3 { font-size: 20px; }

  .steps__list { gap: 12px; }
  .steps__item { padding: 22px 20px; }
  .steps__item::before { font-size: 18px; top: 18px; right: 18px; }

  .final-cta { padding: 64px 18px; }
  .final-cta h2 { font-size: 26px; line-height: 1.2; }
  .final-cta p { font-size: 15px; }

  /* Footer */
  .site-footer { padding: 48px 0 32px; }
  .site-footer__inner { gap: 28px; }

  /* ----- Quiz ----- */
  .quiz-shell { padding: 24px 14px 56px; }
  .quiz { padding: 28px 20px 32px; border-radius: 14px; }
  .quiz__progress { font-size: 11px; letter-spacing: 0.08em; flex-wrap: wrap; gap: 6px; }
  .quiz__bar { margin-bottom: 24px; }
  .quiz__step h2 { font-size: 22px; line-height: 1.2; }
  .quiz__step .hint { font-size: 14px; margin-bottom: 22px; }

  .option { padding: 14px 16px; font-size: 15px; gap: 10px; }
  .option__tag { font-size: 10px; padding: 3px 8px; }
  .option .check { width: 20px; height: 20px; }
  .option.is-selected .check::after { top: 5px; left: 6px; width: 4px; height: 8px; }

  .quiz__actions { margin-top: 22px; gap: 10px; }
  .quiz__next { min-width: 0; flex: 1; padding: 14px 18px; font-size: 14px; }
  .quiz__back { font-size: 12px; padding: 10px 2px; }

  /* Contact form */
  .field input,
  .select-country { padding: 13px 14px; font-size: 16px; }   /* font 16+ — iOS не зумит */
  .select-country { padding-right: 38px; background-position: right 12px center; }
  .phone-row { border-radius: 10px; }
  .phone-prefix { padding: 0 12px; font-size: 15px; }
  .phone-input { padding: 13px 14px !important; font-size: 16px !important; }
  .field label { font-size: 11px; letter-spacing: 0.1em; }
  .field__hint { font-size: 12px; }

  .quiz__submit { padding: 16px 20px; font-size: 15px; }
  .consent { font-size: 11px; line-height: 1.5; }

  /* Thank-you */
  .thanks { padding: 12px 0; }
  .thanks__icon { width: 60px; height: 60px; font-size: 28px; margin-bottom: 18px; }
  .thanks h2 { font-size: 22px; }
  .result-card { padding: 22px 20px 24px; }
  .result-card .estimate { font-size: 26px; line-height: 1.15; }
  .result-card .label { font-size: 10px; letter-spacing: 0.16em; }
  .result-card .note { font-size: 13px; padding-top: 14px; margin-top: 14px; }
  .thanks__cta-text { font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
  .thanks__actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
  .thanks__actions .btn { width: 100%; }
  .thanks__followup { font-size: 12px; margin-top: 22px !important; }
}

/* ----- Standard iPhone (375 – 420) ----- */
@media (max-width: 420px) {
  .container { padding: 0 22px; }       /* немного меньше для маленьких экранов */
  .hero__inner { padding-top: 92px; padding-bottom: 80px; }
  .hero h1 { font-size: 26px; line-height: 1.2; }
  .hero p.lead { font-size: 15px; }
  .hero__meta { gap: 14px 18px; }
  .hero__meta strong { font-size: 20px; }

  .quiz-shell { padding: 18px 14px 48px; }
  .quiz { padding: 24px 18px 28px; }
  .quiz__step h2 { font-size: 20px; }

  .option { padding: 13px 14px; font-size: 14px; }
  .option__text { line-height: 1.35; }

  .phone-prefix { padding: 0 10px; font-size: 14px; }

  .stat__num { font-size: 34px; }
  .card { padding: 22px 18px; }
  .final-cta { padding: 56px 18px; }
  .final-cta h2 { font-size: 22px; }
}

/* ----- Narrow phones (iPhone SE, small Android ≤ 360) ----- */
@media (max-width: 360px) {
  .container { padding: 0 18px; }
  .hero h1 { font-size: 23px; }
  .hero p.lead { font-size: 14.5px; }
  .quiz__step h2 { font-size: 18px; }
  .quiz { padding: 22px 14px 26px; }
  .option { padding: 12px 12px; gap: 8px; }
  .option__tag { display: none; }
  .phone-prefix { padding: 0 8px; font-size: 13px; }
  .phone-input { padding: 12px 12px !important; }
  .result-card .estimate { font-size: 22px; }
}
