:root {
  --night: #1b2122;
  --draft: #202829;
  --chalk: #f3eee4;
  --gold: #e5a858;
  --grid: #ffffff0a;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.header { background: var(--night); color: var(--chalk); border-color: #ffffff24; }
.header-inner { min-height: 4.95rem; }
.header .brand { width: clamp(12rem, 21vw, 16rem); }
.header .nav-cta { background: transparent; color: var(--chalk); border-color: #ffffff64; }
.header .nav-cta:hover { background: var(--chalk); color: var(--night); }
.header :focus-visible, .hero :focus-visible { outline-color: var(--gold); }

.hero { position: relative; display: block; padding: 0; isolation: isolate; background: var(--night); color: var(--chalk); }
.hero-inner { min-height: clamp(35rem, 49vw, 47rem); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero-copy { z-index: 1; width: max-content; max-width: 100%; padding-block: clamp(3rem, 6vw, 5.5rem); }
.hero h1 { font-size: clamp(3.25rem, 5.45vw, 6.15rem); line-height: .97; letter-spacing: -.078em; }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--gold); margin-top: .19em; }
.hero .eyebrow span, .build .eyebrow span { background: var(--gold); }
.hero-lead { color: #e1ddd3; max-width: 28rem; }
.hero .text-link { text-decoration-color: var(--gold); }
.hero .text-link:hover { color: var(--gold); }
.hero-image { position: absolute; inset: 0 0 0 43%; min-height: 0; }
.hero-image::after { content: ""; z-index: 0; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night), #1b2122cb 12%, #1b212230 42%, transparent 76%); pointer-events: none; }
.hero-image img { object-position: 47% 50%; }
.hero-image figcaption { z-index: 1; right: var(--gutter); bottom: 1.25rem; padding: .32rem .62rem; font-size: .78rem; }

.service-section { align-items: start; background: var(--paper); }
.service-section h2 { max-width: 15ch; }
.finish-photo { position: relative; margin-top: 1.75rem; max-width: 25rem; overflow: hidden; border-left: 3px solid var(--ochre-dark); }
.finish-photo img { width: 100%; height: clamp(10rem, 19vw, 14.5rem); object-fit: cover; object-position: center 63%; }
.finish-photo figcaption { color: var(--muted); padding: .35rem .6rem; font-size: .74rem; }
.work-list > li {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .25rem clamp(.65rem, 1.6vw, 1.25rem);
  padding-block: clamp(.95rem, 2vw, 1.6rem);
}
.work-list > li > p { grid-column: 2; }
.work-list h3 { line-height: 1.25; text-wrap: wrap; }
.work-list h3 > span { white-space: nowrap; }
.work-list h3 a {
  text-decoration-color: var(--ochre-dark);
  text-decoration-thickness: from-font;
  text-underline-offset: .24em;
  transition: color .18s ease;
}
.work-list h3 a:hover,
.work-list h3 a:focus-visible { color: var(--ochre-dark); text-decoration-thickness: 2px; }
.work-icon {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: clamp(2.45rem, 3.8vw, 3.25rem);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ochre-dark);
  background: var(--white);
  transition: background-color .18s ease, border-color .18s ease;
}
.work-icon svg { width: 70%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.work-list > li:focus-within .work-icon,
.work-list > li:hover .work-icon { border-color: #c4a171; background-color: #eedfca; }
@media (prefers-reduced-motion: reduce) {
  .work-list h3 a, .work-icon { transition: none; }
}

.build { background: var(--night); color: var(--chalk); }
.build-heading { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 1.5rem 3rem; align-items: end; margin-bottom: clamp(1.8rem, 3.5vw, 3rem); }
.build-heading .build-lead { padding-bottom: .17rem; margin: 0; }
.studio { display: grid; grid-template-columns: minmax(0, 1.54fr) minmax(17rem, .72fr); background: var(--draft); border: 1px solid #596365; }
.studio-visual { min-width: 0; padding: clamp(.9rem, 2.2vw, 1.8rem); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.studio-bar, .gallery-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; }
.studio-bar h3 { letter-spacing: -.035em; }
.segmented { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; }
.segmented button, .lightbox-top button, .lightbox-nav button { min-height: 2.65rem; padding: .45rem .78rem; font-weight: 750; font-size: .9rem; border: 1px solid #a2a09a; border-radius: 2px; background: transparent; color: inherit; transition: color .2s, background-color .2s, border-color .2s; }
.studio-tabs button { border-color: #b1b8b69c; }
.studio-tabs button:hover, .lightbox-top button:hover, .lightbox-nav button:hover { background: #ffffff19; }
.studio-tabs button[aria-pressed="true"] { background: var(--gold); color: var(--night); border-color: var(--gold); }
.blueprint { position: relative; max-width: 43.5rem; margin: .4rem auto 0; aspect-ratio: 660/454; }
.house-drawing { display: block; width: 100%; height: auto; }
.drawing-guide { stroke: #a3b7b477; stroke-dasharray: 4 6; fill: none; stroke-width: 1; }
.layer { opacity: .25; transition: opacity .3s; }
.layer .plane { fill: #75858144; stroke: #b0beb9; stroke-width: 1.2; stroke-linejoin: round; }
.layer .detail { fill: none; stroke: #c6d3cb; stroke-width: 1.5; stroke-linejoin: round; }
.layer .heavy { stroke-width: 2.25; }
.layer .roof { fill: #6f786c38; }
.layer .facade { fill: #63756d1a; }
.layer .finish-floor { fill: #ba926a80; }
.layer .finish-wall { fill: #d8b08766; }
.layer .base { fill: #bfb19b42; }
.layer .ground { fill: #95897226; }
.pipe { stroke-width: 4; stroke-linejoin: round; fill: none; }
.pipe-water { stroke: #81c3c5; }
.pipe-power { stroke: #e9b269; stroke-dasharray: 8 5; }
.node { fill: #81c3c5; stroke: var(--draft); stroke-width: 1.5; }
.node.alt { fill: #e9b269; }
.studio[data-stage="fundamenty"] .foundation,
.studio[data-stage="konstrukcja"] .construction,
.studio[data-stage="instalacje"] .installations,
.studio[data-stage="wykonczenie"] .finish { opacity: 1; }
.studio[data-stage="fundamenty"] .foundation .plane,
.studio[data-stage="fundamenty"] .foundation .detail,
.studio[data-stage="konstrukcja"] .construction .plane,
.studio[data-stage="konstrukcja"] .construction .detail,
.studio[data-stage="wykonczenie"] .finish .plane,
.studio[data-stage="wykonczenie"] .finish .detail { stroke: var(--gold); }
.studio[data-tech="mur"] .wood-variant, .studio[data-tech="szkielet"] .brick-variant { display: none; }
.marker { position: absolute; display: grid; place-items: center; transform: translate(-50%,-50%); width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--chalk); }
.marker span { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border: 1px solid #d2d4c9; border-radius: 50%; background: var(--draft); font-size: .9rem; font-weight: 750; transition: background .18s, color .18s, transform .18s; }
.marker:hover span { transform: scale(1.11); }
.marker[aria-pressed="true"] span { background: var(--gold); border-color: var(--gold); color: var(--night); }
.marker-base { left: 56%; top: 88%; }
.marker-frame { left: 63%; top: 24%; }
.marker-install { left: 82%; top: 52%; }
.marker-finish { left: 30%; top: 65%; }
.diagram-caption { color: #d0d9d4; font-size: .77rem; }
.studio-aside { align-self: stretch; padding: clamp(1rem, 2.75vw, 2.25rem); border-left: 1px solid #596365; }
.stage-buttons { display: grid; gap: .2rem; margin: .2rem 0 1.25rem; }
.stage-buttons button { display: flex; gap: .65rem; min-height: 2.7rem; align-items: center; text-align: left; padding: .3rem .52rem; color: var(--chalk); background: transparent; border: 1px solid transparent; border-bottom-color: #687273; font-weight: 750; transition: background .18s, color .18s; }
.stage-buttons button span { display: grid; place-items: center; border: 1px solid #adb5b1; border-radius: 50%; width: 1.52rem; height: 1.52rem; flex: 0 0 auto; font-size: .76rem; }
.stage-buttons button:hover { background: #ffffff14; }
.stage-buttons button[aria-pressed="true"] { background: #ebad571f; border-color: #aa8053; color: #f5c17f; }
.stage-content h3 { font-size: clamp(1.32rem, 2vw, 1.8rem); }
.stage-content p { margin-top: .55rem; color: #e0dbd2; }
.build-bottom .build-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(.6rem, 3vw, 2.3rem); margin-top: 1.5rem; }
.build-bottom .build-options article { display: block; }
.build-bottom .build-options p { margin-top: .37rem; }

.gallery { padding-block: var(--section) clamp(3rem, 7vw, 6rem); }
.gallery-heading { align-items: end; margin-bottom: 1.4rem; }
.gallery-filters button[aria-pressed="true"] { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.gallery-filters button:hover:not([aria-pressed="true"]) { background: #e9dcce; }
.gallery-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.55rem, 1.35vw, 1.2rem); }
.gallery-item { position: relative; isolation: isolate; display: block; min-width: 0; aspect-ratio: 1.2; overflow: hidden; background: #423c33; color: white; text-decoration: none; }
.gallery-wide { grid-column: span 2; aspect-ratio: 2.48; }
.gallery-item::after { content: ""; position: absolute; inset: 32% 0 0; background: linear-gradient(transparent, #14181aee); pointer-events: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .38s ease; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.045); }
.gallery-item span { position: absolute; z-index: 1; inset: auto .78rem .65rem; font-size: clamp(.78rem, 1.2vw, .95rem); font-weight: 750; line-height: 1.22; }
.gallery-credit { margin-top: 1rem; font-size: .86rem; color: var(--muted); }
.gallery-credit a { text-underline-offset: .17rem; }
.gallery-dialog { width: min(62rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: clamp(.65rem, 2vw, 1.25rem); color: var(--chalk); background: var(--night); border: 1px solid #777; overflow-y: auto; }
.gallery-dialog::backdrop { background: #101313e6; }
.lightbox-top, .lightbox-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.lightbox-top p { font-weight: 750; }
.lightbox-nav { margin-top: .7rem; }
.gallery-dialog img { width: auto; max-height: min(66vh, 45rem); max-width: 100%; margin: .7rem auto 0; object-fit: contain; }

#finish-options { min-width: 0; margin: .1rem 0 .4rem; padding: .45rem .55rem .6rem; border: 1px solid #bbb0a0; }
#finish-options legend { padding-inline: .2rem; font-size: .87rem; font-weight: 750; }
#finish-options label { display: inline-flex; gap: .33rem; align-items: center; margin: .13rem .55rem .13rem 0; font-weight: 400; }
#finish-options input { width: auto; min-height: auto; accent-color: var(--ink); }

@media (max-width: 1000px) {
  .js-ready .header .nav { color: var(--chalk); background: var(--night); border-bottom-color: #ffffff24; }
  .js-ready .header .menu-toggle { color: var(--chalk); border-color: #ffffff55; }
  .hero h1 { font-size: clamp(3.1rem, 6.15vw, 4.45rem); }
  .hero-inner { min-height: 34rem; }
}

@media (max-width: 740px) {
  .hero-inner { min-height: auto; display: block; }
  .hero-copy { padding-block: 2.6rem 1.5rem; width: 100%; }
  .hero h1 { max-width: none; font-size: clamp(2.28rem, 7.1vw, 4rem); letter-spacing: -.066em; }
  .hero-image { position: relative; inset: auto; width: 100%; aspect-ratio: 1.46; }
  .hero-image::after { background: linear-gradient(0deg, #1b212266, transparent 42%); }
  .hero-image img { object-position: center 52%; }
  .hero-image figcaption { right: .48rem; bottom: .5rem; }
  .service-section { gap: 1.55rem; }
  .finish-photo { margin-top: 1.2rem; }
  .finish-photo img { height: clamp(10rem, 35vw, 14rem); }
  .build-heading, .studio { grid-template-columns: minmax(0, 1fr); }
  .build-heading { gap: .9rem; }
  .studio-aside { border-left: 0; border-top: 1px solid #596365; }
  .build-bottom .build-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery-item { aspect-ratio: 1.19; }
  .gallery-wide { aspect-ratio: 2.45; }
}

@media (max-width: 390px) {
  .build-bottom .build-options { grid-template-columns: minmax(0,1fr); }
  .stage-buttons button { min-height: 2.5rem; }
  .gallery-filters { gap: .2rem; }
  .segmented button { padding-inline: .5rem; }
  .gallery-item span { inset-inline: .45rem; }
}
