:root {
  --bg: #f7fbfd;
  --bg-tint: #e5f2f8;
  --surface: #ffffff;
  --ink: #2a2f33;
  --muted: #5f6b73;
  --line: #d5e4ec;
  --blue: #8fc4d8;
  --blue-deep: #5ea4bf;
  --orange: #c9845f;
  --orange-hover: #b8734f;
  --dark: #3a4248;
  --ok: #2f7d57;
  --err: #b33a3a;
  --shadow: 0 18px 50px rgba(42, 70, 84, 0.12);
  --radius: 18px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(143, 196, 216, 0.35), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(201, 132, 95, 0.12), transparent 50%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
p { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; }
code {
  background: var(--bg-tint);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  font-size: 0.92em;
}

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 0.75rem;
}
.lead, .section-lead { font-size: 1.05rem; color: var(--muted); max-width: 46ch; }
.section { padding: 4.5rem 0; }
.section-tint { background: linear-gradient(180deg, transparent, var(--bg-tint) 30%, transparent); }
.inline { display: inline; margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(247, 251, 253, 0.85);
  border-bottom: 1px solid rgba(213, 228, 236, 0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 18%, transparent 19%),
    linear-gradient(145deg, var(--blue), var(--blue-deep));
  box-shadow: inset 0 -8px 0 rgba(255,255,255,0.15);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 11px 8px 8px 14px;
  background: #fff;
  border-radius: 40% 60% 55% 45%;
  opacity: 0.9;
}
.brand-text { font-family: var(--display); font-size: 1rem; }
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a { color: var(--ink); font-weight: 600; text-decoration: none; }
.nav a:hover { color: var(--blue-deep); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1.4rem;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(201, 132, 95, 0.28);
}
.btn-primary:hover { background: var(--orange-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-sm { padding: 0.55rem 0.9rem; font-size: 0.82rem; border-radius: 10px; }
.btn-block { width: 100%; }

.flash {
  margin: 1rem auto;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}
.flash-ok { background: #e7f6ee; color: var(--ok); }
.flash-error { background: #fdecec; color: var(--err); }

.hero { padding: 2.5rem 0 4rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: stretch;
}
.hero-visual {
  position: relative;
  min-height: 520px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-tint), #cfe6f0 45%, #f3e6dc);
  box-shadow: var(--shadow);
}
.hero-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(42,47,51,0.18)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='1000' viewBox='0 0 800 1000'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%23b7d9e7'/%3E%3Cstop offset='1' stop-color='%23e8d5c8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='800' height='1000' fill='url(%23g)'/%3E%3Ccircle cx='400' cy='420' r='120' fill='%23f7fbfd' opacity='.55'/%3E%3Crect x='220' y='560' width='360' height='220' rx='40' fill='%23ffffff' opacity='.45'/%3E%3C/svg%3E")
    center/cover;
}
.floating-badge {
  position: absolute;
  left: 1.2rem;
  max-width: 220px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  animation: floatIn 0.8s ease both;
}
.badge-orange { top: 1.4rem; background: var(--orange); }
.badge-dark { top: 6.2rem; background: var(--dark); animation-delay: 0.12s; }
@keyframes floatIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 0.5rem 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.2rem 0 1.5rem; }
.author-card {
  display: grid;
  gap: 0.25rem;
  background: var(--bg-tint);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  max-width: 420px;
  animation: floatIn 0.9s ease 0.15s both;
}
.author-card strong { font-family: var(--display); font-size: 0.95rem; text-transform: uppercase; }

.module-list { display: grid; gap: 1rem; margin-top: 2rem; }
.module-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.module-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.module-index {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--blue-deep);
}
.module-row ul { margin: 0.4rem 0 0; color: var(--muted); }
.module-row li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #f3e6dc;
  color: var(--orange-hover);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.soft { background: var(--bg-tint); color: var(--blue-deep); }
.pill.warn { background: #fff1d6; color: #9a6b12; }

.pricing-grid, .pay-grid, .cabinet-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}
.price-card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.panel.soft { background: var(--bg-tint); box-shadow: none; }
.price-label { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); font-size: 0.8rem; }
.price {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0.2rem 0 0.6rem;
}
.price span { font-size: 0.55em; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px var(--blue-deep);
}
.fineprint { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; }

.auth-page {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem 3rem;
}
.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow);
}
.brand-center { justify-content: center; margin-bottom: 0.8rem; }
.stack { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fff;
}
input:focus {
  outline: none;
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px rgba(94, 164, 191, 0.2);
}
.switch { margin-top: 1.2rem; }

.progress-wrap { margin: 1.2rem 0 1.4rem; }
.progress-meta, .mini-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
  font-weight: 700;
}
.progress-bar {
  height: 10px;
  background: #e7eef2;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  border-radius: inherit;
}
.progress-bar.thin { height: 6px; flex: 1; }
.steps { padding-left: 1.1rem; color: var(--muted); }
.steps li { margin-bottom: 0.45rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
  background: rgba(255,255,255,0.55);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand { margin-bottom: 0.5rem; }
.footer-links { display: grid; gap: 0.4rem; font-weight: 600; }

/* Player / LMS */
.player-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #eef5f8;
}
.player-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1rem 0.5rem;
}
.brand.compact .brand-text { font-size: 0.9rem; }
.sidebar-back { font-size: 0.85rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.sidebar-course { padding: 0.5rem 1rem 1rem; border-bottom: 1px solid var(--line); }
.lesson-tree { padding: 0.8rem 0 2rem; }
.tree-module-title {
  padding: 0.7rem 1rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.tree-module ul { list-style: none; margin: 0; padding: 0; }
.tree-module li a,
.tree-module li > span {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 1rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.tree-module li a:hover { background: var(--bg-tint); }
.tree-module li.active a {
  background: linear-gradient(90deg, rgba(143,196,216,0.35), transparent);
  color: var(--dark);
}
.tree-module li.done .dot { background: var(--ok); }
.tree-module li.locked { opacity: 0.55; }
.dot {
  width: 9px;
  height: 9px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
}
.player-main {
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem;
  max-width: 920px;
}
.player-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.video-frame, .video-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #1d262b;
  box-shadow: var(--shadow);
  margin-bottom: 1.4rem;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder {
  color: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.4rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(143,196,216,0.35), transparent 40%),
    linear-gradient(160deg, #2c3940, #1a2227);
}
.play-circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  font-size: 1.3rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.lesson-body {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
}
.meta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.player-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.sidebar-toggle {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid,
  .pricing-grid,
  .pay-grid,
  .cabinet-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 360px; }
  .module-row { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
  .player-shell { grid-template-columns: 1fr; }
  .player-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 40;
    box-shadow: var(--shadow);
  }
  .player-shell.sidebar-open .player-sidebar { transform: translateX(0); }
  .sidebar-toggle { display: grid; place-items: center; }
  .player-top { flex-direction: column; }
}
