/* TapWOD landing — цвета приложения + мягкие акценты «12 времён» */

:root {
  --brand: #5b5fc7;
  --brand-soft: #6d5ce8;
  --text: #1c1c1e;
  --text-muted: #8e8e93;
  --surface: #ffffff;
  --bg: #f2f2f7;
  --border: #e5e5ea;
  --past: #4a7fbf;
  --present: #3a9e6f;
  --future: #d4893a;
  --success: #34c759;
  --radius: 16px;
  --phone-ratio: 9 / 20;
  --phone-max: 280px;
  --shadow: 0 8px 32px rgba(28, 28, 30, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, 100% - 40px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.logo-wordmark {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}

.hero-wordmark {
  height: 56px;
  width: auto;
  max-width: 220px;
  margin-bottom: 20px;
  object-fit: contain;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--border);
}

.btn-stub {
  opacity: 0.9;
  cursor: not-allowed;
}

.btn-stub:hover {
  transform: none;
  box-shadow: none;
}

.hero {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 16px;
}

/* Зелёная рамка «бесплатно» — как в приложении (лимиты учителя) */
.free-promo-banner {
  max-width: 520px;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--success) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
  border-radius: 10px;
}

.free-promo-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.free-promo-line + .free-promo-line {
  margin-top: 10px;
}

.free-promo-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #248a3d;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.free-promo-line p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #1d6b38;
  font-weight: 500;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 520px;
}

.hero-wordmark {
  height: 56px;
  width: auto;
  max-width: 220px;
  margin-bottom: 20px;
  object-fit: contain;
}

.feature-nav-hint {
  margin: 24px 0 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 480px;
}

.feature-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
}

.feature-nav a {
  display: block;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.feature-nav a:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  background: color-mix(in srgb, var(--brand) 4%, #fff);
}

.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--surface);
}

/* Насыщенные фоны секций — чётко отличаются на глаз */
.section-tint-past {
  background: color-mix(in srgb, var(--past) 32%, #fff);
}

.section-tint-present {
  background: color-mix(in srgb, var(--present) 32%, #fff);
}

.section-tint-future {
  background: color-mix(in srgb, var(--future) 32%, #fff);
}

.section-tint-brand {
  background: color-mix(in srgb, var(--brand) 28%, #fff);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 12px;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.feature-row.reverse .feature-copy {
  order: 2;
}

.feature-row.reverse .feature-media {
  order: 1;
}

.feature-copy h3 {
  font-size: 1.35rem;
  margin: 0 0 12px;
}

.feature-copy p {
  color: var(--text-muted);
  margin: 0 0 8px;
  font-size: 1rem;
}

.feature-bullets {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.feature-bullets li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 0.95rem;
}

.feature-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.7;
}

.phone-frame {
  width: min(100%, var(--phone-max));
  margin: 0 auto;
  border-radius: 28px;
  border: 3px solid #1c1c1e;
  background: #1c1c1e;
  padding: 10px;
  box-shadow: var(--shadow);
}

.phone-screen {
  aspect-ratio: var(--phone-ratio);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg);
}

.phone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  background: linear-gradient(145deg, #f8f8fc 0%, #ececf4 100%);
  border: 2px dashed color-mix(in srgb, var(--brand) 35%, transparent);
}

.phone-placeholder strong {
  font-size: 0.85rem;
  color: var(--brand);
  margin-bottom: 8px;
}

.phone-placeholder span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.phone-placeholder code {
  display: block;
  margin-top: 10px;
  font-size: 0.7rem;
  background: rgba(91, 95, 199, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  word-break: break-all;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  justify-items: center;
}

.video-card {
  width: min(100%, var(--phone-max));
}

.video-card h4 {
  font-size: 0.9rem;
  margin: 12px 0 0;
  text-align: center;
  color: var(--text-muted);
}

.video-frame {
  aspect-ratio: var(--phone-ratio);
  border-radius: 20px;
  overflow: hidden;
  background: #1c1c1e;
  border: 1px solid var(--border);
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #aeaeb2;
  background: linear-gradient(160deg, #2c2c2e 0%, #1c1c1e 100%);
}

.free-tier-note {
  max-width: 680px;
  margin: 0 auto 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-grid-pro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.pricing-card.pro {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--brand) 6%, #fff) 0%,
    #fff 60%
  );
}

.pricing-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.pricing-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 4px;
}

.pricing-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.pricing-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-card li {
  margin-bottom: 6px;
}

.pricing-card .btn {
  width: 100%;
  margin-top: 16px;
}

.payment-note {
  max-width: 520px;
  margin: 28px auto 0;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px dashed color-mix(in srgb, var(--brand) 35%, transparent);
  background: color-mix(in srgb, var(--brand) 4%, #fff);
  text-align: center;
}

.payment-note p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.email-field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.stub-badge {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 999px;
}

.yookassa-line {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer {
  padding: 40px 0;
  background: var(--text);
  color: #aeaeb2;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.site-footer a {
  color: #f2f2f7;
}

.footer-legal {
  font-size: 0.8rem;
  max-width: 560px;
  line-height: 1.5;
}

/* Кнопка «Наверх» — слева внизу экрана */
.back-to-top {
  position: fixed;
  left: 16px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(28, 28, 30, 0.12);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.back-to-top:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  box-shadow: 0 6px 24px rgba(91, 95, 199, 0.18);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  font-size: 0.95rem;
  line-height: 1;
}

/* ——— SEO-статьи ——— */
.article-page {
  padding: 40px 0 56px;
  background: var(--surface);
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
}

.article-content h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.25;
  margin: 0 0 16px;
}

.article-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.article-content h2 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
  color: var(--text);
}

.article-content p {
  margin: 0 0 14px;
  line-height: 1.65;
}

.article-content ul {
  margin: 0 0 16px;
  padding-left: 22px;
  line-height: 1.65;
}

.article-content li {
  margin-bottom: 8px;
}

.article-cta {
  margin: 36px 0 0;
  padding: 24px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  text-align: center;
}

.article-cta p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.article-nav {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-nav h2 {
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--text-muted);
}

.article-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-nav a {
  font-weight: 500;
}

.footer-articles {
  margin-top: 8px;
  font-size: 0.85rem;
  max-width: 640px;
  line-height: 1.6;
}

.footer-articles a {
  color: #d1d1d6;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .feature-row.reverse .feature-copy {
    order: 1;
  }

  .feature-row.reverse .feature-media {
    order: 2;
  }

  .pricing-grid-pro {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }
}

@media (min-width: 900px) {
  .videos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
