/* Мастер Кровли — site chrome & sections (header, footer, hero, marquee) */

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s;
  border-bottom: 1px solid transparent;
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 84px;
  padding-inline: var(--gutter);
  max-width: 1480px; margin-inline: auto;
}
.site-header.is-scrolled {
  background: rgba(244,239,230,0.86); backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
/* header on dark hero: light text until scrolled */
.site-header--over { color: var(--paper); }
.site-header--over.is-scrolled { color: var(--ink); }

.brand { display: flex; align-items: center; gap: 0.65rem; flex: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font-family: var(--display); font-weight: 600; font-size: 1.45rem; letter-spacing: 0.02em; }
.brand__name b { color: var(--copper); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em;
  position: relative; padding-block: 0.4em; opacity: 0.88;
  transition: opacity 0.3s, color 0.3s;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--copper); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--copper); opacity: 1; }

.header-right { display: flex; align-items: center; gap: 1.25rem; flex: none; }
.header-phone { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em; white-space: nowrap; }
.header-phone:hover { color: var(--copper); }

/* Lang switch */
.lang { display: inline-flex; align-items: center; gap: 0.1rem; font-family: var(--mono); font-size: 0.78rem; }
.lang button {
  padding: 0.3em 0.45em; letter-spacing: 0.05em; opacity: 0.5; transition: opacity 0.25s, color 0.25s;
}
.lang button[aria-pressed="true"] { opacity: 1; color: var(--copper); }
.lang .sep { opacity: 0.35; }

/* Mobile toggle */
.menu-toggle { display: none; width: 30px; height: 22px; position: relative; }
.menu-toggle span { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease), opacity 0.3s; }
.menu-toggle span:nth-child(1) { top: 2px; }
.menu-toggle span:nth-child(2) { top: 10px; }
.menu-toggle span:nth-child(3) { top: 18px; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: 0; z-index: 99; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center; gap: 0.4rem;
  padding: var(--gutter);
  transform: translateY(-100%); transition: transform 0.5s var(--ease), visibility 0.5s;
  visibility: hidden;
}
.mobile-nav.is-open { transform: none; visibility: visible; }
.mobile-nav a { font-family: var(--display); font-size: clamp(2rem,9vw,3.2rem); font-weight: 500; padding-block: 0.15em; }
.mobile-nav a:hover { color: var(--copper); }
.mobile-nav__foot { margin-top: 2rem; font-family: var(--mono); font-size: 0.85rem; opacity: 0.7; display:flex; flex-direction:column; gap:0.4rem; }

@media (max-width: 940px) {
  .nav, .header-phone { display: none; }
  .menu-toggle { display: block; }
}

/* ============================================================
   HERO (dark)
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--ink); color: var(--paper); overflow: hidden;
  padding-top: 84px;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(15,12,9,0.55) 0%, rgba(15,12,9,0.2) 35%, rgba(15,12,9,0.75) 100%); }
.hero__bg-tex {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 75% 15%, rgba(189,107,56,0.34) 0%, rgba(189,107,56,0) 55%),
    repeating-linear-gradient(116deg, #221a12 0px, #221a12 14px, #1c150e 14px, #1c150e 28px);
}
.hero__content { position: relative; z-index: 2; width: 100%; max-width: 1480px; margin-inline: auto; padding: 0 var(--gutter) clamp(2.5rem,5vw,4rem); }
.hero__title { font-size: clamp(3rem, 8vw, 7.2rem); font-weight: 500; line-height: 0.98; letter-spacing: -0.02em; max-width: 16ch; }
.hero__lead { max-width: 46ch; color: rgba(244,239,230,0.82); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* stat band inside hero */
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; border-top: 1px solid rgba(244,239,230,0.18); padding-top: 1.6rem; }
.stat__num { font-family: var(--display); font-size: clamp(2rem,3.4vw,3rem); font-weight: 500; line-height: 1; }
.stat__num .copper { color: var(--copper-lite); }
.stat__cap { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,239,230,0.6); margin-top: 0.5rem; }
@media (max-width: 720px) { .hero__stats { grid-template-columns: repeat(2,1fr); gap: 1.4rem 1rem; } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding-block: 1.1rem; }
.marquee__track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 34s linear infinite; }
.marquee__track:hover { animation-play-state: paused; }
.marquee__item { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); display: flex; align-items: center; gap: 0.7rem; white-space: nowrap; }
.marquee__item::before { content: ''; width: 6px; height: 6px; background: var(--copper); border-radius: 50%; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.sec-head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: end; margin-bottom: clamp(2.5rem,5vw,4rem); }
.sec-head__title { font-size: var(--t-h2); }
.sec-head__lead { max-width: 42ch; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } }

/* ============================================================
   SERVICES
   ============================================================ */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.svc {
  position: relative; padding: clamp(1.6rem,3vw,2.4rem); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); overflow: hidden;
  transition: all 0.5s var(--ease); min-height: 280px; display: flex; flex-direction: column;
}
.svc:hover { border-color: var(--copper); transform: translateY(-4px); box-shadow: var(--sh-md); }
.svc__idx { font-family: var(--mono); font-size: 0.78rem; color: var(--copper); letter-spacing: 0.1em; }
.svc__title { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem,2.4vw,2rem); line-height: 1.05; margin-top: auto; }
.svc__desc { color: var(--text-soft); font-size: 0.96rem; margin-top: 0.8rem; max-width: 38ch; }
.svc__arr { position: absolute; top: clamp(1.6rem,3vw,2.4rem); right: clamp(1.6rem,3vw,2.4rem); transition: transform 0.4s var(--ease); color: var(--copper); }
.svc:hover .svc__arr { transform: translate(4px,-4px); }
.svc--wide { grid-column: span 2; }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } .svc--wide { grid-column: auto; } }

/* ============================================================
   FEATURED SPLIT
   ============================================================ */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem,5vw,5rem); align-items: center; }
.split--rev { grid-template-columns: 0.95fr 1.05fr; }
@media (max-width: 860px) { .split, .split--rev { grid-template-columns: 1fr; } }

/* ============================================================
   PROCESS
   ============================================================ */
.process { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 2rem 1.6rem 2.2rem 0; border-right: 1px solid var(--line); position: relative; }
.step:last-child { border-right: 0; }
.step__num { font-family: var(--mono); font-size: 0.8rem; color: var(--copper); letter-spacing: 0.1em; }
.step__title { font-family: var(--display); font-weight: 500; font-size: 1.55rem; margin-top: 1.2rem; line-height: 1.1; }
.step__desc { color: var(--text-soft); font-size: 0.92rem; margin-top: 0.7rem; }
.step__bar { position:absolute; top:-1px; left:0; width: 40px; height: 2px; background: var(--copper); }
@media (max-width: 860px) { .process { grid-template-columns: 1fr 1fr; } .step { padding-inline: 0 1.4rem; } .step:nth-child(2n){border-right:0;} }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } .step { border-right: 0; border-bottom: 1px solid var(--line); padding: 1.6rem 0; } }

/* ============================================================
   STATS BAND (dark)
   ============================================================ */
.band { background: var(--ink); color: var(--paper); }
.band .stat__cap { color: rgba(244,239,230,0.55); }
.band-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
@media (max-width: 720px){ .band-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.5rem; } }

/* ============================================================
   PORTFOLIO GRID
   ============================================================ */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.work { grid-column: span 6; }
.work--tall { grid-column: span 6; }
.work__img { position: relative; overflow: hidden; border-radius: var(--r-md); }
.work__img .ph { height: 100%; width: 100%; }
.work__img .ph__inner { transition: transform 1.1s var(--ease); }
.work:hover .ph__inner { transform: scale(1.05); }
.work__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1rem; }
.work__title { font-family: var(--display); font-weight: 500; font-size: 1.5rem; line-height: 1.1; }
.work__tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); white-space: nowrap; }
@media (max-width: 720px){ .work, .work--tall { grid-column: span 12; } }

/* ============================================================
   CTA
   ============================================================ */
.cta-block { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ink); color: var(--paper); padding: clamp(2.5rem,6vw,5rem); }
.cta-block__tex { position:absolute; inset:0; background: radial-gradient(120% 120% at 85% 20%, rgba(189,107,56,0.32), rgba(189,107,56,0) 60%); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--soot); color: var(--paper); padding-top: clamp(3.5rem,7vw,6rem); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid rgba(244,239,230,0.12); }
.footer-col h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-lite); margin-bottom: 1.2rem; font-weight: 500; }
.footer-col a, .footer-col p { display: block; color: rgba(244,239,230,0.78); font-size: 0.95rem; padding-block: 0.3rem; transition: color 0.25s; }
.footer-col a:hover { color: var(--copper-lite); }
.footer-brand .brand__name { color: var(--paper); }
.footer-brand p { color: rgba(244,239,230,0.6); max-width: 30ch; margin-top: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-block: 2rem; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; color: rgba(244,239,230,0.5); }
@media (max-width: 860px){ .footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
@media (max-width: 520px){ .footer-top { grid-template-columns: 1fr; } }

/* ============================================================
   VARIANT SWITCHER (homepages only)
   ============================================================ */
.vswitch {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  z-index: 120; display: flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  background: rgba(15,12,9,0.88); backdrop-filter: blur(14px);
  border: 1px solid rgba(244,239,230,0.16); border-radius: 100px;
  box-shadow: var(--sh-lg);
}
.vswitch__label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,239,230,0.6); margin-right: 0.3rem; }
.vswitch a {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500; color: rgba(244,239,230,0.7);
  transition: all 0.3s var(--ease);
}
.vswitch a:hover { color: var(--paper); background: rgba(244,239,230,0.1); }
.vswitch a.is-active { background: var(--copper); color: #fff; }
@media (max-width: 520px){ .vswitch__label{ display:none; } }

/* ---- Variant B: light editorial hero ---- */
.hero-b { background: var(--paper); color: var(--ink); padding-top: 84px; min-height: 100svh; display: flex; align-items: center; }
.hero-b__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem,5vw,4.5rem); align-items: center; width: 100%; }
.hero-b__title { font-size: clamp(2.8rem,6.5vw,6rem); font-weight: 500; line-height: 0.98; letter-spacing: -0.02em; }
.hero-b__img { aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; }
.hero-b__strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 2.2rem; }
@media (max-width: 860px){ .hero-b__grid{ grid-template-columns:1fr; } .hero-b{ padding-block: 110px 3rem; } .hero-b__img{ order:-1; aspect-ratio:16/10; } }

/* ---- Variant C: bold typographic hero ---- */
.hero-c { background: var(--soot); color: var(--paper); min-height: 100svh; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: 84px; }
.hero-c__tex { position:absolute; inset:0; background: radial-gradient(90% 80% at 100% 100%, rgba(189,107,56,0.34), rgba(189,107,56,0) 55%); }
.hero-c__mega { font-family: var(--display); font-weight: 500; font-size: clamp(3.5rem,15vw,13rem); line-height: 0.82; letter-spacing: -0.03em; }
.hero-c__mega .outline { -webkit-text-stroke: 1.5px var(--copper-lite); color: transparent; }
.hero-c__row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; border-top: 1px solid rgba(244,239,230,0.18); padding-top: 1.6rem; margin-top: clamp(2rem,4vw,3rem); }

/* ============================================================
   CASE EXPLORER (variant D first screen)
   ============================================================ */
.explorer { padding-top: calc(84px + clamp(1.5rem,3vw,2.5rem)); padding-bottom: clamp(3rem,6vw,5rem); background: var(--paper); }
.explorer__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.explorer__title { font-size: clamp(2.2rem,4.5vw,3.6rem); }

.search {
  display: flex; align-items: center; gap: 0.8rem;
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0.9rem 1.4rem; background: var(--surface); max-width: 560px; width: 100%;
  transition: border-color 0.3s var(--ease);
}
.search:focus-within { border-color: var(--copper); }
.search svg { color: var(--text-soft); flex: none; }
.search input { border: 0; background: none; font-size: 1rem; width: 100%; color: var(--text); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--stone-400); }

.filter-rows { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.4rem; }
.filter-track { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.005em;
  padding: 0.55em 1em; border-radius: 100px;
  border: 1px solid var(--line); color: var(--text-soft);
  background: var(--surface); cursor: pointer; white-space: nowrap;
  transition: all 0.25s var(--ease);
}
.tag:hover { border-color: var(--stone-400); color: var(--text); }
.tag .tdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tag.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag.is-active .tdot { box-shadow: 0 0 0 2px rgba(244,239,230,0.25); }
/* material accent dots */
.tag[data-mat="copper"] .tdot { background: var(--copper); }
.tag[data-mat="zinc"] .tdot { background: var(--patina); }
.tag[data-mat="steel"] .tdot { background: var(--stone-400); }
.tag[data-mat="build"] .tdot { background: #8a6f4e; }
.tag[data-mat="drain"] .tdot { background: var(--copper-lite); }
.tag--allmat.is-active { background: var(--copper); border-color: var(--copper); }

.filter-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone-400); align-self: center; margin-right: 0.4rem; min-width: 92px; }
@media (max-width: 640px){ .filter-label { min-width: 0; width: 100%; margin-bottom: 0.1rem; } }

/* explorer grid */
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: clamp(2rem,4vw,3rem); }
@media (max-width: 920px){ .ex-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .ex-grid { grid-template-columns: 1fr; } }
.ex-card {
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column;
  transition: all 0.45s var(--ease);
}
.ex-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--line); }
.ex-card.hide { display: none; }
.ex-card__img { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.ex-card__img .ph { height: 100%; }
.ex-card__img .ph__inner { transition: transform 1s var(--ease); }
.ex-card:hover .ex-card__img .ph__inner { transform: scale(1.06); }
.ex-card__tags { position: absolute; top: 0.9rem; left: 0.9rem; display: flex; gap: 0.4rem; flex-wrap: wrap; z-index: 2; }
.minitag {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: 0.72rem; font-weight: 600; padding: 0.35em 0.7em; border-radius: 100px;
  background: rgba(244,239,230,0.92); backdrop-filter: blur(4px); color: var(--ink);
}
.minitag .tdot { width: 7px; height: 7px; border-radius: 50%; }
.minitag[data-mat="copper"] .tdot { background: var(--copper); }
.minitag[data-mat="zinc"] .tdot { background: var(--patina); }
.minitag[data-mat="steel"] .tdot { background: var(--stone-500); }
.minitag[data-mat="build"] .tdot { background: #8a6f4e; }
.minitag--type { background: rgba(26,22,17,0.72); color: var(--paper); }
.ex-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.ex-card__title { font-family: var(--display); font-weight: 500; font-size: 1.4rem; line-height: 1.1; }
.ex-card__desc { color: var(--text-soft); font-size: 0.92rem; margin-top: 0.6rem; }
.ex-card__meta { display: flex; gap: 1.2rem; margin-top: auto; padding-top: 1.1rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-soft); text-transform: uppercase; }
.ex-card__meta b { color: var(--copper); font-weight: 500; }
.ex-empty { grid-column: 1/-1; padding: 3rem; text-align: center; color: var(--text-soft); font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; display: none; }
.ex-empty.show { display: block; }
.ex-count { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-hero { background: var(--ink); color: var(--paper); padding-top: calc(84px + clamp(3rem,7vw,6rem)); padding-bottom: clamp(3rem,7vw,5.5rem); position: relative; overflow: hidden; }
.page-hero__tex { position:absolute; inset:0; background: radial-gradient(100% 120% at 90% 0%, rgba(189,107,56,0.22), rgba(189,107,56,0) 55%); }
.page-hero__inner { position: relative; z-index: 2; }
.page-hero__title { font-size: clamp(2.8rem,7vw,6rem); font-weight: 500; line-height: 0.98; letter-spacing: -0.02em; }
.crumb { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,239,230,0.55); display: flex; gap: 0.6rem; }
.crumb a:hover { color: var(--copper-lite); }
