:root{
  /* Основной цвет: почти белый */
  --bg: #fbfbfb;
  --text: #1e1e1e;
  --muted: #1e1e1e;
  /* Разделения между секциями чуть темнее */
  --alt: #f1f3f5;
  --container: 1120px;
  --header-h: 68px;
  --space: 1.1rem;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }

.container{
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  padding: .75rem 1rem;
  background: var(--alt);
  color: var(--text);
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{
  left: .75rem;
  top: .75rem;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(251, 251, 251, .92);
  backdrop-filter: blur(8px);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand{
  font-weight: 600;
  letter-spacing: .2px;
  text-transform: uppercase;
  margin-left: 10px;
  font-size: 22px;
}

.nav{
  display: flex;
  gap: .6rem;
  align-items: center;
}

.logo_position {
  display: flex;
  }

.logo_main {
  width: 128px;
  height: 100%;
  }

.nav-menu{
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.nav-link{
  padding: .55rem .7rem;
  border-radius: 12px;
  color: var(--text);
  transition: background-color .2s ease, color .2s ease;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .08em;
}
.nav-link:hover{
  background: rgba(30, 30, 30, .06);
}
.nav-link.is-active{
  background: var(--alt);
  color: var(--text);
}

.nav-toggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(30, 30, 30, .06);
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
}

.burger-icon{
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
  margin: 0 auto;
}
.burger-icon::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow:
    0 6px 0 currentColor,
    0 12px 0 currentColor;
}

.close-icon{
  position: relative;
  display: none;
  width: 22px;
  height: 22px;
  margin: 0 auto;
}
.close-icon::before,
.close-icon::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.close-icon::before{ transform: translateY(-50%) rotate(45deg); }
.close-icon::after{ transform: translateY(-50%) rotate(-45deg); }
.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;
}

.hero{
  padding: 3.5rem 0 2.5rem;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.07) 1px, #0000 1px);
    background-size: 24px 24px;
    background-position: 0 0;
    z-index: -1;
    pointer-events: none;
}
.hero-grid{
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
}
.hero-copy h1{
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  margin: 60px 0 32px;
  letter-spacing: -0.02em;
}
.hero-copy p{
  color: var(--muted);
  margin: 0 0 52px;
  font-size: 1.05rem;
}
.hero-actions{
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.btn_two {
    border: solid 1px #00000012;
    }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  border-radius: 14px;
  transition: transform .12s ease, background-color .2s ease, color .2s ease;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: #1e1e1e;
  color: #ffffff;
}
.btn-primary:hover{
  background: #2b2b2b;
}
.btn-ghost{
  background: #f8f8f8;
  color: var(--text);
}
.btn-ghost:hover{
  background: rgba(30, 30, 30, .06);
  color: var(--text);
}

.hero-card{
  background: rgba(30, 30, 30, .03);
  border-radius: 16px;
}
.hero-card img{
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.section{
  padding: 4rem 0;
}
.section-alt{
  background: var(--alt);
  color: var(--text);
}
.section-title-row{
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.section h2{
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}
.section-lead{
  margin: 0;
  color: var(--muted);
  max-width: 800px;
}

.muted{
  color: var(--muted);
}

/* Дублирующий логотип в оверлее показываем только на мобильных */
.nav-logo{
  display: none;
}

.cards{
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

/* Блок "О нас" */
.about-layout{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 1.5rem;
  align-items: start;
}
.about-copy p{
  margin: 0;
}
.about-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.2rem 0 1rem;
}
.stat-value{
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
}
.stat-label{
  color: var(--muted);
  font-size: .95rem;
}
.about-bullets{
  display: grid;
  gap: .65rem;
  margin-top: .8rem;
}
.bullet{
  padding: .8rem 1rem;
  border-radius: 14px;
  background: rgba(30, 30, 30, .02);
  color: var(--text);
}
.about-image img{
  width: 100%;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}
.card{
  padding: 1rem;
  border-radius: 14px;
  background: rgba(30, 30, 30, .02);
}
.card h3{ margin: 0 0 .5rem; }
.card p{ margin: 0; color: var(--muted); }

.feature-grid{
  display: grid;
  gap: 1rem;
}
.feature{
  display: flex;
  gap: .9rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(30, 30, 30, .02);
}
.feature-icon{
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
}
.feature h3{ margin: 0 0 .25rem; }
.feature p{ margin: 0; color: var(--muted); }
.gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.gallery-item{
  margin: 0;
  border-radius: 14px;
  border: solid 1px #00000012;
}
.gallery-item img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
}

.title_card { 
  margin-left: 10px;
  margin-bottom: 0px;
}

.text_card {
  margin: 10px;
  font-size: 14px;
  border-top: solid 1px #0000000a;
  padding-top: 10px;
  margin-top: 0px;
}

.btn_card {
  margin: 0 auto;
  display: flex;
  max-width: 160px;
  margin-top: 40px;
}

.end_title {
  text-align: center;
  margin-top: 60px;
  font-size: 20px;
}

.end_text {
  text-align: center;
  margin-top: 20px;
  max-width: 700px;
  margin: 0 auto;
  text-transform: uppercase;
  color: #000000b2;
  font-size: 14px;
  padding: 10px;
}

.footer{
  padding: 2rem 0;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}
.footer-inner{
  justify-content: center;
}

@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: 1fr; }
  .feature-grid{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, 1fr); }
  .section-title-row{ flex-direction: column; align-items: flex-start; }
  .about-layout{ grid-template-columns: 1fr; }
  .about-stats{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px){
  .site-header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 180;
  }

  .nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 260;
  }

  .nav{
    position: fixed;
    inset: 0;
    z-index: 250;
    display: none;
    flex-direction: column;
    align-items: center;
    padding-top: 200px;
    background: rgba(251, 251, 251, .98);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav.is-open{ display: flex; }

  .nav-logo{
    position: absolute;
    display: block;
    left: 1rem;
    top: calc(1rem + env(safe-area-inset-top));
    z-index: 260;
    font-weight: 900;
    color: var(--text);
  }

  .nav-menu{
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
    margin: 0 auto;
  }

.nav_last {
    margin-bottom: 60px;
    }
    
  .nav-link{
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 1.1rem 1rem;
    border-radius: 16px;
    background: rgba(30, 30, 30, .02);
  }

  body.nav-open .nav-toggle{
    position: fixed;
    left: auto;
    right: 1.2rem;
    top: calc(1.2rem + env(safe-area-inset-top));
    bottom: auto;
    transform: none;
  }

  body.nav-open .nav-toggle .close-icon{ display: block; }
  body.nav-open .nav-toggle .burger-icon{ display: none; }

  /* Логотип слева должен оставаться видимым поверх меню */
  body.nav-open .site-header{
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
  }

  /* Дублирующий логотип в оверлее, поэтому хедерную надпись скрываем */
  body.nav-open .site-header .brand{
    opacity: 1;
    pointer-events: auto;
  }

  /* Логотип уже виден слева в хедере — дубли внутри оверлея скрываем */
  body.nav-open .nav-logo{
    display: none;
  }
}

@media (max-width: 520px){
  .gallery{ grid-template-columns: 1fr; }
  .gallery-item img{ height: 150px; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
  .btn{ width: 100%; }
  .hero-grid{ gap: 1rem; }
  .about-stats{ grid-template-columns: 1fr; }
  .about-layout{ gap: 1rem; }
}

/* Убираем потенциальные “резкие” прыжки при навигации */
html:focus-within{ scroll-behavior: smooth; }

