/* ==========================================================================
   Сдам на 100 — лендинг репетитора по истории и обществознанию
   Палитра: глубокий фиолетовый + бирюзовый акцент (референс nicepage.com)
   ========================================================================== */

:root {
  --violet-950: #170833;
  --violet-900: #26104a;
  --violet-800: #341762;
  --violet-700: #4a2384;
  --violet-100: #f2eefb;
  --cream: #faf8fd;
  --paper: #ffffff;
  --ink: #1c1230;
  --ink-soft: #574f6e;
  --cyan: #29b7dd;
  --cyan-dark: #1c93b3;
  --purple: #6c4cf1;
  --pink: #bd72ef;
  --line: #e7e1f4;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 16px 40px rgba(37, 16, 71, .14);
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'PT Serif', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; color: var(--violet-950); margin: 0 0 .5em; line-height: 1.25; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 76px 0; }
.section-muted { background: var(--violet-100); }
.section-dark { background: linear-gradient(135deg, var(--violet-900), var(--violet-800)); }
.section-dark h2 { color: #fff; }
.section-lead { max-width: 680px; color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 32px; }
.center-cta { text-align: center; margin-top: 36px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .96rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-accent { background: var(--cyan); color: #fff; }
.btn-accent:hover { background: var(--cyan-dark); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(41,183,221,.35); }
.btn-outline { background: transparent; border-color: var(--violet-800); color: var(--violet-900); }
.btn-outline:hover { background: var(--violet-900); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--violet-900); border-color: #fff; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(23, 8, 51, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: 16px; padding: 10px 24px; max-width: 1320px; }
.logo { text-decoration: none; margin-right: auto; line-height: 1.15; flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: 42px; object-fit: contain; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-main { display: block; font-family: var(--font-head); font-size: 1.15rem; color: #fff; font-weight: 700; white-space: nowrap; }
.logo-sub { display: block; font-size: .68rem; color: #c9b8ec; letter-spacing: .01em; white-space: nowrap; }
.main-nav { display: flex; gap: 14px; flex-wrap: nowrap; }
.main-nav a { color: #e6dcfb; text-decoration: none; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.main-nav a:hover { color: var(--cyan); }
.header-cta { flex-shrink: 0; padding: 11px 20px; font-size: .88rem; }
.nav-cta-mobile { display: none; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: #fff; display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--violet-950), var(--violet-800) 65%, var(--violet-700)); color: #fff; padding: 56px 0 72px; }
.hero-blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-blobs::before, .hero-blobs::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35;
}
.hero-blobs::before { width: 420px; height: 420px; background: var(--cyan); top: -140px; right: -80px; }
.hero-blobs::after { width: 380px; height: 380px; background: var(--pink); bottom: -160px; left: -100px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--cyan); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; margin-bottom: 14px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero-sub { color: #d9cdf3; font-size: 1.05rem; max-width: 560px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 28px; }
.hero-meta .tag { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); padding: 7px 14px; border-radius: 999px; font-size: .85rem; color: #efe9fb; }
.hero-photo img { border-radius: var(--radius); box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.hero-cta-group { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Lead form ---------- */
.lead-form { padding: 0; }
.lead-form h3 { margin-bottom: 16px; font-size: 1.1rem; }
.lead-form-row { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: center; }
.lead-form-row-col { grid-template-columns: 1fr; }
.lead-form input, .lead-form select {
  padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  font-family: var(--font-body); font-size: .95rem; background: #fff; color: var(--ink);
}
.lead-form input:focus, .lead-form select:focus { outline: none; border-color: var(--cyan); }
.form-note { margin-top: 12px; font-size: .85rem; color: var(--ink-soft); }
.form-note a { color: var(--violet-800); font-weight: 600; text-decoration: underline; }
.lead-form-plain { padding: 0; margin-top: 24px; }
.consent-check {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 14px;
  font-size: .82rem; color: var(--ink-soft); cursor: pointer; line-height: 1.4;
}
.consent-check input { margin-top: 3px; flex-shrink: 0; accent-color: var(--cyan); width: 16px; height: 16px; }
.consent-check a { color: var(--violet-800); font-weight: 600; text-decoration: underline; }

/* ---------- Card grid (для кого) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; font-weight: 600; color: var(--violet-900); box-shadow: var(--shadow);
  border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--cyan), var(--purple)) 1;
  transition: transform .18s ease, box-shadow .18s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(37,16,71,.18); }
.info-card-icon {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple)); color: #fff;
}
.info-card-dark { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.info-card-dark:hover { background: rgba(255,255,255,.1); }
.check-icon {
  width: 32px; height: 32px; border-radius: 50%; margin-bottom: 12px; flex-shrink: 0;
  background: var(--cyan); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.results-grid .info-card-dark { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- Боли ---------- */
.pain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pain-card {
  position: relative; padding: 26px 24px 22px; background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--violet-900); font-size: 1.02rem; font-weight: 600; overflow: hidden;
}
.pain-quote-mark {
  display: block; font-family: var(--font-head); font-size: 3.2rem; line-height: 1; color: var(--cyan);
  opacity: .35; margin-bottom: -6px;
}

/* ---------- Решение (инфографика) ---------- */
.chain { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; padding-top: 12px; margin-top: 8px; }
.chain::before {
  content: ''; position: absolute; top: 38px; left: 8%; right: 8%; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink)); z-index: 0;
}
.chain-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.chain-step span {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 10px 22px rgba(108,76,241,.3); border: 4px solid var(--cream);
}
.chain-step-label { font-weight: 700; color: var(--violet-900); font-size: .88rem; }

/* ---------- Направления (вкладки) ---------- */
.tabs-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.tab-btn {
  padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--violet-800); background: transparent;
  color: var(--violet-900); font-weight: 600; cursor: pointer; font-family: var(--font-body); font-size: .9rem;
}
.tab-btn.active { background: var(--violet-900); color: #fff; border-color: var(--violet-900); }
.tab-panel { display: none; background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.tab-panel.active { display: block; }
.tab-panel p { margin-bottom: .7em; }

/* ---------- Форматы ---------- */
.formats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.format-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.format-card img { height: 200px; width: 100%; object-fit: cover; }
.format-card h3, .format-card p { padding: 0 22px; }
.format-card h3 { margin-top: 18px; }
.format-card p { padding-bottom: 22px; }

/* ---------- Методика (зигзаг-таймлайн) ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 10px; }
.timeline-item {
  position: relative; background: var(--paper); border-radius: var(--radius); padding: 30px 20px 20px;
  box-shadow: var(--shadow);
}
.timeline-num {
  position: absolute; top: -16px; left: 20px; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple)); color: #fff; font-family: var(--font-head);
  font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  box-shadow: 0 8px 16px rgba(108,76,241,.35);
}
.timeline-item h4 { font-family: var(--font-body); color: var(--violet-900); font-size: 1rem; margin-bottom: 8px; }
.timeline-item p { font-size: .92rem; margin: 0; }
.timeline-item:nth-child(4n+2) .timeline-num, .timeline-item:nth-child(4n+4) .timeline-num { background: linear-gradient(135deg, var(--purple), var(--pink)); }

/* ---------- Преимущества ---------- */
.benefits-table { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.benefits-col { background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.benefits-col h3 { color: var(--cyan-dark); }
.benefits-col ul { margin: 0; padding-left: 20px; }
.benefits-col li { margin-bottom: 10px; color: var(--ink-soft); }

/* ---------- Доверие ---------- */
.trust-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.trust-photo { position: relative; }
.trust-photo img { border-radius: var(--radius); }
.trust-badge {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: linear-gradient(135deg, var(--cyan), var(--purple)); color: #fff; font-weight: 700; font-size: .85rem;
  padding: 8px 20px; border-radius: 999px; box-shadow: 0 10px 20px rgba(108,76,241,.35);
}
.trust-facts-list { list-style: none; margin: 6px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 700; color: var(--violet-900); }
.trust-text p { font-size: .98rem; }

/* ---------- Галерея (отзывы / результаты) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.gallery-item {
  padding: 0; border: none; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
  box-shadow: var(--shadow); background: var(--paper); aspect-ratio: 3 / 4; transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-item:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 20px 44px rgba(37,16,71,.2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(23, 8, 51, .92); opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox-img { max-width: min(90vw, 900px); max-height: 86vh; border-radius: 12px; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.lightbox-close, .lightbox-nav {
  position: absolute; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--cyan); border-color: var(--cyan); }
.lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.2rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.8rem; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #e6dcfb; font-size: .85rem; font-weight: 600; }

/* ---------- Процесс (степпер) ---------- */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 10px; }
.step-card {
  position: relative; overflow: hidden; background: var(--paper); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow); color: var(--violet-900);
}
.step-num {
  position: absolute; right: 6px; top: -18px; font-size: 4.2rem; font-weight: 800; font-family: var(--font-head);
  color: var(--violet-100); z-index: 0; line-height: 1;
}
.step-icon { position: relative; z-index: 1; display: block; font-size: 1.6rem; margin-bottom: 10px; }
.step-card p { position: relative; z-index: 1; margin: 0; font-weight: 600; color: var(--violet-900); font-size: .95rem; }

/* ---------- Программы (аккордеон КТП) ---------- */
.program-toggle-group { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.program-panel { display: none; }
.program-panel.open { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.table-scroll { overflow-x: auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.program-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .9rem; }
.program-table th {
  background: var(--violet-900); color: #fff; text-align: left; padding: 14px 16px; font-weight: 700;
  position: sticky; top: 0;
}
.program-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.program-table td:first-child { font-weight: 700; color: var(--violet-900); white-space: nowrap; }
.program-table td:nth-child(2) { font-weight: 700; color: var(--violet-900); }
.program-table tbody tr:nth-child(even) { background: var(--violet-100); }

/* ---------- Стоимость ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.price-format { color: var(--ink-soft); font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.price-value { font-family: var(--font-head); font-size: 2rem; color: var(--violet-950); font-weight: 700; margin: 6px 0 18px; }
.price-value span { font-size: 1rem; color: var(--ink-soft); font-family: var(--font-body); font-weight: 500; }
.price-features { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.price-features li { position: relative; padding-left: 26px; font-size: .92rem; color: var(--ink-soft); }
.price-features li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--cyan-dark); font-weight: 800; }
.price-card .btn { align-self: flex-start; }

/* ---------- FAQ ---------- */
.accordion-item { background: var(--paper); border-radius: 10px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.accordion-head {
  width: 100%; text-align: left; padding: 18px 22px; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; color: var(--violet-900); font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.accordion-head::after { content: '+'; font-size: 1.4rem; color: var(--cyan-dark); flex-shrink: 0; transition: transform .2s; }
.accordion-item.open .accordion-head::after { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 22px; }
.accordion-item.open .accordion-body { max-height: 300px; padding-bottom: 18px; }
.accordion-body p { margin: 0; }

/* ---------- Расписание ---------- */
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.schedule-card { background: var(--paper); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.schedule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.schedule-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--violet-100); border-radius: 999px; padding: 10px 18px;
}
.schedule-days { font-weight: 700; color: var(--violet-900); }
.schedule-time { font-weight: 700; color: var(--cyan-dark); }

/* ---------- Финальный CTA ---------- */
.final-cta { background: linear-gradient(135deg, var(--violet-900), var(--violet-700)); color: #fff; padding: 76px 0; text-align: center; }
.final-cta h2 { color: #fff; max-width: 720px; margin: 0 auto 16px; }
.final-cta p { color: #ded4f2; max-width: 600px; margin: 0 auto 28px; }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contacts-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 12px; font-size: 1.02rem; color: var(--violet-900); font-weight: 600; }
.contact-channels { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.contact-channel {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--purple)); color: #fff; font-weight: 700; font-size: .92rem;
  text-decoration: none; box-shadow: 0 10px 22px rgba(108,76,241,.28); transition: transform .15s ease;
}
.contact-channel:hover { transform: translateY(-2px); }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--paper); }
.map-wrap iframe { border: 0; display: block; }
.map-fallback { display: block; text-align: center; padding: 12px; font-size: .85rem; font-weight: 600; color: var(--violet-800); background: var(--paper); }

/* ---------- Footer ---------- */
.site-footer { background: var(--violet-950); color: #b3a3d6; padding: 24px 0; text-align: center; font-size: .85rem; }
.footer-legal { margin: 8px 0 0; font-size: .78rem; color: #8a7aad; }
.footer-legal a { color: #b3a3d6; text-decoration: underline; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--violet-950); color: #fff; padding: 14px 22px; border-radius: 10px;
  font-size: .92rem; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 999; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-cta { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text, .hero-photo { min-width: 0; }
  .hero-photo { max-width: 320px; margin: 0 auto; }
  .hero-cta-group .btn { white-space: normal; text-align: center; }
  .trust-card, .contacts-grid, .benefits-table, .formats-grid, .schedule-grid { grid-template-columns: 1fr; }
  .pain-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .chain { grid-template-columns: repeat(3, 1fr); }
  .chain::before { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.4rem; }
  .lead-form-row { grid-template-columns: 1fr 1fr; }
  .lead-form-row button { grid-column: 1 / -1; }

  .site-header.nav-open .main-nav {
    display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--violet-950); padding: 18px 24px 22px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.1);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .site-header.nav-open .main-nav a:not(.nav-cta-mobile) { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .site-header.nav-open .nav-cta-mobile { display: inline-flex; margin-top: 14px; }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr; }
  .chain { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lead-form-row { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem !important; }
  .hero-meta .tag { font-size: .8rem; }
  .hero-cta-group { flex-direction: column; align-items: stretch; }
  .hero-cta-group .btn { text-align: center; }
}
