@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/cormorant-italic-cyr.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/cormorant-italic-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

html, body {
  margin: 0;
  background: #000;
  color: #fff;
}
body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

/* Длина прокрутки: чем больше, тем медленнее путешествие */
.track { height: 700vh; }

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.backdrop {
  position: absolute;
  inset: -4%;
  background: url(doctor-bg.jpg) center / cover no-repeat;
  filter: brightness(.6) saturate(1.1);
}

/* Квадратное фото высотой в экран: на телефоне перекрывает экран целиком,
   на широком экране стоит по центру, по бокам — размытый фон */
.doctor {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(.2);
  transform-origin: 50% 50%;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
@media (min-aspect-ratio: 1/1) {
  .doctor {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  }
}

#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Запасной вариант без WebGL: чёрная шторка с растущим отверстием */
.veil {
  display: none;
  position: absolute;
  inset: 0;
  --r: 0%;
  background: radial-gradient(circle at 50% 50%, transparent var(--r), #000 calc(var(--r) + 3%));
}
.nogl #gl { display: none; }
.nogl .veil { display: block; }

.final {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 6vw calc(8vh + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 30%, rgba(0, 0, 0, 0) 55%);
  opacity: 0;
  pointer-events: none;
}
.slogan {
  margin: 0;
  max-width: 15em;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(32px, 5.4vw, 78px);
  line-height: 1.04;
  letter-spacing: .005em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .65);
  transform: translateY(var(--ty, 0px));
}
.slogan .glow {
  color: #fff6dc;
  text-shadow: 0 0 18px rgba(255, 214, 140, .85), 0 0 46px rgba(255, 190, 110, .55), 0 2px 28px rgba(0, 0, 0, .5);
}
@media (max-aspect-ratio: 1/1) {
  .slogan { font-size: clamp(28px, 8.4vw, 60px); }
}

/* Еле заметная подсказка «листай вниз» на чёрном экране */
.hint {
  position: fixed;
  left: 50%;
  bottom: calc(5vh + env(safe-area-inset-bottom));
  width: 22px;
  height: 22px;
  margin-left: -11px;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.hint.on { opacity: .28; }
.hint i {
  position: absolute;
  inset: 0;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg);
  animation: hint 2.4s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { transform: translateY(-4px) rotate(45deg); opacity: .4; }
  50% { transform: translateY(4px) rotate(45deg); opacity: 1; }
}
