/* ============ Target Platform — тёмный + амбер ============ */
@import url('/assets/fonts/fonts-local.css');

:root {
  --bg: #0b0a08;
  --bg2: #12100d;
  --card: #161310;
  --card2: #1c1813;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dim: rgba(245, 158, 11, .55);
  --gold-faint: rgba(245, 158, 11, .14);
  --gold-glow: rgba(245, 158, 11, .07);
  --text: #f4efe6;
  --muted: #b8b0a2;
  --muted2: #8a8378;
  --danger: #c45a6e;
  --ok: #7fbf7f;
  --serif: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #b45309 100%);
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --r: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  background-image:
    radial-gradient(1100px 500px at 85% -10%, rgba(245, 158, 11, .08), transparent 60%),
    radial-gradient(900px 600px at -15% 108%, rgba(245, 158, 11, .05), transparent 55%);
  background-attachment: fixed;
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; line-height: 1.22; }
a { color: var(--gold-light); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--sans); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ============ шапка ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 8, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-faint);
}
.topbar-in { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--text); letter-spacing: .3px; white-space: nowrap; }
.brand em { font-style: normal; color: var(--gold); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 8px 13px; border-radius: 10px; transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--gold-light); background: var(--gold-glow); }

/* ============ типовые блоки ============ */
.page { padding-top: 34px; padding-bottom: 90px; }
.page-title { font-size: clamp(28px, 5.5vw, 42px); margin-bottom: 6px; }
.page-sub { color: var(--muted); margin-bottom: 30px; font-size: 15px; }
.rule { display: flex; align-items: center; gap: 14px; margin: 34px 0 18px; }
.rule h2 { font-size: 22px; }
.rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-faint), transparent); }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--gold-faint);
  border-radius: var(--r);
  padding: 22px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--grad-gold); color: #191307;
  font-weight: 700; font-size: 15px; letter-spacing: .2px;
  border: none; border-radius: 12px; padding: 14px 26px;
  cursor: pointer; transition: transform .15s, box-shadow .2s, opacity .2s;
  box-shadow: 0 10px 26px rgba(245, 158, 11, .22);
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(245, 158, 11, .3); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.ghost {
  background: transparent; color: var(--gold-light);
  border: 1px solid var(--gold-dim); box-shadow: none;
}
.btn.ghost:hover { background: var(--gold-glow); }
.btn.sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: none; border: 1px solid rgba(196, 90, 110, .5); color: #d98a99; box-shadow: none; }

/* ============ формы ============ */
label.f { display: block; margin-bottom: 16px; }
label.f span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.input, textarea.input, select.input {
  width: 100%; background: #0e0c09; color: var(--text);
  border: 1px solid rgba(245, 158, 11, .22); border-radius: 11px;
  padding: 13px 15px; font-size: 16px; font-family: var(--sans);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, .12); }
.input::placeholder { color: var(--muted2); }
textarea.input { resize: vertical; min-height: 90px; }

.err { color: #e598a5; font-size: 14px; margin-top: 10px; min-height: 20px; }
.hint { color: var(--muted2); font-size: 13px; margin-top: 8px; }

/* ============ прогресс ============ */
.pbar { height: 5px; border-radius: 99px; background: #2a241a; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--grad-gold); border-radius: 99px; transition: width .5s ease; }

/* ============ карточка курса ============ */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.course-card {
  display: block; color: var(--text); overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--gold-faint); border-radius: var(--r);
  transition: transform .2s, border-color .2s, box-shadow .25s;
}
.course-card:hover { transform: translateY(-3px); border-color: rgba(245, 158, 11, .35); box-shadow: var(--shadow); }
.course-cover { aspect-ratio: 16/9; background: #0e0c09 center/cover no-repeat; position: relative; }
.course-cover.empty::before {
  content: 'Курсы по таргету'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; color: var(--gold-dim); letter-spacing: 1px;
}
.course-body { padding: 18px 20px 20px; }
.course-body h3 { font-size: 20px; margin-bottom: 4px; }
.course-body .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.course-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }

/* ============ модули / уроки ============ */
.module { margin-bottom: 14px; overflow: hidden; }
.module-head {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 18px 20px; user-select: none;
}
.module-num { font-family: var(--serif); font-size: 26px; font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--gold-dim); line-height: 1; min-width: 40px; }
.module-head h3 { font-size: 17.5px; flex: 1; }
.module-head .chev { color: var(--gold-dim); transition: transform .25s; font-size: 13px; }
.module.open .chev { transform: rotate(180deg); }
.module-lessons { display: none; border-top: 1px solid var(--gold-faint); }
.module.open .module-lessons { display: block; }
.lesson-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 20px;
  color: var(--text); border-bottom: 1px solid rgba(245, 158, 11, .07);
  transition: background .15s;
}
.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: var(--gold-glow); }
.lesson-row .t { flex: 1; font-size: 15px; }
.lesson-row .d { color: var(--muted2); font-size: 12.5px; white-space: nowrap; }
.check {
  width: 22px; height: 22px; min-width: 22px; border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, .35);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #191307;
}
.check.on { background: var(--grad-gold); border-color: transparent; }
.check.on::before { content: '✓'; font-weight: 800; }

/* ============ видео ============ */
.player { border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--gold-faint); box-shadow: var(--shadow); }
.player video { width: 100%; display: block; max-height: 72vh; background: #000; }

/* ============ расписание ============ */
.event {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 20px; margin-bottom: 12px;
}
.event.past { opacity: .45; }
.event-date { text-align: center; min-width: 58px; }
.event-date .day { font-family: var(--serif); font-size: 27px; font-weight: 700; color: var(--gold-light); line-height: 1.1; }
.event-date .mon { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.event-info { flex: 1; }
.event-info h3 { font-size: 17px; margin-bottom: 3px; }
.event-info .meta { color: var(--muted); font-size: 13.5px; }
.event.next { border-color: rgba(245, 158, 11, .4); background: linear-gradient(180deg, #1c1710, var(--bg2)); }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: #191307; background: var(--grad-gold); border-radius: 99px; padding: 3px 10px;
}
.badge.soft { background: var(--gold-glow); color: var(--gold-light); border: 1px solid var(--gold-faint); }

/* ============ вход / визитные страницы ============ */
.gate { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.gate-photo { display: none; position: relative; background: #0e0c09 center 18%/cover no-repeat; }
.gate-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--bg) 100%), linear-gradient(0deg, rgba(11,10,8,.35), transparent 40%); }
.gate-photo .ph-brand { position: absolute; left: 34px; bottom: 30px; z-index: 2; }
.gate-photo .ph-brand .n { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.gate-photo .ph-brand .r { color: var(--muted); font-size: 13.5px; max-width: 330px; }
.gate-form { display: flex; flex-direction: column; justify-content: center; padding: 46px 24px; max-width: 480px; margin: 0 auto; width: 100%; }
.gate-form .logo { font-family: var(--serif); font-size: 26px; margin-bottom: 6px; }
.gate-form .logo em { font-style: normal; color: var(--gold); }
.gate-kicker { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 14px; }
.gate-title { font-size: clamp(30px, 6vw, 40px); margin-bottom: 10px; }
.gate-sub { color: var(--muted); margin-bottom: 30px; }
.gate-photo-mobile { display: block; height: 240px; border-radius: var(--r); background: #0e0c09 center 15%/cover no-repeat; border: 1px solid var(--gold-faint); margin-bottom: 26px; position: relative; overflow: hidden; }
.gate-photo-mobile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,10,8,.55), transparent 55%); }
@media (min-width: 900px) {
  .gate { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .gate-photo { display: block; }
  .gate-photo-mobile { display: none; }
  .gate-form { padding: 60px 56px; max-width: 560px; }
}

/* ============ разное ============ */
.creds {
  background: #0e0c09; border: 1px dashed var(--gold-dim); border-radius: 14px;
  padding: 18px 20px; margin: 18px 0; font-size: 17px;
}
.creds b { font-family: ui-monospace, 'SF Mono', Menlo, monospace; color: var(--gold-light); font-size: 19px; letter-spacing: .5px; }
.creds .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(80px);
  background: #221d14; color: var(--text); border: 1px solid var(--gold-dim);
  padding: 12px 22px; border-radius: 12px; font-size: 14.5px; z-index: 200;
  transition: transform .3s ease; box-shadow: var(--shadow); max-width: min(92vw, 480px); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.skeleton { color: var(--muted2); padding: 40px 0; text-align: center; }
.footer { text-align: center; color: var(--muted2); font-size: 12.5px; padding: 30px 20px 40px; }
.footer b { color: var(--muted); font-weight: 600; }

@media (max-width: 640px) {
  .page { padding-top: 22px; }
  .topbar-in { gap: 10px; height: 56px; }
  .brand { font-size: 17px; }
  .nav { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; min-width: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 8px; font-size: 12.5px; }
  .card { padding: 18px; }
}
