.hero-animation { --hero-slide: 5s; --hero-cycle: calc(3 * var(--hero-slide)); position: relative; grid-column: 7 / -1; align-self: center; min-width: 0; aspect-ratio: 1.12; display: grid; place-items: center; border-radius: var(--radius-card); background: var(--hero-plate, #dcefe2); overflow: hidden; cursor: pointer; isolation: isolate; }
.hero-animation:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 5px; }
.hero-paper-stack { position: absolute; width: 86%; aspect-ratio: 1.5; border-radius: 12px; background: #f8f8f5; transform: translateY(-9%) rotate(-4deg); box-shadow: 0 12px 32px #173d2620; }
.hero-paper-stack::before { content: ""; position: absolute; inset: 0; border: 1px solid #bed1c0; border-radius: inherit; background: #f8f8f5; transform: translate(3%, 4%) rotate(7deg); }
.hero-paper { position: absolute; width: 92%; aspect-ratio: 1.5; border-radius: 12px; box-shadow: 0 15px 32px #173d2626; overflow: hidden; animation: hero-paper-cycle var(--hero-cycle) ease-in-out infinite; }
.hero-paper-math, .hero-score-math { animation-delay: calc(-2 * var(--hero-slide)); }
.hero-paper-quiz, .hero-score-quiz { animation-delay: calc(-1 * var(--hero-slide)); }
.hero-paper img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; filter: brightness(1.2) contrast(1.15); }
.hero-scan-window { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.hero-scan { position: absolute; z-index: 1; inset: -14% 2.5% auto; height: 20%; background: linear-gradient(0deg, #1bc17d99, #1bc17d00); border-bottom: 3px solid #08b66b; box-shadow: 0 4px 14px #10ba6f66; animation: hero-scanning var(--hero-slide) linear infinite; }
.hero-review-mark { position: absolute; z-index: 2; right: 4%; width: 10%; max-width: 64px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; color: white; background: #0bb57e; box-shadow: 0 4px 12px #123a2430; animation: hero-check var(--hero-slide) ease-out infinite; }
.hero-review-mark svg { width: 65%; height: 65%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hero-mark-1 { top: 32%; }
.hero-mark-2 { top: 50%; animation-name: hero-check-second; }
.hero-mark-3 { top: 68%; animation-name: hero-check-third; }
.hero-mark-4 { top: 66%; animation-name: hero-check-fourth; }
.hero-mark-5 { top: 83%; animation-name: hero-check-fifth; }
.hero-review-error { background: #e83d57; }
.hero-paper-math .hero-review-mark, .hero-paper-quiz .hero-review-mark { translate: 0 -50%; }
.hero-paper-math .hero-mark-1 { top: 44%; }
.hero-paper-math .hero-mark-2 { top: 64%; }
.hero-paper-math .hero-mark-3 { top: 84%; }
.hero-paper-quiz .hero-mark-1 { top: 31%; }
.hero-paper-quiz .hero-mark-2 { top: 42%; }
.hero-paper-quiz .hero-mark-3 { top: 54%; }
.hero-paper-quiz .hero-mark-4 { top: 67%; }
.hero-paper-quiz .hero-mark-5 { top: 82%; }
.hero-paper-quiz .hero-review-mark { right: .5%; width: 4.5%; max-width: 32px; }
.hero-error-line { position: absolute; left: 8%; bottom: 24%; width: 38%; height: 3px; background: #e83d57; transform-origin: left; animation: hero-error-line var(--hero-slide) ease-out infinite; }
.hero-score { position: absolute; inset: auto auto 12px; z-index: 3; padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-muted); font-size: var(--text-xs); line-height: 1.4; white-space: nowrap; animation-name: hero-score; animation-duration: var(--hero-cycle); animation-timing-function: ease-out; animation-iteration-count: infinite; }
.hero-score strong { margin-inline-start: var(--space-2xs); color: var(--color-success); font-weight: 700; }
.hero-animation.is-paused :is(.hero-paper, .hero-scan, .hero-review-mark, .hero-error-line, .hero-score) { animation-play-state: paused; }
@keyframes hero-scanning { 0% { transform: translateY(60%); opacity: 1; } 52% { transform: translateY(520%); opacity: 1; } 54%, 100% { transform: translateY(520%); opacity: 0; } }
@keyframes hero-check { 0%, 54% { opacity: 0; transform: scale(.4); } 57% { opacity: 1; transform: scale(1.25); } 59%, 100% { opacity: 1; transform: scale(1); } }
@keyframes hero-check-second { 0%, 58% { opacity: 0; transform: scale(.4); } 61% { opacity: 1; transform: scale(1.25); } 63%, 100% { opacity: 1; transform: scale(1); } }
@keyframes hero-check-third { 0%, 62% { opacity: 0; transform: scale(.4); } 65% { opacity: 1; transform: scale(1.25); } 67%, 100% { opacity: 1; transform: scale(1); } }
@keyframes hero-check-fourth { 0%, 66% { opacity: 0; transform: scale(.4); } 69% { opacity: 1; transform: scale(1.25); } 71%, 100% { opacity: 1; transform: scale(1); } }
@keyframes hero-check-fifth { 0%, 70% { opacity: 0; transform: scale(.4); } 73% { opacity: 1; transform: scale(1.25); } 75%, 100% { opacity: 1; transform: scale(1); } }
@keyframes hero-error-line { 0%, 62% { opacity: 0; transform: scaleX(0); } 67%, 100% { opacity: 1; transform: scaleX(1); } }
@keyframes hero-paper-cycle { 0% { transform: translateY(-8%) rotate(-2deg); opacity: 0; } 2%, 29% { transform: none; opacity: 1; } 33% { transform: translateY(32%) rotate(5deg); opacity: 0; } 33.01%, 100% { transform: translateY(-8%) rotate(-2deg); opacity: 0; } }
@keyframes hero-score { 0%, 25%, 32%, 100% { opacity: 0; } 26.5%, 30% { opacity: 1; } }
@media (max-width: 680px) {
  .hero { gap: var(--space-md); }
  .hero-intro { display: contents; }
  .hero-intro h1 { grid-row: 1; }
  .hero-intro .lead { grid-row: 2; margin-top: 0; }
  .hero-animation { grid-column: auto; grid-row: 3; aspect-ratio: 1.25; margin-top: var(--space-xs); }
  .hero-paper, .hero-paper-stack { inset-block-start: 50%; translate: 0 calc(-50% - var(--space-md)); }
  .hero-score { bottom: 8px; }
  .hero-intro .actions { grid-row: 4; margin-top: var(--space-xs); }
  .hero-intro .free-plan { grid-row: 5; margin-top: 0; }
  .hero-paper-stack { width: 85%; }
  .hero-paper { width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-animation { cursor: default; }
  .hero-animation :is(.hero-paper, .hero-review-mark, .hero-error-line, .hero-score) { animation: none; }
  .hero-animation :is(.hero-paper-math, .hero-paper-quiz, .hero-scan, .hero-score-math, .hero-score-quiz) { display: none; }
}

/* Тёмная тема: подложка приглушённо-зелёная, листы остаются бумажными (это фото работ). */
:root[data-theme="dark"] .hero-animation { --hero-plate: #16261d; }
:root[data-theme="dark"] .hero-paper img { filter: brightness(1.05) contrast(1.1); }
