/* ═══════════════════════════════════════
   НОМИС — стили лендинговых страниц
   (index, moysklad-1c, moysklad-1c-history, partners)
═══════════════════════════════════════ */

/* ─── NAV (фиксированная) ─── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(29,78,216,.15);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; height: 68px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { height: 42px; }
.nav-menu { display: flex; align-items: baseline; gap: 36px; list-style: none; }
.nav-menu a {
  color: var(--g4); text-decoration: none; font-size: 14px;
  font-weight: 600; letter-spacing: .03em;
  transition: color .2s;
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--bp); }

/* ─── NAV DROPDOWN ─── */
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
}
.nav-drop-arrow {
  width: 12px; height: 12px; fill: currentColor;
  opacity: .6; transition: transform .2s; flex-shrink: 0;
  pointer-events: none;
}
.nav-has-dropdown.open .nav-drop-arrow { transform: rotate(180deg); }
.nav-subdropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  background: rgba(15,40,100,.97);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  min-width: 160px;
  list-style: none;
  padding: 6px 0;
  z-index: 400;
}
.nav-has-dropdown.open .nav-subdropdown { display: block; }
.nav-subdropdown li a {
  display: block; padding: 12px 20px;
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,.85); white-space: nowrap;
  transition: background .15s, color .15s;
  letter-spacing: .02em;
  text-decoration: none;
  text-align: center;
}
.nav-subdropdown li a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav-subdropdown li + li { border-top: 1px solid rgba(255,255,255,.07); }

.nav-btn {
  background: var(--bp); color: #fff;
  border: none; padding: 10px 26px;
  border-radius: 10px; font-family: 'Lato', sans-serif;
  font-weight: 600; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(29,78,216,.3);
  transition: background .2s, box-shadow .2s;
  text-decoration: none; display: inline-block;
}
.nav-btn:hover {
  background: var(--bi);
  box-shadow: 0 6px 28px rgba(29,78,216,.45);
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--g6);
  margin-bottom: 20px; justify-content: center;
}
.breadcrumb a { color: var(--be); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--bp); }
.breadcrumb-sep { color: var(--g6); }

/* ─── SECTION BASE ─── */
section { padding: 64px 56px; position: relative; }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .25em;
  color: var(--be); text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after {
  content: ''; flex: 1; max-width: 56px; height: 1px;
  background: rgba(29,78,216,.3);
}

.section-title {
  font-size: 46px; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.05;
  margin-bottom: 18px;
}
.section-title .accent {
  background: linear-gradient(135deg, var(--bp) 0%, var(--be) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-desc {
  font-size: 17px; color: var(--g4); line-height: 1.7;
  max-width: 580px; margin-bottom: 40px;
}
.divider {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--bp), var(--be));
  border-radius: 2px; margin-bottom: 32px;
}

/* ─── ФИРМЕННАЯ СЕТКА 5×5 (карточки и иконки) ─── */
.ng {
  display: grid;
  grid-template-columns: repeat(5, 11px);
  grid-template-rows: repeat(5, 11px);
  gap: 2.5px;
}
.nc { width: 11px; height: 11px; border-radius: 3px; transition: opacity .3s; }
.nc-0 { background: rgba(29,78,216,.1); }
.nc-1 { background: var(--bp); }
.nc-2 { background: var(--bn); }

/* ─── PRODUCT LAYOUT (изображение + текст) ─── */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  position: relative; z-index: 1;
}
.product-img-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(29,78,216,.12);
  box-shadow: 0 20px 60px rgba(29,78,216,.12);
}
.product-img-wrap img { width: 100%; display: block; }
.product-desc {
  font-size: 17px; color: var(--g4); line-height: 1.8;
  margin-bottom: 36px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--bn); color: #fff;
  padding: 14px 36px; border-radius: 12px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 24px rgba(249,115,22,.4);
  transition: all .2s; display: inline-block;
}
.btn-primary:hover {
  background: #ea6700;
  box-shadow: 0 8px 32px rgba(249,115,22,.55);
  transform: translateY(-1px);
}

.btn-blue {
  background: var(--bp); color: #fff;
  padding: 14px 36px; border-radius: 12px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 24px rgba(29,78,216,.3);
  transition: all .2s; display: inline-block;
}
.btn-blue:hover {
  background: var(--bi);
  box-shadow: 0 8px 32px rgba(29,78,216,.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent; color: #fff;
  padding: 14px 36px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.45);
  transition: all .2s; display: inline-block;
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.7);
}

.btn-outline-blue {
  background: transparent; color: var(--bp);
  padding: 14px 36px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--bp);
  transition: all .2s; display: inline-block;
}
.btn-outline-blue:hover { background: var(--bp); color: #fff; }

/* ─── CONTACT FORM (синяя секция) ─── */
.contact-section {
  background: linear-gradient(135deg, var(--bp) 0%, var(--be) 100%);
  position: relative; overflow: hidden;
}
.contact-section .grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 60px 60px;
}
.contact-section .section-label { color: rgba(255,255,255,.7); }
.contact-section .section-label::after { background: rgba(255,255,255,.3); }
.contact-section .section-title { color: #fff; }
.contact-section .section-title .accent {
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,.8) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-wrap { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.8); margin-bottom: 8px;
  letter-spacing: .04em;
}
.form-input, .form-textarea {
  width: 100%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; padding: 13px 18px;
  border-radius: 10px; font-family: 'Lato', sans-serif;
  font-size: 15px; outline: none;
  transition: border-color .2s, background .2s;
}
.form-input::placeholder,
.form-textarea::placeholder { color: rgba(255,255,255,.45); }
.form-input:focus,
.form-textarea:focus {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.18);
}
.form-textarea { height: 130px; resize: vertical; }

/* ─── CUSTOM SELECT ─── */
.form-select { display: none !important; }
.custom-select-wrap { position: relative; }
.custom-select-trigger {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.45);
  padding: 13px 44px 13px 18px;
  border-radius: 10px;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color .2s, background .2s;
  min-height: 50px;
}
.custom-select-trigger.has-value { color: #fff; }
.custom-select-trigger:hover,
.custom-select-trigger.open {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.18);
}
.custom-select-arrow {
  width: 20px; height: 20px;
  fill: rgba(255,255,255,.6);
  transition: transform .2s;
  flex-shrink: 0; margin-left: 8px;
}
.custom-select-trigger.open .custom-select-arrow { transform: rotate(180deg); }
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(15,40,100,.97);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  overflow-y: auto;
  max-height: 260px;
  z-index: 200;
  display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.custom-select-dropdown::-webkit-scrollbar { width: 4px; }
.custom-select-dropdown::-webkit-scrollbar-track { background: transparent; }
.custom-select-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
.custom-select-dropdown.open { display: block; }
.custom-select-dropdown.open-up {
  top: auto;
  bottom: calc(100% + 6px);
  box-shadow: 0 -12px 40px rgba(0,0,0,.4);
}
.custom-select-option {
  padding: 12px 18px;
  font-size: 15px;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background .15s, color .15s;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover,
.custom-select-option.focused { background: rgba(255,255,255,.12); color: #fff; }
.custom-select-option.selected {
  background: rgba(249,115,22,.25);
  color: #fff;
  font-weight: 600;
}

.form-check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 28px; }
.form-check input[type="checkbox"] {
  flex-shrink: 0; margin-top: 3px;
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--bn);
}
.form-check-label { font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.6; }
.form-check-label a { color: rgba(255,255,255,.95); font-weight: 600; }

.btn-submit {
  width: 100%;
  background: var(--bn); color: #fff;
  border: none; padding: 16px;
  border-radius: 12px; font-family: 'Lato', sans-serif;
  font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 24px rgba(249,115,22,.4);
  transition: all .2s;
}
.btn-submit:hover:not(:disabled) {
  background: #ea6700;
  box-shadow: 0 8px 32px rgba(249,115,22,.55);
  transform: translateY(-1px);
}
.btn-submit:disabled {
  background: #6b7280;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .65;
}
.feedback-status {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .7);
  min-height: 1.5em;
}
.feedback-status--ok { color: #34d399; }
.feedback-status--err { color: #f87171; }

/* ─── FOOTER (тёмный) ─── */
footer.site-footer-dark {
  background: #0A1A35;
  padding: 56px 56px 32px;
}
.footer-top {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 32px;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; }
.footer-logo {
  height: 52px; width: 52px;
  margin-bottom: 6px; display: block; align-self: center;
}
.footer-nomis {
  font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,.55);
  letter-spacing: .18em; text-transform: uppercase;
  display: inline-block; margin-bottom: 16px;
}
.footer-nomis .omi {
  border-bottom: 2px solid #F97316;
  padding-bottom: 2px;
}
.footer-tagline {
  font-size: 14px; color: rgba(255,255,255,.5);
  line-height: 1.7; text-align: center;
}
.footer-col-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 20px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a {
  color: rgba(255,255,255,.65); text-decoration: none;
  font-size: 14px; transition: color .2s;
}
.footer-links a:hover { color: #fff; }

.footer-contacts { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; }
.footer-contact-icon {
  width: 32px; height: 32px;
  background: rgba(79,122,228,.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer-contact-icon svg { width: 16px; height: 16px; fill: var(--be); }
.footer-contact-text { font-size: 14px; color: rgba(255,255,255,.7); }
.footer-contact-text a {
  color: rgba(255,255,255,.7); text-decoration: none;
  transition: color .2s;
}
.footer-contact-text a:hover { color: #fff; }
.footer-contact-note {
  font-size: 12px; color: rgba(255,255,255,.35);
  padding-left: 42px; margin-top: 2px;
}

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,.35); }
.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-legal a {
  font-size: 13px; color: rgba(255,255,255,.4);
  text-decoration: none; transition: color .2s;
}
.footer-legal a:hover { color: rgba(255,255,255,.75); }

.socials { display: flex; gap: 12px; margin-top: 24px; }
.social-link {
  width: 38px; height: 38px;
  background: rgba(79,122,228,.15);
  border: 1px solid rgba(79,122,228,.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all .2s;
}
.social-link:hover {
  background: rgba(79,122,228,.35);
  border-color: var(--be);
}
.social-link svg { width: 18px; height: 18px; fill: #fff; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav.site-nav { padding: 0 16px; justify-content: flex-start; gap: 14px; }
  .nav-menu { display: none; }
  section { padding: 44px 24px; }
  footer.site-footer-dark { padding: 40px 24px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section-title { font-size: 34px; letter-spacing: -.02em; }
  .product-layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  nav.site-nav { height: 60px; }
  .nav-logo img { height: 36px; }
  .nav-btn { padding: 8px 18px; font-size: 13px; }
  .section-title { font-size: 26px; word-break: break-word; }
  .section-desc { font-size: 15px; margin-bottom: 28px; }
  .footer-copy { font-size: 12px; }
  .footer-legal { gap: 16px; }
  section { padding: 36px 18px; }
}
/* ─── BURGER BUTTON ─── */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
.burger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bp);
  border-radius: 2px;
  transition: transform .28s, opacity .28s;
}
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE MENU DRAWER ─── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px;
  left: 0; right: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(29,78,216,.12);
  z-index: 98;
  padding: 8px 0 20px;
  flex-direction: column;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}
.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  display: block;
  padding: 15px 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--g4);
  text-decoration: none;
  border-bottom: 1px solid rgba(29,78,216,.07);
  letter-spacing: .01em;
  transition: color .18s, background .18s;
}
.mobile-nav a:hover { color: var(--bp); background: rgba(29,78,216,.04); }
.mobile-nav a:last-child { border-bottom: none; }

/* ─── FOCUS VISIBLE ─── */
:focus-visible {
  outline: 2px solid var(--bp);
  outline-offset: 2px;
}
button:focus-visible, .btn-primary:focus-visible, .btn-blue:focus-visible,
.btn-outline:focus-visible, .btn-outline-blue:focus-visible, .nav-btn:focus-visible,
.btn-submit:focus-visible {
  outline: 2px solid var(--bn);
  outline-offset: 2px;
}
.form-input:focus-visible, .form-textarea:focus-visible {
  outline: none;
  border-color: rgba(255,255,255,.8);
}

/* ─── SCROLL TO TOP ─── */
#scroll-top-btn {
  display: flex;
  position: fixed;
  bottom: 24px;
  right: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bp);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 4px 18px rgba(29,78,216,.4);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
}
#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}
#scroll-top-btn svg { width: 20px; height: 20px; fill: #fff; }

/* ─── MOBILE OVERRIDES ─── */
@media (max-width: 900px) {
  .burger-btn { display: flex; }
  .mobile-nav { display: flex; }
  .nav-btn { display: none; }
}
@media (max-width: 480px) {
  .mobile-nav { top: 60px; }
  .mobile-nav a { font-size: 15px; padding: 14px 20px; }
}


/* ─── GLOBAL MOBILE TEXT FIX ─── */
@media (max-width: 900px) {
  img, video, canvas { max-width: 100%; height: auto; }
}
@media (max-width: 640px) {
  .section-title, .section-desc, .about-track-title,
  .price-card, .hero-title, .hero-sub, p, li, h1, h2, h3 {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  img, canvas, video { max-width: 100%; height: auto; }
}

/* ─── FLEX/GRID OVERFLOW PREVENTION ─── */
@media (max-width: 900px) {
  .hero-content, .about-track, .service-card,
  .feature-card, .price-card, .doc-card {
    min-width: 0;
    overflow-wrap: break-word;
  }
  .products-grid > * { min-width: 0; }
}

/* ─── HERO FLEX OVERFLOW FIX ─── */
#hero { width: 100%; max-width: 100vw; }
#hero .hero-content { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
@media (max-width: 900px) {
  #hero { overflow: hidden; }
  .hero-title { white-space: normal; }
  .hero-sub { white-space: normal; }
}

/* ─── WIDE SCREEN: ограничение контента до 1200px ─── */
@media (min-width: 1312px) {
  nav.site-nav {
    padding-left: calc((100% - 1200px) / 2);
    padding-right: calc((100% - 1200px) / 2);
  }
  section {
    padding-left: calc((100% - 1200px) / 2);
    padding-right: calc((100% - 1200px) / 2);
  }
  footer.site-footer-dark {
    padding-left: calc((100% - 1200px) / 2);
    padding-right: calc((100% - 1200px) / 2);
  }
}
