/* First stage of the home page redesign. */
.redesign-header,
.redesign-hero {
  --redesign-accent: #e5e4ae;
  --redesign-dark: #252b20;
}

header.redesign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 32px);
  height: auto;
  min-height: 82px;
  padding: 14px 0;
}

.redesign-header .logo img {
  display: block;
  width: clamp(120px, 13vw, 190px);
  height: auto;
}

.redesign-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px clamp(12px, 2vw, 28px);
}

.redesign-nav a,
.redesign-phone {
  color: inherit;
  font-size: 14px;
  font-weight: 600;
}

.redesign-phone { white-space: nowrap; }

.redesign-button,
.redesign-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.redesign-button { color: #252b20; background: var(--redesign-accent); }
.redesign-button:hover { background: #f1edc8; }
.redesign-secondary { color: inherit; border-color: #a8ab97; gap: 8px; }
.redesign-secondary:hover { background: #ffffff18; }

.redesign-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 76px);
  align-items: center;
  padding: clamp(32px, 5vw, 78px);
  background: var(--redesign-dark);
  color: #fbf8ed;
}

.redesign-kicker {
  margin: 0 0 20px;
  color: var(--redesign-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}

.redesign-hero h1 {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.redesign-hero h1 span { color: var(--redesign-accent); white-space: nowrap; }
.redesign-lead { max-width: 38ch; margin: 20px 0 0; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.55; }
.redesign-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.redesign-project { margin: 0; }
.redesign-project img { display: block; width: 100%; height: auto; }
.redesign-project figcaption { margin-top: 10px; color: #dbddce; font-size: 13px; line-height: 1.4; }

main > #catalog { margin-top: clamp(36px, 5vw, 72px); }
main > #catalog .catalog-intro h2 {
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

header.redesign-header .mobile-catalog-toggle { display: none; }

@media (max-width: 840px) {
  header.redesign-header { flex-wrap: wrap; min-height: 68px; }
  header.redesign-header .mobile-catalog-toggle {
    display: inline-flex;
    position: static;
    width: 44px;
    height: 44px;
    margin: 0;
  }
  .redesign-header .logo { margin-right: auto; }
  .redesign-nav { order: 5; width: 100%; justify-content: flex-start; }
  .redesign-phone { display: none; }
  .redesign-hero { grid-template-columns: 1fr; padding: clamp(20px, 5vw, 40px); }
  .redesign-hero h1 { font-size: clamp(32px, 7vw, 56px); }
  .redesign-lead { margin-top: 14px; }
  .redesign-actions { margin-top: 20px; }
}

@media (max-width: 390px) {
  header.redesign-header { column-gap: 6px; }
  .redesign-header .logo img { width: 105px; }
  .redesign-header .redesign-button { padding-inline: 9px; }
}

/* Mobile composition follows the reference: the photo sits behind the copy. */
@media (max-width: 840px) {
  .redesign-hero {
    position: relative;
    isolation: isolate;
    display: block;
    overflow: hidden;
    min-height: clamp(580px, 142vw, 760px);
    padding: clamp(28px, 7vw, 58px) clamp(18px, 5.3vw, 42px) 42px;
    background: #181b17;
  }

  .redesign-hero-copy { position: relative; z-index: 1; }

  .redesign-hero h1 {
    max-width: 16ch;
    font-family: Manrope, Arial, sans-serif;
    font-size: clamp(34px, 10vw, 70px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.055em;
  }

  .redesign-hero h1 span { color: inherit; }
  .redesign-kicker { color: inherit; text-transform: uppercase; }
  .redesign-lead { margin-top: 22px; }

  .redesign-project {
    position: absolute;
    inset: 37% 0 0 12%;
    z-index: 0;
  }

  .redesign-project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
  }

  .redesign-project::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, #181b17 0%, rgba(24, 27, 23, .88) 24%, rgba(24, 27, 23, .4) 79%, rgba(24, 27, 23, .6) 100%);
  }

  .redesign-project figcaption {
    position: absolute;
    z-index: 1;
    right: 14px;
    bottom: 12px;
    left: 14px;
  }

  .redesign-secondary {
    padding-inline: 4px;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/* Catalog and selected projects on the home page. */
@media (max-width: 840px) {
  .redesign-nav { display: none; }
}

#catalog .home-catalog-sidebar { display: none; }
#catalog .catalog-layout { display: block; }
#catalog .category-index {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}
#catalog .category-card {
  border-radius: 5px;
  box-shadow: none;
}
#catalog .category-card .product-body { padding: clamp(12px, 2vw, 24px); }
#catalog .category-card h3 { font-size: clamp(16px, 2vw, 24px); line-height: 1.2; }
#catalog .category-card .spec { font-size: 14px; line-height: 1.35; }

.redesign-works {
  margin-block: clamp(48px, 8vw, 112px);
  padding: clamp(22px, 5vw, 72px);
  background: #ebeade;
  color: #252b20;
}
.redesign-section-label { margin: 0 0 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.redesign-works h2 { margin: 0 0 28px; font-size: clamp(32px, 4vw, 58px); line-height: 1.08; letter-spacing: -.035em; }
.redesign-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 38px) clamp(12px, 2vw, 24px); }
.redesign-work { display: block; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.redesign-work img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.redesign-work strong { display: block; padding-top: 10px; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.3; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .redesign-work img { transition: transform 200ms ease; }
  .redesign-work:hover img { transform: scale(1.02); }
}
.redesign-works .portfolio-open { margin-top: 28px; }

@media (max-width: 940px) {
  #catalog .category-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .redesign-work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  #catalog .category-index { grid-template-columns: 1fr; }
}

/* Reviews, quote and contact sections share the home page rhythm. */
main > #reviews,
main > #quote,
main > #contacts {
  margin-block: clamp(40px, 7vw, 96px);
  padding: clamp(22px, 5vw, 72px);
}

main > #reviews h2,
main > #quote h2,
main > #contacts h2 {
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

main > #reviews { background: #f7f3e9; }
#reviews .review-card {
  border-radius: 4px;
  box-shadow: none;
}
#reviews .review-card p { font-size: 16px; line-height: 1.5; }

main > #quote { background: #ebeade; gap: clamp(22px, 5vw, 72px); }
#quote > div > p { max-width: 38ch; font-size: 17px; line-height: 1.55; }
#quote .quote-form { background: #fbf8ef; box-shadow: none; border-radius: 4px; }
#quote label { font-size: 15px; }
#quote input:not(.quote-honey),
#quote textarea { min-height: 46px; font-size: 16px; }
#quote button[type="submit"] { min-height: 46px; }

main > #contacts { background: #ebeade; }
#contacts .contact-card { min-width: 0; border-radius: 4px; box-shadow: none; overflow-wrap: anywhere; }

@media (max-width: 680px) {
  main > #quote,
  #quote .quote-fields,
  #contacts .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

.redesign-works { --redesign-accent: #e5e4ae; }
.redesign-works .redesign-button {
  background: var(--redesign-accent);
  border-color: transparent;
  color: #252b20;
}

@media (max-width: 840px) {
  header.redesign-header .mobile-catalog-toggle {
    flex: 0 0 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 1px solid #d6d0bc;
    border-radius: 4px;
  }
  header.redesign-header .mobile-catalog-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0;
    background: #252b20;
  }
}

.redesign-header { justify-content: flex-start; }
.redesign-header .redesign-nav { margin-right: auto; }
.redesign-social { display: flex; align-items: center; gap: 6px; }
.redesign-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d6d0bc;
  border-radius: 4px;
  color: #252b20;
  font-size: 10px;
  font-weight: 800;
}
.redesign-social svg { width: 19px; height: 19px; fill: currentColor; }
.redesign-header .redesign-button { flex-shrink: 0; }

@media (min-width: 841px) {
  .redesign-hero { gap: clamp(20px, 3vw, 48px); }
  .redesign-project img {
    aspect-ratio: 1.12;
    object-fit: cover;
  }
  #catalog .catalog-intro {
    display: block;
  }
}

#catalog .category-card .product-body { display: flex; flex: 1; flex-direction: column; }
#catalog .category-card .spec { min-height: 0; margin: 8px 0 12px; padding: 0; }
#catalog .category-card .spec::after { content: none; }
#catalog .category-action {
  --redesign-accent: #e5e4ae;
  width: 100%;
  margin-top: auto;
  padding-inline: 6px;
  font-size: clamp(12px, 1.1vw, 14px);
}

.redesign-stand-cta {
  --redesign-accent: #e5e4ae;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: clamp(24px, 5vw, 72px);
  color: #fbf8ed;
  background: #252b20;
}
.redesign-stand-cta h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.redesign-works:has(+ .redesign-stand-cta) { margin-bottom: 0; }

@media (max-width: 980px) {
  .redesign-header .redesign-phone { display: none; }
}
@media (max-width: 840px) {
  header.redesign-header { gap: 6px; }
  .redesign-social { gap: 4px; }
  .redesign-social a { width: 30px; height: 36px; }
  .redesign-header .redesign-button { padding-inline: 8px; font-size: 12px; }
  .redesign-header .logo img { width: 105px; }
}

/* Full-width section backgrounds with shared content gutters. */
html:has(.redesign-hero) { container-type: inline-size; }
.redesign-hero,
.redesign-works,
.redesign-stand-cta,
main > #quote {
  width: 100cqw;
  margin-inline: calc(50% - 50cqw);
  box-sizing: border-box;
  padding-inline: max(clamp(20px, 5vw, 76px), calc((100cqw - 1470px) / 2));
}
#catalog .category-card::after,
#catalog .category-card .product-body::after { content: none; }

@media (min-width: 841px) {
  .redesign-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: clamp(420px, 46vw, 690px);
    background: #181b17;
  }
  .redesign-hero-copy {
    position: relative;
    z-index: 1;
    width: 69%;
  }
  .redesign-hero h1 { font-size: clamp(42px, 6.2vw, 94px); }
  .redesign-project {
    position: absolute;
    inset: 9% max(4vw, calc((100cqw - 1470px) / 2)) 9% 48%;
  }
  .redesign-project img {
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    filter: grayscale(1);
    opacity: .55;
    mask-image: linear-gradient(to right, transparent, #000 34%);
  }
  .redesign-project figcaption {
    position: absolute;
    right: 0;
    bottom: -22px;
  }
}

.redesign-social a {
  border: 0;
  border-radius: 11px;
  color: #fff;
}
.redesign-social a.site-max { background: linear-gradient(135deg, #1689ef, #7137e7); }
.redesign-social a.site-max span { color: inherit; font-size: 11px; font-weight: 800; }
.redesign-social a.site-telegram { background: #23a9df; }
.redesign-social a.site-telegram svg { width: 22px; height: 22px; fill: #fff; }
.redesign-social a:hover { filter: brightness(1.08); }
@media (max-width: 840px) {
  .redesign-social a { height: 30px; border-radius: 9px; }
}

main > #contacts {
  background: #252b20;
  color: #fbf8ed;
}
#contacts .contact-grid { margin-top: 12px; }
#contacts .contact-card { padding: 14px; }
#contacts .channel-card { padding-block: 12px; }
#contacts .channel-card strong { font-size: 16px; }

header.redesign-header .redesign-social a {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  box-shadow: none;
}
header.redesign-header .redesign-social .site-max { background: linear-gradient(135deg, #387dd4, #6244ba); }
header.redesign-header .redesign-social .site-max span { font-size: 9px; }
header.redesign-header .redesign-social .site-telegram { background: #258bb6; }
header.redesign-header .redesign-social svg { width: 16px; height: 16px; }
@media (pointer: coarse) {
  header.redesign-header .redesign-social a { position: relative; }
  header.redesign-header .redesign-social a::after { position: absolute; inset: -7px -2px; content: ""; }
}
