/* Лендинг aiprofe.ru: тёмная сцена, по центру кольцо карточек профессий с отражением на полу (прототип одобрен
   автором 30.10). Цвета знака — фиолетовый @profs/ui и светлая искра; шрифты платформы — Inter и aiprofe Mono. */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'aiprofe Mono';
  src: url('/fonts/aiprofe-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --bg: #0d0c12;
  --bg-2: #15141d;
  --fg: #f2f0f8;
  --fg-2: #a9a6b8;
  --fg-3: #77748a;
  --line: rgba(242, 240, 248, 0.1);
  --accent: #5b3df5;
  --accent-hover: #6a4ff7;
  --accent-soft: #b8acff;
  --on-accent: #ffffff;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'aiprofe Mono', ui-monospace, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}

/* Шапка */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: calc(18px + env(safe-area-inset-top, 0px)) 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding-inline: 16px;
  border-radius: 999px;
  font: 500 14px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
.btn-accent {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: transparent;
}
.btn-lg {
  height: 48px;
  padding-inline: 22px;
  font-size: 15px;
}

/* Первый экран */
.hero {
  text-align: center;
  padding-block: clamp(16px, 4vw, 40px) 0;
}
.eyebrow {
  margin: 0;
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
h1 {
  margin: 14px auto 0;
  max-width: 17ch;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  color: var(--accent-soft);
}
.lead {
  margin: 0 auto;
  padding-bottom: clamp(28px, 4vw, 44px);
  max-width: 34em;
  text-align: center;
  color: var(--fg-2);
  font-size: clamp(15px, 1.6vw, 17px);
  text-wrap: pretty;
}

/* Кольцо */
.stage {
  position: relative;
  width: 100%;
  margin-top: clamp(8px, 3vw, 28px);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.stage.live {
  cursor: grab;
}
.stage.dragging {
  cursor: grabbing;
}
.stage::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: min(1100px, 140%);
  height: 46%;
  transform: translateX(-50%);
  background: radial-gradient(
    50% 50% at 50% 40%,
    rgba(91, 61, 245, 0.22),
    rgba(91, 61, 245, 0) 70%
  );
  pointer-events: none;
}
/* Без скрипта — ряд карточек с прокруткой: страница читается и так */
.ring {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 16px 24px;
}
.card {
  position: relative;
  flex: none;
  width: 150px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.live .ring {
  display: block;
  position: absolute;
  inset: 0;
  overflow: visible;
  padding: 0;
}
.live .card {
  position: absolute;
  left: 50%;
  top: var(--top, 40px);
  width: var(--cw);
  height: var(--ch);
  margin-left: calc(var(--cw) / -2);
  backface-visibility: hidden;
  will-change: transform, filter;
  -webkit-box-reflect: below 6px linear-gradient(transparent 58%, rgba(255, 255, 255, 0.26));
}
.face {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.face img,
.face video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Блик смещается с поворотом карточки (--s — синус угла) */
.face::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      105deg,
      rgba(255, 255, 255, 0) 35%,
      rgba(255, 255, 255, 0.16) 48%,
      rgba(255, 255, 255, 0) 60%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 30%);
  background-size:
    300% 100%,
    100% 100%;
  background-position:
    calc(50% + var(--s, 0) * 60%) 0,
    0 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.tag {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(13, 12, 18, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.tag b {
  font: 500 11px/1 var(--mono);
  color: var(--accent-soft);
}
.tag span {
  min-width: 0;
  flex: 1;
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(13, 12, 18, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* Подпись под кольцом */
.caption {
  text-align: center;
  padding-block: 0 8px;
  min-height: 150px;
}
.caption .eyebrow {
  color: var(--accent-soft);
}
.caption h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.caption p {
  margin: 8px auto 0;
  max-width: 36em;
  color: var(--fg-2);
  font-size: 15px;
  text-wrap: balance;
}
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.arrow {
  width: 40px;
  padding: 0;
}
.caption .hint {
  font: 400 12px/1 var(--mono);
  color: var(--fg-3);
  margin-top: 14px;
}
.caption:not(.live) {
  display: none;
}

/* Как это устроено */
.how {
  padding-block: clamp(56px, 9vw, 112px) clamp(48px, 7vw, 88px);
}
.how h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.1;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.steps .k {
  font: 500 12px/1 var(--mono);
  color: var(--accent-soft);
}
.steps h3 {
  margin: 12px 0 6px;
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.steps p {
  margin: 0;
  color: var(--fg-2);
  font-size: 15px;
}
.cta {
  margin: 36px 0 0;
}
@media (max-width: 720px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.foot {
  border-top: 1px solid var(--line);
  padding-block: 20px calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--fg-3);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.foot nav {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--fg);
}

/* Подробности профессии */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 12, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.sheet.open .scrim {
  opacity: 1;
}
.panel {
  position: relative;
  width: min(940px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
.media {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 40px 120px -40px rgba(91, 61, 245, 0.45);
  transform-origin: 0 0;
}
.media img,
.media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.info {
  min-width: 0;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s var(--ease-out) 0.18s,
    transform 0.45s var(--ease-out) 0.18s;
}
.sheet.open .info {
  opacity: 1;
  transform: none;
}
.info h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
.info .scn {
  margin: 10px 0 0;
  color: var(--fg-2);
  font-size: 15px;
}
.info blockquote {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.45;
}
.facts {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 8px;
  color: var(--fg-2);
  font-size: 14px;
}
.facts li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.facts li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex: none;
  transform: translateY(-2px);
}
.info .controls {
  justify-content: flex-start;
  margin-top: 24px;
}
.close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 40px;
  padding: 0;
}
@media (max-width: 720px) {
  .sheet {
    place-items: start center;
    overflow-y: auto;
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
  }
  .panel {
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: none;
  }
  .media {
    width: min(62vw, 260px);
    margin-inline: auto;
  }
  .info {
    padding-bottom: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scrim,
  .info {
    transition: none;
  }
}
