/* ========= Core / tokens ========= */
:root{
  --brand:#29296b;
  --bg:#e9edf5;
  --text:#121212;
  --muted:#8a8a8a;
  --white:#fff;

  --radius-xl:25px;
  --radius-md:20px;

  --page-x:40px;         /* горизонтальные поля страницы */
  --content-max:1350px;
  --header-top:30px;
  --header-h:64px;       /* реальная высота шапки */
  --pill-pad-x:40px;     /* горизонтальные поля белой таблетки */

  /* типографика (плавная) */
  --fz-body:clamp(14px, 1.1vw, 16px);
  --fz-h1:clamp(32px, 4vw, 48px);
  --fz-h2:clamp(24px, 2.5vw, 40px);
  --fz-h3:clamp(18px, 1.6vw, 24px);
  --fz-small:clamp(13px, 0.95vw, 15px);
}

/* ========= Reset ========= */
*{margin:0;padding:0;box-sizing:border-box}
html,body{
  height:100%;
  font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
  scroll-behavior:smooth;
  font-size:var(--fz-body);
}

/* ========= Header ========= */
/* ⚙️ Шапка ровно по тем же полям, что и видео/контент */
.site-header{
  position:fixed;
  inset:var(--header-top) var(--page-x) auto var(--page-x);
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* белая таблетка */
.nav-pill{
  position:relative;
  width:100%;
  height:var(--header-h);
  background:var(--white);
  border-radius:var(--radius-xl);
  padding:0 var(--pill-pad-x);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
}

/* внутренняя ширина = ширина контента */
.nav-inner{
  max-width:var(--content-max);
  width:100%;
  height:100%;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* логотип */
.logo-box{
  position:absolute;
  left:0; top:50%;
  transform:translateY(-50%);
  width:160px; height:100%;
  background:var(--brand);
  border-radius:var(--radius-xl);
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  overflow:hidden;
  z-index:3;
}
.logo-box img{
  max-height:55%;
  max-width:90%;
  object-fit:contain;
  display:block;
}

/* телефон — прижат к правому краю «таблетки» */
.phone-box{
  position:absolute;
  right:0;                       /* край таблетки */
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  gap:50px;                      /* расстояние между текстом и синей иконкой */
  text-decoration:none;
}
.phone-text{
  font-weight:300;
  color:#666;
  font-size:17px;
  white-space:nowrap;
}
.phone-icon{
  height:var(--header-h);
  min-width:var(--header-h);
  width:auto;
  padding:0 18px;
  border-radius:var(--radius-xl);
  background:var(--brand);
  display:flex;
  align-items:center;
  justify-content:center;
}
.phone-icon img{width:20px;height:20px;filter:brightness(0) invert(1)}

/* nav */
.main-nav{list-style:none;display:flex;align-items:center;gap:50px;padding:0}
.nav-divider{width:1px;height:24px;background:#ccc}
.main-nav a{
  position:relative; font-weight:380; font-size:17px; color:var(--muted);
  text-decoration:none; white-space:nowrap; transition:color .25s ease;
}
.main-nav a::after{
  content:""; position:absolute; left:50%; bottom:-22px;
  width:30px; height:4px; border-radius:10px; background:var(--brand);
  transform:translateX(-50%) scaleX(0); transform-origin:center; transition:transform .25s ease;
}
.main-nav a:hover{color:var(--brand)}
.main-nav a:hover::after{transform:translateX(-50%) scaleX(1)}

/* бургер — видим на всех экранах */
.burger{
  position:absolute;
  left:190px;
  top:50%;
  transform:translateY(-50%);
  width:30px;height:18px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  z-index:101;
}
.burger span{
  height:3px;
  background:#bfbfbf;
  border-radius:2px;
  transition:background-color .3s;
}
.burger:hover span{background:var(--brand)}

/* ========= Video hero ========= */
.video-block{
  margin-top:calc(var(--header-top) + var(--header-h) + 31px);
  padding:0 var(--page-x);
  height:clamp(420px, 72vh, 820px);
  width:100%;
}
.video-block video{width:100%;height:100%;object-fit:cover;border-radius:var(--radius-xl)}

/* ========= Products ========= */
.products-section{padding:80px var(--page-x) 120px}
.products-title{
  font-weight:900; color:var(--brand); font-size:var(--fz-h2);
  margin:80px 0 40px; padding-left:min(100px, 6vw); text-align:left;
}

.product-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:40px;
  margin-top:40px; padding:0 var(--page-x);
}
.product-tile{
  background:#fff; border-radius:var(--radius-xl);
  padding:40px 30px; text-align:center;
  display:flex; flex-direction:column; justify-content:space-between; height:100%;
  transition:transform .3s ease, box-shadow .3s ease; will-change:transform;
}
.product-tile:hover{transform:scale(1.03);box-shadow:0 10px 30px rgba(0,0,0,.12)}
.product-tile img{width:100%;max-width:240px;height:auto;border-radius:0px;margin:0 auto 30px}
.product-tile h3{font-weight:700;color:#121212;font-size:clamp(18px,1.6vw,24px);margin-bottom:12px}
.product-tile p{font-weight:400;color:#333;font-size:clamp(14px,1.1vw,15px);margin-bottom:24px}
.product-tile a{
  margin-top:auto; display:inline-block; padding:15px 50px;
  border:2px solid #292e64; color:#292e64; text-decoration:none;
  border-radius:20px; font-weight:700; font-size:13px; transition:background .3s ease,color .3s ease;
}
.product-tile:hover a{background:#292e64;color:#fff}

/* ========= Overlay + dropdown ========= */
/* фиксируем оверлей без внутренних отступов и прижимаем панель к верху */
.overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.2);
  opacity:0; pointer-events:none; transition:opacity .35s;
  z-index:200; display:flex; justify-content:center; align-items:flex-start; padding:0;
}
.overlay.active{opacity:1;pointer-events:auto}

/* белая панель — на уровне шапки, с теми же отступами от краёв */
.dropdown-panel{
  position:fixed;
  top:var(--header-top);
  left:var(--page-x);
  right:var(--page-x);
  background:#fff; border-radius:var(--radius-xl);
  padding:60px 60px; width:auto; box-shadow:0 10px 30px rgba(0,0,0,.1);
  z-index:201;
}
.cases-row{display:flex;gap:80px;flex-wrap:wrap;justify-content:center}
.case-item{
  font-weight:380;font-size:17px;color:var(--muted);cursor:pointer;position:relative;text-decoration:none;transition:color .25s;
  padding:6px 10px;
}
.case-item::after{
  content:"";position:absolute;left:50%;bottom:-12px;width:34px;height:4px;border-radius:10px;
  background:var(--brand);transform:translateX(-50%) scaleX(0);transition:transform .25s;
}
.case-item a{display:block;text-decoration:none;color:inherit}
.case-item:hover{color:var(--brand)}
.case-item:hover::after{transform:translateX(-50%) scaleX(1)}

/* якорь #products не прячется под шапкой */
#products{scroll-margin-top:160px}

/* ========= Contacts ========= */
.contacts-title{
  font-weight:900;font-size:var(--fz-h2);color:var(--brand);
  margin:80px 0 40px;padding-left:min(96px, 6vw);
}
.contacts-card{
  background:#fff;border-radius:var(--radius-xl);padding:60px 40px;
  margin:0 auto 40px;width:calc(100% - 80px);
  display:flex;justify-content:center;box-sizing:border-box;
}
.contacts-inner{
  max-width:1400px;width:100%;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:40px 80px;
}
.contact-item{display:flex;align-items:flex-start;gap:16px;flex:1 1 260px;min-width:240px}
.contact-icon{
  width:32px;height:32px;object-fit:contain;
  filter:brightness(0) saturate(100%) invert(14%) sepia(38%) saturate(1522%) hue-rotate(210deg) brightness(94%) contrast(93%);
}
.contact-label{font-weight:700;font-size:18px;color:var(--brand);margin:0 0 4px}
.contact-value{font-weight:400;font-size:16px;color:var(--text);line-height:1.4}

/* ========= Partner ========= */
.partner-section{
  background:#fff;
  border-radius:var(--radius-xl);
  padding:60px var(--page-x);
  margin:40px auto;
  width:calc(100% - calc(var(--page-x)*2));
}
.partner-container{
  max-width:900px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.partner-title{
  text-transform:uppercase;
  font-weight:900;
  font-size:40px;
  color:var(--brand);
  margin-bottom:18px;
  line-height:1.4;
}
.partner-subtitle{
  color:#777;
  font-size:22px;
  font-weight:400;
  margin-bottom:28px;
  line-height:1.6;
}
.partner-text{max-width:1000px}
.partner-button{display:flex;align-items:center;justify-content:center}
.btn-large{
  padding:20px 120px;
  font-size:15px;
  border-radius:22px;
  font-weight:700;
  text-decoration:none;
  background:transparent;
  color:#292e64;
  border:2px solid #292e64;
  transition: background .3s ease, color .3s ease;
}
.btn-large:hover{background:#292e64;color:#fff}

/* ========= Footer ========= */
/* ========= Footer ========= */
.footer-bar{
  margin:0 var(--page-x) 40px;
  padding:20px 40px;
  background:var(--brand);    /* синяя подложка */
  border-radius:var(--radius-xl);
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:80px;
}

.footer-content{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:24px;                   /* расстояние между логотипом и ссылкой */
}

.footer-logo{height:40px}

.footer-divider{
  width:1px;
  height:28px;
  background:rgba(255,255,255,.6);
}

.footer-link{
  color:#fff;
  text-decoration:none;
  font-size:15px;
  font-weight:500;
  transition:opacity .25s ease;
}
.footer-link:hover{opacity:0.8}


/* ========= Responsive ========= */

/* 1200–1440: компактнее */
@media (max-width:1440px){
  :root{ --page-x:32px; --pill-pad-x:32px }
  .main-nav{gap:36px}
  .phone-box{gap:18px}
  .video-block{height:clamp(420px, 70vh, 760px)}
  .product-grid{gap:32px}
}

/* ≤1280 — 2 колонки, уплотняем */
@media (max-width:1280px){
  :root{ --page-x:28px; --content-max:1200px; --pill-pad-x:28px }
  .main-nav{gap:28px}
  .nav-divider{display:none}
  .product-grid{grid-template-columns:repeat(2,1fr)}
}

/* ≤1024 — планшет */
@media (max-width:1024px){
  :root{ --page-x:24px; --pill-pad-x:24px }
  .burger{display:flex}
  .main-nav{display:none}
  .phone-text{display:none}
  .logo-box{width:140px}
  .video-block{height:clamp(380px, 58vh, 640px)}
  .products-title{padding-left:0;text-align:center}
  .product-grid{padding:0}
}

/* ≤768 — телефон */
@media (max-width:768px){
  :root{
    --page-x:16px;
    --pill-pad-x:16px;
    --header-top:18px;
    --header-h:56px;
    --content-max:100%;
  }

  /* шапка по краям */
  .site-header{inset:var(--header-top) var(--page-x) auto var(--page-x)}

  .logo-box{width:128px;height:100%}
  .phone-text{display:none}
  .phone-icon{height:var(--header-h);min-width:var(--header-h);width:auto;padding:0 14px}

  /* бургер по центру таблетки */
  .burger{left:50%;transform:translate(-50%, -50%)}

  .video-block{
    margin-top:calc(var(--header-top) + var(--header-h) + 48px);
    height:clamp(320px, 46vh, 520px);
  }

  .products-section{padding:56px var(--page-x) 80px}
  .products-title{margin:40px 0 24px;font-size:clamp(22px, 5.5vw, 28px)}

  .product-grid{
    grid-template-columns:1fr;
    gap:22px;
    padding:0 var(--page-x);
  }
  .product-tile{padding:28px 22px;border-radius:20px}
  .product-tile img{max-width:200px;margin-bottom:22px}

  /* выпадающее меню: тоже у верхнего края, те же боковые поля */
  .dropdown-panel{
    top:var(--header-top);
    left:var(--page-x); right:var(--page-x);
    padding:28px 18px;
  }
  .cases-row{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .case-item{
    display:block; text-align:center;
    padding:14px 12px;
    font-size:18px;
  }
  .case-item::after{bottom:-6px;width:40px}

  .contacts-title{
    text-align:center;
    margin:40px 0;
    padding-left:0;
  }
  .contacts-card{
    width:auto;
    margin:0 var(--page-x) 32px;
    padding:32px 20px;
    text-align:center;
  }
  .contacts-inner{
    gap:22px;
    justify-content:center;
  }
  .contact-item{
    flex:1 1 100%;
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  .partner-section{width:auto;margin:32px var(--page-x);padding:40px var(--page-x)}
  .partner-title{font-size:clamp(20px, 6vw, 26px)}
  .btn-large{padding:16px 32px;border-radius:18px;font-size:15px}

  .footer-bar{margin:0 var(--page-x) 28px;padding:16px 20px;min-height:70px}
  .footer-content{gap:0}
}

/* ≤480 — маленькие телефоны */
@media (max-width:480px){
  :root{ --page-x:14px; --pill-pad-x:14px }
  .logo-box{width:118px}
  .product-tile img{max-width:180px}
  .partner-subtitle{font-size:clamp(13px, 4.2vw, 15px)}
}

/* High-DPI touch tweaks */
@media (hover:none){
  .product-tile:hover{transform:none;box-shadow:none}
  .product-tile a{transition:background .2s,color .2s}
}


@media (max-width:768px){
  .footer-content{
    gap:12px;
  }
  .footer-logo{height:28px}
  .footer-divider{height:20px}
  .footer-link{font-size:14px}
}
