@import url("/tokens.css");
@import url("/alive-scene.css");

/* H1 главной страницы About: sans 200, размер/интерлиньяж/трекинг —
   через общие токены (правило h1{} в tokens.css). */
:root {
  --fs-h1: clamp(52px, 5.1vw, 82px);
  --lh-h1: 0.98;
  --ls-h1: -0.04em;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

.about {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
}

.about__background {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(248, 242, 234, 0.13) 0%, rgba(248, 242, 234, 0.02) 46%, transparent 66%);
}

/* Живой экран после перехода: тихая рябь на воде + медленный
   рассветный свет — вынесено в отдельный подключаемый файл
   /alive-scene.css (см. tasks/about-alive-scene.md). Композиция/
   текст/переход этой страницы он не трогает. */

.site-header {
  position: absolute;
  top: clamp(28px, 5.5vh, 64px);
  left: clamp(30px, 4vw, 70px);
  right: clamp(30px, 4vw, 70px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 3.4vw, 58px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.08em;
}

.brand i {
  width: 4px;
  height: 4px;
  margin-top: 17px;
  border-radius: 50%;
  background: currentColor;
}

.menu {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.32em;
}

.menu__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.menu__lines {
  display: grid;
  gap: 7px;
  width: 44px;
}

.menu__lines b {
  display: block;
  height: 1px;
  background: currentColor;
}

.about__content {
  position: absolute;
  top: 47.5%;
  left: clamp(90px, 11vw, 185px);
  width: clamp(330px, 29vw, 465px);
  transform: translateY(-46%);
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
}

h1 {
  font-family: var(--font-sans);
  font-weight: 200;
}

.divider {
  display: block;
  width: 52px;
  height: 1px;
  margin: 25px 0 22px;
  background: var(--line);
}

.divider--small {
  width: 30px;
  margin: 25px 0 22px;
}

.about__lead,
.about__copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.18vw, 20px);
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.about__copy {
  color: var(--soft);
  font-size: clamp(16px, 1.06vw, 18px);
}

.action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 260px);
  margin-top: 34px;
  padding: 0 0 11px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.28em;
}

.action__arrow {
  font-size: 27px;
  font-weight: 200;
  line-height: 0.5;
  transition: transform 240ms ease;
}

.action:hover .action__arrow {
  transform: translateX(6px);
}

.afterMeetingTrigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 280px);
  margin-top: 34px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.28em;
  transition: background 240ms ease, opacity 240ms ease;
}

.afterMeetingTrigger:hover {
  background: rgba(255, 255, 255, 0.18);
}

.afterMeetingTrigger[aria-expanded="true"] {
  opacity: 0.55;
}

.afterMeetingTrigger__arrow {
  font-size: 22px;
  font-weight: 200;
  line-height: 0.5;
  transition: transform 240ms ease;
}

.afterMeetingTrigger:hover .afterMeetingTrigger__arrow {
  transform: translateX(6px);
}

/* Карточка "После встречи" — поднимается из воды поверх текущего
   экрана, без перехода на другой URL. См. tasks/about-poznakomitsya.md. */

.afterMeetingCard {
  position: absolute;
  left: 54%;
  bottom: 9vh;
  z-index: 5;
  width: min(360px, 42vw);
  min-width: 300px;
  padding: 28px 30px 30px;
  transform: translate(-50%, 40px) scale(0.97);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border: 1px solid rgba(255, 249, 241, 0.55);
  border-radius: 20px;
  background: rgba(248, 242, 234, 0.62);
  backdrop-filter: blur(16px);
  transition: transform 0.6s cubic-bezier(0.3, 0.02, 0.2, 1),
    opacity 0.6s cubic-bezier(0.3, 0.02, 0.2, 1),
    width 0.5s cubic-bezier(0.3, 0.02, 0.2, 1),
    visibility 0s linear 0.6s;
}

.afterMeetingCard.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  transition: transform 0.7s cubic-bezier(0.25, 0.7, 0.2, 1),
    opacity 0.7s cubic-bezier(0.25, 0.7, 0.2, 1),
    width 0.5s cubic-bezier(0.25, 0.7, 0.2, 1),
    visibility 0s;
}

.afterMeetingCard.is-open.is-full {
  transform: translate(-50%, -18px) scale(1);
}

.afterMeetingCard.is-full {
  width: min(420px, 46vw);
}

.afterMeetingCard__close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: none;
  color: var(--soft);
  font: 300 20px/1 Arial, sans-serif;
  cursor: pointer;
}

.afterMeetingCard__label {
  margin: 0 0 22px;
  padding-right: 28px;
}

.afterMeetingCard__list,
.afterMeetingCard__full {
  transition: opacity 260ms ease;
}

.afterMeetingCard__list.is-fading,
.afterMeetingCard__full.is-fading {
  opacity: 0;
}

.afterMeetingCard__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.afterMeetingCard.is-full .afterMeetingCard__list {
  display: none;
}

.afterMeetingCard__list li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.afterMeetingCard__list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.afterMeetingCard__teaser {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.afterMeetingCard__teaser:hover,
.afterMeetingCard__teaser:focus-visible,
.afterMeetingCard__teaser:active {
  opacity: 0.82;
}

.afterMeetingCard__full {
  display: none;
}

.afterMeetingCard.is-full .afterMeetingCard__full {
  display: block;
}

.afterMeetingCard__fullTitle {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
}

.afterMeetingCard__fullText {
  margin: 0;
  color: var(--soft);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.62;
}

.afterMeetingCard__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.afterMeetingCard__dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--ink-rgb), 0.28);
  cursor: pointer;
  transition: background 220ms ease, transform 220ms ease;
}

.afterMeetingCard__dots button.is-active {
  background: var(--ink);
  transform: scale(1.25);
}

.afterMeetingCard__ripples {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 0;
  pointer-events: none;
}

.afterMeetingCard__ripple {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 120px;
  height: 30px;
  transform: translate(-50%, 50%) scale(0.2);
  border: 1px solid rgba(255, 252, 246, 0.8);
  border-radius: 50%;
  opacity: 0;
}

.afterMeetingCard__ripple:nth-child(2) {
  animation-delay: 0.12s !important;
}

.afterMeetingCard.is-open .afterMeetingCard__ripple {
  animation: afterMeetingRippleOut 0.9s ease-out forwards;
}

.afterMeetingCard.is-closing .afterMeetingCard__ripple {
  animation: afterMeetingRippleOut 0.8s ease-out reverse forwards;
}

@keyframes afterMeetingRippleOut {
  0% {
    opacity: 0;
    transform: translate(-50%, 50%) scale(0.2);
  }
  22% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 50%) scale(5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .afterMeetingCard,
  .afterMeetingCard.is-open {
    transition-duration: 0.2s;
  }

  .afterMeetingCard__ripple {
    display: none;
  }
}

.back {
  position: absolute;
  left: clamp(30px, 4vw, 70px);
  bottom: clamp(28px, 4vh, 48px);
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 44px;
  color: var(--soft);
  font-size: 11px;
  letter-spacing: 0.24em;
}

.back span:first-child {
  font-size: 23px;
  font-weight: 200;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  /* Шаг 3, подход A: цельная сцена — скелет в responsive-shell.css
     (scoped .about). Здесь — вертикальный кадр фона под мобильный экран. */
  .about__background {
    object-position: 70% 50%;
  }

  /* В нижнюю зону мобильного кадра попадает фигура Юлии (она стоит в воде).
     Живой слой — увеличенная (height:250%) копия фото с волновым фильтром —
     искажал её тело «уменьшенным дублем». Убираем фото-копию, оставляем
     только тёплый блик .about__water-glint (без фото). */
  .about__water-img {
    display: none;
  }

  .afterMeetingCard {
    left: 50%;
    bottom: 6vh;
    width: min(340px, 84vw);
    min-width: 0;
  }

  .afterMeetingCard.is-full {
    width: min(380px, 88vw);
  }
}
