/* ==========================================================================
   base.css — общие для всего сайта «Меридиан»: токены, сброс, шапка/футер,
   кнопки, форма, faq, лайтбокс, лента-скролл (gallery-strip/lesson-gallery),
   виджет «версия для слабовидящих», виджет отзывов Яндекс.Карт.
   ========================================================================== */

:root {
  --navy: #071d49;
  --blue: #1157d9;
  --blue2: #0a7ddb;
  --gold: #f7c95c;
  --gold2: #ffe7a6;
  --cream: #fff8e8;
  --paper: #fffdf7;
  --sky: #eaf6ff;
  --mint: #dff6ee;
  --coral: #ff8f70;
  --green: #1fa971;
  --text: #13224a;
  --muted: #5c6a8f;
  --line: rgba(7, 29, 73, 0.12);
  --shadow: 0 24px 60px rgba(7, 29, 73, 0.13);
  --soft: 0 14px 36px rgba(7, 29, 73, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Nunito, system-ui, sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(17, 87, 217, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 70%);
  z-index: -2;
}
body:after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, #fff 0 8%, transparent 22%),
    radial-gradient(circle at 86% 14%, #dff2ff 0 10%, transparent 26%),
    linear-gradient(180deg, #fff8e8 0%, #f6fbff 48%, #fff9ea 100%);
  z-index: -3;
}
a {
  text-decoration: none;
  color: inherit;
}
.wrap {
  width: min(1160px, calc(100% - 32px));
  margin: auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--soft);
  font-weight: 900;
  color: var(--navy);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  border: 0;
  padding: 17px 24px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(17, 87, 217, 0.24);
  transition: 0.22s;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(17, 87, 217, 0.3);
}
.btn.gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 12px 24px rgba(247, 201, 92, 0.35);
}
.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: var(--soft);
}

/* nav (shared shell — all 4 nav variants use these classes) */
.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  padding-top: 12px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(7, 29, 73, 0.09);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-max {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.2s ease;
}
.nav-max:hover {
  transform: scale(1.15);
}
.nav-max img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--navy);
}
.logo-img {
  height: 64px;
  width: auto;
  display: block;
  border-radius: 10px;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}
.menu {
  display: flex;
  gap: 16px;
  font-size: 14px;
  font-weight: 900;
  color: #314265;
}
.menu a {
  color: #314265;
}
.menu a:hover {
  color: var(--blue);
}

/* breadcrumbs (course pages) */
.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  margin-top: 22px;
}
.crumbs a {
  color: var(--muted);
}
.crumbs a:hover {
  color: var(--blue);
}
.crumbs span.sep {
  opacity: 0.5;
}
.crumbs span.cur {
  color: var(--navy);
}

section {
  padding: 72px 0;
}

/* hero lead paragraph + action row — shared baseline; home/course/camp
   pages may override font-size/max-width/margin in their own page css */
.lead {
  font-size: 18px;
  line-height: 1.6;
  color: #425276;
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}

.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 30px;
}
.head h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1;
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.03em;
}
.head p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

/* scroll-strip pattern: team-strip, gallery-strip, lesson-gallery all share this */
.strip-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.strip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft);
  font-weight: 900;
  color: var(--navy);
  cursor: pointer;
  font-size: 18px;
}
.gallery-strip,
.lesson-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.gallery-strip::-webkit-scrollbar,
.lesson-gallery::-webkit-scrollbar {
  height: 8px;
}
.gallery-strip::-webkit-scrollbar-thumb,
.lesson-gallery::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 99px;
}
.g-item {
  scroll-snap-align: start;
  aspect-ratio: 3/4;
  border-radius: 26px;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center top;
  box-shadow: var(--soft);
  cursor: zoom-in;
  transition: transform 0.2s ease;
  display: block;
  padding: 0;
  overflow: hidden;
}
.g-item:hover {
  transform: scale(1.02);
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 29, 73, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 26px;
}
.lightbox.show {
  display: flex;
}
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  background: #fff;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  cursor: pointer;
  z-index: 201;
}

/* reviews widget (Yandex Maps) — used by home + camp */
.reviews-widget {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
}
.reviews-widget iframe {
  border-radius: 16px;
  display: block;
  width: 100%;
}
.reviews-widget-link {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}

/* price note callout (home + camp) */
.price-note {
  margin-top: 18px;
  background: rgba(17, 87, 217, 0.07);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 20px;
  font-weight: 800;
  color: var(--navy);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.price-note b {
  color: var(--blue);
}

/* faq */
.faq {
  display: grid;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--soft);
}
.faq summary {
  font-weight: 900;
  color: var(--navy);
  cursor: pointer;
}
.faq p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
  margin: 10px 0 0;
}
.doc-link {
  color: var(--blue);
  font-weight: 900;
}

/* form */
.form-zone {
  padding-bottom: 96px;
}
.form-single {
  max-width: 640px;
  margin: 0 auto;
  background: linear-gradient(135deg, #fff, #fff7db);
  border: 1px solid var(--line);
  border-radius: 44px;
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
}
.form-single h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3.6vw, 42px);
  margin: 14px 0;
  color: var(--navy);
}
.form-single > p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}
.form-course-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sky);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  color: var(--navy);
  font-size: 13.5px;
  margin-top: 18px;
}
.form-alt {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.form-alt span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.social-row {
  display: flex;
  gap: 14px;
}
.social-row a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.social-row a:hover {
  transform: scale(1.15);
}
.social-row img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.form {
  display: grid;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 26px;
  margin-top: 26px;
  text-align: left;
}
.form label {
  font-weight: 900;
  color: var(--navy);
}
.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 16px;
  font: inherit;
  font-weight: 700;
  background: #fbfdff;
}
.form textarea {
  min-height: 100px;
  resize: vertical;
}
.form-status {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}
.form-status--success {
  color: var(--green);
}
.form-status--error {
  color: var(--coral);
}
.form-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 29, 73, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.lead-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}
.lead-modal {
  position: relative;
  background: var(--paper);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 36px 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: scale(0.85) translateY(14px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lead-modal-overlay.is-open .lead-modal {
  transform: scale(1) translateY(0);
}
.lead-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--sky);
  color: var(--navy);
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lead-modal__icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
}
.lead-modal__icon svg {
  width: 34px;
  height: 34px;
  overflow: visible;
}
.lead-modal__icon circle {
  stroke: var(--green);
  fill: none;
  opacity: 0.35;
}
.lead-modal__icon path {
  stroke: var(--green);
  fill: none;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.lead-modal-overlay.is-open .lead-modal__icon path {
  animation: leadModalCheck 0.4s ease 0.2s forwards;
}
.lead-modal__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--navy);
}
.lead-modal__text {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}
.lead-modal__bar {
  margin-top: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.lead-modal__bar span {
  display: block;
  height: 100%;
  background: var(--green);
  width: 100%;
  transform-origin: left;
}
.lead-modal-overlay.is-open .lead-modal__bar span {
  animation: leadModalTimer 4.2s linear forwards;
}
@keyframes leadModalCheck {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes leadModalTimer {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
@media (max-width: 480px) {
  .lead-modal {
    padding: 30px 22px 24px;
  }
}

footer {
  background: var(--navy);
  color: #fff;
  padding: 40px 0 26px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-block b {
  display: block;
  color: #fff;
  font-size: 17px;
  margin-bottom: 8px;
}
.footer-block span,
.footer-block a {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  line-height: 1.7;
}
.footer-block a:hover {
  color: var(--gold);
}
.footer-block .social-row a:hover {
  transform: scale(1.15);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 800;
  font-size: 14px;
}
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: 0.65s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}
.uc-tilda-hidden-form {
  display: none !important;
}

/* accessibility widget (site-wide) */
.a11y-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 300;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font-size: 21px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.a11y-panel {
  position: fixed;
  left: 16px;
  bottom: 78px;
  z-index: 300;
  width: 280px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.a11y-panel[hidden] {
  display: none;
}
.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.a11y-panel-head b {
  color: var(--navy);
  font-size: 14px;
}
.a11y-panel-head button {
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
  cursor: pointer;
}
.a11y-row {
  margin-bottom: 12px;
}
.a11y-row span {
  display: block;
  font-weight: 800;
  font-size: 12.5px;
  color: var(--navy);
  margin-bottom: 6px;
}
.a11y-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.a11y-btns button {
  flex: 1;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 10px;
  padding: 8px 6px;
  font-weight: 800;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
  min-width: 60px;
}
.a11y-btns button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.a11y-reset {
  width: 100%;
  border: 0;
  background: var(--gold);
  color: var(--navy);
  border-radius: 12px;
  padding: 10px;
  font-weight: 900;
  cursor: pointer;
}

html.a11y-font-1 {
  font-size: 112%;
}
html.a11y-font-2 {
  font-size: 125%;
}
html.a11y-font-3 {
  font-size: 140%;
}

html.a11y-contrast-dark body:before,
html.a11y-contrast-dark body:after {
  display: none !important;
}
html.a11y-contrast-dark body {
  background: #fff !important;
}
html.a11y-contrast-dark * {
  background-color: #fff !important;
  background-image: none !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.a11y-contrast-dark a,
html.a11y-contrast-dark .doc-link {
  color: #0000cc !important;
  text-decoration: underline !important;
}
html.a11y-contrast-dark .btn {
  border: 2px solid #000 !important;
}

html.a11y-contrast-yellow body:before,
html.a11y-contrast-yellow body:after {
  display: none !important;
}
html.a11y-contrast-yellow body {
  background: #000 !important;
}
html.a11y-contrast-yellow * {
  background-color: #000 !important;
  background-image: none !important;
  color: #ffe000 !important;
  border-color: #ffe000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.a11y-contrast-yellow a,
html.a11y-contrast-yellow .doc-link {
  color: #6fd8ff !important;
  text-decoration: underline !important;
}
html.a11y-contrast-yellow .btn {
  border: 2px solid #ffe000 !important;
}

html.a11y-images-off [style*="background-image"] {
  background-image: none !important;
  background-color: #dfe6f4 !important;
}
html.a11y-images-off img {
  visibility: hidden;
}

@media (max-width: 980px) {
  .menu {
    display: none;
  }
  .footer-top {
    flex-direction: column;
  }
}
@media (max-width: 680px) {
  .head {
    display: block;
  }
  .head p {
    margin-top: 12px;
  }
  .form-single {
    padding: 24px;
  }
  .reviews-widget iframe {
    height: 480px;
  }
  .nav-inner {
    padding: 8px 8px 8px 12px;
    gap: 8px;
  }
  .logo-img {
    height: 36px;
  }
  .brand-sub {
    display: none;
  }
  .nav-cta {
    padding: 11px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .nav-max {
    display: none;
  }
}
