:root {
  --dark: #1b1b1b;
  --darker: #121212;
  --olive: #44583d;            /* тёмная олива: #465a3e #415539 #44583d #465840 */
  --olive-light: #a7bb92;      /* светлая олива для текста и иконок на тёмном фоне */
  --accent: #e0ff05;
  --white: #fff;
  /* оливковая текстура + мягкий тон: светлее к центру, темнее к краям */
  --grad: radial-gradient(130% 160% at 45% 50%, rgba(255,255,255,.05), rgba(255,255,255,0) 55%, rgba(0,0,0,.14)), url("olive.png?v=2") repeat var(--olive);
  --head: "Onest", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* страница никогда не шире экрана (iOS Safari иначе даёт болтать её по ширине) */
html { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0; background: var(--dark); color: var(--white);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h2 { font-family: var(--head); font-weight: 700; font-size: clamp(32px, 5vw, 60px); line-height: 1.05; margin: 0; overflow-wrap: anywhere; }
.sep { width: 100px; height: 0; border: 0; border-top: 2px solid var(--olive-light); margin: 22px 0 32px; }
@media (max-width: 1920px) {
    .about-left h2; .h2bio {font-size: 40px!important;}
}


/* ---------- Плейсхолдеры: картинка / видео ---------- */
.ph {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  background: repeating-linear-gradient(45deg, #2a2a2a 0 14px, #262626 14px 28px);
  color: rgba(255,255,255,.55); font: 700 13px/1 var(--head); letter-spacing: .14em; text-transform: uppercase;
  border: 1px dashed rgba(255,255,255,.18);
}
.ph::before { font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 22px; letter-spacing: 0; }
.ph-img::before { content: "\f03e"; }
.ph-video::before { content: "\f03d"; }
.ph.light { background: repeating-linear-gradient(45deg, #333 0 14px, #2d2d2d 14px 28px); }

/* ---------- Шапка ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 18px;
  background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.18) 60%, rgba(0,0,0,0));
  transition: background .3s, padding .3s;
}
.topbar.scrolled { /*background: var(--grad);*/ background:#465a3e; padding-top: calc(env(safe-area-inset-top, 0px) + 12px); padding-bottom: 12px; }
.logo {
  font-family: var(--head); font-weight: 900; font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -.02em; display: inline-block; transform: skewX(-10deg); margin-right: auto; line-height: 1;
}
.logo span { color: var(--accent); }
/* Логотип-картинка (тёмно-серый PNG): белый поверх видео, родной тёмный на розовой шапке */
.logo-img { transform: none; display: block; }
.logo-img img { display: block; height: clamp(24px, 3vw, 34px); width: auto; transition: filter .3s; filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,.7)) drop-shadow(0 0 8px rgba(0,0,0,.45)); }
.topbar.scrolled .logo-img img { filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.side-logo.logo-img img { height: 30px; filter: brightness(0) invert(1); }
.top-icons { display: flex; gap: 18px; font-size: 16px; }
.top-icons a { opacity: .9; transition: opacity .2s, transform .2s; }
.top-icons a:hover { opacity: 1; transform: translateY(-2px); }
.burger { background: none; border: 0; padding: 8px 0 8px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.burger span { display: block; width: 26px; height: 2px; background: var(--white); }
.burger span:nth-child(2) { width: 18px; margin-left: auto; }

/* ---------- Боковое меню ---------- */
.side-nav {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(380px, 88vw);
  background: var(--darker); padding: calc(env(safe-area-inset-top, 0px) + 40px) 36px 40px;
  transform: translateX(100%); display: flex; flex-direction: column; gap: 36px;
  /* закрытое меню полностью скрыто, а не просто сдвинуто за край экрана */
  visibility: hidden; transition: transform .35s ease, visibility 0s linear .35s;
}
.side-nav.open { transform: none; visibility: visible; transition: transform .35s ease, visibility 0s; }
.side-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 18px; background: none; border: 0; color: #fff; font-size: 38px; cursor: pointer; line-height: 1; }
.side-logo { margin: 0; font-size: 32px; }
.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu a { display: block; font: 700 26px/1.2 var(--head); text-transform: uppercase; padding: 10px 0; border-bottom: 1px solid #2a2a2a; }
.side-menu a:hover { color: var(--olive-light); }
.side-socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.side-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .3s; }
.side-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 80svh; min-height: 480px; overflow: hidden; background: #000; }
.hero-media, .contact-media { position: absolute; inset: 0; }
.hero-media video, .contact-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media .ph, .contact-media .ph { font-size: 18px; }
.reel-btn {
  position: absolute; right: var(--gutter); bottom: 40px; z-index: 2;
  width: clamp(130px, 18vw, 190px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 0; padding: 0; cursor: pointer; background: #000; color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: transform .3s;
}
@media (min-width:2560px) { .reel-btn {

  width: clamp(300px); }}
.reel-btn:hover { transform: scale(1.06) rotate(-3deg); }
.reel-img { position: absolute; inset: 0; }
.reel-img img { width: 100%; height: 100%; object-fit: cover; }
.reel-img .ph { border-radius: 50%; font-size: 10px; }
.reel-img .ph::before { display: none; }
.reel-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; background: rgba(0,0,0,.25); }
.reel-label { position: absolute; left: 0; right: 0; bottom: 18%; font: 800 11px/1 var(--head); letter-spacing: .12em; text-align: center; }

/* ---------- Розовая полоса ---------- */
.band { /*background: var(--grad);*/ background:#465a3e; position: relative; scroll-margin-top: 60px; }
.band-inner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 26px var(--gutter); max-width: 1100px; margin: 0 auto;
}
.band-big { text-align: right; font: 800 clamp(20px, 3.2vw, 34px)/.95 var(--head); }
.band-small { font: 800 clamp(9px, 1.1vw, 12px)/1.25 var(--head); text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Портфолио ---------- */
.portfolio { display: grid; grid-template-columns: repeat(4, 1fr); }
.work-item { position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; background: #000; border: 0; padding: 0; color: #fff; text-align: left; }
.work-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s; }
.work-item .ph { border-color: rgba(255,255,255,.08); }
.work-cap {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  padding: 14px 16px; background: linear-gradient(transparent 40%, rgba(0,0,0,.85));
  opacity: 0; transition: opacity .35s;
}
.work-cap b { font: 700 16px/1.2 var(--head); }
.work-cap small { font-size: 12px; opacity: .8; }
.work-item:hover .work-cap, .work-item:focus-visible .work-cap { opacity: 1; }
.work-item:hover img { transform: scale(1.06); }


.clients { background: var(--dark); padding: 80px var(--gutter); scroll-margin-top: 60px; }

.clients-grid { --cols: 7; --gap-x: 30px; max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px var(--gap-x); }
.client { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap-x)) / var(--cols)); aspect-ratio: 2 / 1; display: flex; align-items: center; justify-content: center; }
.client img { max-height: 100%; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; transition: opacity .2s; }
.client:hover img { opacity: 1; }
.client .ph { font-size: 9px; gap: 3px; }
.client .ph::before { font-size: 15px; }

/* ---------- About ---------- */
.about { background: var(--dark); padding: 60px var(--gutter) 110px; scroll-margin-top: 60px; }
.about-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px 70px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 14px; margin-bottom: 70px; }
.tool { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.tool img { width: 100%; height: 100%; object-fit: contain; }
.tool .ph { font-size: 0; gap: 0; }
.tool .ph::before { font-size: 16px; }
.fields { list-style: none; margin: 0; padding: 0; font: 700 17px/1.45 var(--body); }
.bio { font-size: 16px; line-height: 1.55; color: #e9e9e9; }
.bio p { margin: 0 0 1.2em; }
.bio strong { color: #fff; }
.bio a { color: var(--accent); }


.contact { position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; scroll-margin-top: 0; }
.contact-media::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); pointer-events: none; }
.contact-inner { position: relative; z-index: 1; width: 100%; max-width: calc(480px + 2 * var(--gutter)); margin: 0 auto; padding: 140px var(--gutter) 110px; }
.contact-media .ph { align-items: flex-start; justify-content: flex-end; padding: 0 var(--gutter) 28px; }
.roll { display: flex; flex-direction: column; font-size: clamp(40px, 7vw, 68px); text-transform: uppercase; }
.roll-word { color: var(--olive-light); min-height: 1.05em; transition: opacity .35s, transform .35s; }
.roll-word.out { opacity: 0; transform: translateY(12px); }
.contact-lines { list-style: none; margin: 0 0 18px; padding: 0; font-size: 17px; line-height: 1.7; }
.contact-lines i { width: 24px; color: var(--olive-light); }
.contact-note { font-weight: 700; margin: 0 0 60px; }
.contact-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.soc {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); backdrop-filter: blur(4px); font-size: 18px; transition: background .2s, transform .2s;
}
.soc:hover { background: var(--grad); transform: translateY(-3px); }

.footer { /*background: var(--grad);*/ background:#465a3e; text-align: center; font-size: 13px; padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 16px); }

.to-top {
  position: fixed; right: 18px; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; background: rgba(20,20,20,.85); border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.nowrap {white-space: nowrap;}
.fotobio {position: relative; width:35%;float: right;margin-right: 15%;}
.h2bio {display: inline;  }

.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box {
  position: relative; max-height: 100%; overflow-y: auto; scrollbar-width: none;
  /* ширина подстраивается под высоту окна, чтобы видео + подпись помещались без прокрутки */
  width: min(1100px, 100%, calc((100vh - 230px) * 16 / 9));
}
.modal-box::-webkit-scrollbar { display: none; }
.modal-close { position: absolute; top: -6px; right: 0; background: none; border: 0; color: #fff; font-size: 42px; line-height: 1; cursor: pointer; z-index: 2; }
.modal-video { aspect-ratio: 16 / 9; margin-top: 40px; background: #000; }
.modal-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-info { padding: 18px 0 8px; }
.modal-info h3 { font: 700 24px/1.2 var(--head); margin: 0 0 4px; }
.modal-meta { color: var(--olive-light); font-weight: 600; margin: 0 0 10px; font-size: 14px; }
.modal-desc { margin: 0; color: #ddd; white-space: pre-line; }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .clients-grid { --cols: 5; }
}
@media (max-width: 760px) {
  .portfolio { grid-template-columns: repeat(2, 1fr); }
  .work-cap { opacity: 1; padding: 10px; }
  .work-cap b { font-size: 13px; }
  .work-cap small { display: none; }
  .clients-grid { --cols: 3; --gap-x: 22px; row-gap: 28px; }
  .about-inner { grid-template-columns: 1fr; }
  .tools-grid { margin-bottom: 50px; }
  .top-icons { display: none; }
  .reel-btn { right: 50%; transform: translateX(50%); bottom: 32px; }
  .reel-btn:hover { transform: translateX(50%) scale(1.05); }
  .band-inner { gap: 10px; }
  .fotobio {position: relative; width:35%; float: right; margin-right: 5%;}
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
