/* ============================================================
   СУПРЕМУМ — дизайн-система сайта (glassmorphism)
   Единый CSS для хаба и страниц разделов.
   Тема: localStorage key `geo-theme` (общий с учебными страницами).
   ============================================================ */

:root{
  --bg:#c7d2fe;
  --glow1:rgba(244,114,182,.28); --glow2:rgba(96,165,250,.32); --glow3:rgba(167,139,250,.32);
  --glass:rgba(255,255,255,.55); --glass-strong:rgba(255,255,255,.72);
  --glass-border:rgba(255,255,255,.65);
  --text:#1e293b; --muted:#5b6478; --accent:#4f46e5; --accent-soft:rgba(79,70,229,.12);
  --green:#059669; --blue:#2563eb; --amber:#d97706; --red:#dc2626;
  --shadow:0 8px 32px rgba(31,38,90,.12);
}
html[data-theme="dark"]{
  --bg:#0b1023;
  --glow1:rgba(244,114,182,.10); --glow2:rgba(96,165,250,.12); --glow3:rgba(167,139,250,.13);
  --glass:rgba(255,255,255,.06); --glass-strong:rgba(255,255,255,.09);
  --glass-border:rgba(255,255,255,.12);
  --text:#e2e8f0; --muted:#94a3b8; --accent:#818cf8; --accent-soft:rgba(129,140,248,.15);
  --green:#34d399; --blue:#60a5fa; --amber:#fbbf24; --red:#f87171;
  --shadow:0 8px 32px rgba(0,0,0,.35);
}

*{margin:0;padding:0;box-sizing:border-box}
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
/* Интерактив: без 300ms-задержки тапа и серой вспышки (взамен — видимый focus ниже) */
a,button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
/* Видимый фокус с клавиатуры поверх glass-фона */
a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;border-radius:6px;
}
/* Skip-link: виден только при фокусе с клавиатуры */
.skip-link{
  position:absolute;left:16px;top:-48px;z-index:200;
  background:var(--accent);color:#fff;font-weight:700;font-size:.9rem;
  padding:10px 18px;border-radius:0 0 12px 12px;text-decoration:none;transition:top .2s;
}
.skip-link:focus{top:0}
body{
  font-family:-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
  background-image:
    radial-gradient(600px 400px at 12% 8%, var(--glow1), transparent 70%),
    radial-gradient(700px 500px at 88% 20%, var(--glow2), transparent 70%),
    radial-gradient(800px 600px at 50% 95%, var(--glow3), transparent 70%);
  background-attachment:fixed;
  min-height:100vh;
  padding:24px clamp(16px,4vw,48px) 48px;
}

.glass{
  background:var(--glass);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border:1px solid var(--glass-border);
  border-radius:22px;
  box-shadow:var(--shadow);
}
.wrap{max-width:1180px;margin:0 auto;display:grid;gap:28px}

/* ── Шапка ── */
header.site{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 28px}
.logo{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--text)}
/* Лого-марка: как в TG-канале — белый serif «sup» с чертой снизу на чёрном */
.logo-mark{
  font-family:Georgia,"Times New Roman",serif;font-weight:700;line-height:1;
  font-size:1.12rem;color:#fff;background:#0d0f14;
  width:44px;height:44px;border-radius:13px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 4px 14px rgba(13,15,20,.35);flex-shrink:0;
}
.logo-mark::after{content:"";width:27px;height:2.5px;background:#fff;border-radius:2px}
.logo-name{font-size:1.5rem;font-weight:800;letter-spacing:.12em;line-height:1.15}
.logo-sub{font-size:.9rem;color:var(--muted)}
nav.site{display:flex;gap:6px;flex-wrap:wrap}
nav.site a{
  text-decoration:none;color:var(--text);font-size:.95rem;font-weight:600;
  padding:9px 16px;border-radius:12px;transition:background .2s;
}
nav.site a:hover{background:var(--accent-soft)}
nav.site a.active{background:var(--accent);color:#fff}
.header-right{display:flex;align-items:center;gap:10px}
.theme-btn{
  width:44px;height:44px;border-radius:12px;border:1px solid var(--glass-border);
  background:var(--glass-strong);cursor:pointer;font-size:1.1rem;transition:transform .2s;
}
.theme-btn:hover{transform:scale(1.08)}
.btn-login{
  display:inline-block;text-decoration:none;white-space:nowrap;
  background:var(--accent);color:#fff;font-weight:700;font-size:.9rem;
  padding:10px 18px;border-radius:12px;box-shadow:0 4px 14px var(--accent-soft);
  transition:transform .15s;
}
.btn-login:hover{transform:translateY(-2px)}

/* ── Кнопки ── */
.btn-primary{
  display:inline-block;text-decoration:none;text-align:center;
  background:var(--accent);color:#fff;border:none;font-weight:700;font-size:1rem;
  padding:13px 28px;border-radius:14px;cursor:pointer;box-shadow:0 6px 20px var(--accent-soft);
  transition:transform .15s;
}
.btn-primary:hover{transform:translateY(-2px)}
.btn-ghost{
  display:inline-block;text-decoration:none;text-align:center;
  background:var(--glass-strong);color:var(--text);border:1px solid var(--glass-border);
  font-weight:600;font-size:1rem;padding:13px 28px;border-radius:14px;cursor:pointer;
  transition:transform .15s;
}
.btn-ghost:hover{transform:translateY(-2px)}

/* ── Hero ── */
.hero{padding:44px 40px;text-align:center;position:relative;overflow:hidden}
.hero h1{font-size:clamp(1.7rem,4vw,2.6rem);font-weight:800;line-height:1.2;text-wrap:balance}
.hero h1 .sup{color:var(--accent)}
.hero p{margin-top:14px;font-size:1.05rem;color:var(--muted);max-width:640px;margin-left:auto;margin-right:auto}
.hero .cta-row{margin-top:26px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.hero .formula{
  font-family:Georgia,"Times New Roman",serif;font-style:italic;
  color:var(--muted);opacity:.55;font-size:.95rem;margin-top:20px;
}

/* ── Секции и карточки ── */
.section-title{font-size:1.15rem;font-weight:800;margin-bottom:14px;letter-spacing:.02em}
.sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}
.section-card{
  padding:24px;cursor:pointer;transition:transform .2s;position:relative;
  text-decoration:none;color:var(--text);display:block;
}
.section-card:hover{transform:translateY(-4px)}
.section-card .icon{font-size:1.9rem}
.section-card h3{margin-top:12px;font-size:1.1rem;font-weight:800}
.section-card p{margin-top:6px;font-size:.9rem;color:var(--muted);line-height:1.45}
.section-card .accent-line{position:absolute;left:0;top:20px;bottom:20px;width:4px;border-radius:0 4px 4px 0}
.badge{
  display:inline-block;margin-top:12px;margin-right:6px;font-size:.78rem;font-weight:700;
  padding:4px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent);
}
.badge.soon{background:rgba(217,119,6,.12);color:var(--amber)}
.badge.free{background:rgba(5,150,105,.12);color:var(--green)}

/* ── Предметы ── */
.subjects{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}
.subject-card{
  padding:24px;display:flex;flex-direction:column;gap:10px;
  text-decoration:none;color:var(--text);transition:transform .2s;
}
a.subject-card:hover{transform:translateY(-4px)}
.subject-card.disabled{opacity:.62}
.subject-card .top{display:flex;justify-content:space-between;align-items:center}
.subject-card h3{font-size:1.08rem;font-weight:800}
.subject-card .grades{font-size:.85rem;color:var(--muted)}
.progress-track{height:8px;border-radius:999px;background:var(--accent-soft);overflow:hidden}
.progress-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent),#a855f7)}
.subject-card .meta{display:flex;justify-content:space-between;font-size:.85rem;color:var(--muted)}

/* ── Блок «О репетиторе» ── */
.about{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center;padding:30px 34px}
.about h2{font-size:1.25rem;font-weight:800}
.about p{margin-top:10px;font-size:.95rem;color:var(--muted);line-height:1.6;max-width:640px}
.about .facts{display:flex;gap:20px;margin-top:16px;flex-wrap:wrap}
.about .fact .v{font-size:1.25rem;font-weight:800}
.about .fact .l{font-size:.8rem;color:var(--muted);font-weight:600}
.about .cta{display:flex;flex-direction:column;gap:10px;min-width:230px}
.about .cta .note{font-size:.8rem;color:var(--muted);text-align:center}

/* ── Заглушка раздела ── */
.stub{padding:56px 40px;text-align:center}
.stub .icon{font-size:3rem}
.stub h1{margin-top:16px;font-size:1.6rem;font-weight:800}
.stub p{margin-top:12px;color:var(--muted);font-size:1rem;line-height:1.6;max-width:560px;margin-left:auto;margin-right:auto}
.stub .cta-row{margin-top:26px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

/* ── Хлебные крошки ── */
.crumbs{display:flex;align-items:center;gap:8px;font-size:.95rem;flex-wrap:wrap;padding:14px 24px}
.crumbs a{color:var(--accent);text-decoration:none;font-weight:600}
.crumbs .sep{color:var(--muted)}
.crumbs .here{font-weight:700}

/* ── Футер ── */
footer.site{padding:20px 28px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;font-size:.9rem;color:var(--muted)}
footer.site a{color:var(--accent);text-decoration:none;font-weight:700}

/* ── Мягкая воронка: плашка «продолжи в боте» ── */
.funnel-bar{
  position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:90;
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center;
  max-width:min(92vw,760px);padding:13px 18px;font-size:.9rem;font-weight:600;
  text-align:center;animation:funnelIn .4s ease;
}
@keyframes funnelIn{
  from{opacity:0;transform:translateX(-50%) translateY(16px)}
  to{opacity:1;transform:translateX(-50%)}
}
.funnel-bar .btn-primary{padding:9px 18px;font-size:.88rem}
.funnel-close{
  border:none;background:transparent;color:var(--muted);
  font-size:1rem;cursor:pointer;min-width:44px;min-height:44px;
}
.funnel-close:hover{color:var(--text)}

/* Уважение к prefers-reduced-motion: глушим анимации и транзишены */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

@media(max-width:720px){
  header.site{flex-direction:column}
  .hero{padding:32px 20px}
  .about{grid-template-columns:1fr}
  .about .cta{min-width:0}
}
