/* ==========================================================================
   Shturval — онлайн-школа Kubernetes
   Единая таблица стилей. Без внешних шрифтов, CDN и изображений.
   ========================================================================== */

:root {
  /* Палитра */
  --ink:        #0b1020;   /* near-black, глубокие «чернила» */
  --ink-2:      #131a2e;   /* приподнятый тёмный */
  --paper:      #f7f8fb;   /* основной фон */
  --surface:    #ffffff;   /* карточки */
  --accent:     #2e5bff;   /* основной акцент — морская синь */
  --accent-700: #1e40df;
  --teal:       #00c2a8;   /* вторичный акцент — cloud-native бирюза */
  --text:       #161c2d;   /* основной текст */
  --muted:      #5b6478;   /* приглушённый текст */
  --line:       #e4e7ef;   /* хайрлайны */
  --line-2:     #eef0f6;

  /* Тёмные секции */
  --on-dark:        #e9edf8;
  --on-dark-muted:  #9aa6c2;
  --dark-line:      rgba(255, 255, 255, 0.10);

  /* Типографика */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", "Courier New", monospace;

  /* Раскладка */
  --container: 1140px;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(13, 20, 40, .04), 0 12px 32px rgba(13, 20, 40, .07);
  --shadow-sm: 0 1px 2px rgba(13, 20, 40, .05), 0 6px 18px rgba(13, 20, 40, .06);
  --ring:      0 0 0 4px rgba(46, 91, 255, .14);
}

/* ----- Сброс / база ----------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 720;
  color: var(--text);
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-700); }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(46, 91, 255, .18); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

/* ----- Хелперы ----------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.muted    { color: var(--muted); }
.accent   { color: var(--accent); }
.center   { text-align: center; }
.mono     { font-family: var(--mono); }
.nowrap   { white-space: nowrap; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.section--dark .eyebrow { color: var(--teal); }
.section--dark .eyebrow::before { background: var(--teal); }

.lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ----- Кнопки ------------------------------------------------------------ */

.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .72em 1.3em;
  font: inherit;
  font-weight: 600;
  font-size: .98rem;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(46, 91, 255, .28); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
  box-shadow: none;
}
.btn--ghost:hover { color: var(--text); background: var(--surface); border-color: #d6dbe8; box-shadow: var(--shadow-sm); }

.btn--lg { padding: .9em 1.7em; font-size: 1.05rem; }

.section--dark .btn--ghost {
  --btn-fg: var(--on-dark);
  border-color: var(--dark-line);
}
.section--dark .btn--ghost:hover { background: rgba(255,255,255,.06); color: #fff; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 600;
}
.arrow-link::after { content: "→"; transition: transform .15s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ----- Шапка / навигация ------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 251, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-weight: 760;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand b { font-weight: 800; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: .5em .8em;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 550;
  font-size: .96rem;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--text); background: rgba(13, 20, 40, .04); }
.nav-link.is-active { color: var(--text); background: rgba(46, 91, 255, .10); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

/* ----- Секции ------------------------------------------------------------ */

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
  background-image:
    radial-gradient(900px 480px at 80% -10%, rgba(46, 91, 255, .22), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(0, 194, 168, .14), transparent 60%);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .lead, .section--dark .muted { color: var(--on-dark-muted); }

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; }
.section-title { margin-top: .35em; }
.section-lead { margin-bottom: 0; }

/* ----- Сетки ------------------------------------------------------------- */

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ----- Карточки ---------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d9deec;
}
.card-index {
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .02em;
}
.card-title { margin: .5em 0 .35em; }
.card-text { color: var(--muted); margin-bottom: 1.1em; font-size: .98rem; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: auto;
}

.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(46, 91, 255, .10);
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }

/* Теги */
.tag {
  display: inline-block;
  padding: .28em .7em;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.section--dark .tag { background: rgba(255,255,255,.05); border-color: var(--dark-line); color: var(--on-dark-muted); }

.badge {
  display: inline-block;
  padding: .25em .65em;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--teal);
  background: rgba(0, 194, 168, .12);
  border-radius: 999px;
}

/* ----- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  isolation: isolate;
}
/* Координатная сетка-«морская карта» вместо изображения */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--dark-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--dark-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 120% at 70% 0%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 120% at 70% 0%, #000 35%, transparent 78%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background:
    radial-gradient(680px 420px at 82% 8%, rgba(46, 91, 255, .35), transparent 60%),
    radial-gradient(620px 420px at 6% 100%, rgba(0, 194, 168, .18), transparent 55%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 92px 0 96px;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero-title-accent {
  background: linear-gradient(100deg, #7aa0ff, var(--teal));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.18rem;
  color: var(--on-dark-muted);
  max-width: 34ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--dark-line);
}
.stat-num { font-size: 1.7rem; font-weight: 760; color: #fff; letter-spacing: -.02em; }
.stat-label { font-size: .9rem; color: var(--on-dark-muted); }

/* ----- Терминал (вместо иллюстраций) ------------------------------------ */

.term {
  background: #0a0f1f;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .9rem;
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; background: #41485f; }
.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }
.term-title {
  margin-left: 8px;
  font-size: .78rem;
  color: var(--on-dark-muted);
}
.term-body { padding: 18px 18px 22px; line-height: 1.7; color: #cdd6ec; }
.term-line { white-space: pre-wrap; }
.term-line .prompt { color: var(--teal); user-select: none; }
.term-line .prompt::after { content: " "; }
.term-cmd { color: #fff; }
.term-flag { color: #7aa0ff; }
.term-out { color: var(--on-dark-muted); }
.term-ok { color: #58d18b; }

/* ----- Логотипы технологий (текстовые «чипы», без картинок) -------------- */

.logos {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  align-items: center; justify-content: center;
  opacity: .85;
}
.logos li {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
  letter-spacing: .01em;
}
.section--dark .logos li { color: var(--on-dark-muted); }

/* ----- Фичи -------------------------------------------------------------- */

.feature { padding: 0; }
.feature h3 { display: flex; align-items: center; gap: .5em; }
.feature-ico {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(46, 91, 255, .10);
  color: var(--accent);
}
.section--dark .feature-ico { background: rgba(0,194,168,.14); color: var(--teal); }
.feature-ico svg { width: 21px; height: 21px; }
.feature p { color: var(--muted); margin-bottom: 0; }
.section--dark .feature p { color: var(--on-dark-muted); }

/* ----- Roadmap / модули -------------------------------------------------- */

.roadmap { counter-reset: step; max-width: 820px; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 22px;
  padding-bottom: 36px;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 25px; top: 52px; bottom: 0;
  width: 2px;
  background: linear-gradient(var(--line), transparent);
}
.step-num {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.step-body h3 { margin-bottom: .3em; }
.step-body p { color: var(--muted); margin-bottom: .6em; }
.step-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----- Преподаватели ----------------------------------------------------- */

.person { text-align: left; }
.avatar {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .02em;
  margin-bottom: 16px;
}
.person h3 { margin-bottom: .1em; }
.person-role { font-family: var(--mono); font-size: .82rem; color: var(--accent); margin-bottom: .7em; }
.person p { color: var(--muted); font-size: .96rem; margin-bottom: 0; }

/* ----- Отзывы ------------------------------------------------------------ */

.quote {
  display: flex; flex-direction: column;
  height: 100%;
}
.quote-text { font-size: 1.05rem; line-height: 1.6; margin-bottom: 1.3rem; }
.quote-text::before { content: "“"; color: var(--accent); font-weight: 800; margin-right: .1em; }
.quote-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote-author .avatar { width: 42px; height: 42px; font-size: .95rem; margin: 0; }
.quote-author b { display: block; font-weight: 650; }
.quote-author span { font-size: .86rem; color: var(--muted); }

/* ----- Тарифы ------------------------------------------------------------ */

.price {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.price--featured {
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(46, 91, 255, .16);
  position: relative;
}
.price--featured::after {
  content: "Популярный";
  position: absolute; top: -12px; left: 30px;
  padding: .3em .8em;
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: var(--accent);
  border-radius: 999px;
}
.price-name { font-weight: 700; font-size: 1.1rem; }
.price-tagline { color: var(--muted); font-size: .92rem; margin-bottom: 1.2rem; }
.price-amount {
  font-size: 2.2rem; font-weight: 780; letter-spacing: -.02em;
  margin-bottom: .15em;
}
.price-amount span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-period { font-size: .86rem; color: var(--muted); margin-bottom: 1.4rem; }
.price-list { margin-bottom: 1.8rem; display: grid; gap: .6em; }
.price-list li { display: flex; gap: .6em; align-items: flex-start; font-size: .96rem; color: var(--text); }
.price-list li::before {
  content: "✓";
  color: var(--teal); font-weight: 700; flex: none;
}
.price-list li.is-off { color: var(--muted); }
.price-list li.is-off::before { content: "—"; color: var(--line); }
.price .btn { margin-top: auto; }

/* ----- FAQ --------------------------------------------------------------- */

.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.4rem; font-weight: 400;
  color: var(--accent);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

/* ----- Форма ------------------------------------------------------------- */

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: .72em .9em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .84rem; color: var(--muted); }
.form-success {
  display: none;
  align-items: center; gap: .6em;
  padding: 16px 18px;
  background: rgba(0, 194, 168, .10);
  border: 1px solid rgba(0, 194, 168, .35);
  border-radius: var(--radius-sm);
  color: #0a7a6b;
  font-weight: 600;
}
.form-success.is-visible { display: flex; }

/* ----- CTA --------------------------------------------------------------- */

.cta-band {
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 22px;
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 50% -20%, rgba(46, 91, 255, .35), transparent 60%),
    radial-gradient(500px 300px at 50% 130%, rgba(0, 194, 168, .18), transparent 60%);
}
.cta-band h2 { color: #fff; }
.cta-band .lead { color: var(--on-dark-muted); max-width: 540px; margin: 0 auto 1.8rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ----- Подвал ------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--dark-line);
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand-mark { color: var(--teal); }
.footer-brand p { max-width: 32ch; font-size: .95rem; }
.footer-col h4 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
  color: #fff; margin-bottom: 14px; font-weight: 650;
}
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--on-dark-muted); font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  padding-top: 24px;
  font-size: .88rem;
}
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--on-dark-muted); }
.footer-social a:hover { color: #fff; }

/* ----- Утилиты отступов -------------------------------------------------- */

.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 64px 0 72px; }
  .hero-sub { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    left: 16px; right: 16px; top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-left: 0;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-link { padding: .7em .9em; }
  .nav-cta { margin: 6px 0 0; text-align: center; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta-band { padding: 40px 24px; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
