
:root {
  --max: 1180px;
  --white: #fff;
  --black: #000;
}

* { box-sizing: border-box; }

html {
  background: #000;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", Arial, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.site {
  width: 100%;
  min-width: 320px;
  background: #000;
}

.hero {
  position: relative;
  min-height: clamp(610px, 62vw, 760px);
  background: #030303;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 48%, rgba(0,0,0,.10), rgba(0,0,0,.34) 64%, rgba(0,0,0,.72) 100%),
    linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0) 42%, rgba(0,0,0,.16));
  pointer-events: none;
}

.hero-img {
  position: absolute;
  top: 0;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  z-index: 1;
}

.hero-left {
  left: 0;
  width: 32%;
  object-position: left center;
  opacity: .68;
}

.hero-camera {
  right: 0;
  width: 36%;
  object-position: right center;
  opacity: .88;
}

.hero-center {
  position: relative;
  z-index: 3;
  width: min(900px, calc(100% - 32px));
  text-align: center;
  padding: 38px 0 34px;
}

.logo-main {
  display: block;
  width: clamp(215px, 19vw, 285px);
  height: auto;
  margin: 0 auto clamp(36px, 4.5vw, 54px);
}

.hero h1 {
  margin: 0 auto;
  max-width: 860px;
  text-transform: uppercase;
  font-size: clamp(40px, 4.7vw, 68px);
  line-height: 1.02;
  letter-spacing: .012em;
  font-weight: 900;
}

.hero p {
  margin: clamp(18px, 1.7vw, 24px) auto clamp(28px, 2.7vw, 36px);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.3;
  color: rgba(255,255,255,.94);
}

.project-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(300px, 78vw);
  min-height: 56px;
  border: 2px solid rgba(255,255,255,.92);
  text-transform: uppercase;
  font-size: clamp(16px, 1.35vw, 18px);
  letter-spacing: .035em;
}

.project-btn:hover { background: #fff; color: #000; }

.arrow {
  display: block;
  width: 22px;
  height: 22px;
  margin: 34px auto 0;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.section {
  padding: clamp(34px, 4vw, 48px) 28px;
}

.light {
  background: linear-gradient(#fff, #f4f4f4);
  color: #050505;
}

.dark-block {
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.055), transparent 34%),
    #080808;
  color: #fff;
}

.section-title {
  width: min(var(--max), 100%);
  margin: 0 auto clamp(30px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(22px, 4vw, 56px);
}

.section-title span {
  display: block;
  height: 1px;
}

.section-title.dark span { background: rgba(0,0,0,.34); }
.section-title.light-title span { background: rgba(255,255,255,.35); }

.section-title h2,
.solo-title {
  margin: 0;
  text-transform: uppercase;
  font-size: clamp(13px, 1.15vw, 16px);
  letter-spacing: clamp(.45em, .72vw, .72em);
  padding-left: clamp(.45em, .72vw, .72em);
  white-space: nowrap;
  font-weight: 900;
  text-align: center;
}

.solo-title {
  margin: 0 auto clamp(30px, 3vw, 42px);
}

.service-grid,
.why-grid,
.portfolio-grid,
.contacts-grid {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
}

.service-grid { grid-template-columns: repeat(3, 1fr); }
.why-grid { grid-template-columns: repeat(4, 1fr); }
.portfolio-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.contacts-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  max-width: 860px;
  border-top: 1px solid rgba(255,255,255,.22);
  border-bottom: 1px solid rgba(255,255,255,.22);
}

.service-card,
.why-card {
  position: relative;
  text-align: center;
}

.service-card {
  padding: 0 34px 8px;
}

.service-card + .service-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: rgba(0,0,0,.28);
}

.icon,
.circle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card .icon {
  width: 70px;
  height: 62px;
  margin-bottom: 12px;
}

.service-card h3,
.why-card h3,
.portfolio-card h3,
.contact-card strong {
  margin: 0;
  text-transform: uppercase;
  font-weight: 900;
}

.service-card h3 {
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.08;
}

.service-card p,
.why-card p,
.contact-card em,
.footer p {
  font-family: Arial, Helvetica, sans-serif;
}

.service-card p {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.35;
}

.why-card {
  padding: 0 26px;
}

.why-card + .why-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 8px;
  width: 1px;
  background: rgba(255,255,255,.48);
}

.why-card .icon {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
}

.why-card h3 {
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.18;
}

.why-card p {
  margin: 14px 0 0;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.45;
  color: rgba(255,255,255,.82);
}

.portfolio-card {
  height: 313px;
  display: grid;
  grid-template-rows: 245px 68px;
  background: #070707;
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  height: 245px;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05);
}

.portfolio-card h3 {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070707;
  color: #fff;
  text-align: center;
  line-height: 1;
  padding: 0 8px;
  font-size: clamp(16px, 1.45vw, 20px);
  letter-spacing: .03em;
}

.contacts {
  padding: clamp(34px, 4vw, 48px) 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.055), transparent 34%),
    #060606;
  color: #fff;
}

.contacts-grid {
  min-height: 130px;
}

.contact-card {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  position: relative;
}

.contact-card + .contact-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(255,255,255,.45);
}

.contact-card:hover { background: rgba(255,255,255,.055); }

.circle {
  width: 70px;
  height: 70px;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.circle svg {
  width: 38px;
  height: 38px;
}

.contact-card strong {
  display: block;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1;
}

.contact-card em {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: clamp(14px, 1.15vw, 16px);
  color: rgba(255,255,255,.82);
}

.footer {
  background: #000;
  text-align: center;
  padding: 22px 20px 28px;
}

.logo-footer {
  width: 96px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

.footer p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero { min-height: 660px; }
  .hero-left { width: 38%; }
  .hero-camera { width: 39%; }
  .hero h1 { font-size: clamp(38px, 5.4vw, 62px); max-width: 760px; }

  .why-grid,
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .why-card { padding: 28px 24px; }
  .why-card:nth-child(3)::before { display: none; }

  .portfolio-card {
    height: 348px;
    grid-template-rows: 280px 68px;
  }
  .portfolio-card img { height: 280px; }
}

@media (max-width: 680px) {
  .hero { min-height: 620px; }
  .hero-left { width: 56%; opacity: .33; }
  .hero-camera { width: 58%; right: -70px; opacity: .36; }
  .logo-main { width: min(74vw, 250px); margin-bottom: 34px; }
  .hero h1 { font-size: clamp(30px, 9.2vw, 42px); max-width: 94vw; }
  .hero p { font-size: 16px; }
  .hero p br { display: none; }

  .section,
  .contacts { padding-left: 18px; padding-right: 18px; }
  .section-title { gap: 18px; }
  .section-title h2,
  .solo-title { font-size: 13px; letter-spacing: .42em; padding-left: .42em; }

  .service-grid,
  .why-grid,
  .portfolio-grid,
  .contacts-grid { grid-template-columns: 1fr; }

  .service-card,
  .why-card { padding: 30px 12px; }

  .service-card + .service-card::before,
  .why-card + .why-card::before,
  .contact-card + .contact-card::before {
    left: 10%;
    right: 10%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .why-card:nth-child(3)::before { display: block; }

  .portfolio-card {
    height: 360px;
    grid-template-rows: 290px 70px;
  }
  .portfolio-card img { height: 290px; }
  .portfolio-card h3 { height: 70px; }

  .contact-card {
    min-height: 120px;
    justify-content: flex-start;
    padding-left: 24px;
  }

  .logo-footer { width: 86px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(29px, 9vw, 38px); }
  .project-btn { min-height: 52px; }
}


/* v5 fixes: убрать лишний дубль над портфолио и выровнять карточки */

/* В блоке портфолио оставляем только один заголовок и одну линию */
.portfolio {
  position: relative;
  padding-top: clamp(34px, 3.8vw, 46px) !important;
  padding-bottom: clamp(42px, 4vw, 54px) !important;
  overflow: hidden;
}

/* Перекрываем/убираем старую лишнюю серую полоску и дублирующий текст, который тянулся из предыдущего слоя */
.portfolio::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(82px, 7.2vw, 104px);
  height: clamp(36px, 3.6vw, 50px);
  background: linear-gradient(#fff, #f7f7f7);
  z-index: 1;
  pointer-events: none;
}

.portfolio .section-title {
  position: relative;
  z-index: 3;
  margin-bottom: clamp(38px, 4.4vw, 56px) !important;
}

.portfolio-grid {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 56px)) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

/* Карточки: строго одна высота, одна линия низа, одинаковые плашки */
.portfolio-card {
  height: 313px !important;
  min-height: 313px !important;
  max-height: 313px !important;
  display: grid !important;
  grid-template-rows: 245px 68px !important;
  background: #070707 !important;
  overflow: hidden !important;
  align-self: stretch !important;
}

.portfolio-card img {
  display: block !important;
  width: 100% !important;
  height: 245px !important;
  min-height: 245px !important;
  max-height: 245px !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.portfolio-card h3 {
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  background: #070707 !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  transform: none !important;
}

/* Убираем возможные псевдо-элементы, которые могли создавать второй слой */
.portfolio-grid::before,
.portfolio-grid::after,
.portfolio-card::before,
.portfolio-card::after {
  content: none !important;
  display: none !important;
}

/* Планшет */
@media (max-width: 980px) {
  .portfolio::before {
    top: clamp(78px, 9vw, 104px);
    height: 48px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: min(920px, calc(100% - 44px)) !important;
    gap: 18px !important;
  }

  .portfolio-card {
    height: 348px !important;
    min-height: 348px !important;
    max-height: 348px !important;
    grid-template-rows: 280px 68px !important;
  }

  .portfolio-card img {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
  }
}

/* Телефон */
@media (max-width: 680px) {
  .portfolio::before {
    top: 76px;
    height: 42px;
  }

  .portfolio .section-title {
    margin-bottom: 36px !important;
  }

  .portfolio-grid {
    grid-template-columns: 1fr !important;
    width: min(430px, calc(100% - 36px)) !important;
    gap: 18px !important;
  }

  .portfolio-card {
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;
    grid-template-rows: 290px 70px !important;
  }

  .portfolio-card img {
    height: 290px !important;
    min-height: 290px !important;
    max-height: 290px !important;
  }

  .portfolio-card h3 {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
  }
}



/* v6 portfolio cleanup */
/* Исправление отмеченного участка: убираем второй слой 'ПОРТФОЛИО' и верхние полосы над фото */

.portfolio {
  position: relative;
  padding-top: clamp(34px, 3.8vw, 46px) !important;
  padding-bottom: clamp(42px, 4vw, 54px) !important;
  overflow: visible !important;
  background: linear-gradient(#fff, #f4f4f4) !important;
}

/* Убираем белую маску из v5, которая сама создавала лишний слой */
.portfolio::before,
.portfolio::after {
  display: none !important;
  content: none !important;
}

.portfolio .section-title {
  position: relative !important;
  z-index: 2 !important;
  margin-bottom: clamp(34px, 3.8vw, 46px) !important;
}

/* Чистая сетка без перекрытий */
.portfolio-grid {
  position: relative !important;
  z-index: 1 !important;
  width: min(1180px, calc(100% - 56px)) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

.portfolio-grid::before,
.portfolio-grid::after,
.portfolio-card::before,
.portfolio-card::after {
  display: none !important;
  content: none !important;
}

/* Карточки одной высоты */
.portfolio-card {
  height: 313px !important;
  min-height: 313px !important;
  max-height: 313px !important;
  display: grid !important;
  grid-template-rows: 245px 68px !important;
  background: #070707 !important;
  overflow: hidden !important;
  align-self: stretch !important;
}

/* Фото теперь чистые, без верхних линий и букв */
.portfolio-card img {
  display: block !important;
  width: 100% !important;
  height: 245px !important;
  min-height: 245px !important;
  max-height: 245px !important;
  object-fit: cover !important;
  object-position: center center !important;
  filter: grayscale(1) contrast(1.05) !important;
  background: #000 !important;
}

.portfolio-card h3 {
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  background: #070707 !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
}

/* Планшет */
@media (max-width: 980px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: min(920px, calc(100% - 44px)) !important;
  }

  .portfolio-card {
    height: 348px !important;
    min-height: 348px !important;
    max-height: 348px !important;
    grid-template-rows: 280px 68px !important;
  }

  .portfolio-card img {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
  }
}

/* Телефон */
@media (max-width: 680px) {
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    width: min(430px, calc(100% - 36px)) !important;
  }

  .portfolio-card {
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;
    grid-template-rows: 290px 70px !important;
  }

  .portfolio-card img {
    height: 290px !important;
    min-height: 290px !important;
    max-height: 290px !important;
  }

  .portfolio-card h3 {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
  }
}
