/* ИП Быстров И.Г. — styles (responsive, light minimal) */
:root{
  --bg:#f3f6fb;
  --card:#ffffff;
  --text:#1b2430;
  --muted:#6b7b8f;
  --line:#e6edf6;
  --brand:#1f6feb;
  --brand-2:#0b5bd3;
  --radius:14px;
  --shadow:0 10px 30px rgba(16,24,40,.08);
  --shadow-soft:0 8px 20px rgba(16,24,40,.06);
  --container:1400px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans","Helvetica Neue",sans-serif;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 18px;
}

.page-shell{
  margin:26px auto;
  background:var(--card);
  border-radius:18px;
  box-shadow:var(--shadow);
}

/* Header */
.site-header{
  padding: 0 10px;
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(150%) blur(10px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; gap:18px;
  height:70px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  min-width:180px;
  transition: 500ms;
}
.brand:hover{
  transform: scale(1.2);
}
.brand img{width:34px;height:34px}
.brand .name{
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#243041;
}
.nav{
  display:flex; align-items:center; gap:22px;
  margin-left:auto;
}
.nav a{
  color:#334155;
  font-size:14px;
  padding:10px 6px;
}
.nav a:hover{color:var(--brand)}

/* Header dropdown (Services) */
.nav-item{position:relative; display:flex; align-items:center}
.nav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#334155;
  font-size:14px;
  padding:10px 6px;
  border:0;
  background:transparent;
  cursor:pointer;
}
.nav-link:hover{color:var(--brand)}
.nav-link:focus-visible{outline:2px solid rgba(31,111,235,.35); outline-offset:4px; border-radius:10px}

.chev{
  width:10px;height:10px;
  display:inline-block;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-1px);
  opacity:.75;
}

.has-dropdown{position:relative}
/* Hover "bridge" so dropdown doesn't disappear when moving cursor to submenu */
.has-dropdown::after{
  content:"";
  position:absolute;
  left:-10px;
  right:-10px;
  top:100%;
  height:12px;
}

.dropdown{
  position:absolute;
  top:calc(100% + 10px);
  left:-8px;
  min-width:230px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:var(--shadow-soft);
  padding:8px 10px;
  display:none;
  z-index:60;
}
.dropdown a{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  color:#334155;
  font-size:14px;
  white-space:nowrap;
}
.dropdown a:hover{background:#f2f7ff; color:var(--brand)}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown{
  display:block;
}
.has-dropdown:hover .nav-link,
.has-dropdown:focus-within .nav-link{
  color:var(--brand);
}
.has-dropdown:hover .nav-link .chev,
.has-dropdown:focus-within .nav-link .chev{
  transform:rotate(225deg) translateY(1px);
}

/* Mobile submenu inside drawer */
.mobile-dropdown{
  border-bottom:1px solid rgba(230,237,246,.7);
  padding:2px 0;
}
.mobile-dropdown summary{
  list-style:none;
  cursor:pointer;
  padding:10px 0;
  color:#334155;
  font-size:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.mobile-dropdown summary::-webkit-details-marker{display:none}
.mobile-dropdown summary::after{
  content:"";
  width:10px;height:10px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  opacity:.75;
  margin-left:10px;
}
.mobile-dropdown[open] summary::after{transform:rotate(225deg)}
.mobile-submenu{
  padding:4px 0 10px;
}
.mobile-submenu a{
  padding:10px 0 10px 14px;
  border-bottom:1px solid rgba(230,237,246,.45);
}
.mobile-submenu a:last-child{border-bottom:none}

.header-right{
  display:flex; align-items:center; gap:14px;
}
.phone{
  font-weight:600;
  font-size:14px;
  color:#334155;
  white-space:nowrap;
}
.btn{
  border:1px solid var(--line);
  background:#fff;
  color:#223047;
  border-radius:10px;
  padding:10px 14px;
  cursor:pointer;
  transition:.15s ease;
  box-shadow:0 1px 0 rgba(16,24,40,.03);
}
.btn:hover{transform:translateY(-1px); box-shadow:var(--shadow-soft)}
.btn:active{transform:translateY(0)}
.btn.primary{
  background:var(--brand);
  border-color:transparent;
  color:#fff;
}
.btn.primary:hover{background:var(--brand-2)}
.btn.small{padding:8px 12px;border-radius:9px;font-size:14px}

.burger{
  display:none;
  width:42px;height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
}
.burger span{
  display:block;
  width:18px;height:2px;
  background:#243041;
  margin:4px auto;
  border-radius:2px;
}
.mobile-drawer{
  display:none;
  border-top:1px solid var(--line);
  padding:12px 18px 18px;
}
.mobile-drawer a{
  display:block;
  padding:10px 0;
  color:#334155;
  border-bottom:1px solid rgba(230,237,246,.7);
}
.mobile-drawer a:last-child{border-bottom:none}

/* Sections */
.section{
  padding:34px 0;
}
.section-title{
  margin:0 0 18px;
  font-size:20px;
  color:#2a3647;
}
.rule{
  height:1px;
  background:linear-gradient(90deg, rgba(230,237,246,0) 0%, rgba(230,237,246,1) 20%, rgba(230,237,246,1) 80%, rgba(230,237,246,0) 100%);
  margin-top:10px;
}

/* Hero */
.hero{
  padding:36px 0 26px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:26px;
  align-items:center;
}
.hero h1{
  margin:0 0 12px;
  font-size:38px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.hero h1 .accent{color:var(--brand); font-size: 32.5px;}
.hero p{
  margin:0 0 20px;
  color:var(--muted);
  max-width:520px;
}
.hero-actions{
  display:flex; gap:14px; flex-wrap:wrap;
}
.hero-media{
  position:relative;
  background:linear-gradient(180deg, #f7faff, #eef4ff);
  border-radius:18px;
  padding:18px;
  border:1px solid var(--line);
}
.hero-media .main{
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
}
.hero-media .overlay{
  position:absolute;
  left:-8%;
  bottom:-16%;
  width:55%;
  max-width:300px;
  border-radius:16px;
  overflow:hidden;
  border:8px solid rgba(255,255,255,.88);
  box-shadow:var(--shadow-soft);
}

/* Cards */
.grid-4{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}
.grid-3{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.card{
  background:#f8fbff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
  box-shadow:0 2px 0 rgba(16,24,40,.02);
}
.service-card{
  text-align:center;
  padding:16px 14px;
}
.service-card img{width:74px;height:74px;margin:4px auto 10px}
.service-card .label{margin:0;font-size:14px;color:#2b3a4e;font-weight:600}
.card:hover{transform:translateY(-1px)}
.card{transition:.15s ease}

.benefit{
  display:flex; gap:14px; align-items:flex-start;
}
.benefit img{width:40px;height:40px;flex:0 0 40px}
.benefit h3{margin:0 0 4px;font-size:14px}
.benefit p{margin:0;color:var(--muted);font-size:13px}

/* Works */
.works-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.work{
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
  background:#fff;
}
.work img{width:100%;height:170px;object-fit:cover}

/* CTA */
.cta{
  background:#f7f9fc;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:34px 0;
  text-align:center;
}
.cta h2{margin:0 0 6px;font-size:24px}
.cta p{margin:0 0 18px;color:var(--muted)}
.cta-form{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}
.field{
  min-width:100%;
  background:#fff;
  border:1px solid #dbe6f5;
  border-radius:10px;
  padding:10px 12px;
  outline:none;
}
.field:focus{border-color:rgba(31,111,235,.45); box-shadow:0 0 0 3px rgba(31,111,235,.12)}

/* Footer */
.site-footer{
  padding:18px 0;
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  color:#516175;
  font-size:13px;
}
.footer-links{
  display:flex; gap:16px; flex-wrap:wrap; justify-content:flex-end;
}
.footer-phone{
  display:flex; align-items:center; gap:8px;
  font-weight:600;
  color:#243041;
}
.footer-phone img{width:16px;height:16px}

/* Modal */
.modal{
  position:fixed; inset:0;
  background:rgba(15, 23, 42, .45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:100;
}
.modal.is-open{display:flex}
.modal-card{
  width:min(620px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(2, 6, 23, .25);
  border:1px solid rgba(230,237,246,.8);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
}
.modal-head h3{margin:0;font-size:16px}
.modal-close{
  width:42px;height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  display:grid; place-items:center;
}
.modal-body{padding:18px}
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.form-grid .full{grid-column:1 / -1}
textarea.field{min-height:110px;resize:vertical}
.form-actions{
  display:flex; gap:10px; align-items:center; justify-content:flex-end;
  margin-top:12px;
}
.notice{
  font-size:13px;
  color:var(--muted);
}

/* Preloader */
.preloader{
  position:fixed; inset:0;
  background:var(--bg);
  display:grid;
  place-items:center;
  z-index:1000;
  transition:opacity .25s ease, visibility .25s ease;
}
.preloader.is-hidden{
  opacity:0;
  visibility:hidden;
}
.spinner{
  width:42px;height:42px;
  border-radius:50%;
  border:3px solid rgba(31,111,235,.2);
  border-top-color:rgba(31,111,235,.95);
  animation:spin .9s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Utilities */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr; gap:18px}
  .hero-media .overlay{left:0; bottom:-10%; width:52%}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .works-grid{grid-template-columns:1fr}
  .work img{height:210px}
  .nav{display:none}
  .burger{display:inline-block}
}
@media (max-width: 560px){
  .page-shell{margin:0; border-radius:0}
/* Mobile header (вариант как на макете) */
.header-inner{
  height:auto;
  padding:14px 0 16px;
  display:grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand burger"
    "phone phone"
    "cta cta";
  gap:12px 12px;
  align-items:center;
}
.brand{ grid-area:brand; min-width:0; }
.brand .name{
  font-size:24px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.header-right{ display:contents; }
.burger{ grid-area:burger; justify-self:end; }

.phone{
  grid-area:phone;
  display:flex;
  align-items:center;
  gap:10px;
  padding-top:14px;
  margin-top:2px;
  border-top:1px solid var(--line);
  font-size:22px;
  font-weight:800;
  letter-spacing:.01em;
}
.phone::before{
  content:"";
  width:28px;height:28px;flex:0 0 28px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:22px 22px;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A//www.w3.org/2000/svg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'%23f97316'%3E%3Cpath%20d%3D'M6.6%202.9c.6-.6%201.6-.6%202.2%200l2%202c.6.6.6%201.6%200%202.2l-1.2%201.2c.8%201.5%202%202.9%203.4%204.3%201.4%201.4%202.8%202.6%204.3%203.4l1.2-1.2c.6-.6%201.6-.6%202.2%200l2%202c.6.6.6%201.6%200%202.2l-1.3%201.3c-1%201-2.5%201.4-3.9%201-2.7-.8-5.6-2.7-8.4-5.5C8%2013.2%206.1%2010.3%205.3%207.6c-.4-1.4%200-2.9%201-3.9L6.6%202.9z'/%3E%3C/svg%3E");
}

.site-header .btn.primary.small{
  grid-area:cta;
  width:100%;
  justify-content:center;
  padding:16px 18px;
  border-radius:22px;
}
  .hero h1{font-size:30px}
  .grid-4{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
  .field{min-width:100%}
}
/* ===== Form messages ===== */
.form-message {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.25s ease;
}

/* Success */
.form-message.success {
  display: block;
  background: #eaf6ff;
  color: #0b63c9;
  border: 1px solid #b9ddff;
}

/* Error */
.form-message.error {
  display: block;
  background: #fff2f2;
  color: #c92a2a;
  border: 1px solid #ffc9c9;
}

/* Small field error (under inputs) */
.field-error {
  margin-top: 6px;
  font-size: 12px;
  color: #c92a2a;
}

/* Input error state */
.field.error input,
.field.error textarea,
.field.error select {
  border-color: #ffb3b3;
  background-color: #fffafa;
}

/* Fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
