/* JAMM Traffic TEAM — Video Course CSS
   Brand: Traffic (зелений #06B57F)
   Format: text-first з reveal-блоками */

:root {
  --bg: #050a08;
  --bg-1: #0a1410;
  --bg-2: #0f1d18;
  --surface: rgba(255,255,255,.03);
  --surface-2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.08);
  --text: #e8f0ec;
  --text-dim: #9aa8a3;
  --text-muted: #6c7872;

  --accent: #06B57F;
  --accent-bright: #10D690;
  --accent-deep: #054A33;
  --accent-glow: rgba(6,181,127,.18);
  --accent-soft: rgba(6,181,127,.08);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box }
html, body { margin: 0; padding: 0 }
body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%);
  color: var(--text);
  font-family: 'Comfortaa', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px }
.container-narrow { max-width: 880px }

/* ── Preview banner ─────────────────────────────────────── */
.preview-banner {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 100%);
  color: #042e20;
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  border-bottom: 1px solid var(--border);
  background: rgba(5,10,8,.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none }
.brand-logo img { width: 36px; height: 36px; display: block }
.brand-text { color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.2 }
.brand-text .sub { display: block; color: var(--text-dim); font-size: 11px; font-weight: 400; letter-spacing: .04em }

.drawer-toggle-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 8px;
}
.drawer-toggle-btn:hover { background: var(--accent-soft); border-color: var(--accent) }
.dt-ico { font-size: 16px; line-height: 1 }

/* ── Drawer ─────────────────────────────────────────────── */
#drawer-overlay {
  position: fixed; inset: 0; background: rgba(2,5,4,.7);
  backdrop-filter: blur(4px);
  z-index: 60; opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
body.drawer-open #drawer-overlay { opacity: 1; pointer-events: auto }
@media (min-width: 1024px) { body.drawer-open #drawer-overlay { display: none } }

#course-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 320px; max-width: 90vw;
  background: linear-gradient(180deg, #081512 0%, #050a08 100%);
  border-right: 1px solid var(--border);
  z-index: 70;
  transform: translateX(-110%);
  transition: transform .25s ease;
  overflow-y: auto;
}
body.drawer-open #course-drawer { transform: translateX(0) }
@media (min-width: 1024px) {
  body.drawer-open .course-shell { padding-left: 320px; transition: padding-left .25s ease }
}
#course-drawer::-webkit-scrollbar { width: 6px }
#course-drawer::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px }

.dr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(8,21,18,.95); backdrop-filter: blur(8px);
  z-index: 5;
}
.dr-title { color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; letter-spacing: -.01em }
.dr-close {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.dr-close:hover { color: var(--text); border-color: var(--accent) }

.dr-progress { padding: 14px 20px; border-bottom: 1px solid var(--border) }
.dr-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden }
.dr-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width .35s ease }
.dr-pct { margin-top: 6px; color: var(--text-dim); font-size: 11px; font-family: monospace }

.dr-nav { padding: 14px 0 30px }
.dr-block { padding: 10px 20px }
.dr-block + .dr-block { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 16px }
.dr-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px }
.dr-num { color: var(--accent); font-size: 11px; font-family: monospace; letter-spacing: .12em; display: block; margin-bottom: 4px }
.dr-block-title { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.3 }
.dr-gate {
  font-size: 10px; padding: 2px 8px; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 10px; letter-spacing: .05em; white-space: nowrap;
}
.dr-subs { list-style: none; padding: 0; margin: 0 }
.dr-subs li { margin: 0 }
.dr-subs li.is-current { background: var(--accent-soft); border-left: 2px solid var(--accent) }
.dr-subs a, .dr-subs .dr-locked {
  display: flex; gap: 10px; padding: 8px 12px;
  font-size: 13px; line-height: 1.4; text-decoration: none;
  color: var(--text); transition: background .15s ease;
}
.dr-subs a { color: var(--text) }
.dr-subs a:hover { background: var(--surface) }
.dr-subs li.is-done a { color: var(--accent-bright) }
.dr-subs .dr-locked { color: var(--text-muted); cursor: default }
.dr-check { color: var(--text-muted); width: 14px; flex-shrink: 0 }
.dr-subs li.is-done .dr-check { color: var(--accent-bright) }

/* ── Hero ───────────────────────────────────────────────── */
.course-shell { min-height: 100vh }
.course-main { padding: 36px 0 80px }

.hero {
  padding: 30px 0 20px;
  text-align: left;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; background: var(--accent-soft);
  border: 1px solid rgba(6,181,127,.25); border-radius: 100px;
  color: var(--accent-bright); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  margin-bottom: 20px;
}
.hero-tag .pulse {
  width: 7px; height: 7px; background: var(--accent-bright); border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

.hero h1 {
  font-size: clamp(30px, 5vw, 48px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.1; margin: 0 0 16px;
  color: var(--text);
}
.hero h1 .accent { color: var(--accent-bright) }
.hero .lead {
  font-size: clamp(16px, 2vw, 19px); color: var(--text-dim);
  max-width: 680px; margin: 0 0 28px; line-height: 1.55;
}

.landing-progress { display: flex; gap: 14px; align-items: center; max-width: 480px; margin-bottom: 24px }
.lp-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden }
.lp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width .35s ease }
.lp-label { font-size: 12px; color: var(--text-dim); font-family: monospace; white-space: nowrap }

.continue-cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px; background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #042e20; border-radius: var(--radius); font-weight: 700;
  text-decoration: none; transition: all .2s ease;
  font-size: 15px;
}
.continue-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 32px var(--accent-glow); color: #042e20 }

/* ── Programme grid ─────────────────────────────────────── */
.programme-section { padding: 30px 0 12px }
.section-eyebrow {
  font-family: monospace; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-bright); margin-bottom: 8px;
}
.section-h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; color: var(--text) }
.section-sub { color: var(--text-dim); max-width: 640px; margin: 0 0 24px }

.programme-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .programme-grid { grid-template-columns: repeat(2, 1fr) }
}

.prog-card {
  display: block; padding: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none;
  transition: all .2s ease; position: relative;
}
.prog-card:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--accent-soft) }
.prog-card.locked { opacity: .55; cursor: default }
.prog-card.locked:hover { transform: none; border-color: var(--border); background: var(--surface) }

.pc-num {
  font-family: monospace; font-size: 11px; color: var(--accent-bright);
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; display: block;
}
.pc-title { font-size: 18px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; color: var(--text) }
.pc-sub { font-size: 14px; color: var(--text-dim); line-height: 1.5; margin: 0 }
.pc-gate {
  position: absolute; top: 22px; right: 22px;
  font-size: 10px; padding: 3px 10px; border-radius: 10px;
  letter-spacing: .04em; font-weight: 600;
}
.pc-gate.open { background: var(--accent-soft); color: var(--accent-bright); border: 1px solid rgba(6,181,127,.3) }
.pc-gate.closed { background: rgba(255,255,255,.04); color: var(--text-muted); border: 1px solid var(--border) }

.section-divider {
  grid-column: 1 / -1;
  font-family: monospace; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 16px 0 4px; margin-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── Lesson page ────────────────────────────────────────── */
.crumbs { color: var(--text-dim); font-size: 13px; margin-bottom: 24px }
.crumbs a { color: var(--text-dim); text-decoration: none }
.crumbs a:hover { color: var(--accent-bright) }
.crumbs .sep { margin: 0 8px; color: var(--text-muted) }

.sub-page { padding-bottom: 40px }
.sub-eyebrow {
  font-family: monospace; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-bright); margin-bottom: 10px;
}
.sub-page h1 {
  font-size: clamp(28px, 5vw, 42px); font-weight: 700;
  letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.15;
  color: var(--text);
}
.sub-meta {
  display: flex; gap: 16px; color: var(--text-dim); font-size: 13px;
  margin: 8px 0 28px; flex-wrap: wrap;
}
.sub-meta span { display: inline-flex; align-items: center; gap: 6px }

.sub-page h2 {
  font-size: clamp(22px, 3.5vw, 28px); font-weight: 700;
  margin: 40px 0 16px; letter-spacing: -.01em; color: var(--text);
}
.sub-page h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--accent-bright) }

.prose p { line-height: 1.7; color: var(--text); margin: 0 0 14px }
.prose strong { color: var(--accent-bright); font-weight: 700 }
.prose ul, .prose ol { color: var(--text); line-height: 1.7; padding-left: 22px }
.prose li { margin: 6px 0 }

/* ── Reveal cards ───────────────────────────────────────── */
.reveal-grid { display: grid; gap: 10px; margin: 16px 0 }
details.reveal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all .2s ease;
}
details.reveal[open] { background: var(--accent-soft); border-color: rgba(6,181,127,.25) }
details.reveal summary {
  padding: 14px 18px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  list-style: none; font-weight: 600; color: var(--text);
}
details.reveal summary::-webkit-details-marker { display: none }
details.reveal .gp { color: var(--accent-bright); font-size: 18px; font-weight: 300; transition: transform .2s; flex-shrink: 0 }
details.reveal[open] .gp { transform: rotate(45deg) }
details.reveal .gd { padding: 0 18px 16px; color: var(--text); line-height: 1.65 }
details.reveal .gd p { margin: 0 0 10px }
details.reveal .gd p:last-child { margin-bottom: 0 }
details.reveal .gd strong { color: var(--accent-bright); font-weight: 700 }

/* ── Callouts ───────────────────────────────────────────── */
.callout {
  padding: 16px 20px; border-radius: var(--radius); margin: 22px 0;
  border-left: 3px solid; display: flex; gap: 12px; align-items: flex-start;
  line-height: 1.55;
}
.callout-info { background: rgba(6,181,127,.08); border-color: var(--accent-bright); color: var(--text) }
.callout-warning { background: rgba(255,180,80,.08); border-color: #FFB450; color: var(--text) }
.callout-success { background: rgba(80,220,160,.08); border-color: #50DCA0; color: var(--text) }
.callout strong { color: var(--accent-bright) }
.callout-warning strong { color: #FFB450 }
.callout-success strong { color: #50DCA0 }
.callout > span:first-child { font-size: 18px; line-height: 1.3; flex-shrink: 0 }

/* ── Step list ──────────────────────────────────────────── */
.step-list { list-style: none; padding: 0; counter-reset: step; margin: 16px 0 }
.step-list li {
  padding: 14px 18px 14px 56px; position: relative;
  background: var(--surface); margin-bottom: 10px;
  border-radius: var(--radius); border: 1px solid var(--border);
  color: var(--text); line-height: 1.6;
}
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 14px; top: 14px;
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #042e20; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.step-list li strong { color: var(--accent-bright); font-weight: 700 }

/* ── Tooltip abbreviations ──────────────────────────────── */
abbr {
  border-bottom: 1px dotted var(--accent); cursor: help; text-decoration: none;
}

/* ── Comparison table ───────────────────────────────────── */
table.cmp {
  width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;
}
table.cmp th, table.cmp td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
table.cmp th { background: var(--accent-soft); color: var(--accent-bright); font-weight: 600 }
table.cmp td { color: var(--text) }
table.cmp tr:hover td { background: var(--surface) }

/* ── Complete button ────────────────────────────────────── */
.complete-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #042e20; border: none;
  padding: 12px 24px; border-radius: var(--radius);
  font-weight: 700; cursor: pointer; font-size: 14px;
  font-family: inherit; transition: all .2s ease; margin-top: 24px;
}
.complete-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow) }
.complete-btn.is-done { background: linear-gradient(135deg, #50DCA0, var(--accent-bright)); color: #042e20 }

/* ── Subnav ─────────────────────────────────────────────── */
.subnav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px;
}
.subnav a {
  padding: 16px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: all .2s ease;
}
.subnav a:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--text) }
.subnav a.is-next { text-align: right }
.subnav .nav-dir {
  display: block; font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px;
}

/* ── Mini disclaimer ────────────────────────────────────── */
.mini-disclaimer {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 18px; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12px; line-height: 1.5;
  margin-top: 30px;
}
.mini-disclaimer a { color: var(--accent-bright) }

/* ── Reveal-on-scroll ───────────────────────────────────── */
.reveal-anim { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease }
.reveal-anim.is-visible { opacity: 1; transform: translateY(0) }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .subnav { grid-template-columns: 1fr }
  .subnav a.is-next { text-align: left }
  .header-inner { padding: 12px 16px }
  .brand-text { font-size: 13px }
  .brand-text .sub { font-size: 10px }
  .pc-gate { position: static; margin-bottom: 8px; display: inline-block }
}
