:root{
  --ink:#021c1e;
  --teal:#004445;
  --sea:#2c7873;

  --paper:#eef5f4;                  /* чуть темнее, чтобы читалось */
  --white:#fff;

  --shadow: 0 22px 70px rgba(0,0,0,.12);
  --line: rgba(2,28,30,.14);
  --mut: rgba(2,28,30,.82);

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;

  --container: 1180px;
  --toppad: 16px;
  --stack-gap: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"Comfortaa", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }

/* ✅ SAFE GLOBAL (не ломает лого/иконки) */
img,video{
  max-width:100%;
  height:auto;
  display:block;
}

/* cover только там, где реально надо */
.heroBg video,
.caseThumb img,
.teamTile img,
.workGrid .svcMedia img,
.media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.container{
  width:min(var(--container), calc(100% - 28px));
  margin-inline:auto;
}

.frame{
  margin: 14px auto 18px;
  width: min(1280px, calc(100% - 16px));
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06);

  /* ✅ FIX iOS sticky */
  overflow: visible;        /* было hidden */
  position: relative;
}
/* ✅ визуально "обрезаем" контент, но не ломаем sticky */
@supports (clip-path: inset(0 round 1px)){
  .frame{
    clip-path: inset(0 round var(--radius-xl));
  }
}



.section{ padding: 64px 0; }
.section.sm{ padding: 40px 0; }

.h1{
  margin:0;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.06;
  font-size: clamp(30px, 5vw, 64px);
}
.h2{
  margin:0;
  font-weight: 900;
  letter-spacing: -0.2px;
  line-height: 1.12;
  font-size: clamp(20px, 3vw, 34px);
}
.lead{
  margin-top: 12px;
  max-width: 70ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--mut);
}
.small{
  font-size: 12px;
  line-height: 1.7;
  color: rgba(2,28,30,.55);
}

.hairline{
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.12), transparent);
  margin-top: 16px;
}

/* ===== Header ===== */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
}
.brandLogo{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.04);
}
/* ✅ лого не обрезаем и не “вытягиваем” */
.brandLogo img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.brandText{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brandText b{ font-size: 14px; }
.brandText span{ font-size: 11px; color: rgba(2,28,30,.55); }

.rightZone{ display:flex; align-items:center; gap:10px; }

/* language switch */
.lang{
  display:flex; gap:6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.08);
}
.lang button{
  border: 0;
  cursor:pointer;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  font-weight: 900;
  font-family: inherit;
  font-size: 12px;
  color: rgba(2,28,30,.65);
}
.lang button.active{
  background: rgba(0,68,69,.12);
  border: 1px solid rgba(0,68,69,.18);
  color: var(--ink);
}

/* desktop nav */
.nav{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.pill{
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
  font-weight: 900;
  font-size: 12px;
  transition: .18s ease;
}
.pill:hover{ transform: translateY(-1px); background: rgba(0,0,0,.08); }
.pill.active{
  background: rgba(0,68,69,.12);
  border-color: rgba(0,68,69,.22);
}

/* burger */
.burger{
  display:none;
  width: 46px; height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.05);
  cursor:pointer;
  position:relative;
}
.burger span{
  position:absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: rgba(2,28,30,.78);
  border-radius: 999px;
}
.burger span:nth-child(1){ top: 15px; }
.burger span:nth-child(2){ top: 23px; }

/* drawer */
.drawer{
  position: fixed; inset:0;
  background: rgba(246,251,250,.75);
  backdrop-filter: blur(12px);
  opacity: 0; pointer-events:none;
  transition: opacity .18s ease;
  z-index: 999;
}
.drawer.open{ opacity:1; pointer-events:auto; }
.drawerPanel{
  position:absolute;
  right: 12px; top: 12px;
  width: min(420px, calc(100% - 24px));
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.10);
  overflow:hidden;
}
.drawerTop{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  font-weight:900;
}
.xBtn{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.06);
  width: 44px; height: 38px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:900;
}
.drawerLinks{
  padding: 14px;
  display:flex; flex-direction:column; gap:10px;
}
.dLink{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.04);
  font-weight: 900;
}
.drawerBottom{
  padding: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
}

/* ===== Hero ===== */
.hero{
  border-radius: var(--radius-xl);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.06);
  position:relative;
  min-height: 520px;
}

.heroBg{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
}
.heroBg video{
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.02);
}

.heroShade{
  position:absolute; inset:0;
  z-index:1;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.06), rgba(0,0,0,.42)),
    radial-gradient(800px 420px at 15% 25%, rgba(44,120,115,.25), transparent 65%),
    radial-gradient(800px 420px at 85% 80%, rgba(0,68,69,.18), transparent 60%);
}

.heroInner{
  position:relative;
  z-index:2;
  padding: 36px;
  min-height: 520px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  color: var(--white);
}

.heroTag{
  width: fit-content;
  display:inline-flex; align-items:center; gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  font-weight: 900;
  font-size: 12px;
}

/* ✅ dot для HERO только тут */
.heroTag .dot{
  width: 8px; height: 8px;
  background: var(--sea);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(44,120,115,.20);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.14);
  color: var(--white);
  transition: .18s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.18); }
.btn.dark{
  color: var(--ink);
  border-color: rgba(0,0,0,.10);
  background: rgba(0,0,0,.06);
}

/* ===== stack cards ===== */
.stackWrap{ padding-top: 8px; }
.stack{
  position:relative;
  display:grid;
  gap: var(--stack-gap);
  padding-bottom: 24px;
}
.stackCard{
  position: sticky;
  top: calc(var(--toppad) + 56px);
  border-radius: var(--radius-xl);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 16px 50px rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  transform: translateY(16px);
  opacity: 0;
  filter: blur(10px);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
.stackCard.show{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.stackCard .inner{
  padding: 22px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  text-align:center;
}
.stackCard .num{ font-size: 54px; font-weight: 900; letter-spacing: -1px; opacity: .92; }
.stackCard .title{ font-size: 22px; font-weight: 900; letter-spacing: -0.2px; }
.stackCard .text{
  margin: 0 auto;
  max-width: 68ch;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(2,28,30,.75);
}
.media{
  border-radius: var(--radius-lg);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.06);
  aspect-ratio: 4 / 3;
}

/* =========================
   ✅ CASES — FIX “слипленность”
========================= */

.caseGrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.caseCard{
  border-radius: var(--radius-xl);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.40);
  /* ✅ внутренние отступы создают “воздух” */
  padding: 14px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.caseCard:hover{
  transform: translateY(-3px);
  box-shadow: 0 22px 70px rgba(0,0,0,.12);
  border-color: rgba(0,68,69,.25);
}

/* ✅ картинка теперь в своей рамке + есть gap до текста */
.caseThumb{
  aspect-ratio: 16 / 10;            /* можно 16/9 если хочешь */
  overflow:hidden;
  border-radius: 22px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.06);
  margin-bottom: 12px;              /* ✅ это убирает “слипленность” */
}

.caseInfo{
  padding: 2px 2px 0;
  display:flex;
  flex-direction:column;
  gap: 10px;                        /* ✅ больше воздуха */
}

.tag{
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,68,69,.08);
  border: 1px solid rgba(0,68,69,.16);
  font-weight: 900;
  font-size: 12px;
  color: #004445;
}

.caseTitle{ font-weight:900; font-size: 15px; margin:0; }
.caseDesc{ font-size: 12px; line-height:1.7; color: rgba(2,28,30,.64); margin:0; }

/* overlay как было (если используешь) */
.caseOverlay{
  position:absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border-radius: 22px;
  padding: 18px 18px 16px;
  background: rgba(2,28,30,.86);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
  color: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);

  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
}
.caseCard:hover .caseOverlay{ opacity: 1; transform: translateY(0); }
.ovTitle{ font-weight: 900; font-size: 18px; letter-spacing: -0.2px; }
.ovText{ margin-top: 10px; font-size: 13px; line-height: 1.75; color: rgba(255,255,255,.78); }
.ovLink{
  margin-top: 16px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(44,120,115,.18);
  border: 1px solid rgba(44,120,115,.30);
  color: #fff;
}
@media (hover: none){
  .caseOverlay{ opacity:1; transform:none; }
  .caseCard{ transform:none; }
}

/* Team tiles */
.teamGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.teamTile{
  border-radius: var(--radius-xl);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.05);
  position:relative;
  min-height: 520px;
}
.teamTile img{ filter: grayscale(1) contrast(1.05); }
.teamMeta{
  position:absolute;
  left: 16px; bottom: 16px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.18);
  color:#fff;
  padding: 14px;
  border-radius: 18px;
  backdrop-filter: blur(10px);
}
.teamName{ font-weight: 900; font-size: 15px; }
.teamRole{ margin-top:6px; font-size: 12px; color: rgba(255,255,255,.78); }

/* Footer */
.footer{
  padding: 24px 0 30px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.footerRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  flex-wrap:wrap;
  gap: 14px;
}

/* Responsive */
@media(max-width: 980px){
  .nav{ display:none; }
  .burger{ display:inline-block; }
  .heroInner{ padding: 22px; }
  .section{ padding: 46px 0; }
  .caseGrid{ grid-template-columns: 1fr; }
  .teamGrid{ grid-template-columns: 1fr; }
  .teamTile{ min-height: 460px; }
}

@media(max-width: 520px){
  .brandText{ display:none; }
  .stackCard .title{ font-size: 19px; }
  .stackCard .num{ font-size: 46px; }
  .media{ aspect-ratio: 1 / 1; }
}

/* =========================
   WORK (оставил твою структуру)
========================= */

.workHeadRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 14px;
  flex-wrap:wrap;
}
.workIntro{ max-width: 860px; }

.workGrid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media(max-width: 900px){
  .workGrid{ grid-template-columns: 1fr; }
}

/* service card (clickable) */
.svcCard{
  position: relative;
  border-radius: 28px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.44);
  box-shadow: 0 18px 70px rgba(0,0,0,.10);
  overflow: hidden;
  padding: 14px;                    /* ✅ чуть меньше “плитка”, больше воздуха */
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.svcCard:hover{
  transform: translateY(-3px);
  border-color: rgba(44,120,115,.34);
  background: rgba(255,255,255,.55);
}

/* ✅ квадрат + скругление фотки в WORK */
.workGrid .svcMedia{
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.06);
  margin-bottom: 12px;              /* ✅ воздух между фото и текстом */
}
.workGrid .svcMedia img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.svcTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.svcNum{
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.6px;
  color: rgba(0,68,69,.55);
}

.svcBadge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(44,120,115,.12);
  border: 1px solid rgba(44,120,115,.25);
  color: #004445;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.svcTitle{
  margin-top: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.2px;
  color: #004445;
}

.svcDesc{
  margin-top: 10px;
  color: #2c7873;
  font-size: 13px;
  line-height: 1.75;
  max-width: 60ch;
}

.svcLink{
  margin-top: 14px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(44,120,115,.10);
  border: 1px solid rgba(44,120,115,.35);
  color: #004445;
}

.svcChevron{
  position:absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(44,120,115,.12);
  border: 1px solid rgba(44,120,115,.35);
  color: #004445;
  transition: transform .22s ease;
}
.svcCard:hover .svcChevron{ transform: rotate(90deg); }

/* раскрывающийся процесс */
.procWrap{
  margin-top: 14px;
  border-radius: 28px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.45);
  overflow: hidden;
}

.procHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.procHeaderLeft{ display:flex; flex-direction:column; gap: 6px; }

.procKicker{
  color: rgba(2,28,30,.55);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.procTitle{
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}
.procClose{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.05);
  color: rgba(2,28,30,.85);
  cursor:pointer;
}

.procBody{ padding: 18px; }

.timeline{
  position: relative;
  padding-left: 26px;
}
.timeline::before{
  content:"";
  position:absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(44,120,115,.90), rgba(44,120,115,.10));
  border-radius: 999px;
}

.step{
  position: relative;
  padding: 14px 14px 14px 18px;
  margin-bottom: 10px;
  border-radius: 22px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.60);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity .28s ease, transform .28s ease;
}
.step.show{ transform: translateY(0); opacity: 1; }

/* ✅ dot для TIMELINE только тут (не конфликтует с hero) */
.timeline .dot{
  position:absolute;
  left: -26px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #6fb98f;
  box-shadow: 0 0 0 7px rgba(111,185,143,.18);
  border: 1px solid rgba(255,255,255,.35);
}

.step h3{
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.1px;
}
.step p{
  margin: 8px 0 0;
  color: rgba(2,28,30,.72);
  font-size: 13px;
  line-height: 1.8;
}

@media(max-width: 700px){
  .svcTitle{ font-size: 20px; }
  .svcNum{ font-size: 26px; }
}

/* smooth reveal container */
.procWrap[hidden]{ display:none; }


/* FIX: убираем "склейку" при sticky-стеке */
.stackCard{
  background: transparent !important; /* фон убираем с самой карточки */
  position: sticky;
  isolation: isolate;                 /* отдельный слой, меньше артефактов */
  will-change: transform;             /* стабильнее при скролле */
}

.stackCard::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  z-index:0;

  /* ВОТ ТУТ твой фон карточки — можно менять по вкусу */
  background: rgba(238,245,244,.98);  /* почти непрозрачный, текст не "просвечивает" */
  /* если хочешь лёгкий glass:
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  */
}

.stackCard .inner{
  position: relative;
  z-index: 1; /* контент всегда поверх */
}