:root {
  --bg: #090909;
  --surface: #121212;
  --text: #f7f5f2;
  --muted: #a6a19d;
  --accent: #8e063a;
  --line: rgba(255,255,255,.15);
  --page: min(1320px, calc(100vw - 72px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "Rubik", Arial, sans-serif; font-weight: 300; }
body.menu-open, body.lightbox-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 92px;
  display: grid; grid-template-columns: 180px 1fr auto; align-items: center;
  padding: 0 max(28px, 4vw); transition: background .35s, height .35s;
}
.site-header.scrolled { height: 72px; background: rgba(9,9,9,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.brand img { width: 138px; height: auto; }
.site-nav { justify-self: center; display: flex; gap: 34px; text-transform: uppercase; font-size: .78rem; letter-spacing: .14em; }
.site-nav a { position: relative; padding: 8px 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent); transition: right .25s; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.language-switcher { display: flex; align-items: center; gap: 7px; font-size: .76rem; letter-spacing: .12em; }
.language-switcher button { padding: 6px 2px; color: var(--muted); border: 0; background: none; cursor: pointer; }
.language-switcher button[aria-pressed="true"] { color: white; }
.menu-button { display: none; }

.hero { min-height: 100svh; position: relative; display: flex; align-items: flex-end; overflow: hidden; }
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; filter: saturate(.72) contrast(1.04); transform: scale(1.02); animation: heroIn 1.7s ease both; }
.hero-shade { background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.1) 68%), linear-gradient(0deg, rgba(0,0,0,.6), transparent 48%); }
.hero-content { position: relative; z-index: 2; width: var(--page); margin: 0 auto; padding: 180px 0 12vh; }
.eyebrow, .kicker { margin: 0 0 20px; color: #d9d4ce; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 500; }
.hero h1 { max-width: 800px; margin: 0; font-size: clamp(4.4rem, 10vw, 10rem); line-height: .84; letter-spacing: -.065em; text-transform: uppercase; font-weight: 400; }
.hero-content > p:not(.eyebrow) { max-width: 490px; margin: 30px 0 0; font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.6; }
.round-link { display: grid; place-items: center; width: 72px; height: 72px; margin-top: 36px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-size: 1.7rem; transition: .25s; }
.round-link:hover { background: var(--accent); border-color: var(--accent); transform: rotate(45deg); }
.scroll-cue { position: absolute; right: max(28px,4vw); bottom: 40px; z-index: 2; display: flex; gap: 18px; align-items: center; text-transform: uppercase; font-size: .65rem; letter-spacing: .16em; }
.scroll-cue i { display: block; width: 56px; height: 1px; background: white; }

.section { width: var(--page); margin: 0 auto; padding: 150px 0; }
.split, .services, .portfolio, .feature-projects, .partners { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 4fr); gap: 7vw; }
.section-index { align-self: start; position: sticky; top: 110px; display: flex; align-items: center; gap: 18px; text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; color: var(--muted); }
.section-index span { color: var(--accent); }
.section-index p { margin: 0; }
.section-copy h2, .statement h2, .contact h2 { margin: 0; font-size: clamp(2.8rem, 5.5vw, 6.5rem); line-height: .98; letter-spacing: -.045em; font-weight: 400; text-wrap: balance; }
.lead, .statement-copy > p:last-child { max-width: 900px; margin: 46px 0 0; font-size: clamp(1.15rem, 1.8vw, 1.55rem); line-height: 1.65; color: #d5d1cd; }

.services { border-top: 1px solid var(--line); }
.accordion { margin-top: 58px; border-top: 1px solid var(--line); }
.service-item { border-bottom: 1px solid var(--line); }
.service-trigger { width: 100%; display: grid; grid-template-columns: 48px 1fr 36px; gap: 20px; align-items: center; padding: 28px 0; color: white; background: none; border: 0; text-align: left; cursor: pointer; }
.service-trigger .num { color: var(--accent); font-size: .7rem; }
.service-trigger .title { font-size: clamp(1.2rem, 2vw, 1.75rem); }
.service-trigger .icon { font-size: 1.8rem; transition: transform .25s; }
.service-item.open .icon { transform: rotate(45deg); }
.service-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.service-panel > div { overflow: hidden; }
.service-panel p { max-width: 790px; margin: 0 0 34px 68px; color: var(--muted); line-height: 1.75; }
.service-item.open .service-panel { grid-template-rows: 1fr; }

.statement { min-height: 88vh; position: relative; display: grid; align-items: end; overflow: hidden; }
.statement > img, .statement-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.statement > img { object-fit: cover; }
.statement-shade { background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.08) 70%); }
.statement-copy { position: relative; z-index: 1; width: var(--page); margin: 0 auto; padding: 120px 0 10vh; }
.statement-copy h2 { max-width: 1000px; }
.statement-copy > p:last-child { max-width: 700px; margin-top: 34px; }

.portfolio { border-top: 1px solid var(--line); }
.portfolio-copy { margin-bottom: 70px; }
.project-list { grid-column: 1 / -1; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project { background: var(--bg); display: grid; grid-template-columns: minmax(270px, 31%) 1fr; min-height: 540px; }
.project-info { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px,4vw,60px); }
.project-count { color: var(--accent); font-size: .72rem; letter-spacing: .12em; }
.project h3 { margin: 28px 0 8px; font-size: clamp(1.8rem,3vw,3.4rem); line-height: 1; font-weight: 400; }
.project-designer { margin: 0; color: var(--muted); }
.project-open { align-self: flex-start; margin-top: 30px; padding: 0 0 7px; color: white; background: none; border: 0; border-bottom: 1px solid var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; cursor: pointer; }
.project-gallery { min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(68%, 720px); gap: 8px; padding: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--accent) var(--surface); }
.project-gallery button { height: 524px; padding: 0; border: 0; background: #171717; cursor: zoom-in; scroll-snap-align: start; overflow: hidden; }
.project-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-gallery button:hover img { transform: scale(1.025); }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feature-card { position: relative; min-height: 630px; overflow: hidden; }
.feature-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.78), transparent 65%); }
.feature-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.feature-card:hover img { transform: scale(1.035); }
.feature-card > div { position: absolute; z-index: 2; left: 40px; right: 40px; bottom: 38px; }
.feature-card p { color: var(--accent); font-size: .72rem; }
.feature-card h3 { margin: 10px 0 24px; font-size: clamp(2rem,4vw,4rem); font-weight: 400; }
.feature-card button { padding: 0 0 7px; color: white; background: none; border: 0; border-bottom: 1px solid white; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; cursor: pointer; }

.partners { border-top: 1px solid var(--line); }
.partner-mark { margin-top: 60px; border: 1px solid var(--line); padding: 8vw 3vw; color: rgba(255,255,255,.22); text-align: center; font-size: clamp(3rem,11vw,10rem); letter-spacing: -.07em; }

.contact { min-height: 82vh; display: grid; grid-template-columns: 1fr 1fr; background: #0e0e0e; }
.contact-image { background: linear-gradient(rgba(0,0,0,.18),rgba(0,0,0,.18)), url("assets/original/ЖК-Михалковский-8.jpg") center/cover; }
.contact-content { display: flex; flex-direction: column; justify-content: center; padding: 9vw 6vw; }
.contact-content h2 { max-width: 700px; }
.email-link { align-self: flex-start; margin-top: 55px; font-size: clamp(1.15rem,2vw,2rem); border-bottom: 1px solid var(--accent); padding-bottom: 6px; }
.phone-list { display: flex; flex-direction: column; gap: 8px; margin-top: 30px; color: var(--muted); }

.site-footer { width: var(--page); min-height: 120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: var(--muted); font-size: .78rem; }
.site-footer div { display: flex; gap: 24px; }
.site-footer a:hover { color: white; }
.error-page { min-height: 100svh; display: grid; place-content: center; justify-items: start; gap: 24px; padding: 30px; }
.error-page h1 { margin: 0; font-size: clamp(3rem,9vw,8rem); font-weight: 400; letter-spacing: -.06em; }

.lightbox { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; color: white; background: rgba(0,0,0,.96); }
.lightbox::backdrop { background: rgba(0,0,0,.96); }
.lightbox[open] { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; }
.lightbox figure { width: min(1200px, calc(100vw - 170px)); height: calc(100vh - 100px); margin: 0 auto; display: grid; grid-template-rows: 1fr auto; gap: 16px; }
.lightbox figure img { width: 100%; height: 100%; object-fit: contain; }
.lightbox figcaption { text-align: center; color: var(--muted); font-size: .8rem; }
.lightbox-close, .lightbox-nav { color: white; background: transparent; border: 0; cursor: pointer; }
.lightbox-close { position: fixed; z-index: 2; top: 22px; right: 28px; font-size: 2rem; }
.lightbox-nav { font-size: 1.7rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes heroIn { from { opacity: .45; transform: scale(1.08); } to { opacity: 1; transform: scale(1.02); } }

@media (max-width: 900px) {
  :root { --page: min(100% - 38px, 1320px); }
  .site-header { height: 72px; grid-template-columns: 1fr auto auto; gap: 20px; padding: 0 20px; }
  .brand img { width: 112px; }
  .menu-button { display: grid; gap: 6px; width: 38px; padding: 10px 7px; background: none; border: 0; }
  .menu-button span:not(.sr-only) { display: block; width: 24px; height: 1px; background: white; transition: transform .25s; }
  .menu-open .menu-button span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-open .menu-button span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 72px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: rgba(9,9,9,.98); transform: translateX(100%); transition: transform .35s; }
  .menu-open .site-nav { transform: translateX(0); }
  .site-nav a { font-size: 1.3rem; }
  .hero h1 { font-size: clamp(3.5rem,17vw,6.5rem); }
  .scroll-cue { display: none; }
  .section { padding: 92px 0; }
  .split, .services, .portfolio, .feature-projects, .partners { grid-template-columns: 1fr; gap: 38px; }
  .section-index { position: static; }
  .project-list { grid-column: auto; }
  .project { grid-template-columns: 1fr; min-height: auto; }
  .project-info { min-height: 260px; }
  .project-gallery { grid-auto-columns: 84%; }
  .project-gallery button { height: 66vw; max-height: 520px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 520px; }
  .contact { grid-template-columns: 1fr; }
  .contact-image { min-height: 62vw; }
  .contact-content { padding: 90px 20px; }
  .site-footer { padding: 32px 0; align-items: flex-start; flex-direction: column; }
  .site-footer div { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .language-switcher span { display: none; }
  .language-switcher { gap: 3px; }
  .hero-content { padding-bottom: 70px; }
  .hero-content > p:not(.eyebrow) { font-size: .98rem; }
  .round-link { width: 58px; height: 58px; }
  .service-panel p { margin-left: 0; }
  .feature-card { min-height: 450px; }
  .feature-card > div { left: 24px; right: 24px; bottom: 24px; }
  .lightbox[open] { grid-template-columns: 46px 1fr 46px; }
  .lightbox figure { width: calc(100vw - 92px); height: calc(100vh - 90px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
