@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&family=Playfair+Display:ital,wght@0,500;1,500&display=swap');

:root {
  --paper: #f4f2ed;
  --paper-2: #ebe7df;
  --ink: #171716;
  --muted: #77736c;
  --line: rgba(23, 23, 22, .13);
  --white: #fff;
  --accent: #796a55;
  --dark: #191a18;
  --radius: 28px;
  --max: 1440px;
  --shadow: 0 30px 80px rgba(25, 26, 24, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button, input, textarea { font: inherit; }
::selection { background: #222; color: #fff; }

.container { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.eyebrow { margin: 0 0 18px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.display { margin: 0; font-size: clamp(54px, 8vw, 132px); line-height: .88; letter-spacing: -.065em; font-weight: 500; }
.display em { font-family: 'Playfair Display', serif; font-weight: 500; letter-spacing: -.045em; }
.section-title { margin: 0; font-size: clamp(38px, 5vw, 76px); line-height: .98; letter-spacing: -.05em; font-weight: 500; }
.lead { max-width: 760px; font-size: clamp(20px, 2.2vw, 34px); line-height: 1.25; letter-spacing: -.03em; color: #3f3e3a; }
.copy { color: var(--muted); line-height: 1.7; font-size: 15px; }

.header {
  position: fixed; z-index: 100; top: 0; left: 0; right: 0;
  height: 78px; display: flex; align-items: center;
  background: rgba(244, 242, 237, .78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: .35s ease;
}
.header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }
.brand { font-size: 18px; font-weight: 600; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { font-size: 13px; color: #353531; transition: color .2s; }
.nav a:hover, .nav a.active { color: #000; }
.header-action { justify-self: end; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.header-action::after { content: '↗'; font-size: 15px; }
.menu-button { display: none; justify-self: end; background: none; border: 0; padding: 8px 0 8px 8px; }
.menu-button span { display: block; width: 26px; height: 1px; background: var(--ink); margin: 6px 0; transition: .3s; }
.mobile-nav { display: none; }

.hero { min-height: 100svh; padding: 150px 0 36px; display: flex; flex-direction: column; }
.hero.hero-text-only { min-height: auto; padding-bottom: 96px; }
.hero.hero-text-only .hero-top { margin-bottom: 0; }
.hero-top { display: flex; justify-content: space-between; gap: 40px; align-items: flex-end; margin-bottom: 36px; }
.hero-note { max-width: 315px; padding-bottom: 8px; color: var(--muted); line-height: 1.55; font-size: 13px; }
.hero-media { position: relative; flex: 1; min-height: 420px; overflow: hidden; border-radius: var(--radius); background: #ddd; }
.hero-media img { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.hero-media:hover img { transform: scale(1.025); }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.38)); }
.hero-caption { position: absolute; z-index: 2; left: 34px; right: 34px; bottom: 30px; display: flex; justify-content: space-between; align-items: flex-end; color: white; }
.hero-caption strong { font-size: 22px; font-weight: 500; }
.hero-caption span { font-size: 12px; opacity: .78; }

.section { padding: 140px 0; }
.section.compact { padding: 90px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 58px; }
.section-head .copy { max-width: 390px; }
.link-arrow { display: inline-flex; gap: 14px; align-items: center; font-size: 13px; padding-bottom: 7px; border-bottom: 1px solid var(--ink); }
.link-arrow::after { content: '↗'; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 28px 34px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(40px, 4vw, 68px); line-height: 1; letter-spacing: -.055em; font-weight: 500; }
.stat span { display: block; margin-top: 11px; font-size: 12px; color: var(--muted); }

.projects-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; }
.project-card { position: relative; min-height: 640px; overflow: hidden; border-radius: var(--radius); background: #ddd; }
.project-card.small { min-height: 520px; }
.project-card img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.project-card:hover img { transform: scale(1.035); }
.project-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.01), rgba(0,0,0,.54)); }
.project-card-content { position: absolute; z-index: 2; left: 30px; right: 30px; bottom: 28px; color: white; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.project-card h3 { margin: 0 0 8px; font-size: 27px; font-weight: 500; letter-spacing: -.04em; }
.project-card p { margin: 0; font-size: 12px; opacity: .78; }
.card-arrow { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }

.feature-band { background: var(--dark); color: white; }
.feature-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: start; }
.feature-grid .eyebrow, .feature-grid .copy { color: rgba(255,255,255,.55); }
.feature-list { border-top: 1px solid rgba(255,255,255,.18); }
.feature-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 20px; align-items: center; padding: 27px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.feature-row span { font-size: 12px; color: rgba(255,255,255,.42); }
.feature-row strong { font-size: 19px; font-weight: 500; }
.feature-row b { font-weight: 400; font-size: 18px; }

.quote-section { padding: 160px 0; text-align: center; }
.quote { max-width: 1030px; margin: 0 auto; font-size: clamp(34px, 4.5vw, 70px); line-height: 1.04; letter-spacing: -.05em; font-weight: 500; }
.quote em { font-family: 'Playfair Display', serif; font-weight: 500; }
.quote-meta { margin-top: 28px; font-size: 12px; color: var(--muted); }

.cta { padding: 0 0 36px; }
.cta-box { min-height: 500px; background: var(--paper-2); border-radius: var(--radius); padding: 54px; display: flex; flex-direction: column; justify-content: space-between; }
.cta-box h2 { max-width: 930px; margin: 0; font-size: clamp(46px, 6vw, 90px); line-height: .94; letter-spacing: -.06em; font-weight: 500; }
.cta-bottom { display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.cta-bottom p { max-width: 420px; margin: 0; color: var(--muted); line-height: 1.6; }
.round-link { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: white; font-size: 22px; transition: transform .25s; }
.round-link:hover { transform: scale(1.06); }

.page-hero { padding: 180px 0 100px; }
.page-hero .display { max-width: 1200px; }
.page-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 70px; align-items: end; }
.page-intro .lead { margin: 0; }
.page-intro .copy { max-width: 520px; justify-self: end; margin: 0; }
.full-image { height: min(70vw, 820px); min-height: 520px; margin-top: 30px; overflow: hidden; border-radius: var(--radius); }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card { min-height: 330px; padding: 30px; background: #ebe8e1; border-radius: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.value-card span { font-size: 12px; color: var(--muted); }
.value-card h3 { margin: 0; max-width: 280px; font-size: 28px; line-height: 1.08; letter-spacing: -.04em; font-weight: 500; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn { border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; background: transparent; cursor: pointer; font-size: 12px; transition: .25s; }
.filter-btn:hover, .filter-btn.active { background: var(--ink); color: white; }
.portfolio { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.portfolio-card { transition: opacity .25s, transform .25s; }
.portfolio-card.hidden { display: none; }
.portfolio-media { height: 540px; overflow: hidden; border-radius: 22px; background: #ddd; }
.portfolio-media img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.portfolio-card:hover img { transform: scale(1.025); }
.portfolio-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 16px; }
.portfolio-meta h3 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.03em; }
.portfolio-meta p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.portfolio-meta span { font-size: 12px; color: var(--muted); }

.services-list { border-top: 1px solid var(--line); }
.service-item { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 32px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.service-num { color: var(--muted); font-size: 12px; padding-top: 8px; }
.service-item h3 { margin: 0; font-size: clamp(26px, 3vw, 44px); line-height: 1; letter-spacing: -.045em; font-weight: 500; }
.service-item p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.service-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.service-tags span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-size: 11px; color: var(--muted); }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.person-card { margin-bottom: 28px; }
.person-photo { aspect-ratio: .78; overflow: hidden; border-radius: 20px; background: #ddd; }
.person-photo img { filter: saturate(.72); transition: .55s; }
.person-card:hover img { transform: scale(1.02); filter: saturate(1); }
.person-card h3 { margin: 14px 0 4px; font-size: 17px; font-weight: 500; }
.person-card p { margin: 0; color: var(--muted); font-size: 12px; }

.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.contact-details { display: grid; gap: 34px; }
.contact-line { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.contact-line span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.contact-line a, .contact-line p { margin: 0; font-size: clamp(22px, 2vw, 31px); letter-spacing: -.035em; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 0; background: transparent; outline: none; color: var(--ink); }
textarea.field { min-height: 130px; resize: vertical; }
.field:focus { border-bottom-color: var(--ink); }
.submit { justify-self: start; margin-top: 18px; border: 0; background: var(--ink); color: white; padding: 15px 22px; border-radius: 999px; cursor: pointer; }
.form-note { font-size: 11px; color: var(--muted); line-height: 1.5; max-width: 420px; }
.form-status { font-size: 12px; min-height: 18px; }
.map-placeholder { margin-top: 80px; min-height: 430px; border-radius: var(--radius); overflow: hidden; position: relative; background: #d4d1ca; }
.map-placeholder img { filter: grayscale(1); opacity: .72; }
.map-label { position: absolute; left: 28px; bottom: 28px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); border-radius: 14px; padding: 17px 20px; font-size: 12px; line-height: 1.5; }

.footer { padding: 52px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr .6fr .6fr; gap: 50px; padding: 36px 0 70px; border-top: 1px solid var(--line); }
.footer-brand { font-size: clamp(28px, 3vw, 46px); letter-spacing: -.05em; font-weight: 500; }
.footer-col span { display: block; margin-bottom: 16px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.footer-col a { display: block; width: fit-content; margin: 10px 0; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav, .header-action { display: none; }
  .menu-button { display: block; }
  .mobile-nav { display: flex; position: fixed; z-index: 90; inset: 0; padding: 120px 24px 36px; background: var(--paper); flex-direction: column; justify-content: space-between; transform: translateY(-100%); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
  .menu-open .mobile-nav { transform: none; }
  .mobile-nav-links { display: grid; }
  .mobile-nav-links a { padding: 12px 0; font-size: 36px; line-height: 1; letter-spacing: -.05em; }
  .mobile-nav-meta { color: var(--muted); font-size: 13px; line-height: 1.6; }
  .menu-open .menu-button span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-open .menu-button span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .hero-top, .section-head { align-items: start; flex-direction: column; }
  .hero-note { max-width: 480px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .projects-grid, .feature-grid, .page-intro, .contact-grid { grid-template-columns: 1fr; }
  .feature-grid { gap: 50px; }
  .page-intro { gap: 28px; }
  .page-intro .copy { justify-self: start; }
  .values-grid { grid-template-columns: 1fr; }
  .portfolio { grid-template-columns: 1fr; }
  .portfolio-media { height: 62vw; min-height: 400px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .service-item { grid-template-columns: 60px 1fr; }
  .service-item > div:last-child { grid-column: 2; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container, .header-inner { width: min(calc(100% - 28px), var(--max)); }
  .header { height: 68px; }
  .hero { padding-top: 118px; }
  .display { font-size: clamp(48px, 17vw, 78px); }
  .hero-media { min-height: 490px; border-radius: 20px; }
  .hero-caption { left: 20px; right: 20px; bottom: 20px; }
  .hero-caption { align-items: start; flex-direction: column; gap: 15px; }
  .section { padding: 95px 0; }
  .section.compact { padding: 70px 0; }
  .section-title { font-size: 45px; }
  .lead { font-size: 24px; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat, .stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding: 25px 0; }
  .stat:first-child { border-top: 0; }
  .project-card, .project-card.small { min-height: 520px; border-radius: 20px; }
  .projects-grid { gap: 14px; }
  .feature-row { grid-template-columns: 36px 1fr auto; }
  .quote-section { padding: 110px 0; }
  .cta-box { min-height: 480px; padding: 28px 22px; border-radius: 20px; }
  .cta-bottom { align-items: start; flex-direction: column; }
  .page-hero { padding: 135px 0 75px; }
  .full-image { min-height: 520px; border-radius: 20px; }
  .portfolio-media { min-height: 480px; height: 120vw; border-radius: 18px; }
  .service-item { grid-template-columns: 36px 1fr; gap: 20px; padding: 30px 0; }
  .team-grid { grid-template-columns: 1fr; }
  .person-photo { aspect-ratio: .9; }
  .contact-grid { gap: 65px; }
  .form-row { grid-template-columns: 1fr; }
  .map-placeholder { min-height: 460px; border-radius: 20px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-top > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

/* Project detail pages */
.portfolio-card { display: block; color: inherit; }
.portfolio-card:focus-visible, .project-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; border-radius: 22px; }
.portfolio-media { position: relative; }
.portfolio-media::after { content: 'Открыть проект ↗'; position: absolute; right: 18px; bottom: 18px; padding: 10px 13px; border-radius: 999px; background: rgba(244,242,237,.9); color: var(--ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 11px; opacity: 0; transform: translateY(8px); transition: .3s ease; }
.portfolio-card:hover .portfolio-media::after { opacity: 1; transform: none; }

.project-detail-hero { padding: 155px 0 34px; }
.project-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 54px; color: var(--muted); font-size: 12px; }
.project-back::before { content: '←'; color: var(--ink); }
.project-detail-head { display: grid; grid-template-columns: 1.35fr .65fr; gap: 60px; align-items: end; }
.project-detail-title { margin: 0; max-width: 980px; font-size: clamp(54px, 8vw, 126px); line-height: .9; letter-spacing: -.065em; font-weight: 500; }
.project-detail-title em { font-family: 'Playfair Display', serif; font-weight: 500; }
.project-detail-lead { max-width: 430px; justify-self: end; margin: 0 0 10px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.project-cover { height: min(68vw, 900px); min-height: 560px; margin-top: 46px; overflow: hidden; border-radius: var(--radius); background: #ddd; }
.project-cover img { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.project-cover:hover img { transform: scale(1.018); }
.project-specs { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-spec { padding: 26px 24px 26px 0; }
.project-spec + .project-spec { padding-left: 24px; border-left: 1px solid var(--line); }
.project-spec span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.project-spec strong { font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.project-story { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; align-items: start; }
.project-story h2 { position: sticky; top: 120px; margin: 0; font-size: clamp(38px, 4.5vw, 68px); line-height: 1; letter-spacing: -.05em; font-weight: 500; }
.project-story-copy { display: grid; gap: 28px; }
.project-story-copy p { margin: 0; color: #55524d; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.55; letter-spacing: -.025em; }
.project-story-copy p + p { color: var(--muted); font-size: 15px; line-height: 1.75; letter-spacing: 0; }
.project-gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.project-gallery figure { margin: 0; overflow: hidden; border-radius: 22px; background: #ddd; }
.project-gallery figure:nth-child(1) { grid-column: span 7; aspect-ratio: 1.28; }
.project-gallery figure:nth-child(2) { grid-column: span 5; aspect-ratio: .92; }
.project-gallery figure:nth-child(3) { grid-column: span 5; aspect-ratio: .92; }
.project-gallery figure:nth-child(4) { grid-column: span 7; aspect-ratio: 1.28; }
.project-gallery img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.project-gallery figure:hover img { transform: scale(1.025); }
.project-next { display: block; padding: 42px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-next-label { display: block; margin-bottom: 15px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.project-next-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.project-next strong { font-size: clamp(34px, 5vw, 72px); line-height: 1; letter-spacing: -.055em; font-weight: 500; }
.project-next-arrow { width: 70px; height: 70px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; transition: .25s ease; }
.project-next:hover .project-next-arrow { background: var(--ink); color: white; transform: rotate(45deg); }

@media (max-width: 980px) {
  .project-detail-head, .project-story { grid-template-columns: 1fr; }
  .project-detail-lead { justify-self: start; max-width: 620px; }
  .project-specs { grid-template-columns: 1fr 1fr; }
  .project-spec:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .project-spec:nth-child(4) { border-top: 1px solid var(--line); }
  .project-story { gap: 42px; }
  .project-story h2 { position: static; }
}

@media (max-width: 640px) {
  .portfolio-media::after { opacity: 1; transform: none; right: 12px; bottom: 12px; }
  .project-detail-hero { padding: 118px 0 24px; }
  .project-back { margin-bottom: 34px; }
  .project-detail-title { font-size: clamp(50px, 16vw, 76px); }
  .project-cover { min-height: 520px; height: 126vw; margin-top: 32px; border-radius: 20px; }
  .project-specs { grid-template-columns: 1fr; }
  .project-spec, .project-spec + .project-spec, .project-spec:nth-child(3) { padding: 21px 0; border-left: 0; border-top: 1px solid var(--line); }
  .project-spec:first-child { border-top: 0; }
  .project-gallery { grid-template-columns: 1fr; gap: 12px; }
  .project-gallery figure:nth-child(n) { grid-column: auto; aspect-ratio: .86; border-radius: 18px; }
  .project-gallery figure:nth-child(1), .project-gallery figure:nth-child(4) { aspect-ratio: 1.05; }
  .project-next-arrow { width: 56px; height: 56px; }
}

/* Interactive project photo lightbox */
.zoomable-photo { cursor: zoom-in; }
.zoomable-photo:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
body.lightbox-open, body.person-modal-open { overflow: hidden; }
.photo-lightbox[hidden], .person-modal[hidden] { display: none !important; }
.photo-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.photo-lightbox-backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.photo-lightbox-stage { position: relative; z-index: 1; width: min(1380px, 96vw); height: min(880px, 90vh); display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.photo-lightbox-figure { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.photo-lightbox-image { width: auto; height: auto; max-width: 100%; max-height: calc(90vh - 72px); object-fit: contain; border-radius: 16px; box-shadow: 0 28px 90px rgba(0,0,0,.34); }
.photo-lightbox-caption { min-height: 18px; color: rgba(255,255,255,.72); font-size: 12px; text-align: center; }
.photo-lightbox-close, .photo-lightbox-nav { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.photo-lightbox-close:hover, .photo-lightbox-nav:hover { background: rgba(255,255,255,.2); }
.photo-lightbox-close:focus-visible, .photo-lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.photo-lightbox-close { position: absolute; top: 0; right: 0; z-index: 3; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; }
.photo-lightbox-nav { width: 54px; height: 54px; border-radius: 50%; font-size: 22px; display: grid; place-items: center; }
.photo-lightbox-prev { grid-column: 1; grid-row: 1; justify-self: start; }
.photo-lightbox-next { grid-column: 3; grid-row: 1; justify-self: end; }
.photo-lightbox-counter { grid-column: 2; grid-row: 2; justify-self: center; color: rgba(255,255,255,.72); font-size: 12px; letter-spacing: .08em; }

/* Team profile cards */
.person-card.interactive { cursor: pointer; }
.person-card.interactive:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 22px; }
.person-more { display: inline-flex; margin-top: 12px; color: var(--muted); font-size: 11px; transition: color .2s ease, transform .2s ease; }
.person-card.interactive:hover .person-more { color: var(--ink); transform: translateX(2px); }
.person-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 28px; }
.person-modal-backdrop { position: absolute; inset: 0; background: rgba(12,12,12,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.person-modal-panel { position: relative; z-index: 1; width: min(980px, 94vw); max-height: 90vh; overflow: auto; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr); background: var(--paper); border-radius: 28px; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.person-modal-photo { min-height: 560px; background: #ddd; }
.person-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-modal-content { padding: clamp(34px, 5vw, 72px); align-self: center; }
.person-modal-kicker { margin-bottom: 20px; }
.person-modal-content h2 { margin: 0; font-size: clamp(38px, 5vw, 68px); line-height: .95; letter-spacing: -.055em; font-weight: 500; }
.person-modal-role { margin: 18px 0 0; color: var(--muted); font-size: 16px; }
.person-modal-info { display: grid; gap: 24px; margin-top: 44px; }
.person-modal-info section { padding-top: 20px; border-top: 1px solid var(--line); }
.person-modal-info section span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.person-modal-info section p { margin: 0; color: #55524d; font-size: 15px; line-height: 1.7; }
.person-modal-close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: rgba(244,242,237,.86); color: var(--ink); font-size: 25px; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.person-modal-close:hover { background: var(--ink); color: white; }
.person-modal-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 720px) {
  .photo-lightbox { padding: 12px; }
  .photo-lightbox-stage { width: 100%; height: 86vh; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 5px; }
  .photo-lightbox-image { max-height: calc(86vh - 82px); border-radius: 12px; }
  .photo-lightbox-nav { width: 46px; height: 46px; font-size: 20px; }
  .photo-lightbox-close { width: 44px; height: 44px; top: 6px; right: 6px; }
  .photo-lightbox-caption { max-width: 82%; }
  .person-modal { padding: 12px; align-items: start; overflow-y: auto; }
  .person-modal-panel { width: 100%; max-height: none; grid-template-columns: 1fr; border-radius: 20px; overflow: visible; }
  .person-modal-photo { min-height: 0; aspect-ratio: .86; border-radius: 20px 20px 0 0; overflow: hidden; }
  .person-modal-content { padding: 30px 24px 36px; }
  .person-modal-info { margin-top: 30px; }
}


/* Project cards open a dedicated page; each object's photos stay isolated. */
.portfolio-address { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.portfolio-address > span { color: var(--ink); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.gallery-open-button { margin-top: 18px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.gallery-open-button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery-open-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.gallery-open-button span { font-size: 17px; line-height: 1; }
@media (max-width: 700px) {
  .gallery-open-button { width: 100%; }
}


/* ==========================================================================\n   Responsive production hardening · phone / iPad / tablet / desktop\n   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  min-width: 0;
  overflow-x: clip;
}
img, video, svg { max-width: 100%; }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
button, .filter-btn, .submit, .round-link, .gallery-open-button, .menu-button { touch-action: manipulation; }
.contact-line p, .contact-line a, .map-label, .footer-col a,
.person-card h3, .person-card p, .project-spec strong, .portfolio-meta h3, .portfolio-meta p {
  overflow-wrap: anywhere;
}

/* Comfortable intermediate desktop/tablet width. */
@media (max-width: 1240px) {
  .container, .header-inner { width: min(calc(100% - 40px), var(--max)); }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-card { min-height: 560px; }
  .project-card.small { min-height: 480px; }
}

/* iPad landscape, iPad Pro portrait and compact laptops: use touch-friendly menu. */
@media (max-width: 1100px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav, .header-action { display: none; }
  .menu-button {
    display: block;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    z-index: 90;
    inset: 0;
    padding: calc(112px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    background: var(--paper);
    flex-direction: column;
    justify-content: space-between;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility .45s;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .menu-open .mobile-nav { transform: none; visibility: visible; }
  .mobile-nav-links { display: grid; }
  .mobile-nav-links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 9px 0;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.02;
    letter-spacing: -.05em;
  }
  .mobile-nav-meta { color: var(--muted); font-size: 13px; line-height: 1.65; }
  .menu-open .menu-button span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-open .menu-button span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .hero-top, .section-head { align-items: flex-start; flex-direction: column; }
  .hero-note { max-width: 560px; }
  .projects-grid, .feature-grid, .page-intro, .contact-grid,
  .project-detail-head, .project-story { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { gap: 48px; }
  .page-intro { gap: 30px; }
  .page-intro .copy, .project-detail-lead { justify-self: start; }
  .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .portfolio-media { height: auto; min-height: 0; aspect-ratio: 1 / 1.05; }
  .service-item { grid-template-columns: 60px minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { gap: 64px; }
  .project-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-spec:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .project-spec:nth-child(4) { border-top: 1px solid var(--line); }
  .project-story { gap: 42px; }
  .project-story h2 { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
}

/* Tablet portrait / iPad mini / larger phones. */
@media (max-width: 820px) {
  .container, .header-inner { width: min(calc(100% - 32px), var(--max)); }
  .header { height: 72px; }
  .hero { min-height: auto; padding: 126px 0 28px; }
  .hero.hero-text-only { padding-bottom: 72px; }
  .hero-media { min-height: 0; height: auto; aspect-ratio: 4 / 5; }
  .display { font-size: clamp(52px, 12vw, 88px); }
  .section { padding: 104px 0; }
  .section.compact { padding: 72px 0; }
  .page-hero { padding: 138px 0 76px; }
  .full-image { height: auto; min-height: 0; aspect-ratio: 4 / 5; }
  .values-grid { grid-template-columns: minmax(0, 1fr); }
  .portfolio { grid-template-columns: minmax(0, 1fr); }
  .portfolio-media { aspect-ratio: 4 / 3; }
  .service-item { grid-template-columns: 44px minmax(0, 1fr); }
  .service-item > div:last-child { grid-column: 2; }
  .project-cover { height: auto; min-height: 0; aspect-ratio: 4 / 5; }
  .project-gallery { gap: 14px; }
  .person-modal { padding: 16px; align-items: start; overflow-y: auto; }
  .person-modal-panel { width: 100%; max-height: none; grid-template-columns: 1fr; border-radius: 22px; overflow: hidden; }
  .person-modal-photo { min-height: 0; aspect-ratio: 1 / .92; }
  .person-modal-content { padding: 34px 28px 40px; }
  .person-modal-close { position: fixed; top: calc(18px + env(safe-area-inset-top)); right: 24px; }
  .photo-lightbox-stage { height: min(88svh, 880px); }
  .photo-lightbox-image { max-height: calc(88svh - 80px); }

  /* Visioner page follows the same responsive rhythm. */
  .visioner-title-row { display: block !important; }
  .visioner-address { margin-top: 24px; min-width: 0 !important; }
  .visioner-main-image img { height: auto !important; aspect-ratio: 4 / 5; }
  .visioner-gallery { grid-template-columns: 1fr !important; }
}

/* Phones. */
@media (max-width: 640px) {
  .container, .header-inner { width: min(calc(100% - 28px), var(--max)); }
  .mobile-nav { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .display { font-size: clamp(47px, 16vw, 74px); }
  .section-title { font-size: clamp(39px, 12vw, 48px); }
  .lead { font-size: clamp(21px, 6.2vw, 25px); }
  .hero-top { gap: 24px; }
  .hero-media { aspect-ratio: .86; border-radius: 20px; }
  .section { padding: 88px 0; }
  .section.compact { padding: 64px 0; }
  .section-head { margin-bottom: 38px; }
  .quote-section { padding: 98px 0; }
  .quote { font-size: clamp(31px, 10vw, 46px); }
  .cta-box { min-height: 440px; padding: 27px 22px; }
  .cta-box h2 { font-size: clamp(43px, 13vw, 62px); }
  .round-link { width: 68px; height: 68px; min-width: 68px; }
  .page-hero { padding: 124px 0 68px; }
  .page-intro { margin-top: 48px; }
  .portfolio-media { aspect-ratio: .86; }
  .portfolio-meta { align-items: flex-start; }
  .portfolio-meta > span { flex: 0 0 auto; }
  .service-item { gap: 16px; }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .person-photo { aspect-ratio: .86; }
  .form-row { grid-template-columns: 1fr; }
  .field { font-size: 16px; }
  .submit { min-height: 48px; padding-inline: 24px; }
  .map-placeholder { min-height: 380px; }
  .map-label { left: 14px; right: 14px; bottom: 14px; padding: 15px 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 38px; padding-bottom: 48px; }
  .footer-top > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .project-detail-hero { padding: 112px 0 24px; }
  .project-detail-title { font-size: clamp(48px, 15vw, 72px); }
  .project-specs { grid-template-columns: 1fr; }
  .project-spec, .project-spec + .project-spec, .project-spec:nth-child(3), .project-spec:nth-child(4) {
    padding: 20px 0; border-left: 0; border-top: 1px solid var(--line);
  }
  .project-spec:first-child { border-top: 0; }
  .project-gallery { grid-template-columns: 1fr; gap: 12px; }
  .project-gallery figure:nth-child(n) { grid-column: auto; aspect-ratio: .9; }
  .project-gallery figure:nth-child(1), .project-gallery figure:nth-child(4) { aspect-ratio: 1.05; }
  .photo-lightbox { padding: 10px; }
  .photo-lightbox-stage { width: 100%; height: 86svh; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 4px; }
  .photo-lightbox-image { max-height: calc(86svh - 76px); }
  .photo-lightbox-nav { width: 44px; height: 44px; }
  .person-modal-content h2 { font-size: clamp(36px, 11vw, 50px); }

  .visioner-lightbox figure { max-width: calc(100% - 20px) !important; }
  .visioner-lightbox figure img { max-height: 76svh !important; }
  .visioner-lb-close { top: calc(12px + env(safe-area-inset-top)) !important; right: 12px !important; }
  .visioner-lb-prev, .visioner-lb-next { bottom: calc(14px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 420px) {
  .container, .header-inner { width: min(calc(100% - 22px), var(--max)); }
  .mobile-nav-links a { font-size: 31px; }
  .hero-caption strong { font-size: 19px; }
  .project-card, .project-card.small { min-height: 450px; }
  .feature-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; }
  .feature-row strong { font-size: 17px; }
  .contact-line a, .contact-line p { font-size: 22px; }
}

/* Phone landscape: keep navigation and content reachable without viewport traps. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 1100px) {
  .mobile-nav { padding-top: calc(82px + env(safe-area-inset-top)); }
  .mobile-nav-links { grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .mobile-nav-links a { min-height: 44px; font-size: 27px; }
  .hero { min-height: auto; }
}

/* Touch devices should never require hover to reveal a control. */
@media (hover: none), (pointer: coarse) {
  .portfolio-media::after { opacity: 1; transform: none; }
  .project-card:hover img, .portfolio-card:hover img, .person-card:hover img,
  .project-cover:hover img, .project-gallery figure:hover img, .hero-media:hover img { transform: none; }
  .round-link:hover { transform: none; }
}

/* Respect OS accessibility preference while preserving all content. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
