:root {
  --black: #050505;
  --ink: #101010;
  --panel: rgba(255, 255, 255, .065);
  --panel-strong: rgba(255, 255, 255, .11);
  --white: #fff;
  --muted: #a8a8a8;
  --line: rgba(255, 255, 255, .16);
  --danger: #ff5f5f;
  --ok: #7cff9f;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 70% -10%, rgba(255,255,255,.13), transparent 30%),
    linear-gradient(180deg, #050505 0%, #111 48%, #050505 100%);
  color: var(--white);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(1160px, calc(100% - 28px));
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(7,7,7,.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  filter: grayscale(1) contrast(1.12);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a, .contact-menu button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 6px;
  color: #e9e9e9;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.nav a:hover, .contact-menu button:hover {
  border-color: var(--line);
  background: rgba(255,255,255,.06);
}

.contact-menu { position: relative; }
.contact-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9,9,9,.96);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}

.contact-menu.open .contact-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.contact-panel a {
  width: 100%;
  justify-content: flex-start;
}

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  padding: 120px 20px 76px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(7,18,22,.58) 38%, rgba(33,18,8,.2) 100%),
    linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.08) 46%, rgba(0,0,0,.78) 100%),
    radial-gradient(circle at 70% 44%, rgba(0, 214, 160, .38), transparent 26%),
    radial-gradient(circle at 86% 28%, rgba(255, 146, 49, .26), transparent 22%),
    radial-gradient(circle at 18% 22%, rgba(78, 133, 255, .24), transparent 25%),
    url("/assets/hero-lab.png"),
    radial-gradient(circle at 72% 42%, rgba(255,255,255,.18), transparent 21%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.055) 0 1px, transparent 1px 88px);
  background-size: cover, cover, cover, cover, cover, cover, auto, auto, auto;
  background-position: center, center, center;
  filter: saturate(1.32) contrast(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 30%, rgba(0,0,0,.64) 74%),
    linear-gradient(115deg, rgba(0,255,177,.14), transparent 36%, rgba(255,116,29,.1) 72%, transparent),
    linear-gradient(rgba(255,255,255,.025) 50%, transparent 50%);
  background-size: auto, auto, 100% 4px;
  mix-blend-mode: screen;
  opacity: 1;
}

.hero-inner {
  width: min(1040px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.eyebrow, .tag {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
}

.hero .eyebrow { margin: 0 0 10px; }
h1, h2, h3, p { margin-top: 0; }

.hero h1 {
  width: min(940px, 100%);
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 98px);
  line-height: .94;
  font-weight: 900;
}

.lead {
  width: min(760px, 100%);
  color: #d7d7d7;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.button, .submit {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid var(--white);
  background: var(--white);
  color: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.button:hover, .submit:hover { transform: translateY(-2px); }
.ghost { background: transparent; color: var(--white); }

.section-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto 96px;
  scroll-margin-top: 110px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.section-head h2 {
  max-width: 840px;
  margin-bottom: 0;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1;
}

.ad-window {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.03)),
    #090909;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.ad-window.dragging { cursor: grabbing; }

.ad-track {
  display: flex;
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

.ad-window.dragging .ad-track {
  transition: none;
}

.banner {
  flex: 0 0 100%;
  min-height: 310px;
  padding: clamp(24px, 4vw, 46px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.banner h3 {
  margin: 12px 0;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
}

.banner p {
  max-width: 500px;
  color: #d0d0d0;
  font-size: 18px;
  line-height: 1.5;
}

.telegram-preview {
  width: min(300px, 34vw);
  min-height: 220px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.18), transparent 34%),
    repeating-linear-gradient(135deg, transparent 0 34px, rgba(255,255,255,.055) 35px 36px),
    #7f8e98;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 30px 90px rgba(0,0,0,.45);
  overflow: hidden;
}

.telegram-preview img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.14);
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
}

.telegram-preview strong {
  font-size: 28px;
  line-height: 1;
}

.telegram-preview span {
  color: rgba(255,255,255,.72);
  font-size: 17px;
}

.banner-book img {
  width: min(250px, 34vw);
  border-radius: 6px;
  filter: grayscale(.35) contrast(1.1);
  transform: rotate(-4deg);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}

.ad-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 9px;
  pointer-events: none;
}

.ad-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: width .2s ease, background .2s ease;
}

.ad-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: var(--white);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-grid p, .service-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  color: #d7d7d7;
  font-size: 18px;
  line-height: 1.6;
}

.course-ticker {
  margin-top: 24px;
  border-block: 1px solid var(--line);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.course-track {
  display: flex;
  width: max-content;
  animation: ticker 20s linear infinite;
}

.course-track span {
  padding: 22px 28px;
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.86);
}

.preorder {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) 1fr;
  gap: clamp(32px, 7vw, 84px);
  align-items: center;
}

.book-visual img {
  width: 100%;
  display: block;
  border-radius: 8px;
  filter: grayscale(.22) contrast(1.08);
  box-shadow: 0 36px 100px rgba(0,0,0,.62);
}

.book-copy h2 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 5.2vw, 70px);
  line-height: .98;
}

.book-copy > p {
  color: #d0d0d0;
  font-size: 19px;
  line-height: 1.6;
}

.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
}

.price-box div {
  display: grid;
  gap: 5px;
}

.old-price {
  color: var(--muted);
  font-size: 18px;
  text-decoration: line-through;
}

.price-box strong {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.price-box p {
  max-width: 250px;
  margin: 0;
  color: #d7d7d7;
  line-height: 1.45;
}

form { margin-top: 28px; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #d8d8d8;
  font-size: 14px;
  font-weight: 800;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  background: rgba(255,255,255,.055);
  color: var(--white);
  padding: 0 14px;
  outline: none;
}

input:focus { border-color: var(--white); }
.submit { width: 100%; margin-top: 16px; }
.form-status { min-height: 24px; margin: 12px 0 0; color: var(--muted); }
.form-status.success { color: var(--ok); }
.form-status.error { color: var(--danger); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-grid h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.service-grid p {
  margin-bottom: 0;
  color: #d0d0d0;
  line-height: 1.5;
}

footer {
  border-top: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  text-align: center;
  padding: 30px 20px;
}

.admin-body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,.08), transparent 28%),
    var(--black);
}

.admin {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
}

.admin-login {
  width: min(420px, 100%);
  margin: 8vh auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  background: var(--panel);
}

.admin-login img {
  width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.admin h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.search { margin-bottom: 16px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.admin-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.admin-stats strong {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.09);
  padding: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.danger-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,95,95,.58);
  border-radius: 6px;
  background: rgba(255,95,95,.1);
  color: #ff9a9a;
  cursor: pointer;
  font-weight: 800;
}

.danger-button:hover {
  background: rgba(255,95,95,.18);
}

.danger-button:disabled {
  cursor: progress;
  opacity: .55;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { display: none; }

  .info-grid, .preorder, .service-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    background:
      radial-gradient(circle at 20% 10%, rgba(0, 214, 160, .12), transparent 30%),
      radial-gradient(circle at 100% 34%, rgba(255, 146, 49, .1), transparent 32%),
      #050505;
  }

  .site-header {
    top: 8px;
    width: calc(100% - 16px);
    min-height: 0;
    padding: 9px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .nav {
    gap: 6px;
  }

  .nav a, .contact-menu button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .contact-panel {
    right: auto;
    left: 0;
  }

  .hero {
    min-height: 92svh;
    padding: 156px 16px 48px;
    place-items: end center;
  }

  .hero-bg {
    background-position: center, center, 72% 42%, 92% 20%, 14% 18%, center;
    filter: saturate(1.2) contrast(1.04);
  }

  .hero-bg::after {
    background:
      radial-gradient(circle at 50% 52%, transparent 0 18%, rgba(0,0,0,.72) 78%),
      linear-gradient(115deg, rgba(0,255,177,.12), transparent 38%, rgba(255,116,29,.09) 72%, transparent),
      linear-gradient(rgba(255,255,255,.02) 50%, transparent 50%);
    background-size: auto, auto, 100% 4px;
  }

  .hero-inner {
    justify-items: start;
    text-align: left;
  }

  .hero .eyebrow {
    font-size: 10px;
    letter-spacing: .1em;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 46px);
    line-height: 1;
    margin-bottom: 14px;
  }

  .lead {
    font-size: 15px;
    line-height: 1.55;
  }

  .section-shell {
    width: calc(100% - 28px);
    margin-bottom: 64px;
    scroll-margin-top: 96px;
  }

  .section-head {
    margin-bottom: 18px;
  }

  .section-head h2,
  .book-copy h2 {
    font-size: clamp(31px, 10vw, 42px);
    line-height: 1.04;
  }

  .banner {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 22px 18px 52px;
  }

  .banner h3 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .banner p {
    font-size: 15px;
  }

  .telegram-preview {
    width: 100%;
    min-height: 176px;
  }

  .telegram-preview img {
    width: 86px;
    height: 86px;
  }

  .telegram-preview strong { font-size: 23px; }
  .telegram-preview span { font-size: 15px; }

  .banner-book img {
    width: min(220px, 76vw);
    align-self: center;
  }

  .info-grid p, .service-grid article {
    padding: 18px;
    font-size: 15px;
  }

  .course-track span {
    padding: 18px 20px;
  }

  .preorder {
    gap: 24px;
  }

  .book-visual {
    max-width: 420px;
    margin: 0 auto;
  }

  .book-copy > p {
    font-size: 16px;
  }

  .price-box {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .price-box p {
    max-width: none;
  }

  .field-grid, .service-grid { grid-template-columns: 1fr; }
  .hero-actions, .hero-actions .button { width: 100%; }

  .button, .submit {
    min-height: 48px;
    padding: 0 16px;
  }

  input {
    height: 50px;
    font-size: 16px;
  }

  .admin {
    width: calc(100% - 24px);
    padding: 34px 0;
  }

  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
