:root {
  --ink: #16384c;
  --muted: #60717c;
  --paper: #fffaf0;
  --paper-deep: #f6eddc;
  --white: #ffffff;
  --turquoise: #42c4c9;
  --yellow: #ffd969;
  --coral: #ff7b7b;
  --mint: #a8e6d4;
  --shadow: 0 24px 70px rgba(22, 56, 76, 0.14);
  --line: 3px solid var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 217, 105, 0.36), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(66, 196, 201, 0.28), transparent 25rem),
    linear-gradient(135deg, #fffdf8 0%, var(--paper) 50%, #f5fbff 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(22, 56, 76, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 56, 76, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
}

main {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 18px;
  padding: 12px 16px;
  background: #ffd969;
}

.stats-strip p {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
}

.stats-strip strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.site-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 12px 14px 12px 20px;
  border: var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 8px 10px 0 rgba(22, 56, 76, 0.08);
}

.brand {
  color: var(--ink);
  font-family: "Patrick Hand", cursive;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.language-menu {
  position: relative;
  z-index: 10;
}

.language-menu__toggle {
  display: inline-grid;
  place-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  list-style: none;
}

.language-menu__toggle::-webkit-details-marker {
  display: none;
}

.language-menu__toggle span {
  display: block;
  width: 32px;
  height: 3px;
  margin: 3px 0;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.language-menu[open] .language-menu__toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.language-menu[open] .language-menu__toggle span:nth-child(2) {
  opacity: 0;
}

.language-menu[open] .language-menu__toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.language-switcher {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  min-width: 128px;
  gap: 8px;
  padding: 12px;
  border: var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 8px 10px 0 rgba(22, 56, 76, 0.1);
}

.language-switcher__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.language-switcher__button:hover,
.language-switcher__button.is-active {
  background: var(--yellow);
  box-shadow: 3px 4px 0 rgba(22, 56, 76, 0.12);
  transform: translate(-1px, -1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 44px;
  align-items: center;
  min-height: 760px;
  padding: 54px;
  border: var(--line);
  border-radius: 42px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__content::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -42px;
  width: 190px;
  height: 18px;
  border-radius: 999px;
  background: repeating-linear-gradient(-14deg, rgba(255, 123, 123, 0.65) 0 8px, transparent 8px 14px);
}

.eyebrow {
  margin: 0 0 12px;
  color: #177f8b;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 26px;
  font-size: clamp(3rem, 7vw, 6.65rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4.8vw, 4.55rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  overflow-wrap: break-word;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.45rem;
  line-height: 1.05;
}

.hero__lead,
.section-heading p,
.result p,
.advantage-list p,
.learning-copy p,
.note-card p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

.hero__lead {
  max-width: 650px;
  margin-bottom: 12px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 0 24px;
  border: var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 6px 7px 0 rgba(22, 56, 76, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translate(-2px, -3px);
  box-shadow: 9px 10px 0 rgba(22, 56, 76, 0.16);
}

.button--primary {
  background: var(--yellow);
}

.button--ghost {
  background: var(--white);
}

.hero__visual {
  position: relative;
  min-height: 600px;
}

.chat-card {
  position: absolute;
  top: 44px;
  right: 0;
  width: min(100%, 440px);
  padding: 22px;
  border: var(--line);
  border-radius: 34px;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.chat-card::after {
  content: "";
  position: absolute;
  right: 70px;
  bottom: -24px;
  border-width: 24px 20px 0 0;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
}

.chat-card__header {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.chat-card__header span,
.typing-line span,
.advantage-list span {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.chat-card__header span:nth-child(1) {
  background: var(--coral);
}

.chat-card__header span:nth-child(2) {
  background: var(--yellow);
}

.chat-card__header span:nth-child(3) {
  background: var(--turquoise);
}

.chat-bubble {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 14px;
  padding: 14px 18px;
  border: var(--line);
  border-radius: 20px;
  font-weight: 900;
}

.chat-bubble--bot {
  background: #e6faf7;
}

.chat-bubble--user {
  margin-left: auto;
  background: #fff1b8;
}

.typing-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  color: var(--muted);
}

.typing-line span {
  background: var(--mint);
}

.typing-line small {
  margin-left: auto;
  font-weight: 800;
}

.anime-kid {
  position: absolute;
  left: 16px;
  bottom: 10px;
  width: 320px;
  height: 390px;
  transform: rotate(-4deg);
}

.anime-kid__head {
  position: absolute;
  left: 94px;
  top: 42px;
  width: 134px;
  height: 126px;
  border: var(--line);
  border-radius: 46% 48% 52% 50%;
  background: #ffe1c9;
  z-index: 3;
}

.anime-kid__hair {
  position: absolute;
  left: 72px;
  top: 10px;
  width: 176px;
  height: 120px;
  border: var(--line);
  border-radius: 68px 80px 44px 52px;
  background:
    radial-gradient(circle at 85% 20%, #8a624e 0 16px, transparent 17px),
    #9e725c;
  z-index: 4;
}

.anime-kid__hair::before,
.anime-kid__hair::after {
  content: "";
  position: absolute;
  background: #9e725c;
  border: var(--line);
}

.anime-kid__hair::before {
  right: -36px;
  top: 4px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

.anime-kid__hair::after {
  left: 10px;
  bottom: -24px;
  width: 44px;
  height: 62px;
  border-radius: 8px 8px 24px 24px;
  transform: rotate(20deg);
}

.anime-kid__eye {
  position: absolute;
  top: 60px;
  width: 28px;
  height: 8px;
  border-top: var(--line);
  border-radius: 50%;
}

.anime-kid__eye--left {
  left: 32px;
  transform: rotate(9deg);
}

.anime-kid__eye--right {
  right: 30px;
  transform: rotate(-9deg);
}

.anime-kid__mouth {
  position: absolute;
  left: 58px;
  top: 88px;
  width: 24px;
  height: 12px;
  border-bottom: var(--line);
  border-radius: 50%;
}

.anime-kid__body {
  position: absolute;
  left: 62px;
  top: 168px;
  width: 190px;
  height: 170px;
  border: var(--line);
  border-radius: 42px 42px 70px 70px;
  background: #9be5ef;
}

.anime-kid__book {
  position: absolute;
  left: 36px;
  bottom: 38px;
  width: 250px;
  height: 94px;
  padding-top: 34px;
  border: var(--line);
  border-radius: 18px;
  background: #fff1b8;
  color: rgba(22, 56, 76, 0.62);
  font-family: "Patrick Hand", cursive;
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  transform: rotate(5deg);
  z-index: 5;
}

.idea-grid,
.advantage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 28px 0;
}

.note-card,
.advantage-list article {
  border: var(--line);
  border-radius: 30px;
  background: var(--white);
  padding: 28px;
  box-shadow: 8px 10px 0 rgba(22, 56, 76, 0.09);
}

.note-card {
  transform: rotate(-1deg);
}

.note-card--yellow {
  background: #fff8d9;
  transform: rotate(1.2deg);
}

.note-card--blue {
  background: #e6faf7;
  transform: rotate(-0.6deg);
}

.note-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border: var(--line);
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  font-weight: 900;
}

.note-card h2 {
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.solution,
.advantages,
.result {
  margin-top: 86px;
}

.section-heading {
  max-width: 790px;
  margin-bottom: 28px;
}

.learning-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: center;
  padding: 34px;
  border: var(--line);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.hand-chart {
  position: relative;
  min-height: 360px;
  border: var(--line);
  border-radius: 28px;
  background: var(--paper);
  overflow: hidden;
}

.hand-chart p {
  position: absolute;
  left: 28px;
  top: 18px;
  max-width: calc(100% - 56px);
  margin: 0;
  font-family: "Patrick Hand", cursive;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: 0.82;
  overflow-wrap: break-word;
}

:lang(es) h1,
:lang(ru) h1,
:lang(uk) h1 {
  font-size: clamp(2.7rem, 6.2vw, 5.6rem);
  letter-spacing: -0.06em;
}

:lang(es) .hand-chart p,
:lang(ru) .hand-chart p,
:lang(uk) .hand-chart p {
  font-size: clamp(2rem, 4.2vw, 4.1rem);
  line-height: 0.9;
}

.hand-chart svg {
  position: absolute;
  inset: 90px 28px 35px 54px;
  width: calc(100% - 82px);
  height: calc(100% - 125px);
}

.path,
.arrow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 12;
}

.path--turquoise {
  stroke: var(--turquoise);
}

.path--coral {
  stroke: #d53232;
  stroke-width: 10;
}

.arrow {
  stroke: var(--ink);
  stroke-width: 6;
}

.chart-axis {
  position: absolute;
  background: var(--ink);
  border-radius: 999px;
}

.chart-axis--vertical {
  left: 52px;
  top: 94px;
  width: 5px;
  height: 220px;
}

.chart-axis--horizontal {
  left: 52px;
  bottom: 50px;
  width: 78%;
  height: 5px;
}

.chart-label {
  position: absolute;
  color: rgba(22, 56, 76, 0.58);
  font-family: "Patrick Hand", cursive;
  font-size: 2rem;
}

.chart-label--y {
  left: 10px;
  top: 180px;
  transform: rotate(-90deg);
}

.chart-label--x {
  right: 64px;
  bottom: 10px;
}

.learning-copy {
  padding: 10px 6px;
}

.learning-copy ul {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.learning-copy li {
  position: relative;
  padding: 14px 18px 14px 46px;
  border: var(--line);
  border-radius: 18px;
  background: var(--white);
  font-weight: 800;
}

.learning-copy li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--turquoise);
}

.advantage-list article:nth-child(2) {
  background: #fff8d9;
}

.advantage-list article:nth-child(3) {
  background: #e6faf7;
}

.advantage-list span {
  width: 28px;
  height: 28px;
  margin-bottom: 20px;
  background: var(--coral);
}

.advantage-list article:nth-child(2) span {
  background: var(--yellow);
}

.advantage-list article:nth-child(3) span {
  background: var(--turquoise);
}

.result {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  border: var(--line);
  border-radius: 36px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.result .eyebrow,
.result p {
  color: #b7eef0;
}

.result h2 {
  max-width: 820px;
  margin-bottom: 14px;
  color: var(--white);
}

.result .button {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .hero,
  .learning-card,
  .result {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 34px;
  }

  .hero__visual {
    min-height: 560px;
  }

  .chat-card {
    right: 30px;
  }

  .idea-grid,
  .advantage-list {
    grid-template-columns: 1fr;
  }

  .result {
    display: grid;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    align-items: center;
    border-radius: 999px;
    flex-direction: row;
    padding: 18px;
  }

  .stats-strip {
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
  }

  .stats-strip p {
    justify-content: space-between;
    width: 100%;
  }

  .language-switcher {
    min-width: 118px;
  }

  .language-switcher__button {
    width: 100%;
    padding: 0 8px;
  }

  .hero,
  .learning-card,
  .result {
    padding: 22px;
    border-radius: 28px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
  }

  .hero__actions,
  .button {
    width: 100%;
  }

  .hero__visual {
    min-height: 500px;
  }

  .chat-card {
    top: 20px;
    right: 0;
  }

  .anime-kid {
    left: -34px;
    transform: scale(0.86) rotate(-4deg);
    transform-origin: left bottom;
  }

  .hand-chart {
    min-height: 300px;
  }

  .hand-chart svg {
    top: 82px;
  }
}
