:root {
  --ap-gold: #f3c500;
  --ap-gold-soft: #ffe577;
  --ap-ink: #17191a;
  --ap-graphite: #2d2f31;
  --ap-grey: #6b7074;
  --ap-mist: #ececeb;
  --ap-paper: #f7f6f2;
  --ap-white: #fff;
  --ap-wide: 1240px;
  --ap-gutter: clamp(1rem, 3vw, 2rem);
  --ap-shadow: 0 20px 55px rgba(14, 17, 19, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; padding: 0; }
body, button, input, textarea, select { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { text-underline-offset: 0.2em; }
img { height: auto; max-width: 100%; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > *,main#main > * { margin-block-start: 0; }

.ap-shell { margin-inline: auto; max-width: calc(var(--ap-wide) + (2 * var(--ap-gutter))); padding-inline: var(--ap-gutter); width: 100%; }
.ap-section { padding-block: clamp(4rem, 8vw, 8rem); }
.ap-section--compact { padding-block: clamp(3rem, 6vw, 5.5rem); }
.ap-section--dark { background: var(--ap-ink); color: var(--ap-white); }
.ap-section--dark :is(h1,h2,h3,h4,p,a) { color: inherit; }
.ap-section--white { background: var(--ap-white); }
.ap-kicker { color: var(--ap-grey); font-size: .75rem; font-weight: 750; letter-spacing: .16em; margin: 0 0 1rem; text-transform: uppercase; }
.ap-kicker::before { background: var(--ap-gold); content: ""; display: inline-block; height: .68rem; margin-right: .6rem; width: .68rem; }
.ap-section--dark .ap-kicker { color: #c8cacc; }
.ap-display { font-size: clamp(2.7rem, 7vw, 6.6rem); letter-spacing: -.065em; line-height: .92; margin: 0; max-width: 12ch; }
.ap-display mark { background: transparent; color: var(--ap-gold); padding: 0; }
.ap-lead { color: var(--ap-grey); font-size: clamp(1.06rem, 1.7vw, 1.32rem); line-height: 1.55; max-width: 62ch; }
.ap-section--dark .ap-lead { color: #d5d7d8; }
.ap-heading { font-size: clamp(2.1rem, 5vw, 4.7rem); margin: 0; max-width: 14ch; }
.ap-heading-row { align-items: end; display: flex; gap: 2rem; justify-content: space-between; margin-bottom: clamp(2rem, 5vw, 4rem); }
.ap-text-link { align-items: center; display: inline-flex; font-size: .8rem; font-weight: 750; gap: .65rem; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.ap-text-link::after { content: "→"; font-size: 1.25rem; transition: transform .2s ease; }
.ap-text-link:hover::after { transform: translateX(.3rem); }

.ap-site-header { background: rgba(255,255,255,.96); border-top: 5px solid var(--ap-gold); box-shadow: 0 1px 0 rgba(23,25,26,.09); position: sticky; top: 0; z-index: 50; }
.ap-header-inner { align-items: center; display: flex; gap: 2rem; justify-content: space-between; min-height: 86px; }
.ap-brand { display: block; flex: 0 0 auto; line-height: 0; text-decoration: none; }
.ap-brand img { display: block; height: 66px; object-fit: contain; width: auto; }
.ap-header-actions { align-items: center; display: flex; gap: clamp(.7rem, 2vw, 1.7rem); }
.ap-site-header .wp-block-navigation-item__content { text-decoration: none; }
.ap-site-header .wp-block-navigation-item__content:hover { box-shadow: inset 0 -3px var(--ap-gold); }
.ap-header-phone { background: var(--ap-ink); color: var(--ap-white); font-size: .75rem; font-weight: 700; letter-spacing: .08em; padding: .7rem .9rem; text-decoration: none; text-transform: uppercase; white-space: nowrap; }

.ap-hero { background: var(--ap-ink); color: var(--ap-white); min-height: min(820px, calc(100vh - 80px)); overflow: hidden; position: relative; }
.ap-hero::before { background: linear-gradient(90deg, rgba(15,17,18,.98) 0%, rgba(15,17,18,.91) 36%, rgba(15,17,18,.15) 75%), url("../images/realizacje/zabudowa-wielorodzinna.webp") center/cover no-repeat; content: ""; inset: 0; position: absolute; }
.ap-hero::after { background-image: linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px); background-size: 80px 80px; content: ""; inset: 0; opacity: .33; position: absolute; }
.ap-hero-inner { display: flex; flex-direction: column; justify-content: center; min-height: inherit; padding-block: clamp(5rem, 10vw, 9rem); position: relative; z-index: 1; }
.ap-hero .ap-display { color: var(--ap-white); }
.ap-hero-copy { max-width: 790px; }
.ap-hero-brand { align-items: center; color: #c8cacc; display: flex; flex-wrap: wrap; font-size: .72rem; font-weight: 700; gap: .55rem .85rem; letter-spacing: .14em; margin: 0 0 1.25rem; text-transform: uppercase; }
.ap-hero-brand::before { background: var(--ap-gold); content: ""; flex: 0 0 .68rem; height: .68rem; width: .68rem; }
.ap-hero-brand strong { color: var(--ap-gold); font-size: .84rem; letter-spacing: .1em; }
.ap-hero-brand span { border-left: 1px solid rgba(255,255,255,.4); padding-left: .85rem; }
.ap-hero .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.ap-hero .wp-block-button__link { align-items: center; background: var(--ap-gold); color: var(--ap-ink); display: inline-flex; font-size: .82rem; font-weight: 750; justify-content: center; letter-spacing: .08em; padding: .85rem 1.25rem; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.ap-hero .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 2px solid rgba(255,255,255,.7); color: var(--ap-white); }
.ap-hero .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ap-white); color: var(--ap-ink); }
.ap-hero-index { align-items: end; bottom: 2.5rem; display: flex; gap: 1rem; position: absolute; right: clamp(1rem, 4vw, 3rem); z-index: 2; }
.ap-hero-index strong { color: var(--ap-gold); font-size: 2rem; }
.ap-hero-index span { border-top: 1px solid rgba(255,255,255,.5); color: #d5d7d8; font-size: .72rem; letter-spacing: .12em; padding-top: .6rem; text-transform: uppercase; }

.ap-services-grid { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); }
.ap-service { background: var(--ap-white); border-top: 4px solid var(--ap-mist); min-height: 320px; padding: clamp(1.5rem, 4vw, 2.5rem); transition: border-color .2s ease, transform .2s ease; }
.ap-service:hover { border-color: var(--ap-gold); transform: translateY(-4px); }
.ap-service-number { color: var(--ap-grey); font-size: .72rem; letter-spacing: .12em; }
.ap-service h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-top: 3.5rem; }
.ap-service p { color: var(--ap-grey); }

.ap-project-grid { display: grid; gap: clamp(1rem, 2.3vw, 2rem); grid-template-columns: repeat(12, 1fr); list-style: none; margin: 0; padding: 0; }
.ap-project-grid > li { grid-column: span 4; margin: 0; }
.ap-project-grid > .ap-project-card { grid-column: span 4; }
.ap-project-grid > li:first-child { grid-column: span 7; }
.ap-project-grid > .ap-project-card:first-child { grid-column: span 7; }
.ap-project-grid > li:nth-child(2) { grid-column: span 5; }
.ap-project-grid > .ap-project-card:nth-child(2) { grid-column: span 5; }
.ap-project-grid > li:nth-child(3) { grid-column: 3 / span 8; }
.ap-project-grid > .ap-project-card:nth-child(3) { grid-column: 3 / span 8; }
.ap-project-card { color: var(--ap-white); height: 100%; min-height: 520px; overflow: hidden; position: relative; }
.ap-project-card .wp-block-post-featured-image { height: 100%; inset: 0; margin: 0; position: absolute; width: 100%; }
.ap-project-card img { height: 100%; object-fit: cover; transition: transform .5s ease; width: 100%; }
.ap-project-card::after { background: linear-gradient(180deg, transparent 38%, rgba(14,16,17,.9)); content: ""; inset: 0; position: absolute; }
.ap-project-card:hover img { transform: scale(1.025); }
.ap-project-card-content { bottom: 0; left: 0; padding: clamp(1.4rem, 3vw, 2.4rem); position: absolute; right: 0; z-index: 1; }
.ap-project-card h3 { color: inherit; font-size: clamp(1.5rem, 3vw, 2.4rem); margin: .35rem 0; }
.ap-project-card h3 a { color: inherit; text-decoration: none; }
.ap-project-card .wp-block-post-excerpt,.ap-project-card .wp-block-post-excerpt__excerpt { color: #dadcdd; margin: 0; }
.ap-project-kind,.ap-project-kind a { color: var(--ap-gold); font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; }

.ap-process { align-items: center; display: grid; gap: clamp(2rem, 6vw, 6rem); grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
.ap-process-media { min-height: 600px; position: relative; }
.ap-process-media img { height: 88%; object-fit: cover; width: 84%; }
.ap-process-media img:last-child { border: 10px solid var(--ap-paper); bottom: 0; height: 44%; object-fit: cover; position: absolute; right: 0; width: 52%; }
.ap-feature-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.ap-feature-list li { border-top: 1px solid #cfd0cf; display: grid; gap: 1rem; grid-template-columns: 2.5rem 1fr; padding: 1.15rem 0; }
.ap-feature-list strong { color: var(--ap-grey); font-size: .74rem; letter-spacing: .12em; }

.ap-news-grid .wp-block-post-template { display: grid; gap: 1.5rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.ap-news-card { background: var(--ap-white); border-bottom: 4px solid var(--ap-mist); height: 100%; padding: clamp(1.4rem, 3vw, 2.2rem); }
.ap-news-card:hover { border-color: var(--ap-gold); }
.ap-news-card .wp-block-post-date { color: var(--ap-grey); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.ap-news-card .wp-block-post-title { font-size: clamp(1.35rem,2.5vw,2rem); }

.ap-contact-band { background: var(--ap-gold); color: var(--ap-ink); padding-block: clamp(3rem, 7vw, 6rem); }
.ap-contact-band-grid { align-items: center; display: grid; gap: 2rem; grid-template-columns: 1.2fr .8fr; }
.ap-contact-band h2 { font-size: clamp(2.2rem, 5vw, 5.2rem); margin: 0; }
.ap-contact-band__line { display: block; white-space: nowrap; }
.ap-contact-links { display: flex; flex-direction: column; gap: .7rem; }
.ap-contact-links a { border-bottom: 1px solid rgba(23,25,26,.4); font-size: clamp(1rem, 2vw, 1.35rem); padding: .75rem 0; text-decoration: none; }

.ap-page-hero { background: var(--ap-ink); color: var(--ap-white); padding-block: clamp(4rem, 9vw, 8rem); }
.ap-page-hero h1 { color: inherit; font-size: clamp(2.8rem,7vw,6.2rem); margin: 0; }
.ap-page-hero p { color: #ced0d1; max-width: 58ch; }
.ap-content-card { background: var(--ap-white); box-shadow: var(--ap-shadow); padding: clamp(1.5rem,5vw,4rem); }

.ap-project-meta { border-block: 1px solid #d7d7d3; display: grid; gap: 1rem; grid-template-columns: repeat(4,minmax(0,1fr)); margin-block: 2rem; padding-block: 1.2rem; }
.ap-project-meta div { min-width: 0; }
.ap-project-meta dt { color: var(--ap-grey); font-size: .68rem; letter-spacing: .11em; margin-bottom: .3rem; text-transform: uppercase; }
.ap-project-meta dd { margin: 0; }

.ap-contact-card { background: var(--ap-white); display: grid; gap: 0; grid-template-columns: minmax(300px,.82fr) minmax(360px,1.18fr); min-height: 520px; }
.ap-contact-card__details { padding: clamp(1.5rem,5vw,4rem); }
.ap-contact-card__details h2 { font-size: clamp(2rem,4vw,4rem); }
.ap-contact-card__row { border-top: 1px solid #d7d7d3; padding: 1rem 0; }
.ap-contact-card__label { color: var(--ap-grey); display: block; font-size: .68rem; letter-spacing: .12em; margin-bottom: .35rem; text-transform: uppercase; }
.ap-contact-card__value { font-size: clamp(1rem,2vw,1.25rem); text-decoration: none; }
.ap-map-panel { align-items: center; background-color: var(--ap-graphite); background-image: linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px); background-size: 44px 44px; color: var(--ap-white); display: flex; justify-content: center; min-height: 420px; overflow: hidden; position: relative; }
.ap-map-panel iframe { border: 0; height: 100%; inset: 0; position: absolute; width: 100%; }
.ap-map-panel__route { bottom: 1rem; position: absolute; right: 1rem; z-index: 2; }
.ap-map-panel__placeholder { max-width: 340px; padding: 2rem; position: relative; text-align: center; z-index: 1; }
.ap-map-panel__pin { background: var(--ap-gold); border-radius: 50% 50% 50% 0; display: block; height: 42px; margin: 0 auto 1.5rem; transform: rotate(-45deg); width: 42px; }
.ap-map-panel__pin::after { background: var(--ap-ink); border-radius: 50%; content: ""; height: 14px; left: 14px; position: absolute; top: 14px; width: 14px; }
.ap-map-panel button,.ap-map-panel a { background: var(--ap-gold); border: 0; color: var(--ap-ink); cursor: pointer; display: inline-block; font-size: .75rem; font-weight: 750; letter-spacing: .09em; margin-top: .8rem; padding: .9rem 1.1rem; text-decoration: none; text-transform: uppercase; }

.ap-site-footer { background: var(--ap-ink); color: #c7c9ca; padding-block: clamp(3rem, 6vw, 5rem); }
.ap-site-footer :is(h2,h3,a) { color: var(--ap-white); }
.ap-footer-grid { display: grid; gap: 3rem; grid-template-columns: 1fr 1fr 1fr; }
.ap-footer-brand img { height: 105px; object-fit: contain; width: auto; }
.ap-footer-company-name { color: var(--ap-white); font-size: .78rem; font-weight: 650; letter-spacing: .055em; line-height: 1.55; margin: 1.1rem 0 0; max-width: 260px; text-transform: uppercase; }
.ap-footer-title { color: var(--ap-grey); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ap-footer-links { display: flex; flex-direction: column; gap: .4rem; }
.ap-footer-links a { text-decoration: none; }
.ap-footer-bottom { border-top: 1px solid #3d4042; display: flex; font-size: .72rem; justify-content: space-between; margin-top: 3rem; padding-top: 1.2rem; }

.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute!important; width: 1px; word-wrap: normal!important; }
.screen-reader-text:focus { background: var(--ap-white); clip: auto!important; clip-path: none; color: var(--ap-ink); display: block; font-weight: 700; height: auto; left: 1rem; padding: 1rem; top: 1rem; width: auto; z-index: 99999; }
:focus-visible { outline: 3px solid var(--ap-gold); outline-offset: 3px; }

@media (max-width: 900px) {
  .ap-header-phone { display: none; }
  .ap-services-grid { grid-template-columns: 1fr; }
  .ap-service { min-height: 0; }
  .ap-project-grid > li,.ap-project-grid > li:first-child,.ap-project-grid > li:nth-child(2),.ap-project-grid > li:nth-child(3),.ap-project-grid > .ap-project-card,.ap-project-grid > .ap-project-card:first-child,.ap-project-grid > .ap-project-card:nth-child(2),.ap-project-grid > .ap-project-card:nth-child(3) { grid-column: 1 / -1; }
  .ap-project-card { min-height: 460px; }
  .ap-process,.ap-contact-band-grid,.ap-contact-card { grid-template-columns: 1fr; }
  .ap-process-media { min-height: 480px; }
  .ap-footer-grid { grid-template-columns: 1fr 1fr; }
  .ap-project-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .ap-site-header { position: relative; }
  .ap-header-inner { min-height: 74px; }
  .ap-brand img { height: 55px; max-width: 155px; }
  .ap-display { font-size: clamp(2.55rem, 15vw, 4.6rem); }
  .ap-hero { min-height: 720px; }
  .ap-hero-brand { gap: .45rem .65rem; letter-spacing: .1em; }
  .ap-hero-brand span { padding-left: .65rem; }
  .ap-hero::before { background: linear-gradient(180deg,rgba(15,17,18,.45),rgba(15,17,18,.98) 58%),url("../images/realizacje/zabudowa-wielorodzinna.webp") 62% center/cover no-repeat; }
  .ap-hero-inner { justify-content: end; padding-bottom: 7rem; }
  .ap-hero-index { bottom: 1.4rem; left: 1rem; right: auto; }
  .ap-heading-row { align-items: start; flex-direction: column; }
  .ap-project-card { min-height: 390px; }
  .ap-process-media { min-height: 380px; }
  .ap-process-media img { width: 92%; }
  .ap-contact-band h2 { font-size: clamp(1.9rem, 9vw, 2.2rem); }
  .ap-news-grid .wp-block-post-template { grid-template-columns: 1fr; }
  .ap-footer-grid { grid-template-columns: 1fr; }
  .ap-footer-bottom { flex-direction: column; gap: .5rem; }
  .ap-project-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { scroll-behavior: auto!important; transition-duration: .01ms!important; }
}
