/* BOSFORUS prototype — главная: первый экран («Появление», утверждённый вариант A), блоки по порядку.
   Параметры первого экрана — из assets/video/hero/preview.html. */

/* ---------- первый экран ---------- */
.hero {
  --logo-top: 9vh;
  --logo-w: min(30vw, 440px, 44vh);
  position: relative; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh; overflow: hidden;
  background: var(--navy-deep); color: var(--white); text-align: center;
}
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__still { display: none; }
.hero::after {  /* темнее небо за логотипом, светлее над яхтами */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 22, 38, .45) 0%, rgba(6, 22, 38, .12) 55%, rgba(6, 22, 38, .35) 100%);
}
.hero__inner {  /* кнопка прижата к низу первого экрана (02.11); блок с логотипом на ПК и планшете — у верха, как был
                   («логотип находится на островах, а надписи перекрыли яхты»), на телефоне — опущен */
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center;
  padding-top: max(var(--logo-top), var(--header-h));
  padding-bottom: calc(var(--mbar-h, 0px) + var(--cookie-h, 0px) + env(safe-area-inset-bottom) + clamp(16px, 4svh, 56px));
}
.hero__inner::before {  /* локальное затемнение под текстом: читается и над светлым берегом */
  content: ""; position: absolute; z-index: -1; left: -8%; right: -8%; top: 38%; bottom: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 50% at 50% 48%, rgba(6, 22, 38, .55), rgba(6, 22, 38, 0) 100%);
}
.hero__brand { width: var(--logo-w); aspect-ratio: 3754 / 2837; margin: 0; }
.hero__brand img { display: block; width: 100%; height: 100%; }
.hero__tagline { margin: 28px 0 0; max-width: 30em; font: 500 clamp(24px, 2.6vw, 36px)/1.2 var(--serif); text-shadow: 0 1px 18px rgba(6, 22, 38, .45); }
.hero__subline { margin: 10px 0 0; max-width: 40em; font-size: 18px; color: var(--ice); text-shadow: 0 1px 14px rgba(6, 22, 38, .5); }
.hero__services {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0;
  max-width: 940px; margin: 28px 0 clamp(16px, 4svh, 48px); padding: 0;
  font: 500 13px/1.7 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ice);
  text-shadow: 0 1px 12px rgba(6, 22, 38, .6);
}
.hero__svc { display: inline-flex; align-items: center; white-space: nowrap; }
.hero__svc:not(:last-child)::after { content: "·"; margin: 0 .9em; opacity: .7; }
/* R66: почти прозрачная кнопка с тонкой светлой рамкой — не спорит с логотипом */
.hero__btn {
  margin-top: auto; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .7); color: var(--white);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.hero__btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--white); color: var(--white); }

/* «Появление»: белый логотип проявляется и чуть поднимается, итоговая непрозрачность .88 */
.hero.v-fade .hero__brand img { opacity: 0; animation: logo-in 1.6s .4s ease-out forwards; }
@keyframes logo-in { from { opacity: 0; transform: translateY(14px); } to { opacity: .88; transform: none; } }

/* «уменьшить движение» и экономия трафика: стоп-кадр вместо видео, без анимации.
   На телефоне видео идет тоже (03.11, тест заказчика): кадр сдвинут к яхтам — они правее центра */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .hero__still { display: block; }
}
.hero.is-still .hero__video { display: none; }
.hero.is-still .hero__still { display: block; }
@media (max-width: 767px) and (orientation: portrait) { .hero__video { object-position: 60% 50%; } }
@media (max-width: 767px) {
  /* телефон (02.11): логотип и отступы — от высоты экрана, чтобы кнопка встала над нижней панелью */
  .hero { --logo-w: min(74vw, 340px, 30svh); }
  .hero__inner { padding-top: calc(var(--header-h) + clamp(8px, 3svh, 40px)); }
  .hero__brand { margin-top: auto; }  /* свободная высота делится поровну над логотипом и между услугами и кнопкой */
  .hero__tagline { margin-top: clamp(12px, 2.6svh, 22px); font-size: clamp(20px, 3.6svh, 25px); }
  .hero__subline { font-size: 17px; }
  .hero__services {
    margin: clamp(10px, 2.4svh, 20px) 0 clamp(16px, 4svh, 48px);
    font-size: 12px; line-height: clamp(17px, 2.8svh, 20.4px); letter-spacing: .1em;
  }
  .hero__svc:not(:last-child)::after { margin: 0 .6em; }
  .hero__svc { white-space: normal; }
  .hero__btn { width: 100%; max-width: 360px; }
}
@media (max-width: 767px) and (max-height: 600px) and (orientation: portrait) {
  /* самые низкие телефоны (iPhone SE 1, 320x568): логотип и услуги мельче, чтобы кнопка осталась на первом экране */
  .hero { --logo-w: min(74vw, 22svh); }
  .hero__services { font-size: 11px; letter-spacing: .06em; }
}
@media (max-width: 767px) and (max-height: 760px) and (orientation: portrait) {
  /* невысокий телефон, пока видна строка cookie: первый экран ужимается под оставшуюся высоту (02.11) */
  .has-cookie .hero { --logo-w: min(74vw, calc((100svh - var(--cookie-h, 0px)) * .25)); }
  .has-cookie .hero__tagline { margin-top: 10px; font-size: 20px; }
  .has-cookie .hero__services { margin-top: 8px; font-size: 11px; line-height: 16px; letter-spacing: .06em; }
}
@media (max-width: 767px) and (max-height: 600px) and (orientation: portrait) {
  .has-cookie .hero { --logo-w: min(74vw, calc((100svh - var(--cookie-h, 0px)) * .15)); }
  .has-cookie .hero__tagline { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero.v-fade .hero__brand img { animation: none !important; opacity: .88 !important; transform: none !important; }
}

/* ---------- одна точка контакта ---------- */
.intro-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: start; }
.intro-split .heading { margin-bottom: 0; }
.intro-split .lead { margin: 6px 0 0; }
@media (max-width: 1023px) { .intro-split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- услуги ---------- */
.more-row { margin: 48px 0 0; max-width: none; }

/* ---------- как мы работаем ---------- */
.how-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 40px; margin-top: 56px; counter-reset: none; }
.how-step { position: relative; padding-top: 36px; border-top: 1px solid var(--line); }
.how-step::before {  /* точка на линии */
  content: ""; position: absolute; left: 0; top: -5px; width: 9px; height: 9px; background: var(--sky); transform: rotate(45deg);
}
.how-step__num { display: block; margin-bottom: 14px; font: 500 15px/1 var(--sans); letter-spacing: .14em; color: var(--muted); }
.how-step__title { margin-bottom: 12px; font-size: 32px; }
.how-step p { margin: 0; color: var(--muted); font-size: 17px; }
@media (max-width: 1023px) { .how-steps { grid-template-columns: 1fr 1fr; gap: 48px 40px; } }
@media (max-width: 767px) {
  .how-steps { grid-template-columns: 1fr; gap: 0; margin-top: 36px; border-left: 1px solid var(--line); }
  .how-step { padding: 0 0 36px 28px; border-top: 0; }
  .how-step:last-child { padding-bottom: 0; }
  .how-step::before { left: -5px; top: 6px; }
  .how-step__title { font-size: 28px; }
}

/* ---------- почему BOSFORUS ---------- */
.why { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; }
.why__item { padding: 0 32px; border-left: 1px solid var(--line); }
.why__item:first-child { padding-left: 0; border-left: 0; }
.why__item:last-child { padding-right: 0; }
.why__item .icon { width: 44px; height: 44px; margin-bottom: 22px; color: var(--sky); stroke-width: 1.25; }
.why__title { margin-bottom: 10px; font-size: 28px; }
.why__item p { margin: 0; color: var(--muted); font-size: 17px; }
@media (max-width: 1023px) {
  .why { grid-template-columns: 1fr 1fr; gap: 48px 0; }
  .why__item:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 767px) {
  .why { grid-template-columns: 1fr; gap: 0; margin-top: 36px; }
  .why__item, .why__item:nth-child(odd) { padding: 28px 0; border-left: 0; border-top: 1px solid var(--line); }
  .why__item:first-child { border-top: 0; padding-top: 0; }
  .why__item .icon { width: 38px; height: 38px; margin-bottom: 14px; }
}

/* ---------- порты (превью) ---------- */
.ports-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.ports-split__text p { margin-bottom: 32px; color: var(--muted); }
.ports-split__text .heading { margin-bottom: .5em; }
@media (max-width: 1023px) { .ports-split { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- финальный блок: текст и контакты слева, форма справа ---------- */
.cta-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; align-items: start; }
.cta-split .lead { margin-bottom: 40px; color: var(--ice); }
@media (max-width: 1023px) { .cta-split { grid-template-columns: 1fr; gap: 48px; } }
