:root {
  --paper: #f3f6fb;
  --ink: #121826;
  --neva: #175cd3;
  --sun: #c4470c;
  --line: #e3e8f0;
  --sun-deep: #b8430a;
  --mist: #e6e8e2;
  --line: #d5d8d2;
  --slate: #5c6570;
  --warm: #fff1e6;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --header: 74px;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--neva); }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, p { margin: 0 0 12px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h1 { font-size: clamp(44px, 6vw, 78px); }
h2 { font-size: clamp(32px, 4vw, 48px); }
h3 { font-size: 28px; line-height: 1.15; }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--sun-deep);
  outline-offset: 3px;
}

::selection { background: #f6c7a8; }

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 80;
}

.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.quiet { color: var(--slate); font-size: 15px; }
.gap-top { margin-top: 18px; }
.lede { font-size: 18px; max-width: 46ch; color: var(--slate); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 246, 251, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--header);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-links a:hover { color: var(--neva); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.seat-pill {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--sun);
  padding-bottom: 2px;
}

.menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sun);
  color: white;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  padding: 14px 22px;
  cursor: pointer;
  line-height: 1.1;
}

.btn:hover { background: var(--sun-deep); }

.btn-small { padding: 10px 16px; font-size: 15px; }

.text-link {
  color: var(--ink);
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 20px;
}

.hero h1 { max-width: 11ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin: 22px 0 10px;
}

.hero-photo { position: relative; }

.hero-photo img {
  width: 100%;
  height: 620px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 28px;
}

.ticket {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 230px;
  background: white;
  padding: 16px 16px 14px;
  border-top: 4px solid var(--sun);
  box-shadow: 0 12px 40px rgba(23, 35, 58, 0.18);
}

.ticket p { margin: 0; }
.ticket .who {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.05;
  margin: 4px 0;
}
.ticket .left {
  color: var(--sun-deep);
  font-weight: 700;
  margin-top: 8px;
}

.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 36px;
  padding: 0;
  list-style: none;
}

.stamps li {
  border: 1.5px dashed #e28a4a;
  color: var(--sun-deep);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
}

.mission {
  background: var(--ink);
  color: #f4f1ea;
  padding: 72px 0;
}

.mission p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin: 0;
}

.mission .en {
  margin-top: 18px;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0;
  color: #c5d0dc;
  max-width: none;
}

.bridge img {
  width: 100%;
  height: min(68vh, 620px);
  object-fit: cover;
  object-position: center 60%;
}

.bridge figcaption {
  padding: 12px 0 8px;
  color: var(--slate);
}

.section { padding: 80px 0; }
.band-white { background: white; }
.band-mist { background: #e7eef3; }

.points {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 28px;
}

.points h3 { font-size: 24px; }

.program-list { margin-top: 12px; }

.program-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr auto;
  gap: 12px 28px;
  align-items: baseline;
  padding: 24px 8px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.program-row:last-child { border-bottom: 1px solid var(--line); }
.program-row:hover { background: white; }
.program-row h3 { margin: 0; font-size: 28px; }
.program-row .age { color: var(--slate); display: block; font-family: var(--sans); font-size: 14px; letter-spacing: 0; margin-top: 4px; }
.program-row p { margin: 0; max-width: 52ch; }
.program-row .price { font-weight: 700; white-space: nowrap; }

.seat-list { list-style: none; margin: 20px 0 0; padding: 0; }
.seat-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.seat-list .few { color: var(--sun-deep); font-weight: 700; }

.day-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.day-layout img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 18px;
}

.day { list-style: none; margin: 8px 0 0; padding: 0 0 0 4px; border-left: 2px solid var(--sun); }
.day li { position: relative; padding: 0 0 26px 22px; }
.day li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sun);
  position: absolute;
  left: -6px;
  top: 8px;
}
.day time { display: block; color: var(--slate); font-size: 14px; font-weight: 700; }
.day h3 { font-size: 22px; margin: 2px 0 6px; }

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.review-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  min-width: 0;
}

.review-who {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.review-who img,
.review-who .letter {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
}

.letter {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-family: var(--serif);
  font-size: 26px;
}

.review-who strong { display: block; line-height: 1.25; }
.review-who .quiet { margin: 3px 0 0; }

.review-card blockquote {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.55;
  flex: 1;
}

.listen {
  background: none;
  border: 0;
  padding: 0;
  color: var(--neva);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exams {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: baseline;
  margin-top: 18px;
  padding: 0;
  list-style: none;
}

.exams li {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -0.03em;
}

.journal-list a {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.journal-list a:last-child { border-bottom: 1px solid var(--line); }
.journal-list h3 { margin: 0 0 6px; font-size: 28px; }
.journal-list time { color: var(--slate); font-size: 14px; }

.closing { background: var(--warm); padding: 88px 0; }
.closing h2 { max-width: 12ch; }

.site-footer {
  background: var(--ink);
  color: #d5dde6;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2 { color: white; font-size: 22px; }
.site-footer a { color: white; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.fine { margin-top: 32px; font-size: 13px; color: #9aabba; }

.page-intro { padding: 48px 0 12px; }
.page-intro h1 { max-width: 16ch; }
#quiz h1 { max-width: 28ch; }

.history {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: start;
}

.year {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 0.9;
  color: var(--sun);
  margin: 0;
}

.prose p { max-width: 62ch; }

.gallery {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 14px;
}

.gallery figure { margin: 0; }
.gallery figure:first-child {
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
}
.gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
}
.gallery figure:first-child img {
  flex: 1;
  height: 100%;
  min-height: 420px;
}
.gallery figure:nth-child(2) img { object-position: center 30%; }
.gallery figcaption { color: var(--slate); font-size: 14px; padding-top: 8px; }

.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 20px;
}

.team img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 32%;
  border-radius: 18px;
  background: var(--mist);
}

.team h3 { margin: 12px 0 4px; }
.team .role { color: var(--sun-deep); font-weight: 700; font-size: 14px; margin: 0 0 8px; }

.method { display: grid; gap: 28px; margin-top: 12px; }
.method article { max-width: 68ch; }

.offer {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.offer:nth-of-type(even) .offer-photo { order: 2; }

.offer img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 18px;
}

.facts { margin: 18px 0; }
.facts div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.facts dt { color: var(--slate); }

.table-wrap { overflow-x: auto; margin-top: 12px; }

table { width: 100%; border-collapse: collapse; min-width: 640px; }
caption {
  text-align: left;
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  caption-side: top;
}
th, td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-weight: 700; }
.col-hot { background: var(--warm); }
td.few, th.few { color: var(--sun-deep); }

.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  background: white;
  border-left: 4px solid var(--sun);
  padding: 28px;
  margin-top: 18px;
}

.field { margin-bottom: 14px; }
.field label, .check { font-weight: 600; display: block; margin-bottom: 6px; }
.check { font-weight: 500; display: flex; gap: 8px; align-items: flex-start; }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 12px 14px;
}

textarea { min-height: 120px; resize: vertical; }

.price-out {
  font-family: var(--serif);
  font-size: 42px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 8px 0;
}

.struck { color: var(--slate); text-decoration: line-through; font-family: var(--sans); font-size: 16px; letter-spacing: 0; }

.discounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.form-card h2 { font-size: 34px; }

.errors {
  background: #fff1e6;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.errors ul { margin: 0; padding-left: 18px; }

.success h2 { font-size: 36px; }

.map {
  width: 100%;
  height: 420px;
  border: 0;
  background: var(--mist);
}

.messengers { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 0; margin: 12px 0 0; list-style: none; }
.messengers a { font-weight: 700; }

.faq details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { max-width: 68ch; margin: 8px 0 0; }

.quiz-step { font-weight: 700; color: var(--slate); }
.quiz-options { display: grid; gap: 10px; margin-top: 16px; }
.quiz-options button {
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.quiz-options button:hover { border-color: var(--ink); }
.passage {
  background: white;
  padding: 16px 18px;
  border-left: 4px solid var(--neva);
  max-width: 62ch;
}

.article { padding: 36px 0 80px; }
.article h1 { max-width: 16ch; }
.article p, .article li { max-width: 62ch; }
.article h2 { font-size: 32px; margin-top: 36px; }
.article ol, .article ul { padding-left: 20px; }
.cluster {
  background: white;
  border-left: 4px solid var(--sun);
  padding: 16px 18px;
  max-width: 62ch;
}
.cluster p { margin: 0; }

.materials { margin-top: 8px; }
.materials a {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.03em;
}
.materials a:last-child { border-bottom: 1px solid var(--line); }
.materials a span { display: block; font-family: var(--sans); font-size: 15px; letter-spacing: 0; color: var(--slate); font-weight: 500; margin-top: 4px; }

.chat-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.chat-hello {
  background: white;
  border: 1px solid var(--line);
  padding: 8px 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.chat-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  max-height: min(480px, calc(100vh - 140px));
  background: white;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.chat-panel[hidden] { display: none; }

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: white;
}

.chat-head button {
  background: none;
  border: 0;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.chat-log { overflow: auto; padding: 12px 14px; flex: 1; }

.msg { padding: 10px 12px; margin: 0 0 8px; max-width: 92%; }
.msg-bot { background: var(--mist); }
.msg-user { background: var(--ink); color: white; margin-left: auto; }

.chat-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.chat-options button, .chat-options a {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}

.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: white;
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  gap: 12px;
  align-items: center;
}

.mobile-bar a:first-child { font-weight: 700; color: var(--ink); text-decoration: none; }
.mobile-bar .btn { margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s ease both; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
  .hero-photo { animation: rise 0.9s ease 0.12s both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .hero, .day-layout, .offer, .calc, .contact-grid, .history, .discounts, .footer-grid {
    grid-template-columns: 1fr;
  }
  .review-grid { grid-template-columns: 1fr 1fr; }
  .offer:nth-of-type(even) .offer-photo { order: 0; }
  .points, .team { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure:first-child { grid-row: auto; }
  .gallery figure:first-child img, .gallery img, .hero-photo img, .offer img { height: 320px; }
  .program-row { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .section { padding: 56px 0; }
}

@media (max-width: 880px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 8px 22px 18px;
    gap: 12px;
  }
  .nav-links.open { display: flex; }
  .header-bar { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .header-actions { order: 3; width: 100%; }
  .header-actions .btn { width: 100%; }
  .seat-pill { display: none; }
  .mobile-bar { display: flex; }
  body { padding-bottom: 72px; }
  .chat-dock { bottom: 84px; }
  .chat-panel { bottom: 156px; }
  .wrap { width: min(1120px, calc(100% - 32px)); }
}

@media (max-width: 640px) {
  .points, .team, .journal-list a, .facts div, .review-grid { grid-template-columns: 1fr; }
  .ticket { position: static; width: auto; margin-top: 12px; }
  .hero-photo img { border-radius: 18px; height: 280px; }
  h1 { font-size: 40px; }
}

.class-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 240px 240px;
  gap: 12px;
  margin-top: 22px;
}

.class-grid figure { margin: 0; }
.class-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}
.class-grid figure:first-child { grid-row: 1 / span 2; }
.class-grid figcaption { display: none; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  gap: 18px;
}
.auth-card {
  width: min(440px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
}
.auth-card h1 { font-size: 40px; }

.app-body { background: #eef3f9; margin: 0; }
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}
.app-side {
  background: var(--ink);
  color: white;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-side .logo { color: white; }
.app-hello { font-family: var(--serif); font-size: 28px; margin: 18px 0 0; }
.app-progress { color: #c5d0dc; margin: 0; }
.app-bar { height: 6px; background: #2c3b55; border-radius: 99px; overflow: hidden; margin: 8px 0 16px; }
.app-bar span { display: block; height: 100%; width: 0; background: var(--sun); }
.lesson-nav { display: grid; gap: 6px; }
.lesson-nav button {
  text-align: left;
  background: transparent;
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.lesson-nav button small { color: #9aabba; }
.lesson-nav button.is-on { background: #24344e; }
.app-out { color: #d5dde6; margin-top: auto; background: none; border: 0; cursor: pointer; text-align: left; padding: 12px 0; }
.app-main { padding: 28px 32px 48px; }
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d1524;
  border-radius: 18px;
  overflow: hidden;
  margin: 12px 0 16px;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) {
  .class-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .class-grid figure:first-child { grid-row: auto; }
  .class-grid img { height: 240px; }
  .app-shell { grid-template-columns: 1fr; }
  .app-side { position: sticky; top: 0; z-index: 5; }
  .lesson-nav { grid-template-columns: 1fr; max-height: 220px; overflow: auto; }
  .app-main { padding: 20px 16px 40px; }
}
