:root{
  --bg:#0b1220;
  --card:#111b2e;
  --text:#e9eefc;
  --muted:#a9b4d0;
  --line:rgba(255,255,255,.10);
  --accent:#ffd24a;
  --accent2:#6ee7ff;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;
  --max: 1120px;
}

/* base */
*{box-sizing:border-box; min-width:0;}
html,body{height:100%;}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);

  background:
    radial-gradient(900px 500px at 15% 10%, rgba(110,231,255,.14), transparent 55%),
    radial-gradient(900px 500px at 85% 15%, rgba(255,210,74,.12), transparent 55%),
    linear-gradient(180deg, #070c17, var(--bg));

  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;

  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}
img{max-width:100%; height:auto; display:block;}
input,textarea,select,button{font:inherit;}
button{border:0; background:none; color:inherit;}
.wrap{max-width:var(--max); margin:0 auto; padding:24px}

/* header */
.nav{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(7,12,23,.55);
  border-bottom:1px solid var(--line);
}
.nav .row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 24px;
  max-width:var(--max); margin:0 auto;
}
.brand{
  display:flex; align-items:center; gap:10px; font-weight:700;
  letter-spacing:.2px;
}
.dot{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(255,210,74,.12);
}
.menu{display:flex; gap:16px; align-items:center; color:var(--muted); font-size:14px}
.menu a{padding:8px 10px; border-radius:12px}
.menu a:hover{background:rgba(255,255,255,.06); color:var(--text)}

/* ui */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  border-radius:14px; padding:12px 16px; font-weight:700;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  transition: transform .15s ease, background .15s ease;
  max-width:100%;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.09)}
.btn.primary{
  border-color: rgba(255,210,74,.45);
  background: linear-gradient(135deg, rgba(255,210,74,.95), rgba(110,231,255,.55));
  color:#0b1220;
}

/* sections / layout */
section{padding:22px 0}
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}
.card{
  grid-column: span 4;
  padding:16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  max-width:100%;
}
.card h3{margin:0 0 6px; font-size:16px}
.card p{margin:0; color:var(--muted); font-size:14px; line-height:1.5}

.footer{
  padding:26px 0 40px;
  color:var(--muted);
  font-size:13px;
  border-top:1px solid var(--line);
  margin-top:22px;
}

/* extra (если где-то используется) */
.hero{
  padding:54px 0 24px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:24px;
  align-items:center;
}
.badge{
  display:inline-flex; align-items:center; gap:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius:999px;
  padding:8px 12px;
  color:var(--muted);
  font-size:13px;
  width: fit-content;
}
h1{margin:14px 0 12px; font-size:44px; line-height:1.06; letter-spacing:-.7px}
.lead{color:var(--muted); font-size:16px; line-height:1.6; max-width:64ch}
.cta{display:flex; gap:12px; flex-wrap:wrap; margin-top:18px}
.panel{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.photo{
  min-height:260px;
  background:
    linear-gradient(
      90deg,
      rgba(7,12,23,.85) 0%,
      rgba(7,12,23,.55) 35%,
      rgba(7,12,23,.15) 60%,
      rgba(7,12,23,.05) 100%
    ),
    url("../img/baner.png") no-repeat;
  background-size: cover;
  background-position: right center;
  border-radius: var(--radius);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 20px 50px rgba(0,0,0,.45);
}
.photo .note{
  font-size:13px; color:var(--muted);
  border:1px solid var(--line);
  background: rgba(7,12,23,.55);
  border-radius:14px;
  padding:10px 12px;
}
.section-title{
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  margin-bottom:12px;
}
.section-title h2{margin:0; font-size:24px}
.section-title p{margin:0; color:var(--muted); font-size:14px}

.case{
  grid-column: span 4;
  overflow:hidden;
  display:flex; flex-direction:column; gap:0;
}
.case .shot{
  height:160px;
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  color:rgba(233,238,252,.55);
  font-weight:700;
}
.case .body{padding:16px}
.case .meta{display:flex; justify-content:space-between; gap:10px; margin-top:10px; color:var(--muted); font-size:12px}

.steps .card{grid-column: span 3}
.faq .card{grid-column: span 6}

.contact{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
.form{
  padding:16px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:12px}
label{font-size:13px; color:var(--muted)}
input, textarea{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(7,12,23,.55);
  color: var(--text);
  padding:12px 12px;
  outline:none;
  font-size:14px;
}
textarea{min-height:110px; resize:vertical}

/* =========================
   MOBILE BASE (<=920px) — SINGLE SOURCE OF TRUTH
   (убираем конфликты, делаем стабильный хедер)
   ========================= */

/* Чтобы подложка (в т.ч. overscroll) не была белой */
html{ background:#070c17; }
body{ background-color:#070c17; color-scheme: dark; }

@media (max-width: 920px){

  /* ВАЖНО: на мобилках fixed фон часто даёт артефакты */
  body{
    background-attachment: scroll !important;
    overflow-x: hidden;
  }

  /* фикс: контент не должен попадать под fixed header */
  :root{ --mnav-h: 64px; } /* подгони если нужно */

  /* ХЕДЕР: только fixed (sticky убрать) */
  .nav{
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 9999;

    /* никаких blur/backdrop — они вызывают белые артефакты */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;

    /* плотный фон */
    background: rgba(7,12,23,.92) !important;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);

    /* стабилизация композитинга */
    transform: translateZ(0);
    will-change: transform;
  }

  /* отступ сверху под фиксированный header */
  body{ padding-top: var(--mnav-h); }

  /* уменьшаем паддинги */
  .wrap{ padding:14px; }
  .nav .row{ padding:12px 14px; }

  /* меню в хедере скрываем на мобилке */
  .menu{ display:none; }

  /* адаптация сеток */
  .hero{ grid-template-columns:1fr; }
  h1{ font-size:34px; }

  .grid{ grid-template-columns:1fr; gap:12px; }
  .card, .case{ grid-column: 1 / -1; }

  .steps .card{ grid-column: 1 / -1; }
  .faq .card{ grid-column: 1 / -1; }
  .contact{ grid-template-columns:1fr; }

  .photo{
    min-height:220px;
    background-position:center top;
  }
}

/* =========================
   ADMIN MOBILE (SIMPLE, NO DRAWER) — unchanged logic
   ========================= */
body.admin .burger,
body.admin .sidebar-overlay{ display:none !important; }

@media (max-width: 920px){
  body.admin .wrap{ padding:14px !important; }
  body.admin .nav .row{ padding:12px 14px !important; }

  body.admin .grid{
    grid-template-columns: 1fr !important;
    gap:12px !important;
  }

  body.admin .grid > aside,
  body.admin .grid > section{
    grid-column: 1 / -1 !important;
  }

  body.admin .grid > aside{
    order:-1;
    padding:12px !important;
  }

  body.admin .grid > aside > div{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap:10px !important;
  }

  body.admin .grid > aside .btn{
    width:100%;
    justify-content:center !important;
    padding:10px 12px !important;
    border-radius:16px;
  }

  body.admin .grid > aside > div > div{ grid-column: 1 / -1; }
  body.admin .grid > aside > div > a:last-of-type{ grid-column: 1 / -1; }

  body.admin h2{ font-size:22px; }
}


  /* ---- Header / Menu (desktop + mobile) ---- */
  .nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); }
  .nav .row {
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    padding: 14px 0;
  }

  .brand { display:flex; align-items:center; gap:10px; }
  .brand a { text-decoration:none; }
  .brand .dot { width:10px; height:10px; border-radius:999px; background:#7dd3fc; display:inline-block; }

  .menu { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
  .menu a { text-decoration:none; opacity:.9; padding:6px 10px; border-radius:12px; }
  .menu a:hover { opacity:1; background: rgba(255,255,255,.05); }

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

  /* active link */
  .menu a.is-active,
  .mobile-menu a.is-active {
    opacity: 1;
    background: rgba(125, 211, 252, .12);
    border: 1px solid rgba(125, 211, 252, .22);
  }

  /* burger button */
  .burger {
    display:none;
    width:42px; height:42px;
    border-radius:12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: inherit;
    cursor: pointer;
    align-items:center; justify-content:center;
  }
  .burger:active { transform: translateY(1px); }

  .burger .lines { width:18px; height:14px; position:relative; }
  .burger .lines span {
    position:absolute; left:0; right:0; height:2px; border-radius:2px;
    background: rgba(255,255,255,.85);
    transition: transform .2s ease, opacity .2s ease, top .2s ease;
  }
  .burger .lines span:nth-child(1){ top:0; }
  .burger .lines span:nth-child(2){ top:6px; }
  .burger .lines span:nth-child(3){ top:12px; }

  /* mobile dropdown (animated) */
  .mobile-menu {
    border-top: 1px solid rgba(255,255,255,.08);
    overflow: hidden;

    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height .25s ease, opacity .2s ease, transform .2s ease;

    padding: 0; /* будет добавляться в открытом состоянии */
  }

  .mobile-menu a {
    display:block;
    padding: 10px 0;
    text-decoration:none;
    opacity:.92;
  }
  .mobile-menu a:hover { opacity:1; }

  /* open state */
  .nav.is-open .mobile-menu {
    opacity: 1;
    transform: translateY(0);
    padding: 12px 0 16px;
  }

  .nav.is-open .burger .lines span:nth-child(1){ top:6px; transform: rotate(45deg); }
  .nav.is-open .burger .lines span:nth-child(2){ opacity:0; }
  .nav.is-open .burger .lines span:nth-child(3){ top:6px; transform: rotate(-45deg); }

  /* responsive */
  @media (max-width: 860px) {
    .menu { display:none; }
    .burger { display:inline-flex; }
    .nav-actions .btn.primary { display:none; }
  }

