
/* patch-v11.css — targeted fixes for drotraffic-v5 */
:root{ --container-w: 1200px; --side-pad: clamp(16px, 5vw, 40px); --header-h: 72px; --accent:#ff7a1a; --accent2:#ffb066 }

/* Layout containers and header */
.header{ position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 1000;
  backdrop-filter: saturate(160%) blur(10px);
  background: linear-gradient(to bottom, rgba(7,7,9,.9), rgba(7,7,9,.5));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body{ padding-top: var(--header-h); }
.nav{ width: min(var(--container-w), 100% - var(--side-pad)*2); margin: 0 auto; }

/* Menu hover = underline only */
.menu a{ position:relative; transition: opacity .2s, transform .2s; }
.menu a:hover{ opacity:1; transform: translateY(-1px); background: none !important; box-shadow:none !important; }
.menu a::after{ content:""; position:absolute; left:10px; right:10px; bottom:6px; height:2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); transform: scaleX(0); transform-origin:left;
  transition: transform .25s cubic-bezier(.22,1,.36,1); }
.menu a:hover::after, .menu a.active::after{ transform: scaleX(1); }

/* Keep CTA visible; wrap menu gracefully */
.menu{ display:flex; flex-wrap: wrap; align-items:center; gap:8px; min-width:0; }
.cta{ flex: 0 0 auto; }

/* Mobile burger drawer */
@media (max-width: 860px){
  .menu{
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: rgba(7,7,9,.96); backdrop-filter: blur(8px);
    display: none; flex-direction: column; align-items: flex-start; gap:10px;
    padding: 14px var(--side-pad);
    border-bottom:1px solid rgba(255,255,255,.06);
  }
  body.open .menu{ display:flex }

}

/* Consistent side paddings & vertical rhythm */
.container.inner{ width: min(var(--container-w), 100% - var(--side-pad)*2); margin: 0 auto }
section.section{ padding: 24px 0 }
p{ margin: .6em 0 0; }
.head{ margin-bottom: 10px; }
.lead{ margin: .4em 0 .6em; color: #ffffff; max-width: 820px }

/* Down arrow cue */
.scroll-down{ position:absolute; left:50%; bottom:16px; transform: translateX(-50%);
  width:64px; height:28px; background:none; border:none; color:#fff; opacity:.75; cursor:pointer }
.scroll-down:hover{ opacity:1 }
.scroll-down svg{ width:100%; height:100% }

/* Steps: 4 in a row with connectors */
#steps .grid-2{ display:grid; grid-template-columns: repeat(4,1fr); gap:16px }
#steps .card{ position:relative }
#steps .card::after{ content:""; position:absolute; right:-10px; top:50%; transform: translateY(-50%);
  width:22px; height:2px; background: linear-gradient(90deg, var(--accent), var(--accent2)) }
#steps .card:last-child::after{ display:none }
@media (max-width: 980px){
  #steps .grid-2{ grid-template-columns: 1fr 1fr }
  #steps .card::after{ display:none }
}
@media (max-width: 560px){
  #steps .grid-2{ grid-template-columns: 1fr }
}

/* Benefits (Почему выбирают): ensure 4 in row, icon-first look */
#benefits .grid-4, #benefits .grid-3, #benefits .grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:16px }
#benefits article{ display:block; border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.08)); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
#benefits h3{ margin:0 0 6px; font-size: clamp(16px, 1.6vw, 18px) }
#benefits p{ margin:0; color:#ffffff; font-size:14px }
@media (max-width: 980px){ #benefits .grid-4, #benefits .grid-3, #benefits .grid{ grid-template-columns: 1fr 1fr } }
@media (max-width: 560px){ #benefits .grid-4, #benefits .grid-3, #benefits .grid{ grid-template-columns: 1fr } }

/* Sources (Принимаем трафик) — 2 columns with checklists */
#sources .grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap:16px }
#sources .card{ border:1px solid rgba(255,255,255,.06); border-radius:14px; padding:16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.08)); }
#sources ul.checklist{ list-style:none; margin:8px 0 0; padding:0; display:grid; gap:8px }
#sources ul.checklist li{ position:relative; padding-left:26px }
#sources ul.checklist li::before{
  content:""; position:absolute; left:0; top:4px; width:16px; height:16px; border-radius:50%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns=%22http://www.w3.org/2000/svg%22><path fill=%22%23fff%22 d=%22M9 16.2l-3.5-3.5 1.4-1.4L9 13.4l7.1-7.1 1.4 1.4z%22/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns=%22http://www.w3.org/2000/svg%22><path fill=%22%23fff%22 d=%22M9 16.2l-3.5-3.5 1.4-1.4L9 13.4l7.1-7.1 1.4 1.4z%22/></svg>') center/contain no-repeat;
}
@media (max-width: 980px){ #sources .grid-2{ grid-template-columns:1fr } }

/* Multi gallery & controls */
.multi{ position:relative; overflow:hidden; border-radius:16px; border:1px solid rgba(255,255,255,.06); background:rgba(255,255,255,.02) }
.multi .track{ display:flex; gap:0; transition: transform .6s cubic-bezier(.22,1,.36,1) }
.multi .item{ flex:0 0 25%; padding:10px }
.multi .item img, .multi .item .card{ width:100%; border-radius:12px; border:1px solid rgba(255,255,255,.06) }
@media (max-width:1200px){ .multi .item{ flex-basis:54% } } 
@media (max-width:800px){ .multi .item{ flex-basis:50% } }
.multi .nav{ position:absolute; inset:auto 12px 12px 12px; display:flex; justify-content:space-between; pointer-events:none }
.multi .nav button{ pointer-events:auto; border:none; border-radius:12px; padding:10px 14px; font-weight:800;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); color:#111; box-shadow:0 10px 24px rgba(255,106,0,.35) }

/* FAQ details prettier (accordion feel) */
#faq details{ border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:12px 14px; background: rgba(255,255,255,.02); margin:10px 0 }
#faq summary{ cursor:pointer; font-weight:600 }
#faq details[open]{ background: rgba(255,255,255,.04) }

/* FAB buttons spacing */
.fab{ position:fixed; width:48px; height:48px; border-radius:999px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.08)); border:1px solid rgba(255,255,255,.08);
  color:#fff; box-shadow:0 12px 32px rgba(0,0,0,.35); z-index:950; opacity:0; transform:scale(.9);
  pointer-events:none; transition: opacity .25s, transform .25s }
.fab.show{ opacity:1; transform:scale(1); pointer-events:auto }
.fab.top{ left:24px; bottom:28px } .fab.help{ right:24px; bottom:28px }


/* v12: Hero layout — текстовая колонка шире, картинка уже */
.hero-grid{ grid-template-columns: 1.6fr .8fr; }
@media (max-width: 1200px){ .hero-grid{ grid-template-columns: 1.4fr .8fr; } }
@media (max-width: 980px){ .hero-grid{ grid-template-columns: 1fr; } }
.hero-grid > :last-child{ justify-self:end; max-width: 560px; }
.hero-grid img, .hero-grid .mock { width: 100%; height: auto; }



/* v12: Контрастный белый текст */
:root{ --text:#ffffff; --muted:rgba(255,255,255,.78); --amber:#FF7A1A; --amber2:#FF8C3A; }
body, .lead, .card, .menu a, .drawer a, h1, h2, h3, h4, p{ color: #fff; }
.menu a{ opacity:.9 } .menu a.active{ opacity:1 }



/* v12: Узкие списки в блоке "Мы примем любой твой трафик" */
#sources .grid-2{ 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  max-width: 780px; margin-inline:auto;
}
#sources .card{ font-size: 16px; line-height:1.5; padding:14px 16px; }



/* v12: Normalize accent palette to orange */
:root{ --amber:#FF7A1A; --amber2:#FF8C3A; }
a, .cta, .card strong, .badge, .chip, .btn { accent-color: var(--amber); }



/* v12: Hover effects for sections 2–6 */
#benefits .card, #steps .card, #sources .card, #offer .tile, #community .card{
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative; border:1px solid rgba(255,255,255,.08);
}
#benefits .card:hover, #steps .card:hover, #sources .card:hover, #offer .tile:hover, #community .card:hover{
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  border-color: rgba(255,122,26,.65);
}
/* Equalize card heights for cleaner layout */
.grid-3 .card, .grid-2 .card{ display:flex; flex-direction:column; justify-content:flex-start; min-height: 120px; }

/* Generic icon-bullet instead of emojis */
.i{ 
  display:inline-block; width:1.05em; height:1.05em; vertical-align:-0.18em; margin-right:.4em;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/></svg>') no-repeat center / contain;
  opacity:.92;
}



/* v12: CSS scroll-snap as a fallback */
html, body{ scroll-behavior:smooth; }
main{ scroll-snap-type: y proximity; }
.snap{ scroll-snap-align: start; }
section[id]{ scroll-margin-top: var(--header-h); }



/* v12: Hover-corner indicator icon */
#benefits .card::after, #steps .card::after, #sources .card::after, #offer .tile::after, #community .card::after{
  content:""; position:absolute; top:10px; right:10px; width:14px; height:14px; opacity:0; transition:opacity .25s ease;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 12l4 4 4-4" stroke="black" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 12l4 4 4-4" stroke="black" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center / contain;
}
#benefits .card:hover::after, #steps .card:hover::after, #sources .card:hover::after, #offer .tile:hover::after, #community .card:hover::after{ opacity:.9; }
#benefits h3, #offer .tile div{ margin-bottom:8px }

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  opacity: 1 !important;
  transform: none !important;
}

.highlight-orange {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}


.card::after,
.tile::after {
  display: none !important;
  content: none !important;
}


/* Сетка: три «плашки» в ряд и адаптив */
.features-3{
  display: grid;
  grid-template-columns: repeat(3, minmax(220px,1fr));
  gap: 16px;
  margin-top: 6px;
}
@media (max-width: 980px){ .features-3{ grid-template-columns: repeat(2, minmax(220px,1fr)); } }
@media (max-width: 560px){ .features-3{ grid-template-columns: 1fr; } }

/* Плашка-элемент в стиле сайта */
.feature-item{
  --icon-size: 64px; /* легко увеличить/уменьшить иконку */
  display: grid;
  grid-template-columns: var(--icon-size) 1fr;
  align-items: center;
  gap: 12px;


  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.02) inset,
    0 8px 24px rgba(0,0,0,.28),
    0 0 22px rgba(255,122,26,.10);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .4s ease;
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp .5s ease forwards;
  animation-delay: var(--d, 0s);
}
.feature-item:hover{
  transform: translateY(22px) scale(1.02);


}

/* Иконка – круглая «капсула» с акцентом */
.icon-wrap{
  width: var(--icon-size);
  height: var(--icon-size);

  display: flex; align-items: center; justify-content: center;

  
  color: var(--amber);
  transition: transform .25s ease;
}
.feature-item:hover .icon-wrap{ transform: scale(1.06); }

/* Размер и цвет SVG-иконки из Lucide */
.icon-wrap svg{
  width: 60%; height: 60%;
  stroke: currentColor;
  stroke-width: 2.9;
}

/* Текст */
.feature-item p{
  margin: 0;
  text-align: left;      /* читается лучше в плашке */
  line-height: 1.45;
}

/* Анимация появления (оставили твою идею) */
@keyframes fadeUp{ to{ opacity:1; transform: translateY(0); } }





/* Улучшенная кнопка "Присоединиться" */
.hero-grid .cta {
  font-size: 20px;
  padding: 16px 32px;
  margin: 24px auto 0; /* центрируем по горизонтали */
  display: block;
  animation: pulse-bait 2.5s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Пульсация "байт" */
@keyframes pulse-bait {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255,122,26,0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255,122,26,0.45);
  }
}

/* Hover-эффект */
.hero-grid .cta:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(255, 122, 26, 0.6);
  filter: brightness(1.1) saturate(1.1);
}




/* === #community: делаем читаемую ширину строки и жёстко 2 строки === */

/* 1) Сетка — колонки не бесконечно широкие */
#community .grid-3{
  display: grid;
  grid-template-columns: repeat(3, minmax(360px, 1fr)); /* было 1fr, делаем минимум 360px */
  gap: 18px 20px;
  align-items: stretch;
}

@media (max-width: 1100px){
  #community .grid-3{ grid-template-columns: repeat(2, minmax(360px, 1fr)); }
}
@media (max-width: 680px){
  #community .grid-3{ grid-template-columns: 1fr; }
}

/* 2) Задаём «меру» строки и ограничиваем до двух строк */
#community .card{ --measure: 38ch; }          /* желаемая ширина текста ≈ 38 символов */

#community .card .card-text{
  max-width: var(--measure);                  /* текст не растягивается на всю карту */
  display: -webkit-box;
  -webkit-line-clamp: 2;                      /* ровно 2 строки */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: auto;                              /* переносы по слогам */
  word-break: normal;
}

/* если нет card-text — можно повесить правило на саму .card */
#community .card:not(:has(.card-text)){
  /* fallback: если текст просто лежит как узел внутри .card */
}
#community .card:not(:has(.card-text)){ /* поддерживается не везде, лучше обернуть в <p class="card-text">... */
}

/* 3) Иконка слева — как делали раньше */
#community .card{ display:block !important; line-height:1.5; }
#community .card::after{ content:""; display:table; clear:both; }
#community .card .icon-l{
  float:left; width:40px; height:40px; margin:2px 12px 6px 0;
  border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.05);
  box-shadow:0 0 0 1px rgba(255,255,255,.06) inset, 0 0 14px rgba(255,122,26,.18);
  color:var(--amber); font-size:20px; line-height:1;
  shape-outside:circle(50%); -webkit-shape-outside:circle(50%);
}








/* ===== Обтекаемая «призрачная» иконка в #benefits ===== */
#benefits .card{
  /* Переменные по умолчанию для удобного твика */
  --ico-size: 140px;   /* размер иконки */
  --ico-gap:  12px;    /* зазор между иконкой и текстом */
}

/* Сама иконка: по умолчанию справа, с обтеканием */
#benefits .card .bg-ico-flow{
  float: right;                         /* ключ к обтеканию */
  width: var(--ico-size);
  height: var(--ico-size);
  margin: 0 0 6px var(--ico-gap);       /* слева зазор под текст */
  shape-outside: circle(50%);           /* обводим по кругу */
  -webkit-shape-outside: circle(50%);

  opacity: .12;                         /* «призрак» под текстом */
  pointer-events: none;
  position: relative; z-index: 0;       /* ниже, чем текст */
  filter: drop-shadow(0 8px 20px rgba(255,122,26,.25));
}

/* SVG из Lucide должен занять контейнер */
#benefits .card .bg-ico-flow svg{
  width: 100% !important;
  height: 100% !important;
  stroke: var(--amber);
  stroke-width: 1.8;
  fill: none;
}

/* Вариант слева (если понадобится) */
#benefits .card .bg-ico-flow.left{
  float: left;
  margin: 0 var(--ico-gap) 6px 0;       /* справа зазор */
}

/* Быстрые пресеты размеров (опционально) */
#benefits .card.size-sm { --ico-size: 50px; }
#benefits .card.size-md { --ico-size: 50px; }
#benefits .card.size-lg { --ico-size: 50px; }
#benefits .card.size-xl { --ico-size: 50px; }

/* На узких экранах убираем float, чтобы не ломать сетку */
@media (max-width: 560px){
  #benefits .card .bg-ico-flow{
    float: none;
    display: block;
    margin: 0 auto px auto;
    shape-outside: none;
    -webkit-shape-outside: none;
  }
}





/* Узкий контейнер для списка вопросов */
#faq .grid-1,
#faq .accordion,
#faq .cards {
  /* выбери желаемую ширину: от 640 до 980 на десктопе */
  max-width: clamp(540px, 66vw, 780px);
  margin-inline: auto;     /* центрируем */
}

/* На мобилке — во всю ширину */
@media (max-width: 680px){
  #faq .grid-1,
  #faq .accordion,
  #faq .cards { max-width: 100%; }
}

/* На всякий — чтобы каждая плашка не пыталась растянуться шире */
#faq .card { width: 100%; }












#cta-bottom { padding: 48px 0 64px; }
#cta-bottom .cta-bottom__wrap { display:flex; justify-content:center; }
.cta--xl { font-size: clamp(18px, 1.2vw + 14px, 22px); padding: 18px 36px; }











/* Десктоп/планшет: скрыта */
.cta--mobile { display:none; }

/* Мобильная шапка: фиксируем по центру */
@media (max-width: 680px){
  header .cta--mobile{
    display:inline-flex;
    position:absolute;
    top: 8px; left:50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    font-size: 14px;
    z-index: 5;       /* поверх фона, но ниже оверлея меню */
  }
}


/* === v12 header CTA in center on tablet/mobile, and menu modes === */
.header .cta-nav{ display:none; }
@media (max-width: 1024px){
  .header .nav{ position:relative; }
  .header .menu{ display:none !important; }
  .header .burger{ display:inline-flex !important; }
  .header .cta-nav{
    display:inline-flex;
    position:absolute; left:50%; top:50%;
    transform: translate(-50%, -50%);
    padding:10px 18px; font-size:14px;
    z-index:5;
  }
}

/* body lock when drawer is open */
body.noscroll{ overflow:hidden; }

/* CTA bottom block */
#cta-bottom{ padding: 48px 0 64px; }
#cta-bottom .cta-bottom__wrap{ display:flex; justify-content:center; }
#cta-bottom .cta--xl{ font-size:clamp(18px,1.2vw + 14px,22px); padding:18px 36px; }

/* Mobile: disable screen snapping & hide scroll-down */
@media (max-width:680px){
  html, body{ scroll-snap-type: none !important; }
  .snap{ scroll-snap-align: none !important; }
  .section.vh{ min-height:auto; height:auto; }
  .scroll-down, .scroll-indicator{ display:none !important; }
}


/* ===== Header desktop: logo | menu centered | CTA right ===== */
@media (min-width:1025px){
  .header .nav{
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:24px;
  }
  .header .menu{
    display:flex !important;
    justify-content:center;
    align-items:center;
    gap: clamp(16px, 2.2vw, 36px);
    flex-wrap: nowrap !important;   /* не переносить пункты */
    white-space: nowrap;
    position: static !important;    /* на всякий, чтобы не остался fixed из моб-правил */
    inset: auto !important;
    background: none !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .header .cta-nav{
    display:inline-flex !important;
    position: static !important;
    transform: none !important;
    justify-self: end;
    padding: 12px 22px;
    font-size: 15px;
  }
  .header .burger{align-items: center; justify-content: center;display:none !important; }
}

/* ===== Header tablet/mobile: center CTA between logo and burger, hide desktop menu ===== */
@media (max-width:1024px){
  .header .menu{ display:none !important; }      /* убираем горизонтальное меню целиком */
  .header .cta-nav{
    display:inline-flex;
    position:absolute; left:50%; top:50%;
    transform:translate(-50%,-50%);
    padding:10px 18px; font-size:14px; z-index:5;
  }
  .header .burger{ display:inline-flex !important; }
}


/* === Header: container-query logic to prevent overlap === */
/* Make nav a CQ container so we can switch when items no longer fit */
.header .nav{ container-type: inline-size; }

/* When there's enough inline size inside the header container */
@container (min-width: 1180px){
  .header .menu{
    display:flex !important;
    justify-content:center;
    align-items:center;
    gap: clamp(14px, 2vw, 34px);
    flex-wrap: nowrap !important;
    white-space: nowrap;
    overflow: hidden; /* prevent bleeding over the logo/cta area */
  }
  .header .cta-nav{
    display:inline-flex !important;
    position: static !important;
    transform: none !important;
    justify-self: end;
  }
  .header .burger{ display:none !important; }
}

/* If the header container is too narrow for the whole menu: use mobile pattern */
@container (max-width: 1179px){
  .header .menu{ display:none !important; }
  .header .burger{ display:inline-flex !important; }
  .header .cta-nav{
    display:inline-flex !important;
    position:absolute; left:50%; top:50%;
    transform: translate(-50%,-50%);
  }
}



/* фрейм одного размера */
#cabinet .multi .item .shot,
#screenshots .multi .item .shot{
  width:100%;
  height: var(--shot-h);
  border-radius:12px;
  overflow:hidden;
}
#cabinet .multi .item .shot img,
#screenshots .multi .item .shot img{
  width:100%; height:100%; object-fit:cover; display:block;
}



/* === Фиксированный размер превьюшек в карусели === */
.multi .item.shot {
  width: 100%;
  flex-basis:53%;
  height: 320px;        /* задай базовую высоту, например 220px */
  border-radius: 12px;
  overflow: hidden;     /* обрезаем лишнее */

}

.multi .item.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;    /* подгоняем картинку под контейнер */
  display: block;
}

/* адаптив: меняем высоту на разных экранах */
@media (max-width: 1200px) {
  .multi .item.shot { height: 280px; }
}
@media (max-width: 680px) {
  .multi .item.shot { height: 160px; }
}








/* ===== CSS-устройство с рамкой (без картинок) ===== */
.device{
  /* управление размерами */
  --device-w: 420px;           /* ширина корпуса */
  --ratio: 9/19.5;             /* пропорции корпуса */
  --bezel-r: 42px;             /* радиус корпуса */
  --screen-inset: 16px 12px 16px 12px; /* отступы экрана: t r b l */
  --screen-r: 28px;            /* радиус экрана */

  /* динамический остров (можно скрыть) */
  --island-show: 1;            /* 1 — видно, 0 — скрыть */
  --island-top: 10px;          /* от верха корпуса */
  --island-w: 94px;
  --island-h: 28px;
  --island-r: 16px;

  position: relative;
  width: min(var(--device-w), 100%);
  aspect-ratio: var(--ratio);
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.45));
}

/* Корпус телефона */
.device::before{
  content:"";
  position:absolute; inset:0;
  border-radius: var(--bezel-r);
  background:
    radial-gradient(120% 120% at 20% -10%, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:
    0 0 0 2px rgba(255,255,255,.06) inset,
    0 0 0 10px rgba(0,0,0,.45) inset;
  pointer-events:none;
  z-index:0;
}

/* Экран с контентом */
.device .screen{
  position:absolute;
  inset: var(--screen-inset);        /* t r b l — подгоняй под вкус */
  border-radius: var(--screen-r);
  overflow:hidden;
  background:#000;
  z-index:1;                         /* ниже «острова», выше корпуса */
  display:grid; place-items:center;  /* на случай пустого контента */
}

/* Любой вложенный контент: видео/картинка/iframe */
.device .screen > *{
  width:100%; height:100%;
  object-fit: cover;                 /* заполняем без искажений */
  display:block;
}

/* «Динамический остров» */
.device .island{
  position:absolute;
  top: var(--island-top);
  left:50%; transform:translateX(-50%);
  width: var(--island-w); height: var(--island-h);
  border-radius: var(--island-r);
  background: rgba(0,0,0,.85);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 16px rgba(0,0,0,.35);
  opacity: calc(var(--island-show)); /* 0 — скрыть */
  pointer-events:none;
  z-index:2;
}

/* необязательный блик стекла */
.device::after{
  content:"";
  position:absolute; inset:0;
  border-radius: var(--bezel-r);
  background: linear-gradient(150deg, rgba(255,255,255,.06), transparent 30%);
  mix-blend-mode: screen;
  pointer-events:none;
  z-index:3;
}

/* адаптивные пресеты высоты окна экрана (если нужно компактнее на мобиле) */
@media (max-width: 980px){ .device{ --device-w: 360px; } }
@media (max-width: 560px){ .device{ --device-w: 300px; } }
