/* Второй экран лендинга — юзкейсы: карточки, шторка ритуала, реплики.
   Файл целиком принадлежит сессии второго экрана.
   Подключается после brick.css, поэтому переменные и базовые стили уже есть. */

/* ---------- Characters (второй экран) ---------- */
.characters { padding: 56px 0 44px; }
.characters .h2 { padding: 0 var(--gutter); }
/* Таглайн «Live with intent» — заметно крупнее общего .h2 (32px в brick.css, его не трогаем) */
.characters__title { font-size: 46px; line-height: 1.02; letter-spacing: -.03em; }
/* Под коротким таглайном подпись — полноценная вторая строка, не сноска: чуть крупнее и темнее, узкая колонка */
.characters__caption {
  margin: 14px auto 0; padding: 0 var(--gutter); max-width: 34ch;
  text-align: center; font-size: 17px; line-height: 1.35; text-wrap: balance;
  color: var(--ink); opacity: .72;
}
.ccard__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 310 / 380; background: var(--cream); }
.ccard__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); }
.ccard__media { position: relative; }
/* Плюс на карточке — как на apple.com/watch: раскрывает ритуал */
.ccard__more {
  position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); font-size: 26px; line-height: 1; font-weight: 300;
  display: grid; place-items: center; cursor: pointer;
}
.ccard__more:hover { background: #fff; }

/* Карточка-ролик: кадр лежит снизу картинкой, видео проявляется, когда пошло.
   Не завёлся автоплей — на карточке остаётся кадр, а не пустота. */
.ccard__still, .ccard__film {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform: scale(var(--zoom, 1));
}
.ccard__film { opacity: 0; transition: opacity .35s ease; }
.ccard__film.is-live { opacity: 1; }
.ccard__ctls { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.ccard__ctl {
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.ccard__ctl:hover { background: #fff; }
/* Пока ролик ждёт свои три секунды, кнопка звука мигает — приглашение включить голос */
.ccard__ctl.is-nudge { animation: ccard-nudge .9s ease-in-out infinite; }
@keyframes ccard-nudge {
  0%, 100% { background: rgba(255,255,255,.86); transform: scale(1); }
  50% { background: var(--blue); color: #fff; transform: scale(1.12); }
}
/* Ролик кончился — поверх кадра одна кнопка: посмотреть снова */
.ccard__replay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); font: 600 15px/1 inherit; font-family: inherit; cursor: pointer;
}
.ccard__replay[hidden] { display: none; }
.ccard__replay svg { width: 18px; height: 18px; fill: currentColor; }
.ccard__replay:hover { background: #fff; }
.ccard__replay:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Подзаголовок под названием карточки-ролика — одна-две строки, тише названия */
.ccard__caption { margin: 4px 0 0; padding: 0 var(--gutter); text-align: center; font-size: 14px; line-height: 1.35; color: var(--ink); opacity: .6; text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { .ccard__ctl.is-nudge { animation: none; background: var(--blue); color: #fff; } }
.ccard__ctl:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ccard__ctl .i { width: 19px; height: 19px; fill: currentColor; display: none; }
.ccard__ctl .i--play, .ccard__ctl .i--muted { display: block; }
.ccard__ctl.is-on .i--play, .ccard__ctl.is-on .i--muted { display: none; }
.ccard__ctl.is-on .i--pause, .ccard__ctl.is-on .i--loud { display: block; }

/* ---------- Шторка ритуала ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; display: none; }
.sheet.is-open { display: block; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: 40px;
  background: var(--white); border-radius: 20px 20px 0 0; overflow: hidden;
  animation: sheet-up .28s ease-out;
}
@keyframes sheet-up { from { transform: translateY(28px); opacity: .6 } to { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .sheet__panel { animation: none } }
.sheet__close {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer;
}
.sheet__scroll { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 56px; }
.sheet__media { aspect-ratio: 390 / 300; overflow: hidden; background: var(--cream); }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); }
.sheet__title { font-size: 28px; line-height: 1.1; font-weight: 400; letter-spacing: -.01em; padding: 26px var(--gutter) 0; }
.sheet__lead { font-size: 18px; line-height: 1.55; padding: 14px var(--gutter) 0; }

/* ---------- Комикс ---------- */
.comic { padding: 28px var(--gutter) 0; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  max-width: 84%; padding: 13px 17px; border-radius: 18px;
  font-size: 16px; line-height: 1.4;
  transition: opacity .25s ease, transform .25s ease;
}
.bubble--morph { align-self: flex-start; background: var(--cream); color: var(--ink); border-bottom-left-radius: 5px; }
.bubble--you { align-self: flex-end; background: var(--blue); color: var(--white); border-bottom-right-radius: 5px; }
/* Реплики проявляются по мере скрола внутри шторки и обратно уже не прячутся */
/* Разговор идёт субтитрами: реплики стоят на своих местах и просто
   зажигаются и гаснут — никакой езды вместе со скролом. */
.comic--stage { display: block; padding: 0; }
.comic--stage .bubble {
  position: absolute; max-width: 76%; margin: 0;
  opacity: 0; transition: opacity .5s ease;
}
.comic--stage .bubble--morph { left: var(--gutter); }
.comic--stage .bubble--you { right: var(--gutter); }
.comic--stage .bubble[data-slot="0"] { top: 44%; }
.comic--stage .bubble[data-slot="1"] { top: 60%; }
.comic--stage .bubble.is-in { opacity: 1; }
.comic.is-playing .bubble { opacity: 0; transform: translateY(8px); }
.comic.is-playing .bubble.is-shown { opacity: 1; transform: none; }
.comic__play { display: block; margin: 26px auto 0; }

.ccard__name { margin-top: 14px; text-align: center; font-size: 16px; line-height: 1.2; letter-spacing: -.02em; }

/* Шторка рутины: кадр остаётся фоном, разговор идёт поверх него — как в макете */
.sheet--live .sheet__panel { background: #16100b; }
.sheet__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet__bg-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,.34) 22%, rgba(0,0,0,.44) 60%, rgba(0,0,0,.72) 100%);
}
/* первая реплика приходит в нижнюю половину кадра, как субтитр */
.sheet--live .sheet__scroll { position: relative; padding-top: 42vh; }
.sheet--live .sheet__title { color: #fff; text-shadow: 0 1px 18px rgba(0,0,0,.5); }
.sheet--live .sheet__lead { color: rgba(255,255,255,.82); text-shadow: 0 1px 14px rgba(0,0,0,.5); }
.sheet--live .sheet__close { background: rgba(0,0,0,.42); color: #fff; }

.sheet__status {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 22px;
  padding-right: 46px; /* место под крестик */
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.55);
}
.sheet__live { display: inline-flex; align-items: center; gap: 7px; }
.sheet__live .sheet__led { animation: led-pulse 1.4s ease-in-out infinite; }
.sheet__meta { opacity: .78; text-align: right; }

@keyframes led-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sheet__led { width: 6px; height: 6px; border-radius: 50%; background: #57d07f; box-shadow: 0 0 0 3px rgba(87,208,127,.22); }

/* Карточка целиком открывает рутину */
.ccard--live { cursor: pointer; }
.ccard--live:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: var(--radius); }
.ccard__more {
  position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); font-size: 26px; line-height: 1; font-weight: 300;
  display: grid; place-items: center; pointer-events: none;
}

/* Сцена: всё, что видно, закреплено; скроллится только прозрачная дорожка */
.sheet--live .sheet__panel { overflow: hidden; }
.sheet__stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sheet--live .sheet__scroll {
  position: absolute; inset: 0; z-index: 2; overflow-y: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sheet--live .sheet__scroll::-webkit-scrollbar { display: none; }
.sheet--live .sheet__close, .sheet--live .sheet__status { z-index: 3; }

/* Текст о рутине — приходит следом за последней репликой, на её же месте */
.sheet__body {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 44%;
  margin: 0; max-width: 34ch;
  font-size: 17px; line-height: 1.5; color: rgba(255,255,255,.92);
  text-shadow: 0 1px 16px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .5s ease;
}
.sheet__body.is-in { opacity: 1; }
.sheet__tail {
  position: absolute; left: 0; right: 0; bottom: 34px; margin: 0;
  text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
  opacity: 0; transition: opacity .4s ease;
}
.sheet__tail.is-in { opacity: 1; }
