/* The main page (repetitor.club): the app's colours and fonts (app.css). */

:root {
  --bg: #EEF2F4;
  --surface: #FCFDFD;
  --surface-2: #E3E9ED;
  --ink: #0F1D2B;
  --ink-2: #475767;
  --muted: #5A6876;
  --line: #DCE3E8;
  --blue: #2A66B8;
  --blue-hover: #1E4F93;
  --blue-tint: #E2ECF8;
  --orange: #D9772B;
  --err: #B3261E;
  --ok: #1E7B45;
  --shadow: 0 1px 2px rgba(15, 29, 43, .12);
  --shadow-lg: 0 24px 60px rgba(15, 29, 43, .22);
  --font: Onest, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --display: Unbounded, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B141D;
    --surface: #121E2A;
    --surface-2: #1B2A37;
    --ink: #E8EEF3;
    --ink-2: #B7C4CF;
    --muted: #97A7B5;
    --line: #243442;
    --blue: #2F6CC0;
    --blue-hover: #3A7AD1;
    --blue-tint: #18304D;
    --err: #FF8A80;
    --ok: #6FD39A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 4.6vw, 48px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 20px; }
h3 { font-size: 20px; margin-bottom: 8px; }
h4 { margin: 0 0 4px; font-size: 16px; }

/* buttons */
.btn { font: 600 15px/1 var(--font); border-radius: 12px; padding: 11px 16px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.big { font-size: 16px; padding: 15px 22px; border-radius: 14px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.google svg { width: 18px; height: 18px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font: 600 18px var(--display); color: var(--ink); text-decoration: none; }
.logo img { border-radius: 8px; }
.top-nav { display: flex; align-items: center; gap: 8px; }
.top-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 10px; font-weight: 500; }
.top-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .hide-sm { display: none; } }
@media (max-width: 440px) {
  .logo { font-size: 16px; gap: 8px; }
  .top-nav { gap: 6px; }
  .top-nav .btn { padding: 10px 12px; font-size: 14px; }
}
@media (max-width: 360px) { .logo span { display: none; } }
@media (max-width: 380px) { .hide-xs { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.kicker { color: var(--blue); font-weight: 600; margin: 0 0 12px; }
.lead { font-size: 18px; color: var(--ink-2); margin: 18px 0 26px; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.hero-shot { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .cta .btn { flex: 1 1 auto; }
}

/* screenshots */
.phone { margin: 0; width: min(300px, 78vw); border-radius: 34px; padding: 9px; background: #0F1D2B; box-shadow: var(--shadow-lg); }
.phone img { border-radius: 26px; width: 100%; height: auto; }
.desk { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--surface); }
.desk img { width: 100%; height: auto; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.step { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.step b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; font: 600 16px var(--display); }
.step h3 { font-size: 17px; margin-bottom: 4px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* features */
.features { padding-top: 56px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 28px 0; }
.feat .phone { justify-self: center; width: min(280px, 74vw); }
.feat.rev .feat-text { order: 2; }
.feat-text p { color: var(--ink-2); font-size: 17px; margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: rotate(-45deg); }
@media (max-width: 860px) {
  .feat { grid-template-columns: 1fr; gap: 24px; }
  .feat.rev .feat-text { order: 0; }
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.tile p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

/* prices */
.prices { padding-top: 64px; }
.sub { color: var(--ink-2); }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.plan.hot { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.plan .price { font: 600 28px var(--display); margin: 6px 0; }
.plan p { margin: 0; color: var(--ink-2); font-size: 14px; }
@media (max-width: 760px) { .plans { grid-template-columns: repeat(2, 1fr); } }

/* faq */
.faq { padding-top: 56px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq p { color: var(--ink-2); margin: 0 0 14px; }

.final { text-align: center; padding-top: 64px; padding-bottom: 32px; }
.final p { color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 40px; }
.foot a { color: var(--muted); text-decoration: none; font-size: 14px; }

/* the dialog: sign in, registration */
.dlg-back { position: fixed; inset: 0; z-index: 20; background: rgba(8, 15, 22, .5); display: grid; place-items: center; padding: 16px; }
.dlg-back[hidden] { display: none; }
.dlg { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 22px; padding: 26px 24px 22px; box-shadow: var(--shadow-lg); }
.dlg h2 { font-size: 22px; margin: 0 34px 6px 0; }
.dlg .hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.dlg-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.dlg-x:hover { background: var(--surface-2); }
.dlg label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.dlg input[type=email], .dlg input[type=password], .dlg input[type=text] { width: 100%; font: 16px var(--font); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.dlg input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.dlg .addr { display: flex; align-items: center; gap: 6px; }
.dlg .addr input { flex: 1; min-width: 0; }
.dlg .addr span { color: var(--muted); white-space: nowrap; }
.dlg .code { letter-spacing: .4em; font: 600 22px var(--display) !important; text-align: center; }
.dlg .row { display: flex; gap: 10px; margin-top: 18px; }
.dlg .row .btn { flex: 1; }
.dlg .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.dlg .or::before, .dlg .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dlg .links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; }
.dlg .links a, .dlg .linkbtn { color: var(--blue); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.dlg .err { color: var(--err); font-size: 14px; min-height: 20px; margin: 10px 0 0; }
.dlg .ok { color: var(--ok); font-size: 14px; margin: 6px 0 0; min-height: 20px; }
.dlg .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink-2); margin-top: 16px; }
.dlg .check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.dlg .wait { text-align: center; padding: 18px 0 6px; }
.spin { width: 36px; height: 36px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font: 14px var(--font); cursor: pointer; padding: 6px 8px; }

/* самые узкие экраны (Galaxy Fold в сложенном виде, 280px) и нажатие пальцем */
@media (max-width: 359px) {
  .wrap { padding: 0 14px; }
  .btn { white-space: normal; text-align: center; line-height: 1.2; }
  .btn.big { padding-left: 14px; padding-right: 14px; }
  .dlg { padding: 22px 16px 18px; }
}
@media (pointer: coarse) {
  .logo { padding: 8px 0; }
}

/* пока картинка грузится — на её месте спокойный фон, а не пустота; picture не ломает размеры */
.phone picture, .desk picture { display: block; }
.phone img { background: #1b2b3c; aspect-ratio: 390 / 844; }
.desk img { background: var(--surface-2, #E3E9ED); aspect-ratio: 1280 / 800; }

.oauth { display: grid; gap: 8px; }
.btn.google svg { flex: none; }
/* registration through a service: the e-mail and the password are optional */
.dlg .optional { margin: 14px 0 4px; padding: 2px 14px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.dlg .optional .hint { margin: 12px 0 0; }
.dlg label small { font-weight: 400; color: var(--muted); }
