/*
Theme Name: NordFenster
Theme URI: https://nordfenster.pl/
Author: NordFenster
Description: Indywidualny motyw NordFenster: DE/PL, realizacje z galerią, formularz z załącznikami i strony prawne.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nordfenster
*/

/* ---------- Zmienne ---------- */
:root {
  --bg: #f6f5f1;
  --ink: #101618;
  --muted: #5d686b;
  --line: #dde1df;
  --white: #fff;
  --gold: #caa66a;
  --gold-dark: #8a6a2f;
  --dark: #0d1416;
  --dark-2: #162023;
  --soft: #edf0ee;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(9, 15, 17, .10);
  --header-h: 78px;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.menu-open, body.lb-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
svg.nf-icon { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--gold); color: #111; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.08; margin: 0 0 18px; text-wrap: balance; }
h1 { font-size: clamp(40px, 7vw, 86px); max-width: 850px; }
h2 { font-size: clamp(32px, 5vw, 58px); }
h3 { font-size: 24px; }
p { text-wrap: pretty; }

.kicker {
  font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 10px;
}
.hero .kicker, .systems .kicker, .contact .kicker { color: var(--gold); }

/* ---------- Przyciski ---------- */
.nav-cta, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .2s ease, filter .2s ease, background-color .2s ease;
}
.nav-cta, .btn.gold { background: var(--gold); color: #111; }
.nav-cta:hover, .btn.gold:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.ghost-dark { border-color: var(--line); color: var(--ink); }
.btn.dark { background: var(--dark); color: #fff; }
.btn.dark:hover { filter: brightness(1.3); }
.btn.is-loading { opacity: .7; cursor: progress; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.link-button:hover { color: var(--gold); }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 20, 22, .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.admin-bar .site-header { top: 32px; }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; }
.brand img { height: 60px; width: auto; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; color: #e9eeee; font-size: 15px; }
.site-nav > a:not(.nav-cta):hover { color: var(--gold); }
.lang-switch { display: flex; gap: 8px; margin-left: 4px; color: #7d8a8b; }
.lang-switch a { color: #c7d0ce; }
.lang-switch .active { color: var(--gold); font-weight: 700; }
.menu-toggle {
  display: none; margin-left: auto; background: transparent; border: 0; color: #fff;
  width: 46px; height: 46px; place-items: center; cursor: pointer; font-size: 26px;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: grid; }
.menu-toggle span { display: grid; }

/* ---------- Hero ---------- */
.hero {
  min-height: min(720px, 88vh); display: flex; align-items: flex-end; position: relative;
  background: #182124; color: #fff; overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 11, 12, .88) 0%, rgba(6, 11, 12, .62) 45%, rgba(6, 11, 12, .10) 78%),
    linear-gradient(0deg, rgba(6, 11, 12, .38), transparent 45%);
}
.hero-inner { padding: 120px 0 92px; }
.hero .lead { font-size: clamp(18px, 2vw, 23px); max-width: 690px; color: #e7eceb; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Pasek zaufania ---------- */
.trust { background: var(--dark); color: #eef3f2; }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin-block: 0; }
.trust-item { display: flex; align-items: center; gap: 10px; padding: 22px 18px; border-right: 1px solid rgba(255, 255, 255, .1); font-size: 15px; }
.trust-item:last-child { border-right: 0; }
.trust-item .nf-icon { color: var(--gold); }

/* ---------- Sekcje ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 760px; margin-bottom: 46px; }
.section-head p { font-size: 18px; color: var(--muted); }
.section-more { margin: 32px 0 0; text-align: center; }
.footnote { font-size: 12px; color: #93a09d; margin-top: 18px; }

/* Produkty */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card .icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--soft); color: var(--ink);
  display: grid; place-items: center; margin-bottom: 28px; font-size: 22px;
}
.product-card p { color: var(--muted); margin: 0; }

/* Systemy okienne */
.systems { background: #101719; color: #fff; }
.systems .section-head p { color: #bdc7c6; }
.system-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.system-card {
  display: grid; grid-template-columns: 210px 1fr; gap: 26px;
  background: #172024; border: 1px solid rgba(255, 255, 255, .09); border-radius: var(--radius);
  padding: 24px; overflow: hidden;
}
.system-card h3 { font-size: 27px; }
.system-visual {
  min-height: 230px; border-radius: 14px; background: linear-gradient(145deg, #eef1ef, #cdd3d0);
  position: relative; overflow: hidden; color: #13191b;
}
.profile-schematic { position: absolute; inset: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; transform: rotate(-8deg); }
.profile-part {
  border: 7px solid #272d2e; border-radius: 8px; padding: 9px; background: #f7f8f7;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px;
}
.profile-part span { border: 2px solid #586062; border-radius: 3px; }
.profile-measure { position: absolute; right: 12px; bottom: 10px; background: #0f1618; color: #fff; padding: 7px 10px; border-radius: 8px; font-weight: 800; }
.schematic-label { position: absolute; left: 10px; top: 10px; background: rgba(255, 255, 255, .88); padding: 5px 8px; border-radius: 7px; font-size: 11px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.spec { background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 12px; display: flex; flex-direction: column-reverse; }
.spec dd { margin: 0; color: var(--gold); font-size: 20px; font-weight: 700; }
.spec dt { font-size: 14px; color: #d0d8d7; }
.source-link { font-size: 13px; color: #d7dddd; text-decoration: underline; text-underline-offset: 3px; }
.source-link:hover { color: var(--gold); }

/* Loft – galeria zdjęć */
.loft { background: #fff; }
.photo-grid { display: grid; grid-template-columns: 1.15fr .85fr .85fr; grid-auto-rows: 260px; grid-auto-flow: dense; gap: 14px; }
.photo-grid figure { margin: 0; border-radius: 16px; overflow: hidden; position: relative; background: #ddd; }
.photo-grid figure:first-child { grid-row: span 2; }
.photo-grid figure:nth-child(5) { grid-column: span 2; }
.photo-grid figure:nth-child(6) { grid-row: span 2; }
.photo-grid a { display: block; height: 100%; cursor: zoom-in; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-grid figure:hover img { transform: scale(1.03); }
.photo-grid figcaption {
  position: absolute; left: 14px; bottom: 14px; pointer-events: none;
  background: rgba(11, 17, 18, .78); color: #fff; padding: 7px 10px; border-radius: 8px; font-size: 12px;
}

/* Realizacje */
.projects { background: #eceeea; }
.page-title { font-size: clamp(40px, 6vw, 64px); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease; }
.project-card:hover { transform: translateY(-3px); }
.project-card > a { display: block; height: 100%; }
.project-card img { width: 100%; height: 260px; object-fit: cover; }
.project-card .project-body { padding: 20px; }
.project-card h3 { font-size: 21px; margin-bottom: 8px; }
.project-card p { margin: 0; color: var(--muted); }
.project-meta { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filter-chips a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.filter-chips a.active, .filter-chips a:hover { background: var(--dark); color: #fff; border-color: var(--dark); }
.nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.nav-links .page-numbers { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; border-radius: 10px; background: #fff; }
.nav-links .current { background: var(--dark); color: #fff; }

/* Proces */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.step { padding: 22px 4px; }
.step .num {
  width: 42px; height: 42px; background: var(--dark); color: #fff; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; margin-bottom: 18px;
}
.step p { color: var(--muted); }

/* Kontakt */
.contact { background: var(--dark); color: #fff; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; align-items: start; }
.contact p { color: #d6dedd; }
.contact address { font-style: normal; color: #d6dedd; margin: 24px 0; }
.contact-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-links li { display: flex; align-items: center; gap: 10px; color: var(--gold); }
.contact-links a { color: var(--gold); }
.contact-links a:hover { text-decoration: underline; }
.contact-card { background: var(--dark-2); padding: 30px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: block; font-size: 13px; color: #d6dedd; margin-bottom: 6px; }
.contact-form input:not([type=checkbox]), .contact-form textarea, .contact-form select {
  width: 100%; border: 1px solid #3c484b; background: #0e1618; color: #fff;
  border-radius: 10px; padding: 13px 15px; font: inherit; font-size: 16px;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(202, 166, 106, .25); }
.contact-form input[type=file] { padding: 10px; font-size: 14px; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form ::placeholder { color: #6f7c7e; }
.contact-form .consent { display: flex; gap: 10px; align-items: flex-start; }
.contact-form .consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.contact-form .consent label { margin: 0; }
.contact-form .consent a { color: var(--gold); text-decoration: underline; }
.contact-form button { width: 100%; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; }
.notice.ok { background: #153a2b; }
.notice.err { background: #522222; }

/* ---------- Stopka ---------- */
.site-footer { background: #080d0f; color: #c7d0ce; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 38px; }
.footer-brand img { width: 170px; height: auto; }
.footer-grid strong { color: #fff; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 34px; padding-top: 20px; font-size: 12px; color: #8f9b99; }

/* ---------- Strony tekstowe / prawne ---------- */
.legal { padding: 76px 0; max-width: 900px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal h2 { font-size: 26px; margin-top: 36px; }
.legal p, .legal li { color: #344043; }
.legal a { color: var(--gold-dark); text-decoration: underline; }
.post-item { padding: 24px 0; border-bottom: 1px solid var(--line); }

/* ---------- Pojedyncza realizacja ---------- */
.project-single { padding: 56px 0 90px; }
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.project-hero { width: 100%; max-height: 680px; object-fit: cover; border-radius: 18px; margin: 28px 0; }
.project-content { max-width: 800px; font-size: 18px; color: #344043; }
.project-single .gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 36px; }
.project-single .gallery a { display: block; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.project-single .gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.project-single .gallery a:hover img { transform: scale(1.03); }
.project-cta { margin-top: 56px; padding: 40px; border-radius: var(--radius); background: var(--dark); color: #fff; }
.project-cta h2 { font-size: clamp(28px, 4vw, 40px); }
.project-cta p { color: #d6dedd; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 10000; background: rgba(5, 9, 10, .94);
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: 24px 12px;
}
.lightbox figure { margin: 0; display: grid; place-items: center; gap: 10px; height: 100%; min-height: 0; }
.lightbox img { max-height: calc(100vh - 100px); width: auto; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #aab4b2; font-size: 13px; }
.lightbox button { background: rgba(255, 255, 255, .1); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; }

/* ---------- Baner cookies ---------- */
.cookie-banner {
  position: fixed; z-index: 9999; left: 18px; right: 18px; bottom: 18px; max-width: 980px; margin-inline: auto;
  background: #11191b; color: #fff; border: 1px solid #334043; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35); padding: 18px;
}
.cookie-inner { display: flex; gap: 22px; align-items: center; }
.cookie-copy { flex: 1; }
.cookie-copy a { color: var(--gold); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner button { border: 0; border-radius: 9px; padding: 11px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.cookie-banner .primary { background: var(--gold); color: #111; }
.cookie-banner .secondary { background: #253033; color: #fff; }
.cookie-banner .outline { background: transparent; border: 1px solid #526064; color: #fff; }
.cookie-settings { margin-top: 16px; padding-top: 14px; border-top: 1px solid #364144; }
.cookie-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 8px 0; }
.switch-note { color: #aab4b2; font-size: 12px; }

/* ---------- WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  transition: transform .2s ease, bottom .2s ease;
}
.whatsapp:hover { transform: scale(1.06); }
.whatsapp .nf-icon { width: 30px; height: 30px; }
.cookie-banner:not([hidden]) ~ .whatsapp { bottom: 180px; }

/* ---------- Responsywność ---------- */
@media (max-width: 1100px) {
  .site-nav { gap: 16px; font-size: 14px; }
}
@media (max-width: 960px) {
  .menu-toggle { display: grid; }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: var(--dark); padding: 12px 20px 24px; flex-direction: column; align-items: stretch; gap: 0; font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .site-nav > a:not(.nav-cta) { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .site-nav.open { display: flex; }
  .lang-switch { margin: 16px 0; }
  .nav-cta { width: 100%; }
  .trust-inner, .product-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: 0; }
  .system-grid, .contact-grid { grid-template-columns: 1fr; }
  .system-card { grid-template-columns: 190px 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid figure:first-child { grid-row: span 1; }
  .photo-grid figure:nth-child(5) { grid-column: span 1; }
  .photo-grid figure:nth-child(6) { grid-row: span 1; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 650px) {
  :root { --header-h: 70px; }
  .wrap { width: calc(100% - 32px); }
  .brand img { height: 50px; }
  .hero { min-height: 600px; }
  .hero-inner { padding: 90px 0 56px; }
  .hero::before { background: linear-gradient(0deg, rgba(6, 11, 12, .92) 0%, rgba(6, 11, 12, .72) 55%, rgba(6, 11, 12, .45) 100%); }
  .kicker { letter-spacing: .12em; }
  .hero-actions .btn { flex: 1 1 100%; }
  .section { padding: 68px 0; }
  .trust-inner { grid-template-columns: 1fr 1fr; }
  .trust-item { padding: 16px 10px; font-size: 14px; }
  .product-grid, .projects-grid, .steps, .footer-grid, .photo-grid, .contact-form, .project-single .gallery { grid-template-columns: 1fr; }
  .system-card { grid-template-columns: 1fr; }
  .system-visual { min-height: 190px; }
  .photo-grid { grid-auto-rows: 320px; }
  .contact-form .full { grid-column: auto; }
  .contact-card { padding: 20px; }
  .cookie-inner { display: block; }
  .cookie-actions { margin-top: 12px; }
  .cookie-actions button { flex: 1 1 auto; }
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; }
  .cookie-banner:not([hidden]) ~ .whatsapp { display: none; }
  .whatsapp { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .project-cta { padding: 26px; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 8px 8px; }
  .lightbox .lb-prev, .lightbox .lb-next { position: absolute; bottom: 16px; }
  .lightbox .lb-prev { left: 16px; }
  .lightbox .lb-next { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
