:root{
  --white:#fff;
  --text:#e5e7eb;
  --text-strong:#f9fafb;
  --btn:#0F3D6E;
  --btn-hover:#0c325b;
  --btn-ghost:rgba(255,255,255,0.10);
  --btn-ghost-hover:rgba(255,255,255,0.18);
  --radius:14px;
  --shadow:0 10px 30px rgba(0,0,0,0.18);
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
html{scroll-behavior:smooth;text-size-adjust:100%}
body{
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--text); background:#0b1323; overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block}

/* ==== Фон ==== */
.bg{
  position:fixed; inset:0; z-index:-3;
  background:url('../img/hero-bg.jpg') center/cover no-repeat;
  opacity:0; transform:scale(1.03);
  transition:opacity 1.7s cubic-bezier(.7,.3,.38,1) .1s, transform 2s cubic-bezier(.68,.36,.41,1.05) .1s;
}
.glow-lines{
  position:fixed; inset:0; z-index:-2; pointer-events:none;
  mix-blend-mode:screen; opacity:0;
  background-image:
    repeating-linear-gradient(to right,rgba(255,255,255,0.01) 0,rgba(255,255,255,0.06) 1px,rgba(255,255,255,0.00) 2px),
    repeating-linear-gradient(45deg,rgba(255,220,120,0.00) 0,rgba(255,220,120,0.04) 1px,rgba(255,220,120,0.00) 3px);
  filter:blur(1px) brightness(1.04);
}
.bg-overlay{
  position:fixed; inset:0; z-index:-1;
  background:
    radial-gradient(1200px 600px at 50% 30%,rgba(255,255,255,0.06),transparent 60%),
    linear-gradient(to bottom,rgba(10,16,30,0.28),rgba(10,16,30,0.68));
  opacity:0; transition:opacity 1.5s cubic-bezier(.7,.3,.38,1) .1s;
}
.fog{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(900px 600px at 55% 22%,rgba(255,255,255,0.20),transparent 60%),
    linear-gradient(to bottom,rgba(255,255,255,0.09),rgba(255,255,255,0.00) 40%),
    radial-gradient(900px 900px at 50% 67%,rgba(255,255,255,0.10),transparent 60%);
  opacity:1; filter:blur(8px); transition:opacity 1.7s cubic-bezier(.6,.3,.38,1) .2s;
}
.is-loaded .bg{opacity:1; transform:scale(1);}
.is-loaded .glow-lines{opacity:.12;}
.is-loaded .bg-overlay{opacity:1;}
.is-loaded .fog{opacity:0; filter:blur(1px);}
@media (max-width: 767px){
  .bg{background-image:url('../img/hero-bg-mobile.jpg');}
  .is-loaded .bg{opacity:1; transform:scale(1);}
}

/* ==== Главная ==== */
.hero{
  min-height:100dvh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; 
  padding:42px 8px 65px 8px; position:relative; text-align:center;
}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap;}
.brand-logo{
  display:flex; align-items:center; justify-content:center; margin-bottom:18px;
}
.brand-logo-link{
  display:inline-block; border-radius:16px; padding:14px 8px 12px; background:rgba(255,255,255,.08);
  box-shadow:var(--shadow); border:1px solid rgba(255,255,255,0.14);
  transition:box-shadow .18s,background .14s;
}
.brand-logo-link img{width:clamp(130px,36vw,270px);height:auto;}
.brand-subtitle{
  font-size:17px; color:var(--text);opacity:.92;
  text-align:center;margin-bottom:24px;font-weight:400;
}
.cta{
  display:flex; gap:13px; flex-wrap:wrap; justify-content:center; margin-bottom:10px;
}
.btn{
  outline:none; border:none;
  padding:14px 22px; border-radius:14px;
  color:var(--white); background:var(--btn-ghost);
  font-size:18px; font-family:inherit; font-weight:700; cursor:pointer;
  box-shadow:0 5px 25px rgba(0,0,0,0.09);
  letter-spacing:.01em;
  transition:background .16s,box-shadow .13s,transform .15s;
}
.btn-primary{background:var(--btn);}
.btn-primary:hover, .btn:active{background:var(--btn-hover);}
.btn:not(.btn-primary):hover{background:var(--btn-ghost-hover);color:var(--white);}
@media (max-width: 700px){
  .brand-logo-link img{width:clamp(96px,48vw,172px);}
  .cta{gap:7px;}
  .btn{font-size:16px;padding:12px 13px;}
  .brand-subtitle{font-size:15px;margin-bottom:19px;}
}
/* ============ Поповер/услуги ============ */
.popover{
  position:fixed; inset:0; z-index:1002;
  background:rgba(7,12,19,.77); display:grid; place-items:center;
  transition:opacity .22s;
}
.popover[hidden]{display:none;}
.popover-card{
  background:rgba(33,41,61,.96); border-radius:18px;
  box-shadow:0 14px 38px rgba(0,0,0,.20);
  max-width:335px; width:92vw; padding:32px 20px 22px 20px;
  text-align:left; position:relative;
}
.popover-close{
  position:absolute;top:15px;right:16px;font-size:26px;background:none;outline:none;border:none;color:#fff;cursor:pointer;width:38px;height:38px;border-radius:100%;
}
.services-list{ padding:0;margin:20px 0 18px 0;list-style:none;display:grid;gap:9px;font-size:16px;}
.popover-card h2{font-size:21px;margin:0 0 8px 0;}
.popover-actions{ margin-top:0; text-align:center;}
.no-scroll{overflow:hidden !important;}
@media (max-width:440px){
  .popover-card{padding:22px 9px 10px 8px;}
  .popover-card h2{font-size:17px;}
  .services-list{font-size:14.5px;}
}

/* ==== Footer ==== */
.footer-min{
  position:fixed; left:0; right:0; bottom:14px; z-index:1;
  display:flex; justify-content:center; color:#cbd5e1; font-size:13px;
  text-shadow:0 1px 2px rgba(0,0,0,.22); pointer-events:none;
}

@media (max-width: 500px){
  .projects-header,.hero-inner{padding-left:0px;padding-right:0px;}
}

/* ==== Секция проекты (для длинной страницы) ==== */
.projects-page{
  min-height:100dvh; display:flex; flex-direction:column; align-items:center;
  padding:62px 6px 100px; position:relative; z-index:1;
  background:none;
}
.projects-header{text-align:center;max-width:900px;margin-bottom:10px;}
.projects-header h1{font-size:clamp(20px,3.5vw,27px);margin:9px 0 7px;}
.projects-lead{color:#d9dee9;opacity:.95;}
.proj-grid{width:min(1100px,98vw);margin:0 auto;display:grid;gap:17px;
  grid-template-columns:repeat(auto-fit,minmax(330px,1fr));
}
.proj-card{background:rgba(18,22,36,0.80);border:1px solid rgba(215,221,233,0.09);
  border-radius:18px;box-shadow:0 7px 25px rgba(0,0,0,.15);
  overflow:hidden; display:flex; flex-direction:column;}
.proj-thumb{background:#132244;min-height:160px;}
.proj-thumb.no-img{position:relative;display:flex;align-items:center;justify-content:center;}
.proj-thumb.no-img::after{content:"Фото скоро";color:#dfe5f0;font-size:14px;opacity:.85;padding:6px 16px;border-radius:12px;background:rgba(188,210,255,0.12);}
.proj-body{padding:15px 13px 20px;}
.proj-title{font-size:19px;margin-bottom:7px;font-weight:700;color:#fafbff;}
.proj-meta{font-size:14px;color:#b5c2dd;margin-bottom:9px;}
.proj-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px;}
.proj-tags span{font-size:13px;padding:4px 10px;border-radius:9px;
  background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.14);}
.proj-more{list-style:none;padding:0;margin:0;display:grid;gap:5px;font-size:14.3px;line-height:1.52;}
.proj-more b{color:#dbe1ef;font-weight:600;}
@media (max-width:600px){
  .proj-card{border-radius:13px;}
  .proj-body{padding:11px 7px 13px;}
  .proj-title{font-size:17px;}
  .proj-meta{font-size:12.5px;}
}
