:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --surface: #fffefa;
  --muted-bg: #ebeee5;
  --ink: #202b24;
  --muted: #536057;
  --forest: #294b37;
  --forest-deep: #183425;
  --line: #d8ddd2;
  --max: 1240px;
  --gutter: clamp(20px, 4.5vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 98px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 "Avenir Next", "Segoe UI", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
p, h1, h2, h3, figure, fieldset, address { margin: 0; }
h1, h2, h3 { line-height: 1.11; letter-spacing: -.043em; font-weight: 680; }
h1 { font-size: clamp(44px, 5.95vw, 88px); line-height: .99; }
h1 span { color: #527759; }
h2 { font-size: clamp(35px, 4.5vw, 63px); }
h3 { font-size: clamp(21px, 2.05vw, 29px); }
p { color: var(--muted); }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #527759; outline-offset: 4px; }
.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.eyebrow { font: 650 .75rem/1.38 ui-monospace, "Cascadia Mono", "Consolas", monospace; letter-spacing: .095em; text-transform: uppercase; color: var(--forest); }
.skip-link { position: absolute; z-index: 4; inset: 8px auto auto 8px; padding: 8px 14px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.wordmark { display: inline-flex; align-items: center; width: 140px; min-height: 44px; }
.wordmark img { mix-blend-mode: multiply; }
.site-header nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.site-header nav a { font-size: .93rem; font-weight: 630; text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.language-switch { display: inline-flex; align-items: center; gap: 2px; color: var(--forest); white-space: nowrap; }
.site-header .language-switch a { padding: 6px; font-size: .82rem; }
.language-switch [aria-current] { padding: 2px 5px; border-radius: 3px; font-size: .82rem; font-weight: 750; background: var(--muted-bg); }
.flag-pl { display: inline-block; flex: none; width: 22px; height: 14px; border: 1px solid #bcbdb8; border-radius: 2px; background: linear-gradient(to bottom, #fff 50%, #cf3150 50%); }
html[lang="pl"] .hero h1 { max-width: 14ch; }
.header-cta { justify-self: end; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 51px; padding: 11px 18px; border: 1px solid var(--forest); border-radius: 5px; background: var(--forest); color: #fff; font-size: .93rem; font-weight: 690; text-align: center; text-decoration: none; line-height: 1.3; }
.button:hover { background: var(--forest-deep); }
.button span { font-size: 1.15em; }
.button-small { min-height: 44px; padding: 9px 13px; }
.button-quiet { background: transparent; border-color: #98a599; color: var(--forest); }
.button-quiet:hover { background: var(--muted-bg); }
.text-link { display: inline-flex; align-items: baseline; gap: 8px; width: fit-content; color: var(--forest); font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--forest-deep); text-decoration-thickness: 2px; }

.hero { display: grid; grid-template-columns: 1fr 1.06fr; align-items: center; gap: clamp(30px, 5vw, 72px); padding-block: clamp(44px, 6vw, 84px); }
.hero .eyebrow { margin-bottom: 23px; }
.hero-country { display: flex; align-items: center; gap: 10px; }
.flag-de { display: inline-block; flex: none; width: 22px; height: 14px; border-radius: 2px; background: linear-gradient(to bottom, #212121 0 33.33%, #c8363a 33.33% 66.66%, #efb932 66.66% 100%); }
.hero h1 { max-width: 10.5ch; }
.intro { font-size: clamp(16px, 1.54vw, 20px); margin-top: 25px; max-width: 47ch; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 29px; }
.hero-media { border-radius: 8px; overflow: hidden; background: var(--forest-deep); position: relative; }
.hero-media img { aspect-ratio: 1.13; object-fit: cover; object-position: center 52%; }
.hero-media figcaption { position: absolute; left: 14px; bottom: 14px; background: var(--paper); color: var(--forest-deep); padding: 6px 10px; border-radius: 3px; font-size: .76rem; font-weight: 650; }
.building-note { position: absolute; top: clamp(23px, 3vw, 42px); right: clamp(17px, 2.4vw, 34px); display: grid; gap: 3px; transform: rotate(-5deg); padding: 10px 15px; border: 1px solid rgba(40,66,49,.5); border-radius: 3px; background: rgba(250,249,238,.88); color: var(--forest-deep); line-height: 1.25; }
.building-note strong { font-size: clamp(.9rem, 1.35vw, 1.22rem); letter-spacing: -.025em; }
.building-note span { font-size: clamp(.76rem, 1.04vw, .9rem); }

.section { padding-block: clamp(54px, 7vw, 98px); }
#angebot, #oferta { border-top: 1px solid var(--line); padding-top: clamp(32px, 4vw, 60px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px 24px; margin-bottom: clamp(22px, 4vw, 40px); }
.section-heading p { max-width: 40ch; }
.offer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.offer-card { display: flex; flex-direction: column; align-items: start; gap: 14px; padding: clamp(18px, 2.05vw, 30px); border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.offer-card p { font-size: .94rem; margin-bottom: 5px; }
.offer-card .text-link { margin-top: auto; font-size: .88rem; }
.product-icon { display: inline-block; position: relative; width: 37px; height: 37px; color: var(--forest); background: var(--muted-bg); border-radius: 4px; margin-bottom: 2px; }
.product-icon::before, .product-icon::after { content: ""; position: absolute; }
.icon-window::before { inset: 8px; border: 1.5px solid; }
.icon-window::after { inset: 8px auto 8px 17.5px; border-left: 1.5px solid; }
.icon-door::before { inset: 7px 11px; border: 1.5px solid; }
.icon-door::after { width: 4px; left: 14px; top: 18px; border-top: 1.5px solid; }
.icon-blind::before { inset: 8px; border: 1.5px solid; background: repeating-linear-gradient(transparent 0 4px, currentColor 4px 5px); }
.icon-install::before { inset: 9px 9px 9px 9px; border: 1.5px solid; border-radius: 50%; }
.icon-install::after { width: 8px; height: 5px; top: 15px; left: 15px; border-bottom: 1.5px solid; border-left: 1.5px solid; transform: rotate(-45deg); }

.reference-section { background: var(--muted-bg); border-block: 1px solid var(--line); }
.reference-card { display: grid; grid-template-columns: 1.15fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.reference-card + .reference-card { margin-top: 18px; }
.reference-cover { display: block; overflow: hidden; }
.reference-cover:focus-visible { outline-offset: -4px; }
.reference-cover > img { width: 100%; height: 100%; min-height: 245px; max-height: 380px; object-fit: cover; }
.reference-copy { padding: clamp(24px, 4vw, 56px); align-self: center; }
.reference-copy h3 { margin-block: 15px 11px; font-size: clamp(29px, 3.6vw, 49px); max-width: 15ch; }
.reference-copy .text-link { margin-top: 23px; }
.reference-extra { margin-top: 19px; padding: 20px 0 0; border-top: 1px solid #c8d0c3; display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px 24px; align-items: center; }
.reference-extra h3 { font-size: 22px; margin-top: 6px; }
.reference-extra > p { font-size: .94rem; }

.gallery-heading-link { display: inline-flex; align-items: center; gap: .32em; color: inherit; text-decoration: none; }
.gallery-heading-link:hover { color: var(--forest); }
.gallery-icon { position: relative; display: inline-block; width: 1.24em; height: 1em; flex: none; align-self: center; }
.gallery-icon::before, .gallery-icon::after { content: ""; position: absolute; width: 77%; height: 76%; border: 1.6px solid currentColor; border-radius: 2px; }
.gallery-icon::before { top: 0; right: 0; }
.gallery-icon::after { bottom: 0; left: 0; background: var(--surface); }
.gallery-heading-link .gallery-icon { font-size: clamp(17px, 2.1vw, 26px); color: var(--forest); }
.gallery-heading-link .gallery-icon::after { background: var(--muted-bg); }
.project-photos { display: none; grid-column: 1/-1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; padding: 18px; border-top: 1px solid var(--line); }
.project-photos:target { display: grid; }
.gallery-enabled .project-photos:target { display: none; }
.project-photos img { aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.project-photos figcaption { margin-top: 5px; font-size: .9rem; color: var(--muted); }

.gallery-dialog { position: fixed; inset: 0; width: min(90vw, 870px); max-width: calc(100% - 16px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 0; margin: auto; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 80px #101b1840; }
.gallery-dialog::backdrop { background: rgb(16 27 22 / 82%); }
html:has(.gallery-dialog[open]) { overflow: hidden; }
.gallery-inner { --album-inset: clamp(14px, 3.5vw, 30px); }
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--album-inset); }
.gallery-bar h2 { margin-top: 3px; font-size: clamp(21px, 3vw, 32px); }
.gallery-close, .gallery-step { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--forest-deep); }
.gallery-close { font-size: 1.85rem; line-height: 1; }
.gallery-close:hover { background: var(--muted-bg); }
.gallery-picker { display: flex; align-items: center; gap: 10px; padding: 0 var(--album-inset) 12px; font-size: .93rem; }
.gallery-picker select { min-width: 0; max-width: 100%; min-height: 40px; padding: 5px 8px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #a9b4a7; border-radius: 4px; }
.gallery-image-wrap { position: relative; background: #1c2821; }
#gallery-image { width: 100%; height: min(53vh, 69vw, 540px); height: min(53dvh, 69vw, 540px); object-fit: contain; touch-action: pan-y pinch-zoom; }
#gallery-image.gallery-portrait { height: min(62vh, 680px); height: min(62dvh, 680px); }
.gallery-step { position: absolute; top: 50%; transform: translateY(-50%); background: rgb(20 35 26 / 82%); color: white; border-color: rgb(255 255 255 / 55%); }
.gallery-step:hover { background: var(--forest-deep); }
.gallery-step::after { content: ""; display: block; width: .64rem; height: .64rem; border: solid currentColor; border-width: 0 2px 2px 0; }
.gallery-prev { left: 9px; }
.gallery-prev::after { transform: translateX(2px) rotate(135deg); }
.gallery-next { right: 9px; }
.gallery-next::after { transform: translateX(-2px) rotate(-45deg); }
.gallery-caption { display: flex; align-items: baseline; gap: 12px; padding: 12px var(--album-inset) 8px; font-size: .95rem; }
#gallery-counter { flex: none; color: var(--forest); font: 650 .83rem/1.5 ui-monospace, monospace; }
.gallery-thumbs { display: flex; gap: 7px; overflow-x: auto; padding: 4px var(--album-inset) 16px; }
.gallery-thumb { flex: none; width: 70px; padding: 2px; border: 2px solid transparent; border-radius: 5px; background: none; }
.gallery-thumb img { height: 46px; object-fit: cover; border-radius: 2px; }
.gallery-thumb[aria-pressed="true"] { border-color: var(--forest); }
.gallery-thumb:hover { background: var(--muted-bg); }

.contact-layout { display: grid; grid-template-columns: .73fr 1fr; gap: clamp(30px, 7vw, 95px); align-items: start; }
.contact h2 { margin-block: 15px; max-width: 12ch; }
.contact > p:not(.eyebrow) { max-width: 38ch; }
.contact address { display: grid; width: fit-content; font-style: normal; margin-top: 23px; }
.contact address a { display: grid; gap: 2px; border-top: 1px solid var(--line); padding: 12px 0; color: var(--forest); text-decoration: none; }
.contact address a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.contact address span { font-size: .8rem; color: var(--muted); }
.contact-languages { margin-top: 12px; font-size: .91rem; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(20px, 3vw, 40px); }
.form-heading h3 { font-size: clamp(26px, 3vw, 38px); }
.form-heading p { font-size: .92rem; margin-top: 8px; }
.form-progress { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 24px 0; }
.form-progress li { color: var(--muted); padding-top: 6px; border-top: 3px solid var(--line); font-size: .79rem; font-weight: 620; }
.form-progress li[aria-current="step"] { color: var(--forest); border-color: var(--forest); }
.form-progress li.is-done { border-color: #80a382; }
.form-step { display: grid; gap: 16px; }
fieldset { padding: 0; border: 0; min-inline-size: 0; }
legend, .field label { color: var(--ink); font-size: .95rem; font-weight: 680; }
.field-hint, .field small, .form-status { color: var(--muted); font-size: .82rem; }
.field label small { margin-inline-start: 2px; font-weight: 400; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.option { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; min-height: 44px; cursor: pointer; font-size: .89rem; line-height: 1.25; }
.option:has(input:checked) { border-color: #729178; background: var(--muted-bg); }
.option input { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--forest); }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); }
.form-grid.location-grid { grid-template-columns: minmax(110px, .65fr) minmax(0, 1fr); }
.field { display: grid; gap: 5px; min-width: 0; align-content: start; }
.field input, .field select, .field textarea { color: var(--ink); width: 100%; min-height: 45px; border: 1px solid #a9b4a7; border-radius: 4px; padding: 8px 10px; background: #fff; font-size: 16px; }
.field textarea { resize: vertical; }
.summary-heading { margin: 0 0 4px; color: var(--ink); font-size: 1rem; }
#mail-preview { margin: 0; border-top: 1px solid var(--line); }
#mail-preview > div { display: grid; grid-template-columns: minmax(102px, .72fr) minmax(0, 1.28fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
#mail-preview dt { font-size: .84rem; color: var(--muted); }
#mail-preview dd { margin: 0; font-size: .92rem; color: var(--ink); font-weight: 600; white-space: pre-line; overflow-wrap: anywhere; }
.error { margin-top: 6px; color: #86291f; font-size: .88rem; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { justify-self: start; background: none; border: 0; padding: 5px 1px; color: var(--forest); text-decoration: underline; text-underline-offset: 4px; font-weight: 650; }
.form-status:empty { display: none; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px 32px; padding-block: 24px; }
.footer-inner p, .footer-inner > a:last-child { font-size: .86rem; }
.detail-page { max-width: 880px; }
.detail-page h1 { margin-top: 24px; max-width: 13ch; }
.process-list { list-style: none; padding: 0; margin: 37px 0 28px; }
.process-list li { border-top: 1px solid var(--line); padding: 18px 0; }
.process-list h2 { font-size: clamp(22px, 3vw, 31px); margin-bottom: 8px; }

@media (max-width: 1040px) {
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 790px) {
  .header-inner { gap: 10px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 12ch; }
  .hero-media img { aspect-ratio: 1.65; }
  .section-heading { flex-direction: column; align-items: start; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact address { display: flex; gap: 12px 22px; flex-wrap: wrap; }
}
@media (max-width: 590px) {
  html { scroll-padding-top: 122px; }
  .header-inner { grid-template-columns: 1fr auto; padding-block: 10px 6px; gap: 5px 10px; }
  .header-inner nav { grid-row: 2; grid-column: 1/-1; gap: clamp(8px, 3vw, 21px); justify-content: space-between; }
  .header-inner nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .wordmark { width: 120px; }
  .button-small { font-size: .79rem; min-height: 41px; padding-inline: 9px; gap: 6px; }
  .hero { padding-top: 32px; gap: 26px; }
  .hero .eyebrow { margin-bottom: 15px; }
  .intro { margin-top: 17px; }
  .hero-actions { gap: 14px; margin-top: 22px; }
  .building-note { right: 14px; top: 20px; padding: 7px 10px; }
  .offer-grid { grid-template-columns: 1fr; }
  .reference-card, .reference-extra { grid-template-columns: 1fr; }
  .reference-cover > img { height: auto; min-height: 0; aspect-ratio: 1.55; }
  .gallery-dialog { width: calc(100% - 16px); }
  .footer-inner { align-items: start; flex-direction: column; }
}
@media (max-width: 360px) {
  h1 { font-size: 39px; }
  .header-inner .wordmark { width: 110px; }
  .header-cta { font-size: .74rem; padding-inline: 7px; white-space: nowrap; }
  .form-card { padding: 15px; }
  .option-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.arrow-up-right { display: inline-block; position: relative; width: 10px; height: 10px; flex: none; transform: translateY(1px); }
.arrow-up-right::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 7px; height: 7px; border-top: 1.5px solid; border-right: 1.5px solid; }
.arrow-up-right::after { content: ""; position: absolute; top: 4px; left: 0; width: 11px; height: 1.5px; background: currentColor; transform: rotate(-45deg); }
.text-link .arrow-up-right { vertical-align: baseline; }
