/* XII — первый экран. Размеры из макета Figma (холст 1440×950).
   Единица --s = масштаб относительно макета: всё считается через неё. */

:root{
  --bg:#0f0e0e;
  --milk:#f0ede3;
  --red:#fe4332;
  --ff:"Geist",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --ff-cap:"Unbounded","Geist",system-ui,sans-serif;
  --s:min(calc(100vw / 1440), calc(100svh / 950));
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--milk)}
body{font-family:var(--ff);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none}
ul{list-style:none;margin:0;padding:0}
p,h1{margin:0}

.hero{
  position:relative;
  width:100%;
  height:100vh;height:100svh;
  min-height:calc(560px);
  overflow:hidden;
  background:var(--red);
}

/* ---------- фон: видео в скруглённой рамке ---------- */
.hero__media{
  position:absolute;
  inset:calc(10 * var(--s));
  border-radius:calc(20 * var(--s));
  overflow:hidden;
  background:#000;
}
.hero__video{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;
  object-position:50% 40%;
  opacity:1;
}
/* затемнение: градиент из макета + общий слой + усиление внизу под заголовком */
.hero__shade{
  position:absolute;inset:0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(15,14,14,.62) 100%),
    linear-gradient(180deg, rgba(0,0,0,.17) 11.377%, rgba(0,0,0,.55) 59.521%),
    rgba(15,14,14,.2);
}

/* ---------- сетка 12 колонок ---------- */
.hero__grid{
  position:absolute;
  left:calc(40 * var(--s));right:calc(40 * var(--s));
  top:0;bottom:0;
  display:grid;
  pointer-events:none;
  z-index:2;
}
.hero__grid{grid-template-columns:repeat(13,0)}
.hero__grid i{display:block;width:1px;height:100%;background:rgba(240,237,227,.12);justify-self:start}
.hero__grid i:nth-child(n){position:absolute;top:0;bottom:0}
.hero__grid i:nth-child(1){left:0}
.hero__grid i:nth-child(2){left:calc(100%/12*1)}
.hero__grid i:nth-child(3){left:calc(100%/12*2)}
.hero__grid i:nth-child(4){left:calc(100%/12*3)}
.hero__grid i:nth-child(5){left:calc(100%/12*4)}
.hero__grid i:nth-child(6){left:calc(100%/12*5)}
.hero__grid i:nth-child(7){left:calc(100%/12*6)}
.hero__grid i:nth-child(8){left:calc(100%/12*7)}
.hero__grid i:nth-child(9){left:calc(100%/12*8)}
.hero__grid i:nth-child(10){left:calc(100%/12*9)}
.hero__grid i:nth-child(11){left:calc(100%/12*10)}
.hero__grid i:nth-child(12){left:calc(100%/12*11)}
.hero__grid i:nth-child(13){left:calc(100% - 1px)}

/* ---------- красные «+» ---------- */
.plus{position:absolute;width:calc(16 * var(--s));height:auto;z-index:3;pointer-events:none}
.plus--a{left:calc(32 * var(--s));top:calc(433 * var(--s))}
.plus--b{left:calc(40 * var(--s) + (100% - 80 * var(--s)) / 12 * 8 - 8 * var(--s));top:calc(122 * var(--s))}

/* ---------- логотип (с подписью внутри) ---------- */
.logo{position:absolute;left:calc(39.76 * var(--s));top:calc(39 * var(--s));z-index:5;display:block;width:calc(129 * var(--s));height:calc(62.7 * var(--s))}
.logo img{width:100%;height:100%;display:block}

/* ---------- меню ---------- */
.menu{
  position:absolute;z-index:5;
  top:calc(40 * var(--s));
  left:calc(40 * var(--s) + (100% - 80 * var(--s)) / 12 * 8);
  width:calc((100% - 80 * var(--s)) / 12 * 4);   /* от 9-й до 13-й линии сетки */
  display:flex;justify-content:space-between;
  font-weight:400;
  font-size:calc(18 * var(--s));line-height:calc(21 * var(--s));
  letter-spacing:calc(-.18 * var(--s));
  white-space:nowrap;
}
.menu a{transition:color .25s ease,opacity .25s ease}
.menu a:hover{color:var(--red)}
.burger{display:none}

/* ---------- Что мы берём на себя ---------- */
.takes{
  position:absolute;z-index:5;
  left:calc(40 * var(--s) + (100% - 80 * var(--s)) / 12 * 8 + 19 * var(--s));
  top:calc(118 * var(--s));
  width:calc(188 * var(--s));
}
.takes__line{
  position:absolute;
  left:calc(-19 * var(--s));top:calc(35 * var(--s));
  width:1px;height:calc(117 * var(--s));
  background:var(--red);
}
.takes__title{
  font-weight:600;text-transform:uppercase;white-space:nowrap;
  font-size:calc(16 * var(--s));line-height:calc(22 * var(--s));
  margin-bottom:calc(8 * var(--s));
}
.takes__list{
  display:flex;flex-direction:column;gap:calc(4 * var(--s));
  font-weight:400;opacity:.8;
  font-size:calc(18 * var(--s));line-height:calc(21 * var(--s));
  letter-spacing:calc(-.18 * var(--s));
}
.takes__inline{display:none}
.br-d{display:inline}
.br-m{display:none}

/* ---------- заголовок ---------- */
.headline{
  position:absolute;z-index:5;
  left:calc(40 * var(--s));
  top:calc(717 * var(--s));
  width:calc(759 * var(--s));
}
.headline__kicker{
  font-weight:400;
  font-size:calc(18 * var(--s));line-height:calc(21 * var(--s));
  letter-spacing:calc(-.18 * var(--s));
  margin-bottom:calc(16 * var(--s));
}
.headline__title{
  font-family:"Unbounded","Geist",system-ui,sans-serif;
  font-weight:400;
  font-size:calc(38 * var(--s));line-height:calc(42 * var(--s));
  letter-spacing:0;
}
.headline__title .c-b{display:block;margin-top:calc(14 * var(--s));font-size:calc(20 * var(--s));line-height:calc(26 * var(--s))}
.c-a{color:#f9ecea}
.c-b{color:rgba(249,236,234,.7)}

/* ---------- кнопки ---------- */
.actions{
  position:absolute;z-index:5;
  left:calc(40 * var(--s) + (100% - 80 * var(--s)) / 12 * 8);
  top:calc(870 * var(--s));
  display:flex;gap:calc(8 * var(--s));
}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:calc(8 * var(--s)) calc(24 * var(--s));
  border-radius:2000px;
  font-weight:400;color:#fff;white-space:nowrap;
  font-size:calc(18 * var(--s));line-height:calc(21 * var(--s));
  letter-spacing:calc(-.18 * var(--s));
  border:1px solid transparent;
  transition:transform .25s ease,background .25s ease,color .25s ease;
}
.btn--red{
  background:linear-gradient(110deg,var(--red) 36%,#ff9a8a 50%,var(--red) 64%) 100% 0 / 260% 100% no-repeat;
  transition:background-position .9s cubic-bezier(.2,.8,.2,1),transform .25s ease,color .25s ease;
}
.btn--red:hover{background-position:0 0}
.btn--line{border-color:var(--milk)}
.btn:hover{transform:translateY(-1px)}
.btn--line:hover{background:var(--milk);color:#0f0e0e}


/* ---------- появление после прелоадера ---------- */
.rv{opacity:1;transform:none;transition:opacity .9s ease var(--d,0s),transform .9s cubic-bezier(.2,.8,.2,1) var(--d,0s)}
.hero__media{transition:opacity 1.1s ease}
.plus{transition:opacity .8s ease .2s}
.pre-active:not(.revealed) .rv{opacity:0;transform:translateY(14px)}
.pre-active:not(.revealed) .logo{opacity:0}
.pre-active:not(.revealed) .hero__media{opacity:0}
.pre-active:not(.revealed) .plus{opacity:0}
.pre-active:not(.revealed) .hero__grid{opacity:0}
.hero__grid{transition:opacity .4s ease}

/* буквы заголовков (анимация проявления) */
.tw{display:inline-block;white-space:nowrap}
.tl{display:inline-block;will-change:opacity,filter}

/* ---------- мобильная версия ---------- */
.sheet{display:none}
@media (max-width:900px){
  :root{--s:1px}
  .hero{min-height:620px}
  .hero__media{inset:8px;border-radius:20px}
  .hero__video{object-position:50% 38%}
  .hero__shade{background:
    linear-gradient(180deg, rgba(15,14,14,.55) 0%, rgba(15,14,14,0) 26%),
    linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(15,14,14,.82) 78%, rgba(15,14,14,.92) 100%),
    rgba(15,14,14,.3)}
  .hero__grid{left:20px;right:20px}
  .hero__grid i:nth-child(n){display:none}
  .hero__grid i:nth-child(1),.hero__grid i:nth-child(4),.hero__grid i:nth-child(7),.hero__grid i:nth-child(10),.hero__grid i:nth-child(13){display:block}
  .plus--a,.plus--b{display:none}
  .logo{left:22px;top:20px;width:102px;height:49.6px}
  .menu{display:none}
  .burger{
    display:block;position:absolute;z-index:6;right:22px;top:24px;width:40px;height:40px;
    background:transparent;border:1px solid rgba(240,237,227,.6);border-radius:50%;cursor:pointer;padding:0;
  }
  .burger span{position:absolute;left:11px;right:11px;height:1px;background:var(--milk);transition:transform .35s cubic-bezier(.65,0,.35,1),top .35s cubic-bezier(.65,0,.35,1)}
  .burger span:nth-child(1){top:16px}
  .burger span:nth-child(2){top:23px}
  .burger[aria-expanded="true"] span:nth-child(1){top:19.5px;transform:rotate(45deg)}
  .burger[aria-expanded="true"] span:nth-child(2){top:19.5px;transform:rotate(-45deg)}
  .sheet{
    position:absolute;z-index:5;left:8px;right:8px;top:8px;bottom:8px;border-radius:20px;
    background:rgba(15,14,14,.94);backdrop-filter:blur(10px);
    display:flex;flex-direction:column;justify-content:center;gap:18px;padding:0 28px;
    font-size:34px;font-weight:300;letter-spacing:-.6px;
    opacity:0;visibility:hidden;pointer-events:none;
    transition:opacity .35s ease,visibility 0s linear .35s;
  }
  .sheet a{opacity:0;transform:translateY(12px);transition:opacity .4s ease,transform .4s cubic-bezier(.2,.8,.2,1)}
  .sheet.is-open{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .35s ease}
  .sheet.is-open a{opacity:1;transform:none}
  .sheet.is-open a:nth-child(1){transition-delay:.08s}
  .sheet.is-open a:nth-child(2){transition-delay:.14s}
  .sheet.is-open a:nth-child(3){transition-delay:.2s}
  .sheet.is-open a:nth-child(4){transition-delay:.26s}
  .logo{z-index:7}
  .sheet[hidden]{display:flex}
  .takes{left:22px;right:22px;top:104px;bottom:auto;width:auto}
  .takes__line,.takes__title,.takes__list{display:none}
  .takes__inline{display:block;font-size:13px;line-height:18px;opacity:.8;letter-spacing:-.1px}
  .headline{left:22px;right:22px;top:auto;bottom:calc(100px + env(safe-area-inset-bottom));width:auto}
  .headline__kicker{font-size:15px;line-height:20px;margin-bottom:12px;letter-spacing:-.1px}
  .headline__title{font-size:clamp(18px,5vw,26px);line-height:1.18;letter-spacing:-.01em}
  .headline__title .c-b{font-size:clamp(13px,3.6vw,16px);line-height:1.3;margin-top:8px}
  .br-d{display:none}
  .br-m{display:inline}
  .about__lead,.work__lead,.scn__lead,.foot__text,.card__p{text-wrap:pretty}
  .actions{left:22px;right:22px;top:auto;bottom:calc(34px + env(safe-area-inset-bottom));gap:6px}
  .btn{flex:1 1 auto;padding:11px 14px;font-size:15px;line-height:20px;letter-spacing:-.1px}
  .btn--line{flex:1.3 1 auto}
}


@media (prefers-reduced-motion:reduce){
  .hero__video{display:none}
  .hero__media{background:#000 center/cover no-repeat url("../assets/img/poster-desktop.jpg")}
}

@media (max-width:900px){
  li,.qa__q,.qa__a p,.fcap__d,.card__p{text-wrap:pretty}
}
@media (max-width:900px){.scn__lead{text-wrap:wrap}}

.br-t{display:none}
@media (min-width:601px) and (max-width:900px){.br-t{display:inline}.br-nt{display:none}}
