/* ============================================================
   01Academy · Hero & Executive Letter
   Applied AI for Business — Off-white / Graphite / Lime
   ------------------------------------------------------------
   Первый экран отвечает на «что я получу», а не «чему вы учите»:
   слева обещание и два действия, справа — сжатый before/after
   рабочего дня. Фиксированной 3D-сцены здесь больше нет: она была
   декором, а по аудиту анимация на странице должна показывать
   процесс или эффект. Движок остался в assets/js/vendor/webgl.js.
   ============================================================ */

.hero {
  /* Шапка прилипшая, но в потоке: первый экран начинается под ней.
     Со 100svh секция была выше свободного места ровно на высоту шапки,
     и нижний ряд с кнопками уезжал за сгиб. */
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding-top: clamp(48px, 6vw, 96px);
  padding-bottom: clamp(56px, 7vw, 104px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(244, 247, 246, 0.99) 0%, rgba(244, 247, 246, 0.97) 37%, rgba(244, 247, 246, 0.78) 58%, rgba(244, 247, 246, 0.32) 100%),
    url("../img/backgrounds/ai-flow-v2.webp") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(48vw, 760px);
  aspect-ratio: 1;
  right: -12vw;
  top: 5%;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 64px color-mix(in srgb, var(--accent) 4%, transparent),
    0 0 0 128px color-mix(in srgb, var(--accent) 3%, transparent);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(520px, 1.02fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  width: 100%;
}

.hero__visual {
  min-width: 0;
  position: relative;
  padding: clamp(46px, 6vw, 78px) 0 clamp(18px, 2vw, 28px) clamp(24px, 3vw, 44px);
}

.ai-map {
  position: absolute;
  inset: 0 7% auto 0;
  height: 68%;
  padding: 18px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: calc(var(--radius-cards) + 8px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(232, 239, 237, 0.58)),
    repeating-linear-gradient(90deg, transparent 0 56px, rgba(84, 124, 126, 0.07) 56px 57px),
    repeating-linear-gradient(0deg, transparent 0 56px, rgba(84, 124, 126, 0.07) 56px 57px);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.ai-map__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-text);
}

.ai-map__rail {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.ai-map__rail::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 8px;
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--accent), var(--line));
}

.ai-map__rail span {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.ai-map__rail span::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--surface-2);
  border: 3px solid var(--palette-sage);
  box-shadow: 0 0 0 5px rgba(142, 168, 166, 0.14);
}

.ai-map__pulse {
  position: absolute;
  top: 28%;
  right: 12%;
  display: flex;
  align-items: end;
  gap: 5px;
  height: 32px;
}

.ai-map__pulse i {
  width: 4px;
  height: 40%;
  border-radius: 5px;
  background: var(--palette-sage);
  animation: ai-pulse 2.2s var(--ease) infinite alternate;
}

.ai-map__pulse i:nth-child(2) { height: 90%; animation-delay: -0.5s; }
.ai-map__pulse i:nth-child(3) { height: 62%; animation-delay: -1.1s; }
.ai-map__pulse i:nth-child(4) { height: 100%; animation-delay: -1.6s; }

@keyframes ai-pulse {
  to { height: 100%; opacity: 0.48; }
}

.hero__signal {
  position: absolute;
  right: clamp(16px, 3vw, 38px);
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-tags);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  color: var(--ink-2);
  backdrop-filter: blur(12px);
}

.hero__signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

@media (max-width: 1020px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: clamp(40px, 7vw, 64px);
  }

  .hero__visual {
    max-width: 760px;
    width: 100%;
    margin-inline: auto;
  }
}

.hero__col {
  min-width: 0;
}

.hero__title {
  font-family: var(--font-neue-montreal);
  font-weight: var(--font-weight-regular);
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 17ch;
  margin: 0 0 clamp(20px, 2.5vw, 32px);
  text-wrap: balance;
}

.hero__lead {
  font-family: var(--font-neue-montreal);
  font-weight: var(--font-weight-regular);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 clamp(28px, 3vw, 40px);
}

.hero__ctas {
  display: flex;
  gap: var(--spacing-16);
  flex-wrap: wrap;
}

.hero__note {
  margin: var(--spacing-20) 0 0;
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------
   Before / after рабочего дня
   ------------------------------------------------------------
   Полосы пропорциональны верхней границе диапазона «было», поэтому
   ширины у строк с часами и строк с днями сравнивать между собой
   нельзя — сравнение всегда внутри одной операции. Ширина живёт в
   инлайновой --w у каждой полосы: цифры и картинка не разъезжаются.
   ------------------------------------------------------------ */
.daychart {
  margin: 0;
  padding: clamp(20px, 2.4vw, 32px);
  position: relative;
  z-index: 2;
  background: color-mix(in srgb, var(--surface-2) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.daychart__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-16);
  flex-wrap: wrap;
  padding-bottom: var(--spacing-16);
  border-bottom: 1px solid var(--line);
}

.daychart__title {
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.daychart__legend {
  display: flex;
  gap: var(--spacing-16);
  font-size: 13px;
  color: var(--ink-3);
}

.daychart__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.daychart__key::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.daychart__key--was::before {
  background: var(--line-strong);
}

.daychart__key--now::before {
  background: var(--accent);
}

.daychart__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.daychart__row {
  padding-block: clamp(16px, 1.8vw, 22px);
  border-bottom: 1px solid var(--line);
}

.daychart__row:last-child {
  border-bottom: 0;
}

.daychart__op {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.daychart__bars {
  display: grid;
  gap: 6px;
}

.daychart__bar {
  display: flex;
  align-items: center;
  height: 26px;
  padding-inline: 10px;
  border-radius: 3px;
  font-size: 13px;
  white-space: nowrap;
  /* Полоса не уже своей подписи: на 320px «15–20 минут» в 11% ширины
     обрезалось бы на середине слова. */
  min-width: max-content;
  width: var(--w);
  transition: width var(--dur-slow) var(--ease-vivid) 120ms;
}

/* Без JS-скролла полосы уже развёрнуты; с ним — растут при появлении. */
.js [data-reveal] .daychart__bar {
  width: 0;
}

.js [data-reveal].is-in .daychart__bar {
  width: var(--w);
}

.daychart__bar--was {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink-2);
}

.daychart__bar--now {
  background: linear-gradient(90deg, var(--accent), var(--palette-sage));
  color: #ffffff;
  font-weight: var(--font-weight-medium);
}

@media (max-width: 620px) {
  .hero__visual {
    padding: 34px 0 24px;
  }

  .ai-map {
    inset-inline: -12px;
  }

  .hero__signal {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 14px 0 0 auto;
    width: max-content;
  }
}

.daychart__bar b {
  font-weight: inherit;
}

.daychart__foot {
  margin: var(--spacing-16) 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] .daychart__bar,
  .js [data-reveal].is-in .daychart__bar {
    width: var(--w);
    transition: none;
  }
}

/* --- Executive Letter (Graphite Veil Slate Document) --- */
.letter {
  max-width: 880px;
  margin-inline: auto;
  background: var(--surface-2);
  border-radius: var(--radius-cards);
  padding: clamp(32px, 5vw, 64px) clamp(24px, 4.5vw, 56px);
  position: relative;
  border: 1px solid var(--line);
  box-shadow: none;
}

.letter__body {
  padding-bottom: 4px;
  /* Ограничиваем длину строки: без этого абзац растягивался
     на всю колонку (~79 символов) и читался тяжело. */
  max-width: 60ch;
}

.letter__to {
  font-family: var(--font-neue-montreal);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--spacing-40);
  display: flex;
  align-items: center;
  gap: 12px;
}

.letter__to::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.letter p {
  font-family: var(--font-neue-montreal);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  margin-bottom: var(--spacing-20);
  color: var(--ink);
}

.letter p:last-of-type {
  margin-bottom: 0;
}

.letter p.is-lead {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-20);
  color: var(--ink);
}

.letter mark {
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
  padding: 0 3px;
}
