@font-face {
  font-family: "Rehab Plex";
  src: url("assets/fonts/IBMPLEXSANS-REGULAR.TTF") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Rehab Plex";
  src: url("assets/fonts/IBMPLEXSANS-BOLD.TTF") format("truetype");
  font-weight: 700;
}

:root {
  color-scheme: light;
  --blue: #3366ff;
  --blue-deep: #064ed0;
  --green: #17e316;
  --ink: oklch(17% 0.012 258);
  --paper: #ffffff;
  --paper-cold: oklch(94% 0.006 250);
  --grid: oklch(87% 0.01 252);
  --muted: oklch(47% 0.025 252);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: "Rehab Plex", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 4vw, 60px);
  min-height: 88px;
  padding: 10px clamp(18px, 5vw, 72px);
  background: #ffffff;
  box-shadow: 0 1px 0 color-mix(in oklch, var(--ink) 10%, transparent);
}

.brand img {
  width: 340px;
  height: auto;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 40px);
  color: color-mix(in oklch, var(--ink) 70%, transparent);
  font-size: 17px;
}

.menu-toggle {
  display: none;
  border: 1px solid color-mix(in oklch, var(--blue) 34%, transparent);
  background: color-mix(in oklch, var(--paper) 96%, var(--blue));
  color: var(--ink);
  min-height: 42px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
}

.top-nav a,
.login-link,
.contacts a {
  text-decoration: none;
}

.top-nav a::before {
  content: "/";
  margin-right: 7px;
  color: var(--blue);
}

.top-nav a:hover,
.login-link:hover,
.contacts a:hover {
  color: var(--blue);
}

.login-link {
  color: color-mix(in oklch, var(--ink) 70%, transparent);
  font-size: 17px;
  white-space: nowrap;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(820px, calc(100svh - 88px));
  background: var(--blue);
  color: var(--paper);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(440px, 0.95fr) minmax(500px, 0.78fr);
  gap: clamp(18px, 3vw, 44px);
  width: min(var(--max), calc(100% - 48px));
  min-height: inherit;
  margin: 0 auto;
  align-items: center;
}

.dot-field {
  position: absolute;
  left: clamp(28px, 11vw, 170px);
  top: clamp(58px, 12vw, 145px);
  width: min(520px, 44vw);
  height: min(380px, 33vw);
  background-image: radial-gradient(color-mix(in oklch, var(--blue-deep) 72%, transparent) 4px, transparent 5px);
  background-size: 40px 40px;
  opacity: 0.8;
}

.hero-copy {
  padding-top: clamp(18px, 3.6vw, 54px);
  position: relative;
  z-index: 3;
}

.hero-kicker {
  margin: 0 0 18px;
  color: var(--green);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0 0 clamp(34px, 5vw, 68px);
  font-size: clamp(48px, 4.85vw, 74px);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

h1 span {
  display: block;
  padding-left: clamp(64px, 10vw, 160px);
}

h1 span:first-child::before {
  content: "";
  display: inline-block;
  width: clamp(66px, 9vw, 150px);
  height: 8px;
  margin: 0 24px 12px calc(clamp(64px, 10vw, 160px) * -1);
  background: var(--paper);
}

.hero-lead {
  max-width: 560px;
  margin-bottom: 24px;
  font-size: clamp(23px, 2.35vw, 35px);
  line-height: 1.1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 44px;
  border: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button-green {
  background: var(--green);
  min-width: 210px;
}

.button-blue {
  background: var(--blue);
  color: var(--paper);
}

.button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.hero-face {
  position: relative;
  align-self: stretch;
  min-height: 520px;
  pointer-events: none;
}

#faceCanvas {
  position: absolute;
  right: min(-10vw, -118px);
  bottom: -4px;
  max-width: none;
  width: min(713px, 42vw);
  height: min(663px, 39vw);
}

.about-strip {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  --arrow-shift: 0px;
  background:
    linear-gradient(90deg, transparent 0 66%, color-mix(in oklch, var(--paper-cold) 62%, transparent) 66% 100%),
    var(--paper);
}

.about-strip::before {
  content: "";
  position: absolute;
  inset: 0 15% 0 0;
  background: color-mix(in oklch, var(--paper-cold) 88%, var(--paper));
}

.about-strip::after {
  content: "";
  position: absolute;
  right: clamp(34px, 8vw, 150px);
  top: 120px;
  width: clamp(160px, 28vw, 360px);
  height: clamp(120px, 22vw, 280px);
  background: var(--blue);
  clip-path: polygon(0 36%, 63% 36%, 38% 0, 72% 0, 100% 50%, 72% 100%, 38% 100%, 63% 64%, 0 64%);
  transform: translateX(var(--arrow-shift));
  transition: transform 90ms linear;
}

#pendulumCanvas {
  position: absolute;
  left: clamp(10px, 8vw, 100px);
  top: 0;
  z-index: 2;
  width: min(560px, 46vw);
  height: 360px;
}

.about-card {
  position: relative;
  z-index: 3;
  width: min(710px, 52vw);
  margin-left: max(390px, 34vw);
  padding-top: clamp(82px, 9vw, 132px);
}

.about-card div {
  background: color-mix(in oklch, var(--paper-cold) 97%, var(--paper));
  padding: clamp(30px, 4vw, 54px);
}

.about-card p {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 18px;
}

.about-card strong {
  color: var(--green);
  font-size: 17px;
}

.effectiveness {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(16px, 4vw, 54px);
  align-items: end;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(52px, 9vw, 110px) 0 clamp(48px, 8vw, 94px);
}

.effectiveness h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(32px, 4.3vw, 54px);
  line-height: 0.98;
}

.effectiveness p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.effectiveness strong,
.effectiveness-value {
  display: flex;
  align-items: baseline;
  color: var(--green);
  font-size: clamp(72px, 10vw, 128px);
  line-height: 0.9;
  white-space: nowrap;
}

.program-section,
.curators,
.price-section {
  width: min(1120px, calc(100% - 42px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 100px) 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 13px;
  margin-bottom: clamp(36px, 6vw, 70px);
  color: var(--blue);
}

.section-title span {
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 700;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 3.7vw, 48px);
  line-height: 1.05;
}

.program-lead {
  max-width: 720px;
  margin: -42px 0 50px 54px;
  color: var(--muted);
  font-size: 18px;
}

.program-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(34px, 6vw, 78px);
  row-gap: clamp(42px, 6vw, 72px);
}

.program-item {
  display: grid;
  grid-template-columns: clamp(150px, 14vw, 188px) 1fr;
  gap: clamp(22px, 3vw, 32px);
  align-items: start;
}

.program-item img {
  width: 100%;
  max-width: 188px;
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
}

.program-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.program-item h3 {
  margin-bottom: 13px;
  font-size: 20px;
  line-height: 1.18;
}

.program-item p,
.topic-flow,
.curator p,
.price-section p,
.price-section li {
  color: var(--muted);
  font-size: 17px;
}

.topic-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(44px, 7vw, 84px);
}

.topic-flow span {
  padding: 7px 11px;
  border: 1px solid color-mix(in oklch, var(--blue) 28%, transparent);
  background: color-mix(in oklch, var(--paper) 82%, var(--green));
}

.video-section {
  padding: clamp(48px, 8vw, 86px) 0 clamp(62px, 8vw, 108px);
  background: var(--blue);
  color: var(--paper);
  scroll-margin-top: 118px;
}

.video-copy,
.video-grid,
.video-start {
  width: min(1080px, calc(100% - 42px));
  margin-inline: auto;
}

.video-copy {
  display: block;
  align-items: end;
}

.video-copy .section-title {
  width: auto;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section-title-light {
  color: var(--paper);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
}

.video-grid h3 {
  margin: 0 0 14px;
  color: var(--paper);
  font-size: clamp(22px, 2.5vw, 34px);
}

.video-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: color-mix(in oklch, var(--blue-deep) 80%, var(--ink));
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.video-frame iframe,
.video-frame video,
.public-video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: color-mix(in oklch, var(--blue-deep) 90%, var(--ink));
  object-fit: contain;
}

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  background: color-mix(in oklch, var(--blue-deep) 20%, transparent);
  cursor: pointer;
}

.video-play:hover {
  background: color-mix(in oklch, var(--blue-deep) 8%, transparent);
}

.video-start {
  display: grid;
  grid-template-columns: 0.7fr 1fr auto;
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(34px, 6vw, 70px);
  padding-top: clamp(26px, 4vw, 42px);
  border-top: 1px solid color-mix(in oklch, var(--paper) 28%, transparent);
}

.video-start h3 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(28px, 4vw, 48px);
}

.video-start p {
  margin: 0;
  color: color-mix(in oklch, var(--paper) 78%, transparent);
  font-size: 19px;
}

.video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(60px, 8vw, 90px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 3px solid color-mix(in oklch, var(--paper) 80%, transparent);
  border-radius: 50%;
  background: color-mix(in oklch, var(--blue) 66%, transparent);
}

.play-mark::after {
  content: "";
  position: absolute;
  left: 39%;
  top: 30%;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid var(--paper);
}

.curator {
  display: grid;
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  margin-bottom: clamp(54px, 8vw, 98px);
}

.curator-left {
  grid-template-columns: 220px 1fr;
}

.curator-right {
  grid-template-columns: 1fr 220px;
}

.curator img {
  width: 220px;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1);
  outline: 9px solid var(--paper);
  box-shadow: -15px -15px 0 var(--blue), 15px 15px 0 var(--green);
}

.curator-right img {
  box-shadow: 15px -15px 0 var(--green), -15px 15px 0 var(--blue);
}

.curator h3 {
  margin-bottom: 6px;
  font-size: clamp(30px, 3.5vw, 46px);
}

.role {
  color: var(--green) !important;
  font-weight: 700;
}

.reviews {
  padding: clamp(48px, 7vw, 78px) 0;
}

.reviews-head,
.review-row {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-dark {
  color: var(--blue);
}

.review-arrows {
  display: flex;
  gap: 56px;
  color: var(--green);
  font-size: 34px;
}

.review-arrows span::before {
  content: "<";
}

.review-arrows span:last-child::before {
  content: ">";
}

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

blockquote {
  min-height: 185px;
  margin: 0;
  padding: 28px 30px;
  background: var(--blue);
  color: var(--paper);
}

blockquote span {
  display: block;
  margin-bottom: -10px;
  color: var(--ink);
  font-size: 78px;
  font-weight: 700;
  line-height: 0.7;
}

blockquote strong {
  color: var(--green);
  font-size: 17px;
}

blockquote p {
  margin: 16px 0 0;
  color: color-mix(in oklch, var(--paper) 80%, transparent);
  font-size: 16px;
}

.price-section {
  border-top: 1px solid color-mix(in oklch, var(--blue) 28%, transparent);
}

.price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
  padding: 24px 0;
  border-top: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
}

.price-line strong {
  font-size: clamp(28px, 4vw, 44px);
}

.price-line span {
  color: var(--green);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 700;
  white-space: nowrap;
}

.price-section ul {
  columns: 2;
  padding-left: 22px;
  margin-bottom: 34px;
}

.registration {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(280px, 0.6fr);
  gap: clamp(38px, 8vw, 100px);
  padding: clamp(58px, 8vw, 92px) max(22px, calc((100vw - var(--max)) / 2));
  background: oklch(11% 0.014 255);
  color: var(--paper);
  scroll-margin-top: 112px;
}

.lead-form,
.login-form {
  align-self: start;
  display: grid;
  gap: 18px;
  scroll-margin-top: 112px;
}

.lead-form .section-title,
.login-form .section-title {
  margin-bottom: 10px;
}

label {
  display: grid;
  gap: 8px;
  color: color-mix(in oklch, var(--paper) 72%, transparent);
  font-size: 16px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid color-mix(in oklch, var(--blue) 52%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
}

input:focus {
  outline: 2px solid var(--green);
  outline-offset: 5px;
}

input[readonly] {
  color: color-mix(in oklch, var(--paper) 62%, transparent);
  border-bottom-color: color-mix(in oklch, var(--green) 34%, transparent);
}

.registration input:-webkit-autofill,
.registration input:-webkit-autofill:hover,
.registration input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--paper);
  caret-color: var(--paper);
  box-shadow: 0 0 0 1000px oklch(11% 0.014 255) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.login-form {
  width: min(100%, 430px);
}

.lead-form button,
.login-form button {
  width: min(100%, 330px);
  margin-top: 18px;
}

.form-note {
  max-width: 500px;
  color: color-mix(in oklch, var(--paper) 45%, transparent);
  font-size: 14px;
}

.form-note-top {
  color: color-mix(in oklch, var(--paper) 78%, transparent);
  font-size: 16px;
}

.contacts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 0.6fr);
  gap: clamp(38px, 8vw, 100px);
  border-top: 1px solid color-mix(in oklch, var(--blue) 32%, transparent);
  padding-top: 34px;
  color: color-mix(in oklch, var(--paper) 70%, transparent);
  font-size: 15px;
}

.captcha-row {
  max-width: 330px;
}

.code-row {
  max-width: 330px;
}

.code-row input {
  color: var(--paper);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.captcha-line {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--paper);
  font-size: 20px;
}

.captcha-line input {
  text-align: center;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contacts nav {
  display: grid;
  gap: 5px;
  margin-bottom: 42px;
}

.contacts p {
  margin: 0 0 11px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .hero {
    min-height: min(760px, calc(100svh - 136px));
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-face {
    position: absolute;
    inset: auto -50vw -8px auto;
    width: min(621px, 83vw);
    height: min(578px, 77vw);
    opacity: 0.98;
  }

  #faceCanvas {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    max-width: 650px;
  }

  .about-card {
    width: min(620px, calc(100% - 32px));
    margin: 260px auto 0;
    padding-top: 0;
  }

  #pendulumCanvas {
    width: min(520px, 86vw);
    height: 310px;
  }

  .program-grid,
  .review-row,
  .registration {
    grid-template-columns: 1fr;
  }

  .contacts {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .video-copy,
  .video-start {
    grid-template-columns: 1fr;
  }

  .curator-left,
  .curator-right {
    grid-template-columns: 180px 1fr;
  }

  .curator-right img {
    grid-row: 1;
    grid-column: 1;
  }

  .curator-right > div {
    grid-row: 1;
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 18px;
    background-size: 34px 34px;
  }

  .video-section {
    scroll-margin-top: 104px;
    padding-top: 86px;
  }

  .site-header {
    position: sticky;
    grid-template-columns: 1fr auto;
    gap: 10px;
    min-height: 0;
    padding: 8px 12px 10px;
  }

  .brand img {
    width: min(220px, 52vw);
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  .login-link {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    padding: 13px 0 4px;
    text-align: center;
    font-size: 15px;
  }

  .site-header.nav-open .login-link {
    display: block;
  }

  .top-nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: visible;
    padding: 8px 0 0;
    font-size: 18px;
    border-top: 1px solid color-mix(in oklch, var(--blue) 14%, transparent);
  }

  .site-header.nav-open .top-nav {
    display: grid;
  }

  .top-nav a {
    padding: 12px 0;
    border-bottom: 1px solid color-mix(in oklch, var(--blue) 10%, transparent);
  }

  .hero {
    min-height: min(720px, calc(100svh - 182px));
  }

  .hero-inner {
    width: min(100% - 28px, var(--max));
  }

  .dot-field {
    left: 18px;
    top: 82px;
    width: 88vw;
    height: 260px;
    background-size: 30px 30px;
  }

  .hero-kicker {
    font-size: clamp(34px, 10vw, 48px);
  }

  h1 {
    margin-bottom: 34px;
    font-size: clamp(42px, 11vw, 58px);
    line-height: 1.18;
  }

  h1 span {
    padding-left: 0;
  }

  h1 span:first-child::before {
    width: 62px;
    height: 6px;
    margin: 0 14px 9px 0;
  }

  .hero-lead {
    max-width: 350px;
    font-size: 21px;
    line-height: 1.18;
  }

  .hero-face {
    right: -48vw;
    bottom: -16px;
    width: 103vw;
    height: 95vw;
  }

  .about-strip::after {
    display: none;
  }

  #pendulumCanvas {
    display: none;
  }

  .about-card {
    margin-top: 28px;
  }

  .about-card div {
    padding: 24px 20px;
  }

  .effectiveness {
    grid-template-columns: 1fr;
  }

  .effectiveness strong {
    justify-self: start;
  }

  .program-lead {
    margin: -20px 0 36px;
  }

  .program-section {
    width: min(1120px, calc(100% - 28px));
  }

  .program-item {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
  }

  .program-item img {
    max-width: 116px;
  }

  .program-item div,
  .program-item h3,
  .program-item p {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .program-item span {
    font-size: 30px;
  }

  .curator,
  .curator-left,
  .curator-right {
    grid-template-columns: 1fr;
  }

  .curator-right img {
    grid-row: 1;
    grid-column: 1;
  }

  .curator-right > div {
    grid-row: 2;
    grid-column: 1;
  }

  .curator img {
    width: 180px;
  }

  .reviews-head {
    display: block;
  }

  .review-arrows {
    display: none;
  }

  .price-line {
    display: block;
  }

  .price-line span {
    display: block;
    margin-top: 8px;
  }

  .price-section ul {
    columns: 1;
  }

  .registration {
    padding-inline: 20px;
  }
}
