/* ========== Base ========== */
:root{
  --bg:#ffffff;
  --bg2:#f6f8fc;
  --text:#0b1220;
  --muted:#5b667a;
  --border:rgba(11,18,32,0.10);

  /* unified shadows */
  --shadow-sm: 0 10px 24px rgba(11,18,32,0.06);
  --shadow-md: 0 12px 26px rgba(11,18,32,0.08);
  --shadow-lg: 0 18px 50px rgba(11,18,32,0.12);

  --primary:#0b5fff;
  --primary2:#2f7bff;
  --ring:rgba(11,95,255,0.22);

  --radius:16px;
  --radius2:22px;
  --container:1120px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--bg);
  line-height:1.55;
}
img{max-width:100%;display:block}
a{color:inherit}
code{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}

/* ========== Layout ========== */
.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 20px;
}

.section{ padding:72px 0; }
.section--alt{
  background:var(--bg2);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}

.sectionHead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}

.twoCol{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap:32px;
}
@media (max-width: 980px){
  .twoCol{grid-template-columns:1fr}
}

/* ========== Typography ========== */
h1,h2,h3{
  margin:0 0 12px 0;
  letter-spacing:-0.02em;
}
h1{ font-size:48px; line-height:1.08; }
h2{ font-size:32px; line-height:1.15; }
h3{ font-size:18px; line-height:1.25; }

p{margin:0 0 12px 0}
.lead{
  font-size:18px;
  color:var(--muted);
  max-width:56ch;
}
.muted{color:var(--muted)}
.tiny{font-size:12px}

/* ========== Header ========== */
.header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,0.88);
  backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--border);
}
.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
  text-decoration:none;
  color:inherit;
}

.brand__mark{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  box-shadow:none;
  padding:0;
}

.brand__mark--logo img{
  height:36px;   /* 42 часто слишком много для хедера */
  width:auto;
  display:block;
}

.brand__text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand__name{
  font-weight:800;
  font-size:18px;
  letter-spacing:0.02em; /* было 0.04 — слишком растягивает */
}

.brand__tag{
  font-size:12px;
  color:var(--muted);
}

.brand:visited{ color:inherit; }
.brand:hover{ opacity:0.92; }
.brand:active{ opacity:0.85; }
.brand:focus{ outline:none; }

.nav{
  display:flex;
  align-items:center;
  gap:14px;
}
.nav__link{
  text-decoration:none;
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  padding:8px 10px;
  border-radius:10px;
}
.nav__link:hover{
  color:var(--text);
  background:rgba(11,95,255,0.06);
}
.nav__cta{
  color:#fff;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow:0 12px 26px rgba(11,95,255,0.24);
}
.nav__cta:hover{
  color:#fff;
  background:linear-gradient(135deg, var(--primary2), var(--primary));
}

.burger{
  display:none;
  width:44px;height:44px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.burger span{
  display:block;
  width:18px;
  height:2px;
  background:var(--text);
  margin:4px auto;
  border-radius:2px;
}
@media (max-width: 920px){
  .nav{display:none}
  .burger{display:block}
}

.mobile{
  border-top:1px solid var(--border);
  background:rgba(255,255,255,0.95);
}
.mobile__inner{
  padding:14px 20px 18px;
  display:grid;
  gap:8px;
}
.mobile__link{
  text-decoration:none;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-weight:700;
}
.mobile__link:hover{box-shadow:var(--shadow-sm)}

/* ========== Buttons ========== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:focus{outline:none; box-shadow:0 0 0 6px var(--ring)}
.btn--primary{
  color:#fff;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow:0 14px 30px rgba(11,95,255,0.22);
}
.btn--primary:hover{transform:translateY(-1px)}
.btn--ghost{
  color:var(--text);
  background:#fff;
  border-color:var(--border);
}
.btn--ghost:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
}
.btn--full{width:100%}

/* ========== Hero ========== */
.hero{
  padding:78px 0 44px;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(11,95,255,0.14), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(47,123,255,0.10), transparent 55%);
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap:28px;
  align-items:center;
}
@media (max-width: 980px){
  .hero__grid{grid-template-columns:1fr}
  h1{font-size:40px}
}
.hero__content{padding:6px 0}
.hero__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 12px;
}

.hero__visual{
  align-self:stretch;
}
.hero__image{
  object-position:center;
}

.pillrow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.pill{
  font-size:13px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(11,95,255,0.12);
  background:rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  color:var(--text);
}

.hero__visualNote{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

/* Hero image */
.hero__visual{
  border-radius: var(--radius2);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, rgba(11,95,255,0.06), rgba(11,18,32,0.02));
  aspect-ratio: 16 / 9;
}

.hero__image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   About section (match Hero) — FIXED
   ========================= */

   .twoCol.about{
    display:grid; /* приходит из .twoCol */
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); /* как Hero + правильное сжатие */
    gap: 28px;                                                  /* как Hero */
    align-items: center;
  }
  
  /* ВАЖНО: даём грид-элементам реально сжиматься */
  .twoCol.about > *{
    min-width: 0;
  }
  
  @media (max-width: 980px){
    .twoCol.about{
      grid-template-columns: 1fr;
    }
  }
  
  /* Контент */
  .about__content{
    max-width: none;
  }
  .about__content p{
    max-width: 62ch;
  }
  
  /* Правая колонка: растягиваем на всю ширину ячейки */
  .about__right{
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }
  
  /* Картинка: полностью как Hero */
  .about__visual{
    width: 100%;
    aspect-ratio: 16 / 9; /* как Hero */
    border-radius: var(--radius2);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(180deg, rgba(11,95,255,0.06), rgba(11,18,32,0.02));
  }
  
  .about__image{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* Cards in About — чтобы они не "раздували" колонку */
  .about__cards{
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .about__cards .card{
    padding: 14px;
    min-width: 0;
  }
  
  .about__cards .card__title{
    margin-top: 6px;
  }
  
  .about__cards .card__text{
    margin-top: 6px;
    line-height: 1.45;
  }

/* ========== Placeholders ========== */
.ph{
  border-radius:var(--radius2);
  border:1px solid rgba(11,18,32,0.08);
  background:
    linear-gradient(180deg, rgba(11,95,255,0.06), rgba(11,18,32,0.02));
  position:relative;
  overflow:hidden;
}
.ph__hint{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:18px;
  text-align:center;
  color:rgba(11,18,32,0.55);
  font-weight:700;
  font-size:13px;
}
.ph--hero{height:330px}
.ph--about{height:330px}
.ph--proj{height:170px;border-radius:18px}

/* premium depth for hero visual */
.hero__visual .ph{
  box-shadow: var(--shadow-lg);
}

/* Hide placeholders/hints on production */
.is-prod .ph__hint,
.is-prod .hero__visualNote{
  display:none;
}

/* ========== Cards / content ========== */
.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
@media (max-width: 980px){
  .grid3{grid-template-columns:1fr}
}
.mt16{margin-top:16px}

.card{
  border:1px solid var(--border);
  background:#fff;
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow-sm);
}
.card__icon{font-size:20px}
.card__title{font-weight:900;margin-top:8px}
.card__text{color:var(--muted); font-size:14px; margin-top:6px}

.note{
  margin-top:14px;
  padding:14px 16px;
  border:1px solid rgba(11,95,255,0.18);
  background:rgba(11,95,255,0.06);
  border-radius:16px;
}

/* ========== Services ========== */
.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
@media (max-width: 980px){
  .cards{grid-template-columns:1fr}
}
.service{
  border:1px solid var(--border);
  background:#fff;
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow-md);
}
.service__top{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:6px;
}
.service__icon{
  width:42px;height:42px;
  border-radius:14px;
  display:grid;place-items:center;
  background:rgba(11,95,255,0.10);
  border:1px solid rgba(11,95,255,0.18);
}
.service p{color:var(--muted); margin:8px 0 12px}
.list{
  margin:0;
  padding-left:18px;
}
.list li{margin:6px 0;color:var(--muted)}

/* ========== Steps ========== */
.steps{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
@media (max-width: 980px){
  .steps{grid-template-columns:1fr}
}
.step{
  border:1px solid var(--border);
  background:#fff;
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow-md);
  display:flex;
  gap:12px;
}
.step__num{
  width:34px;height:34px;
  border-radius:12px;
  display:grid;place-items:center;
  color:#fff;
  font-weight:900;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
}
.step__title{font-weight:900}
.step__text{color:var(--muted); font-size:14px; margin-top:4px}

/* ========== Projects ========== */

/* Project images */
.project__visual{
  aspect-ratio: 3 / 2;          /* можно 16/9 если хочешь шире */
  overflow: hidden;
  border-radius: 18px 18px 0 0; /* верх карточки */
  background: linear-gradient(180deg, rgba(11,95,255,0.06), rgba(11,18,32,0.02));
}

.project__image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.projectGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
@media (max-width: 980px){
  .projectGrid{grid-template-columns:1fr}
}
.project{
  border:1px solid var(--border);
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--shadow-md);
}
.project__body{padding:16px}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.tag{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(11,18,32,0.05);
  border:1px solid var(--border);
  color:var(--muted);
}

.callout{
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(11,95,255,0.16);
  background:linear-gradient(135deg, rgba(11,95,255,0.08), rgba(47,123,255,0.05));
}
@media (max-width: 720px){
  .callout{flex-direction:column;align-items:flex-start}
}
.callout__title{font-weight:900}
.callout__text{color:var(--muted); margin-top:4px}

/* ========== FAQ ========== */
.faq{ display:grid; gap:10px; }
.faq__item{
  border:1px solid var(--border);
  background:#fff;
  border-radius:16px;
  padding:14px 16px;
  box-shadow:var(--shadow-sm);
}
.faq summary{ cursor:pointer; font-weight:900; }
.faq__content{ margin-top:10px; color:var(--muted); }

/* ========== Contact ========== */
.contactCards{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
  margin-top:12px;
}
@media (max-width: 520px){
  .contactCards{grid-template-columns:1fr}
}
.formWrap{
  border:1px solid var(--border);
  background:#fff;
  border-radius:20px;
  padding:18px;
  box-shadow:var(--shadow-lg);
}
.form{display:grid;gap:12px}
.label{font-weight:800;font-size:13px;color:var(--muted)}
.input,.textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  font:inherit;
}
.input:focus,.textarea:focus{
  outline:none;
  border-color:rgba(11,95,255,0.35);
  box-shadow:0 0 0 6px var(--ring);
}
.form__row{display:grid;gap:6px}

/* ========== Footer ========== */
.footer{
  padding:42px 0;
  background:#0b1220;
  color:#e9eefc;
}
.footer__grid{
  display:grid;
  grid-template-columns: 1.1fr 0.7fr 0.9fr 1.3fr;
  gap:18px;
}
@media (max-width: 980px){
  .footer__grid{grid-template-columns:1fr}
}
.footer__brand{font-weight:900;font-size:18px}
.footer__title{font-weight:900;margin-bottom:10px}
.footer__links{
  list-style:none;
  padding:0;margin:0;
  display:grid;
  gap:8px;
}
.footer__links a{
  color:#e9eefc;
  text-decoration:none;
  opacity:0.9;
}
.footer__links a:hover{opacity:1}
.footer__legal{opacity:0.9}

/* ========== Back to top ========== */
.toTop{
  position:fixed;
  right:16px;
  bottom:16px;
  width:44px;
  height:44px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--border);
  box-shadow:var(--shadow-md);
  display:grid;
  place-items:center;
  text-decoration:none;
  color:var(--text);

  z-index:1000;
  opacity:0;
  transform:translateY(6px);
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}

.toTop.is-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.toTop:hover{ transform:translateY(-1px); }
.toTop:active{ transform:translateY(0); }

/* =========================
   Shared media box (Hero + About)
   ========================= */
   .mediaBox{
    width:100%;
    border-radius: var(--radius2);
    overflow:hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(180deg, rgba(11,95,255,0.06), rgba(11,18,32,0.02));
    aspect-ratio: 16 / 9;         /* ВАЖНО: одинаковый размер */
  }
  
  .mediaBox > img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
  
  /* Hero: больше НЕ задаём aspect-ratio тут, он в .mediaBox */
  .hero__visual{ align-self:stretch; }
  
  /* Hero note — отдельной строкой, чтобы не влиять на размер картинки */
  .hero__visualNote{
    margin-top:10px;
    font-size:12px;
    color:var(--muted);
  }
  
  /* =========================
     About: высота левого блока = высоте картинки
     ========================= */
  .twoCol.about{
    grid-template-columns: 1.05fr 0.95fr; /* как Hero */
    gap:28px;                              /* как Hero */
    align-items:stretch;                   /* ВАЖНО: одинаковая высота колонок */
  }
  
  .twoCol.about > *{ min-width:0; }
  
  @media (max-width: 980px){
    .twoCol.about{ grid-template-columns:1fr; }
  }
  
  /* Левый блок растягиваем по высоте правого (картинки) */
  .about__content{
    display:flex;
    flex-direction:column;
    height:100%;
  }
  
  /* текст ограничиваем по ширине, но высоту не режем */
  .about__content p{ max-width:62ch; }
  
  /* карточки уводим вниз, чтобы колонка "добивалась" до высоты картинки */
  .about__cards{
    margin-top:auto; /* ВАЖНО */
    gap:12px;
  }
  
  .about__cards .card{ padding:14px; }
  .about__cards .card__title{ margin-top:6px; }
  .about__cards .card__text{ margin-top:6px; line-height:1.45; }

  /* ===== Contact form status ===== */
.formStatus{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
  text-align:center;
  font-weight:700;

  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

.formStatus.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.formStatus__icon{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 16px;
}

.formStatus__text{
  flex: 1 1 auto;
  
}
.formStatus__text small{
  display:block;
  margin-top: 4px;
  font-weight: 700;
  color: var(--muted);
}

/* States */
.formStatus--ok{
  border-color: rgba(16,185,129,0.28);
  background: rgba(16,185,129,0.08);
}
.formStatus--ok .formStatus__icon{ background: rgba(16,185,129,0.16); }

.formStatus--err{
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.07);
}
.formStatus--err .formStatus__icon{ background: rgba(239,68,68,0.14); }

.formStatus--info{
  border-color: rgba(11,95,255,0.18);
  background: rgba(11,95,255,0.07);
}
.formStatus--info .formStatus__icon{ background: rgba(11,95,255,0.14); }


/* optional: success / error colors */
.formStatus--success{
  color:#0a8a3a;
}

.formStatus--error{
  color:#c62828;
}