:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --ink: #1d211d;
  --muted: #697069;
  --accent: #235f4d;
  --accent-light: #dbe9c8;
  --line: rgba(29, 33, 29, 0.12);
  --page: 1180px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.site-header,
.hero,
.section,
footer {
  width: min(calc(100% - 48px), var(--page));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--accent);
  font-size: 15px;
  font-weight: 850;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.3);
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-radius: 999px;
  font-weight: 750;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}
.button-with-icon {
  gap: 10px;
}
.telegram-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(12, 65, 95, 0.18);
}
.button:focus-visible,
.answers button:focus-visible,
a:focus-visible {
  outline: 3px solid #d68a4d;
  outline-offset: 3px;
}
.button-small {
  padding: 11px 20px;
  color: white;
  background: var(--accent);
  font-size: 14px;
}
.button-primary {
  min-height: 58px;
  padding: 0 27px;
  color: white;
  background: var(--accent);
}
.button-primary:hover {
  background: #194c3d;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
  min-height: calc(100vh - 92px);
  padding: 44px 0 96px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 24px;
  height: 1px;
  background: currentColor;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(54px, 6.2vw, 88px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 0.96;
  text-wrap: balance;
}

.hero-lead {
  max-width: 570px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}
.text-link {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 720;
}
.text-link span {
  margin-left: 10px;
}

.hero-stats {
  display: flex;
  gap: clamp(28px, 4vw, 60px);
  margin: 56px 0 0;
}

.hero-stats div {
  display: grid;
  gap: 3px;
}
.hero-stats dt {
  font-size: 20px;
  font-weight: 790;
  letter-spacing: -0.035em;
}
.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.preview-wrap {
  position: relative;
  display: grid;
  min-height: 610px;
  place-items: center;
  isolation: isolate;
}
.preview-wrap::before {
  position: absolute;
  z-index: -3;
  width: min(100%, 510px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-light);
  content: "";
}

.orbit {
  position: absolute;
  z-index: -2;
  border: 1px solid rgba(35, 95, 77, 0.2);
  border-radius: 50%;
}
.orbit-one {
  width: 96%;
  aspect-ratio: 1;
  transform: rotate(-14deg) scaleY(0.73);
}
.orbit-two {
  width: 74%;
  aspect-ratio: 1;
  transform: rotate(28deg) scaleY(1.08);
}

.quiz-card {
  width: min(100%, 394px);
  padding: 27px;
  border: 1px solid rgba(29, 33, 29, 0.08);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 34px 80px rgba(32, 52, 43, 0.16);
  transform: rotate(-2deg);
  backdrop-filter: blur(12px);
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-topic {
  color: var(--accent);
  font-size: 13px;
  font-weight: 790;
}
.quiz-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.quiz-progress {
  height: 3px;
  margin: 17px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e3dc;
}
.quiz-progress span {
  display: block;
  width: 43%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.quiz-label {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.quiz-card h2 {
  margin-bottom: 25px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}
.answers {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.answers button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 49px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    border 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.answers button:hover:not(:disabled) {
  border-color: rgba(35, 95, 77, 0.45);
  transform: translateX(3px);
}
.answers button span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(29, 33, 29, 0.05);
  font-size: 11px;
  font-weight: 800;
}
.answers button.correct {
  border-color: rgba(35, 95, 77, 0.42);
  color: #164a3a;
  background: rgba(35, 95, 77, 0.1);
}
.answers button.wrong {
  border-color: rgba(167, 65, 56, 0.35);
  color: #84372f;
  background: rgba(167, 65, 56, 0.08);
}
.answers button:disabled {
  cursor: default;
}
.answer-note {
  min-height: 18px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.answer-note.success {
  color: var(--accent);
  font-weight: 720;
}

.floating-note {
  position: absolute;
  padding: 11px 15px;
  border: 1px solid rgba(29, 33, 29, 0.08);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(38, 58, 49, 0.13);
  font-size: 12px;
  font-weight: 760;
}
.floating-note span {
  color: #d98745;
}
.floating-note-top {
  top: 16%;
  right: -2%;
  transform: rotate(5deg);
}
.floating-note-bottom {
  bottom: 15%;
  left: -1%;
  color: var(--accent);
  transform: rotate(-5deg);
}

.section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 40px;
  margin-bottom: 64px;
}
.section h2 {
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 660;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mode-grid article {
  position: relative;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.46);
}
.mode-number {
  position: absolute;
  top: 25px;
  right: 25px;
  color: var(--muted);
  font-size: 11px;
}
.mode-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 92px;
  place-items: center;
  border-radius: 15px;
  color: var(--accent);
  background: var(--accent-light);
  font-size: 24px;
}
.mode-grid h3 {
  margin-bottom: 11px;
  font-size: 25px;
  letter-spacing: -0.035em;
}
.mode-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.topics {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 70px;
}
.topics h2 {
  margin-bottom: 0;
}
.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topic-cloud li {
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.48);
  font-size: 14px;
  font-weight: 650;
}
.topic-cloud li:nth-child(3n + 1) {
  color: var(--accent);
  background: var(--accent-light);
  border-color: transparent;
}

.start {
  width: min(calc(100% - 48px), 1280px);
  margin-bottom: 36px;
  padding: clamp(56px, 8vw, 100px);
  border: 0;
  border-radius: 34px;
  color: white;
  background: var(--accent);
}
.eyebrow-light {
  color: #bbd7c8;
}
.start h2 {
  max-width: 760px;
  margin-bottom: 64px;
}
.start ol {
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.start li {
  display: grid;
  grid-template-columns: 70px 1fr 1fr;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.start li > span {
  color: #bbd7c8;
  font-size: 12px;
}
.start li strong {
  font-size: 17px;
}
.start li small {
  color: #bbd7c8;
  font-size: 14px;
}
.button-light {
  padding: 17px 25px;
  color: var(--accent);
  background: white;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 38px;
  padding: 42px 0 52px;
}
footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.footer-link {
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 720;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 70px;
  }
  .hero-copy {
    max-width: 720px;
  }
  .preview-wrap {
    width: min(100%, 590px);
    margin: 0 auto;
  }
  .section-heading,
  .topics {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .topic-cloud {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .section,
  footer {
    width: min(calc(100% - 32px), var(--page));
  }
  .site-header {
    height: 76px;
  }
  .nav-link {
    display: none;
  }
  .hero {
    min-height: auto;
    padding: 54px 0 74px;
    gap: 52px;
  }
  h1 {
    font-size: clamp(48px, 15vw, 66px);
  }
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .text-link {
    align-self: flex-start;
  }
  .hero-stats {
    justify-content: space-between;
    gap: 14px;
    margin-top: 44px;
  }
  .preview-wrap {
    min-height: 530px;
  }
  .quiz-card {
    width: min(92%, 394px);
    padding: 22px;
  }
  .floating-note-top {
    right: 0;
  }
  .floating-note-bottom {
    left: 0;
  }
  .section {
    padding: 82px 0;
  }
  .section-heading {
    margin-bottom: 38px;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .mode-grid article {
    min-height: auto;
  }
  .mode-icon {
    margin-bottom: 52px;
  }
  .topics {
    gap: 38px;
  }
  .start {
    width: calc(100% - 20px);
    padding: 54px 22px;
    border-radius: 26px;
  }
  .start h2 {
    margin-bottom: 40px;
  }
  .start li {
    grid-template-columns: 40px 1fr;
  }
  .start li small {
    grid-column: 2;
  }
  footer {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  footer p {
    order: 3;
  }
  .footer-link {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms;
  }
}
