:root {
  color-scheme: light;
  --dark: #171717;
  --dark-raised: #202020;
  --paper: #f3f2ef;
  --ink: #191919;
  --white: #f8f7f5;
  --accent: #ff6d38;
  --accent-text: #a43612;
  --line: #ffffff23;
  --muted-dark: #bfbdb9;
  --muted-light: #55524e;
  --display: "Space Grotesk", "Arial", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.1rem; }
body { margin: 0; font: 1rem/1.55 var(--body); background: var(--dark); color: var(--white); }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; text-wrap: balance; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.light :focus-visible, dialog :focus-visible { outline-color: var(--accent-text); }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 6rem, 77rem); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 10; translate: 0 -150%; background: var(--accent); color: var(--ink); padding: .7rem 1rem; }
.skip:focus { translate: 0; }
.dark { background: var(--dark); color: var(--white); }
.light { background: var(--paper); color: var(--ink); }

.top { position: sticky; top: 0; z-index: 5; background: #161616f5; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 700 1.45rem/.91 var(--display); letter-spacing: -.045em; }
.brand-sub { display: block; margin-top: .32rem; font: 650 .59rem/1 var(--body); letter-spacing: .105em; }
.brand-mark { width: 2.45rem; height: 2.35rem; object-fit: contain; }
.top nav { display: flex; align-items: center; gap: clamp(.7rem, 1.78vw, 1.65rem); }
.top nav a, .footer a { font-size: .92rem; font-weight: 550; text-underline-offset: .35em; text-decoration-color: transparent; transition: text-decoration-color .18s; }
.top nav a:hover, .footer a:hover { text-decoration-color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; border: 1px solid transparent; padding: .78rem 1.25rem; text-decoration: none; font-weight: 750; font-size: .94rem; line-height: 1.25; transition: background-color .18s, border-color .18s, color .18s, transform .18s; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-top { border-color: #74716f; min-height: 2.7rem; color: var(--white); padding: .5rem 1rem; }
.button-top:hover, .button-secondary:hover { border-color: var(--accent); color: var(--accent); }
.button-primary { background: var(--accent); color: #20120e; }
.button-primary:hover { background: #ff9469; }
.button-secondary { color: var(--white); border-color: #cecbc380; background: #1515154d; }
.button-outline { color: var(--ink); border-color: #a4a09b; background: transparent; }
.button-outline:hover { background: #e7e1da; }
.button:disabled { opacity: .68; cursor: default; transform: none; }
.mobile-menu { padding: .52rem .74rem; background: transparent; color: var(--white); border: 1px solid #74716f; font-weight: 650; }

.eyebrow { font: 700 .83rem/1.3 var(--display); text-transform: uppercase; letter-spacing: .15em; display: flex; align-items: center; gap: .65rem; }
.eyebrow span { display: inline-block; width: 1.3rem; height: 2px; background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }

.services, .projects, .about, .contact { padding-block: clamp(4rem, 8vw, 7.75rem); }
.services { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1.66fr 1fr; align-items: end; gap: 1.5rem 3rem; margin-bottom: clamp(1.8rem, 4vw, 3.5rem); }
.kicker { color: var(--muted-dark); margin-bottom: 1rem; }
.light .kicker { color: var(--muted-light); }
.light .kicker span { background: var(--accent-text); }
h2 { font-size: clamp(2.45rem, 5.45vw, 5.2rem); font-weight: 700; letter-spacing: -.075em; }
.about h2 span { color: var(--accent); }
.section-copy { max-width: 29rem; font-size: clamp(1rem, 1.33vw, 1.15rem); }
.dark .section-copy { color: var(--muted-dark); }
.light .section-copy { color: var(--muted-light); }
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; }
.service { position: relative; overflow: clip; min-height: 17rem; padding: 1.6rem; padding-top: 5.1rem; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #464441; background: var(--dark-raised); transition: border-color .2s, background .2s; }
.service:hover, .service:focus-within { background: #29221e; border-color: var(--accent); }
.service h3 { font-size: clamp(1.6rem, 2.63vw, 2.58rem); letter-spacing: -.06em; margin-bottom: .7rem; }
.service p { color: var(--muted-dark); margin-bottom: 1.4rem; max-width: 24rem; }
.service-link { margin-top: auto; color: #ff9b77; font-size: .96rem; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.service-link::after { content: ""; position: absolute; inset: 0; }
.service-motif { position: absolute; height: 2.65rem; width: 2.65rem; inset: 1.6rem auto auto 1.6rem; color: var(--accent); }
.motif-frame { border: 1px solid; border-radius: 50%; }
.motif-frame::before, .motif-frame::after { content: ""; position: absolute; background: currentColor; }
.motif-frame::before { width: 125%; height: 1px; left: -12.5%; top: 50%; }
.motif-frame::after { height: 125%; width: 1px; top: -12.5%; left: 50%; }
.motif-lines { border: 1px solid; background: repeating-linear-gradient(0deg, transparent 0 7px,currentColor 7px 8px); }
.motif-lines::after { content: ""; position: absolute; width: 1px; height: 100%; background: currentColor; left: 32%; }
.motif-blocks { background: repeating-linear-gradient(90deg, transparent 0 calc(33.33% - 1px),currentColor calc(33.33% - 1px) 33.33%); border: 1px solid; border-right: 0; }
.motif-blocks::after { content: ""; position: absolute; width: 100%; height: 1px; background: currentColor; top: 50%; }

.project-grid { display: grid; grid-template-columns: 1.22fr 1fr; align-items: stretch; gap: 1rem; }
.project-feature, .project-compact { background: #fff; border: 1px solid #d9d5cf; min-width: 0; }
.project-feature { display: flex; flex-direction: column; }
.project-side { display: grid; gap: 1rem; }
.project-compact { display: grid; grid-template-columns: minmax(7.75rem, 41%) minmax(0,1fr); }
.project-image { background: #dcdad6; overflow: clip; }
.project-feature .project-image { min-height: 17rem; position: relative; flex: 1; }
.project-compact .project-image { position: relative; }
.project-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease-out; }
.project-image.arche img { object-position: 43% center; }
.project-feature:hover img, .project-compact:hover img { transform: scale(1.035); }
.project-text { padding: clamp(1rem, 2vw, 1.55rem); }
.project-meta { font: 750 .77rem/1.3 var(--display); color: var(--accent-text); letter-spacing: .09em; text-transform: uppercase; margin-bottom: .62rem; }
.project-text h3 { font-size: clamp(1.36rem, 2.18vw, 2.1rem); letter-spacing: -.055em; margin-bottom: .55rem; }
.project-feature .project-text h3 { font-size: clamp(1.6rem, 3.18vw, 2.9rem); }
.project-text p:not(.project-meta) { color: var(--muted-light); }

.about { background-color: #1d1d1d; background-image: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), #ffffff09 calc(12.5% - 1px) 12.5%); }
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2rem clamp(2rem, 6vw, 7rem); align-items: end; }
.about h2 { font-size: clamp(3rem, 7.1vw, 7rem); }
.about-role { color: #ff9b77; margin-top: .95rem; font-weight: 670; }
.about-detail > p { color: #d9d5d0; font-size: 1.08rem; max-width: 40rem; }
.credentials { margin-top: 1.5rem; border-block: 1px solid #ffffff35; }
.credentials div { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; padding-block: .95rem; align-items: baseline; }
.credentials div + div { border-top: 1px solid #ffffff35; }
.credentials dt { color: #ff9b77; font: 700 1.1rem/1.4 var(--display); }
.credentials dd { color: #d9d5d0; }

.contact-grid { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: 2rem clamp(2rem, 6vw, 6.5rem); align-items: start; }
.contact h2 span { color: var(--accent-text); }
.contact-intro .section-copy { margin-top: 1.25rem; }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin: 1.6rem 0 .6rem; font-weight: 700; overflow-wrap: anywhere; }
.contact-links a { text-underline-offset: .22em; }
.contact-links a:first-child { font: 700 clamp(1.45rem, 2.5vw, 2rem)/1.2 var(--display); text-decoration: none; }
.contact-links a:hover { color: var(--accent-text); }
address { color: var(--muted-light); font-style: normal; }
.inquiry { display: grid; gap: .9rem; background: #fff; border: 1px solid #d9d5cf; padding: clamp(1rem, 3.5vw, 2.25rem); }
.inquiry h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.055em; margin-bottom: .3rem; }
.form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
label { display: block; color: var(--ink); font-size: .94rem; font-weight: 650; min-width: 0; }
label span { color: var(--accent-text); }
input, select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid #aaa59f; border-radius: 0; background-color: #fbfaf8; padding: .62rem .72rem; min-height: 2.85rem; color: var(--ink); font-size: 1rem; font-weight: 450; }
label :is(input,select,textarea) { margin-top: .26rem; }
textarea { resize: vertical; }
textarea::placeholder { color: #66625e; opacity: 1; }
select { appearance: none; padding-right: 2rem; background: linear-gradient(45deg,transparent 49%,#3d3a38 50%,#3d3a38 65%,transparent 67%) right 1.05rem center/6px 7px no-repeat,linear-gradient(-45deg,transparent 49%,#3d3a38 50%,#3d3a38 65%,transparent 67%) right .7rem center/6px 7px no-repeat,#fbfaf8; }
.form-note { color: var(--muted-light); font-size: .875rem; }
.inquiry button { justify-self: start; }

.footer { padding-block: 1.6rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.25rem; color: var(--muted-dark); font-size: .875rem; }
.footer-inner span:first-child { font-weight: 700; color: var(--white); }

dialog { width: min(35rem,calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); padding: clamp(1rem,5vw,2rem); background: var(--paper); color: var(--ink); border: 1px solid #c7c2bb; }
dialog::backdrop { background: #000b; }
dialog h2 { font-size: clamp(1.65rem,5vw,2.5rem); margin-right: 3rem; }
dialog p { color: var(--muted-light); margin: .65rem 0 1rem; }
dialog .actions { margin-top: 1rem; }
.dialog-close { position: absolute; inset: .6rem .6rem auto auto; }
.dialog-close button { width: 2.6rem; height: 2.6rem; padding: 0; color: var(--ink); background: transparent; border: 1px solid #aaa59f; font-size: 1.6rem; }
#copy-status { min-height: 1.5rem; margin-bottom: 0; }

@media (max-width: 950px) {
  .wrap { width: calc(100% - 3rem); }
  .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service { padding-inline: 1.15rem; }
  .service-motif { left: 1.15rem; }
  .project-compact { grid-template-columns: minmax(6rem, 33%) 1fr; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 4.2rem; }
  .wrap { width: calc(100% - 2rem); }
  .section-head, .about-grid, .contact-grid, .project-grid { grid-template-columns: 1fr; }
  .section-head { gap: .85rem; }
  .desktop-break { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .service { min-height: auto; padding: 1.25rem 1.1rem 1.2rem 4.85rem; }
  .service-motif { inset: 1.35rem auto auto 1.1rem; }
  .service p { margin-bottom: .85rem; }
  .project-feature .project-image { min-height: 0; aspect-ratio: 1.78; }
  .project-compact { grid-template-columns: minmax(6.5rem, 34%) 1fr; }
}
@media (max-width: 380px) {
  .form-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.tour {
  --tour-top: 4.6rem;
  --tour-view: calc(100svh - var(--tour-top));
  --tour-gradient:
    linear-gradient(90deg, #18181bf7 0%, #18181be0 19%, #18181b70 37%, transparent 57%),
    linear-gradient(0deg, #18181b 0%, #18181b8a 9%, transparent 31%);
  background: #1b1a1c;
}
.tour-stage { position: relative; isolation: isolate; }
.tour-poster, .tour-canvas, .tour-recording, .tour-scrim { position: absolute; inset: 0; width: 100%; pointer-events: none; }
.tour-poster { z-index: -3; height: max(32rem, var(--tour-view)); }
.tour-poster img { width: 100%; height: 100%; object-fit: cover; }
.tour-recording { object-fit: cover; z-index: -2; height: 100%; opacity: 0; }
.tour-scrim { z-index: -1; height: max(32rem, var(--tour-view)); background: var(--tour-gradient); }
.tour-canvas { height: 100%; }
.tour-panel { display: grid; align-items: center; min-height: 20rem; border-bottom: 1px solid var(--line); }
.tour-panel:not(.tour-opening) { background: #222022; }
.tour-opening { min-height: max(32rem, var(--tour-view)); }
.tour-panel-inner { padding-block: 3.2rem 4rem; }
.tour-copy { max-width: min(52%, 38rem); }
.tour-label { color: #f4d6c3; margin-bottom: 1.2rem; }
.tour-copy :is(h1,h2) {
  font-size: clamp(3.35rem, 6.6vw, 7.2rem);
  letter-spacing: -.086em;
  line-height: .94;
  text-wrap: unset;
}
#etap-wykonczenia h2 { font-size: clamp(3.15rem, 5.55vw, 6rem); }
.tour-copy :is(h1,h2) span { color: var(--accent); }
.tour-summary { max-width: 27rem; font-size: clamp(1.03rem, 1.34vw, 1.2rem); color: #eee7e1; margin-top: 1.55rem; }
.tour-copy .actions { margin-top: 1.32rem; }
.tour-copy .button-secondary { background: #1a1718ba; }
.tour-guide { position: absolute; z-index: 2; inset: auto 0 .9rem; pointer-events: none; }
.tour-guide-inner { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem 1rem; font-size: .875rem; color: #e8ded7; }
.tour-guide-inner span { color: #d7c9c1; font-size: .78rem; }
.tour-progress { display: grid; grid-template-columns: repeat(6,1fr); gap: .35rem; max-width: 27rem; pointer-events: auto; }
.tour-progress button { border: 0; min-height: 2.65rem; position: relative; background: transparent; color: inherit; }
.tour-progress button::after { content: ""; position: absolute; inset: 50% 0 auto; height: 2px; background: #fff7; }
.tour-progress button[aria-current]::after, .tour-progress button:hover::after { background: var(--accent); }
.tour-scopes { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.tour-scopes li, .project-scopes li {
  border: 1px solid #f6d8c277;
  background: #241d1ab3;
  color: #fff4ed;
  font-size: .88rem;
  padding: .38rem .58rem;
}
.project-scopes { position: absolute; inset: auto .7rem .7rem; display: flex; flex-wrap: wrap; gap: .32rem; list-style: none; padding: 0; margin: 0; }
.project-scopes li { font-size: .78rem; }

.tour.is-moving { height: 565svh; }
.is-moving .tour-stage { position: sticky; top: var(--tour-top); height: var(--tour-view); overflow: clip; }
.is-moving .tour-canvas { z-index: -2; }
.is-moving[data-visual="webgl"] .tour-poster { opacity: 0; }
.is-moving[data-video-ready] .tour-recording { opacity: 1; }
.is-moving .tour-scrim { height: 100%; }
.is-moving .tour-panels { position: absolute; inset: 0; pointer-events: none; }
.is-moving .tour-panel {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  opacity: var(--panel-opacity, 1);
  transform: translate3d(0,var(--panel-rise,0),0);
}
.is-moving .tour-panel[inert] { visibility: hidden; }
.is-moving .tour-panel-inner { padding-bottom: 7rem; }
.is-moving .tour-copy { pointer-events: auto; }

@media (max-width: 940px) {
  html { scroll-padding-top: 4.2rem; }
  .tour { --tour-top: 3.75rem; }
  .top-inner { min-height: 3.75rem; flex-wrap: wrap; }
  .top nav { width: 100%; padding-block: .9rem; order: 3; flex-wrap: wrap; gap: .85rem 1.35rem; }
  .top .mobile-menu:not([hidden]) { display: inline-flex; margin-left: auto; }
  .top:has(.mobile-menu:not([hidden])) nav { position: absolute; display: grid; gap: 0; width: auto; inset: 100% 0 auto; padding: .25rem 1rem .65rem; background: #1a1a1a; border-bottom: 1px solid #ffffff35; }
  .top:has(.mobile-menu:not([hidden])) nav a { padding: .7rem 0; }
  .button-top { display: none; }
}
@media (max-aspect-ratio: 1/1) {
  .tour {
    --tour-gradient: linear-gradient(0deg, #18181bf7 0%, #18181bf4 12%, #18181bc2 30%, #18181b20 56%, transparent 70%);
  }
  .tour-panel { align-items: end; }
  .tour-copy { max-width: min(100%, 38rem); }
  .tour-copy :is(h1,h2), #etap-wykonczenia h2 { font-size: clamp(2.55rem, 8vw, 5.5rem); }
  .tour-summary { margin-top: .78rem; max-width: 32rem; }
  .tour-label { margin-bottom: .68rem; }
  .tour-copy .actions { margin-top: .8rem; }
  .is-moving .tour-panel-inner { padding-bottom: 5.35rem; }
  .tour.is-moving { height: 487svh; }
}
@media (max-width: 540px) {
  .tour-guide-inner { font-size: .75rem; }
  .tour-guide-inner span { font-size: .68rem; line-height: 1.2; text-align: right; }
  .tour-progress { max-width: 100%; }
  .tour-label { font-size: .73rem; }
  .tour-scopes { margin-top: .8rem; }
  .tour-scopes li { font-size: .77rem; padding: .32rem .46rem; }
  .project-scopes { inset: auto .45rem .45rem; }
  .project-scopes li { font-size: .7rem; padding: .23rem .32rem; }
}
