:root {
  --bg: #0d0d14;
  --surface: #16161f;
  --surface-2: #1e1e2a;
  --text: #f4f4f7;
  --muted: #a3a3b5;
  --en: #4f7cff;
  --zh: #ff4d5e;
  --it: #22c08a;
  --accent: #ffc94d;
  --radius: 24px;
  --font: "Manrope", "Noto Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

.container--narrow {
  width: min(760px, 100% - 40px);
}

/* Background blobs */
.blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  filter: blur(90px);
  opacity: 0.45;
}

.blob {
  position: absolute;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  animation: float 18s ease-in-out infinite alternate;
}

.blob--1 { background: var(--en); top: -10%; left: -10%; }
.blob--2 { background: var(--zh); bottom: -15%; right: -10%; animation-delay: -6s; }
.blob--3 { background: var(--accent); top: 40%; left: 40%; width: 25vw; height: 25vw; opacity: 0.5; animation-delay: -12s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, 6vh) scale(1.15); }
  100% { transform: translate(-4vw, 10vh) scale(0.9); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--en), var(--zh));
  color: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -10px var(--zh);
}

.btn--small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn--ghost:hover {
  box-shadow: none;
  border-color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--bg);
}

.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.icon--telegram {
  color: #229ed9;
}

.icon--email {
  color: var(--zh);
}

.gradient-text {
  background: linear-gradient(90deg, var(--en), var(--zh), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 18px 0;
  transition: background 0.3s, padding 0.3s;
}

.header--scrolled {
  background: rgba(13, 13, 20, 0.75);
  backdrop-filter: blur(14px);
  padding: 10px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.logo__dot {
  color: var(--zh);
}

.nav {
  display: flex;
  gap: 28px;
  font-weight: 500;
  color: var(--muted);
}

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

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang {
  display: flex;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.lang__btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  background: none;
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.lang__btn:hover {
  color: var(--text);
}

.lang__btn--active {
  background: var(--text);
  color: var(--bg);
}

.lang__btn--active:hover {
  color: var(--bg);
}

.burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: transform 0.3s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 90px 0 40px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 540px;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 36px;
}

.stats {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.stats li {
  max-width: 220px;
}

.stats strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
}

.stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero__visual {
  position: relative;
}

.photo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  margin-inline: auto;
  /* Fade the photo edges into the page background */
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 45%, transparent 100%);
}

.bubble {
  position: absolute;
  padding: 12px 22px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 1.3rem;
  animation: bob 4s ease-in-out infinite;
}

.bubble--en {
  background: var(--en);
  top: 10%;
  left: -8%;
  border-bottom-left-radius: 4px;
}

.bubble--zh {
  background: var(--zh);
  bottom: 12%;
  right: -6%;
  border-bottom-right-radius: 4px;
  animation-delay: -2s;
}

@keyframes bob {
  50% { transform: translateY(-14px); }
}

/* Marquee */
.marquee {
  overflow: hidden;
  padding: 26px 0;
  background: var(--accent);
  color: var(--bg);
  transform: rotate(-2deg);
  margin: 40px -20px;
}

.marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  font-size: 1.6rem;
  font-weight: 800;
  animation: scroll 30s linear infinite;
}

.marquee__track span::after {
  content: "✦";
  margin-left: 48px;
}

@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* Sections */
.section {
  padding: 110px 0;
}

.section__head {
  margin-bottom: 50px;
}

/* About */
.about__intro {
  max-width: 720px;
  margin-bottom: 50px;
}

.about__intro p:last-child {
  color: var(--muted);
  font-size: 1.2rem;
}

.strengths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.strength {
  --line: var(--en);
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--line);
}

.strength--it {
  --line: var(--it);
}

.strength--zh {
  --line: var(--zh);
}

.strength__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 16px;
}

.strength h3 {
  font-size: 1.3rem;
}

.strength p {
  color: var(--muted);
  margin: 0;
}

.strength .strength__sub {
  color: var(--line);
  font-weight: 700;
  margin: -0.2em 0 1em;
}

/* Diplomas & certificates */
.docs {
  margin-top: 50px;
}

.docs__title {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

/* Papers fanned out on a desk: overlapping, tilted, straightened on hover/tap */
.docs__grid {
  --h: clamp(120px, 30vw, 380px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0 40px;
}

.doc {
  --tilt: -7deg;
  --shift: 14px;
  position: relative;
  z-index: 1;
  display: block;
  flex-shrink: 0;
  padding: 0;
  margin-inline: calc(var(--h) * -0.09);
  border: none;
  border-radius: 6px;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(var(--shift)) rotate(var(--tilt));
  transition: transform 0.4s ease, opacity 0.4s, box-shadow 0.4s;
}

/* Diploma lies at the back; the HSK sheet covers its right half, including the emblem */
.doc--diploma {
  --tilt: -6deg;
  --shift: -20px;
  margin-right: calc(var(--h) * -0.74);
}

.doc--diploma img {
  height: calc(var(--h) * 0.85);
}

.doc--hsk {
  --tilt: 2deg;
  --shift: 0px;
  z-index: 3;
}

.doc--scores {
  --tilt: 8deg;
  --shift: 18px;
  z-index: 2;
}

.doc:hover,
.doc:focus-visible,
.doc--active {
  z-index: 5;
  transform: translateY(-10px) rotate(0) scale(1.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.docs__grid:hover .doc:not(:hover),
.docs__grid:has(.doc--active) .doc:not(.doc--active) {
  opacity: 0.6;
}

/* The diploma only lifts a little and stays behind, so its emblem stays covered */
.doc--diploma:hover,
.doc--diploma:focus-visible,
.doc--diploma.doc--active {
  z-index: 1;
  transform: translateY(calc(var(--shift) - 12px)) rotate(var(--tilt));
}

.docs__grid:has(.doc--diploma:hover, .doc--diploma.doc--active) .doc {
  opacity: 1;
}

.doc img {
  display: block;
  height: var(--h);
  width: auto;
}

/* Ukrainian diploma: leftmost paper, flips between cover and inside */
.doc--ua {
  --tilt: -10deg;
  --shift: 12px;
  z-index: 2;
  margin-right: calc(var(--h) * -0.3);
  overflow: visible;
  background: none;
  box-shadow: none;
  cursor: pointer;
  perspective: 1400px;
}

.flip__inner {
  position: relative;
  height: calc(var(--h) * 0.85);
  aspect-ratio: 1280 / 897;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.flip--flipped .flip__inner {
  transform: rotateY(180deg);
}

.doc .flip__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip__face--back {
  transform: rotateY(180deg);
}

.flip__badge,
.flip__zoom {
  position: absolute;
  top: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 13, 20, 0.75);
  color: #fff;
  font-size: 1rem;
}

.flip__badge {
  left: 8px;
}

.flip__zoom {
  right: 8px;
  cursor: zoom-in;
}

.lightbox {
  max-width: 92vw;
  max-height: 92vh;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: none;
  cursor: zoom-out;
}

.lightbox::backdrop {
  background: rgba(13, 13, 20, 0.9);
}

.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
}

.inline-link {
  color: var(--line);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cards with cursor glow */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  --glow: var(--en);
  position: relative;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.3s;
}

.card--zh {
  --glow: var(--zh);
}

.card--it {
  --glow: var(--it);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--x, 50%) var(--y, 50%), color-mix(in srgb, var(--glow) 35%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-6px);
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
}

.card__tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--glow);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.7rem;
}

.card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

/* Kids & parents */
.kids {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-top: 24px;
  padding: 32px 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.kids__icon {
  font-size: 2.4rem;
  line-height: 1;
}

.kids h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2em;
}

.kids .kids__sub {
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 16px;
}

.kids__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
  color: var(--muted);
}

.kids__list li {
  position: relative;
  padding-left: 22px;
}

.kids__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step__num {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--en), var(--zh));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step p {
  color: var(--muted);
  margin: 0;
}

/* Pricing */
.consult {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.consult__icon {
  font-size: 2rem;
}

.consult p {
  margin: 0;
  color: var(--muted);
}

.consult strong {
  display: block;
  font-size: 1.2rem;
  color: var(--text);
}

.prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.price {
  --line: var(--en);
  padding: 36px 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--line);
  text-align: center;
}

.price--it {
  --line: var(--it);
}

.price--zh {
  --line: var(--zh);
}

.price p {
  color: var(--muted);
  margin: 0;
}

.price .price__value {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 10px 0;
}

.price__value small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.price .price__pack {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.price__pack strong {
  color: var(--line);
}

/* FAQ */
.faq {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
}

.faq summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.3s;
}

.faq[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  color: var(--muted);
  margin: 14px 0 0;
}

/* CTA */
.cta {
  text-align: center;
  padding: 80px 30px;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--en), var(--zh));
}

.cta p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.cta__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* Footer */
.footer {
  padding: 40px 0;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal--visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 960px) {
  .hero__inner,
  .cards,
  .prices {
    grid-template-columns: 1fr;
  }

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

  .hero__visual {
    max-width: 380px;
    margin-inline: auto;
  }


  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    gap: 0;
    padding: 90px 20px 30px;
    background: rgba(13, 13, 20, 0.97);
    transform: translateY(-100%);
    transition: transform 0.4s;
    z-index: -1;
  }

  .nav a {
    padding: 14px 0;
    font-size: 1.2rem;
  }

  .nav--open {
    transform: none;
  }

  .burger {
    display: block;
  }

  .header__actions .btn--small {
    display: none;
  }
}

@media (max-width: 560px) {
  .kids {
    flex-direction: column;
    padding: 28px 24px;
  }

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

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

  .stats {
    gap: 24px;
  }

  .stats strong {
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
