:root {
  --bg: #f6f5ff;
  --surface: rgba(255, 255, 255, 0.72);
  --text: #1c1b2e;
  --muted: #5d5b78;
  --accent: #5b4fe0;
  --accent-text: #ffffff;
  --border: rgba(91, 79, 224, 0.14);
  --hero-1: #4540cc;
  --hero-2: #854ddb;
  --hero-3: #db66b3;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e1a;
    --surface: rgba(34, 32, 56, 0.72);
    --text: #f1f0fb;
    --muted: #a9a6c7;
    --accent: #8f86ff;
    --accent-text: #0f0e1a;
    --border: rgba(143, 134, 255, 0.18);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header bar */
.bar { padding: 18px 0; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.bar nav { display: flex; gap: 18px; font-weight: 600; }
.bar nav a { color: inherit; text-decoration: none; opacity: 0.85; }
.bar nav a:hover { opacity: 1; }
.hero .bar, .hero .bar a { color: #fff; }

/* Hero */
.hero {
  color: #fff;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(50% 50% at 95% 70%, rgba(255, 255, 255, 0.12), transparent 70%),
    linear-gradient(140deg, var(--hero-1), var(--hero-2) 60%, var(--hero-3));
  padding-bottom: 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 32px; }
.hero .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.05; margin: 20px 0 12px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.2rem; opacity: 0.92; margin: 0 0 28px; max-width: 32em; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 12px 20px; border-radius: 14px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.badge svg { width: 22px; height: 22px; fill: currentColor; }
.badge small { display: block; font-size: 0.72rem; font-weight: 500; opacity: 0.8; line-height: 1.1; }
.badge span { line-height: 1.15; }
.phone {
  width: 100%; max-width: 320px; justify-self: center;
  border-radius: 44px; border: 10px solid #17161c;
  box-shadow: 0 30px 60px rgba(20, 10, 60, 0.45);
  display: block;
  height: auto;
}

/* Sections */
section { padding: 64px 0; }
h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 32px; max-width: 36em; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 20px;
}
.card h3 { margin: 10px 0 4px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.easy { background: linear-gradient(#4cd964, #2fb24c); }
.medium { background: linear-gradient(#4aa3ff, #1f7ae0); }
.hard { background: linear-gradient(#ffad4a, #f08a1c); }
.extreme { background: linear-gradient(#ff5f8f, #e8336a); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
.features h3 { margin: 0 0 6px; font-size: 1.15rem; }
.features p { margin: 0; color: var(--muted); }

.gallery { display: flex; gap: 20px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; }
.gallery img {
  flex: 0 0 auto; width: 240px; border-radius: 30px; border: 7px solid #17161c;
  scroll-snap-align: center; box-shadow: 0 16px 36px rgba(20, 10, 60, 0.18);
}
.gallery img.ipad { width: 420px; border-radius: 26px; }

.languages { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 0; }
.languages li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-weight: 600; }

/* Text pages */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin: 0; }
.contact {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 24px; margin: 32px 0 8px;
}
.contact h2 { font-size: 1.3rem; margin-bottom: 4px; }
.contact p { margin: 0 0 14px; color: var(--muted); }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-text);
  padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 700;
}
.faq h2 { font-size: 1.15rem; margin: 32px 0 6px; }
.faq p, .faq li { color: var(--muted); }
.faq ol, .faq ul { padding-left: 1.2em; }
.prose h2 { font-size: 1.2rem; margin: 32px 0 6px; }
.prose p, .prose li { color: var(--muted); }

footer { padding: 40px 0 48px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 24px; }
footer nav { display: flex; gap: 18px; }
footer a { color: inherit; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone { max-width: 260px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; gap: 24px; }
  .bar nav { gap: 14px; font-size: 0.95rem; }
  .gallery img.ipad { width: 340px; }
}
