/* Base */
:root {
  --bg: #F6F4FA;
  --surface: #FFFFFF;
  --text: #211B2E;
  --muted: #5B536B;
  --accent: #6234B5;
  --accent-strong: #4D2494;
  --accent-text: #FFFFFF;
  --plate-bg: #211B2E;
  --plate-text: #F6F4FA;
  --line: #E3DCEF;
  --heading-font: 'Gill Sans', 'Gill Sans MT', Calibri, 'Segoe UI', sans-serif;
  --body-font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius-card: 18px;
  --radius-btn: 10px;
  --shadow-soft: 0 1px 2px rgb(33 27 46 / .06), 0 12px 32px rgb(33 27 46 / .08);
  --shadow-accent: 0 8px 28px rgb(98 52 181 / .22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(115deg,
    #F6F4FA 0px, #F6F4FA 180px,
    #EFEBF7 180px, #EFEBF7 360px);
  color: var(--text);
  font-family: var(--body-font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  min-height: 100vh;
}

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

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; }
h3 { font-size: clamp(1.2rem, 1vw + 0.9rem, 1.5rem); }

p { max-width: 68ch; }

a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.section { padding-block: clamp(64px, 7vw, 96px); }

.lead {
  font-size: clamp(1.15rem, 1vw + 0.95rem, 1.5rem);
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 60;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* Header */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.topbar__row {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.topbar__contacts {
  margin: 0;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.topbar__contacts a { color: var(--muted); text-decoration: none; font-weight: 600; }
.topbar__contacts a:hover { color: var(--accent-strong); text-decoration: underline; }

.topbar__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  flex-wrap: wrap;
}

.brandmark {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brandmark--foot { color: var(--plate-text); }

/* Nav */
.menu { display: flex; align-items: center; gap: 12px; }

.menu__burger {
  display: none;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--text);
  font: 600 1rem var(--body-font);
  cursor: pointer;
  align-items: center;
  gap: 10px;
}
.menu__burger-box {
  width: 22px; height: 16px;
  display: inline-block;
  position: relative;
}
.menu__burger-bar,
.menu__burger-bar::before,
.menu__burger-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform .25s ease, top .25s ease;
}
.menu__burger-bar { top: 7px; }
.menu__burger-bar::before { top: -7px; }
.menu__burger-bar::after { top: 7px; }
.menu--open .menu__burger-bar { background: transparent; }
.menu--open .menu__burger-bar::before { top: 0; transform: rotate(45deg); }
.menu--open .menu__burger-bar::after { top: 0; transform: rotate(-45deg); }
.menu__burger-text { font-size: 0.95rem; }

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

.menu__link {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}
.menu__link::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px;
  bottom: 5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: height .2s ease, transform .25s ease;
}
.menu__link:hover::after { transform: scaleX(1); height: 2px; }
.menu__link:hover { border-color: var(--accent); color: var(--accent-strong); }
.menu__link[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.menu__link[aria-current="page"]::after { display: none; }
.menu__link:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: var(--radius-btn);
  background-image: linear-gradient(120deg, var(--accent) 0%, #7B4FC9 50%, var(--accent) 100%);
  background-size: 200% 100%;
  background-position: 50% 50%;
  color: var(--accent-text);
  font: 600 1rem var(--body-font);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(33 27 46 / .12);
  transition: background-position .35s ease, box-shadow .25s ease, transform .15s ease;
}
.btn:hover {
  background-position: 100% 50%;
  box-shadow: var(--shadow-accent);
}
.btn:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
  outline-color: var(--plate-bg);
}
.btn:active { box-shadow: none; transform: translateY(1px); }

.btn--ghost {
  background-image: none;
  background-color: transparent;
  border: 2px solid var(--accent);
  color: var(--accent-strong);
}
.btn--ghost:hover { background-color: var(--accent); color: var(--accent-text); box-shadow: none; }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 80px); }

.hero__grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
}

.hero__figure {
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  display: flex;
}
.hero__figure img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: calc(var(--radius-card) - 6px);
}

.hero__body > * + * { margin-top: 20px; }
.hero__title {
  max-width: 14ch;
  text-wrap: balance;
  line-height: 1.08;
}
h2 { text-wrap: balance; }

html.is-scripted .hero__body--enter > * {
  animation: heroRise .5s ease both;
}
html.is-scripted .hero__body--enter > *:nth-child(2) { animation-delay: .08s; }
html.is-scripted .hero__body--enter > *:nth-child(3) { animation-delay: .16s; }

@keyframes heroRise {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 32px 0 20px;
}
.tabs__tab {
  min-height: 44px;
  padding: 12px 20px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 600 0.95rem var(--body-font);
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, background-color .25s ease;
}
.tabs__tab:hover { border-color: var(--accent); color: var(--accent-strong); }
.tabs__tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.tabs__tab:focus-visible { outline: 3px solid var(--plate-bg); outline-offset: 2px; }

.tabs__panel {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgb(33 27 46 / .06);
  padding: 24px 32px;
  max-width: 68ch;
}

/* Courses list */
.courses {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}
.courses__item {
  display: grid;
  gap: 8px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.courses__item h3 { margin: 0; }
.courses__item p { margin: 0; color: var(--muted); max-width: 62ch; line-height: 1.6; }
.courses__more {
  font-weight: 600;
  justify-self: start;
  position: relative;
}
.courses__more::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: height .2s ease;
}
.courses__more:hover::after { height: 3px; }

/* Plate */
.plate {
  background: var(--plate-bg);
  color: var(--plate-text);
  padding-block: 96px;
}
.plate h2, .plate h3 { color: var(--plate-text); }
.plate p { color: #D9D3E6; }
.plate a { color: #C7B4F0; }
.plate a:hover { color: #E5DAFB; }

.plate__title {
  font-size: clamp(2rem, 3vw + 1rem, 3.4rem);
}

/* Split layout */
.split {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.split__aside { position: sticky; top: 96px; }
.split__aside p { color: var(--muted); }
.split__body {
  display: grid;
  gap: 20px;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 26px 28px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .3s ease, transform .3s ease;
}
.card h3 { margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); }
.card:hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-3px);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.gallery__item {
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-accent); }
.gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius-card) - 6px);
}
.gallery__item--wide { grid-column: span 2; }
.gallery__item--wide img { aspect-ratio: 16 / 9; }

/* FAQ */
.faq__list {
  display: grid;
  gap: 12px;
  margin-top: 32px;
  max-width: 760px;
}
.faq__item {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: box-shadow .3s ease;
}
.faq__item[open] { box-shadow: var(--shadow-accent); }
.faq__item summary {
  cursor: pointer;
  padding: 18px 24px;
  color: var(--text);
  font-family: var(--heading-font);
  font-weight: 650;
  font-size: 1.1rem;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before {
  content: "+";
  display: inline-block;
  width: 1.4em;
  color: var(--accent-strong);
  font-weight: 700;
  transition: transform .25s ease;
}
.faq__item[open] summary::before { content: "–"; }
.faq__item summary:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-radius: var(--radius-card); }
.faq__item p { margin: 0; padding: 0 24px 20px 24px; color: var(--muted); }

/* Form */
.signup {
  display: grid;
  gap: 18px;
  max-width: 560px;
  margin: 28px auto 0;
}
.signup__field { display: grid; gap: 6px; }
.signup__label { font-weight: 600; font-size: 0.95rem; color: var(--plate-text); }
.signup__input,
.signup__area {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgb(246 244 250 / .25);
  border-radius: var(--radius-btn);
  background: #2E2742;
  color: var(--plate-text);
  font: 400 1rem var(--body-font);
}
.signup__area { resize: vertical; min-height: 120px; }
.signup__input::placeholder { color: rgb(246 244 250 / .55); }
.signup__input:focus-visible,
.signup__area:focus-visible {
  outline: 3px solid #C7B4F0;
  outline-offset: 1px;
  border-color: #8B5CF6;
}
.signup__check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: #D9D3E6;
}
.signup__check input {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: #6234B5;
  flex: none;
}
.signup__check label {
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgb(246 244 250 / .8);
}
.signup__note { font-size: 0.9rem; color: #B9B0CC; margin: 0; }
.signup__error {
  color: #FFC9C9;
  font-size: 0.9rem;
  margin: 2px 0 0;
}
.signup.is-sending .signup__send {
  opacity: .65;
  pointer-events: none;
}

/* Floating call button */
.callbtn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background-image: linear-gradient(120deg, var(--accent) 0%, #7B4FC9 50%, var(--accent) 100%);
  background-size: 200% 100%;
  color: var(--accent-text);
  font: 600 0.95rem var(--body-font);
  text-decoration: none;
  box-shadow: var(--shadow-accent);
  transition: background-position .35s ease, transform .2s ease;
}
.callbtn:hover { background-position: 100% 50%; transform: translateY(-2px); }
.callbtn:focus-visible { outline: 3px solid var(--plate-bg); outline-offset: 3px; }
.callbtn:active { box-shadow: none; transform: none; }

/* Footer */
.pagefoot {
  background: var(--plate-bg);
  color: var(--plate-text);
  padding-top: clamp(48px, 6vw, 80px);
}
.pagefoot__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.pagefoot__lead { color: #B9B0CC; font-size: 0.95rem; }
.pagefoot__title {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 14px;
  color: var(--plate-text);
}
.pagefoot__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 10px;
}
.pagefoot__list a { color: #D9D3E6; text-decoration: none; }
.pagefoot__list a:hover { color: #E5DAFB; text-decoration: underline; }
.pagefoot address {
  font-style: normal;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #B9B0CC;
}
.pagefoot address p { margin: 0 0 8px; max-width: none; }
.pagefoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9rem; }
.pagefoot ul li span { color: #8F86A6; margin-right: 4px; }
.pagefoot ul a { color: #D9D3E6; }
.pagefoot__bottom {
  margin-top: clamp(32px, 5vw, 56px);
  padding-block: 20px;
  border-top: 1px solid #3A334E;
}
.pagefoot__copy { margin: 0; font-size: 0.9rem; color: #B9B0CC; }

/* Prose */
.prose { max-width: 760px; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 32px; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li { margin-bottom: 8px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.prose th { background: #EFEBF7; font-family: var(--heading-font); }

/* Inner page head */
.pagehead { padding-top: clamp(40px, 6vw, 72px); }
.pagehead p { color: var(--muted); font-size: 1.1rem; }

/* Contact block */
.contactcard {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 28px 32px;
}
.contactcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contactcard ul span { color: var(--muted); margin-right: 6px; }

/* Thanks & 404 */
.statuspage { text-align: center; }
.statuspage .btn { margin-top: 24px; }
.statuspage p { margin-inline: auto; }

/* Reveal */
html.is-scripted .reveal { opacity: 0; }
html.is-scripted .reveal.reveal--shown {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}
html.is-scripted .section.reveal { transform: translateY(24px); }

/* Breakpoints */
@media (max-width: 1280px) {
  .hero__grid { gap: 28px; }
}

@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; }
  .split__aside { position: static; }
  .pagefoot__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item--wide { grid-column: span 2; }
}

@media (max-width: 768px) {
  .menu__burger { display: inline-flex; }
  .menu__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    padding: 16px clamp(16px, 4vw, 40px) 24px;
    gap: 10px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s ease;
  }
  .menu--open .menu__list {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .menu__link { display: block; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { max-width: 420px; }
  .hero__figure img { height: auto; aspect-ratio: 3 / 4; }
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__item--wide { grid-column: auto; }
  .pagefoot__grid { grid-template-columns: 1fr; }
  .topbar__main { flex-direction: column-reverse; align-items: flex-start; }
  .split__body { grid-template-columns: 1fr; }
  .callbtn__text { display: inline; }
  .callbtn { padding: 0 18px; }
}

@media (max-width: 480px) {
  .topbar__contacts { flex-wrap: wrap; font-size: 0.85rem; }
  .tabs__panel { padding: 18px 16px; }
  .faq__item summary { padding: 14px 16px; }
  .faq__item p { padding: 0 16px 16px; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.is-scripted .reveal { opacity: 1; transform: none; }
}

/* Contrast fixes */
.card .pagefoot__list a { color: var(--accent-strong); }
.card .pagefoot__list a:hover { color: var(--accent); }
.card .pagefoot__list li span,
.card .pagefoot address,
.card .pagefoot address p,
.card .pagefoot ul,
.card .pagefoot__lead,
.card .pagefoot__copy { color: var(--muted); }
.card .pagefoot__title,
.card .brandmark--foot { color: var(--text); }
.card .pagefoot__bottom { border-top-color: var(--line); }
.plate .faq__item summary { color: var(--text); }
