/* =========================================================
   PERRUGI · MAIN STYLESHEET
   Zgodny z Brand Book v 1.0 (2026)
   ========================================================= */

/* ---------- 1 · DESIGN TOKENS ---------- */
:root {
  /* Paleta */
  --ink:        #1A1815;
  --ink-90:     rgba(26, 24, 21, 0.92);
  --ink-60:     rgba(26, 24, 21, 0.60);
  --ink-40:     rgba(26, 24, 21, 0.40);
  --ink-20:     rgba(26, 24, 21, 0.20);
  --ink-12:     rgba(26, 24, 21, 0.12);
  --ink-08:     rgba(26, 24, 21, 0.08);

  --cream:      #F4F1EA;
  --paper-warm: #EDE8DC;
  --brass:      #B8915C;

  /* Powierzchnie */
  --bg:         var(--cream);
  --bg-warm:    var(--paper-warm);
  --bg-dark:    var(--ink);
  --fg:         var(--ink);
  --fg-on-dark: var(--cream);

  /* Typografia */
  --font-sans:  "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ls-display: -0.025em;
  --ls-mono:    0.22em;

  /* Skala typografii */
  --fs-display: clamp(3.2rem, 7vw, 6rem);   /* 56–96pt */
  --fs-h1:      clamp(2.4rem, 4.5vw, 3.5rem);
  --fs-h2:      clamp(1.8rem, 3vw, 2.4rem); /* 24–32pt */
  --fs-h3:      1.35rem;
  --fs-lead:    1.0625rem;                   /* 14pt-ish na ekranie */
  --fs-body:    0.95rem;                     /* 11pt */
  --fs-small:   0.8125rem;
  --fs-mono:    0.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* Inne */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;
  --hairline:  1px solid var(--ink-12);
  --duration:  240ms;
  --easing:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2 · RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: opacity var(--duration) var(--easing); }
a:hover { opacity: 0.65; }
button { font: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

::selection { background: var(--ink); color: var(--cream); }

/* ---------- 3 · TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: var(--ls-display);
  line-height: 1.05;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); line-height: 1.0; }
h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3 { font-size: var(--fs-h3); line-height: 1.2; }

.display {
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.96;
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-90);
  max-width: 38em;
}

.body-large { font-size: 1.0625rem; line-height: 1.6; }

.mono,
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--ink-60);
}
.eyebrow { display: inline-block; margin-bottom: var(--space-4); }
.eyebrow .dash { color: var(--ink-40); margin: 0 0.5em; }

.section-num {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--ink-40);
}

/* ---------- 4 · LAYOUT ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.section-tight { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }

.bg-warm { background: var(--bg-warm); }
.bg-ink  { background: var(--bg-dark); color: var(--fg-on-dark); }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: var(--cream); }
.bg-ink .eyebrow, .bg-ink .mono { color: rgba(244, 241, 234, 0.65); }
.bg-ink .lead { color: rgba(244, 241, 234, 0.85); }
.bg-ink a:hover { opacity: 0.7; }

.divider { border: 0; border-top: var(--hairline); margin: 0; }
.bg-ink .divider { border-top: 1px solid rgba(244, 241, 234, 0.12); }

/* Sekcja z numerkiem brandbookowym (np. 01 · O MARCE) */
.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-4);
  border-bottom: var(--hairline);
}
.bg-ink .section-header { border-bottom-color: rgba(244,241,234,0.18); }

/* ---------- 5 · NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 234, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: var(--hairline);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 72px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-header__brand { display: flex; align-items: center; gap: var(--space-3); }
.site-header__brand svg { height: 32px; width: auto; }

.site-nav {
  display: flex; align-items: center; gap: var(--space-6);
}
.site-nav__list {
  display: flex; align-items: center; gap: var(--space-5);
  list-style: none; margin: 0; padding: 0;
}
.site-nav__list a {
  font-size: 0.9rem; font-weight: 500;
  padding: 8px 0; position: relative;
}
.site-nav__list a:hover { opacity: 1; }
.site-nav__list a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px;
  height: 1px; background: var(--ink);
  transition: right var(--duration) var(--easing);
}
.site-nav__list a:hover::after { right: 0; }

.lang-switch {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lang-switch__item { padding: 4px 6px; color: var(--ink-40); }
.lang-switch__item.is-active { color: var(--ink); }
.lang-switch__sep { color: var(--ink-20); }

/* Dropdown (Produkty → Keypad / Chime / …) */
.site-nav__list .has-children { position: relative; }

/* Trigger dropdownu — button, nie link (nie nawiguje) */
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 8px 0;
  margin: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  letter-spacing: inherit;
}
.nav-trigger::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 2px;
  height: 1px;
  background: var(--ink);
  transition: right var(--duration) var(--easing);
}
.nav-trigger:hover::after,
.has-children:hover .nav-trigger::after,
.has-children.is-open .nav-trigger::after { right: 0; }

.nav-trigger .caret {
  display: inline-flex;
  align-items: center;
  transition: transform var(--duration) var(--easing);
  margin-top: 1px;
}
.site-nav__list .has-children:hover .caret,
.site-nav__list .has-children:focus-within .caret,
.site-nav__list .has-children.is-open .caret {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: -12px;
  min-width: 220px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: var(--cream);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -10px rgba(26, 24, 21, 0.18), 0 6px 14px -6px rgba(26, 24, 21, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--duration) var(--easing), transform var(--duration) var(--easing), visibility 0s linear var(--duration);
  z-index: 100;
}
/* Most łapania kursora między linkiem a submenu */
.submenu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.site-nav__list .has-children:hover .submenu,
.site-nav__list .has-children:focus-within .submenu,
.site-nav__list .has-children.is-open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.submenu li { margin: 0; padding: 0; }
.submenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.submenu a:hover { background: var(--paper-warm); opacity: 1; }
.submenu a::after { display: none; }

/* Nieaktywne pozycje (Chime, Keypad dla mieszkań) — wyglądają jak link, nie nawigują */
.submenu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  color: var(--ink-60);
}
.submenu__item.is-disabled {
  cursor: not-allowed;
  user-select: none;
}
.submenu__tag {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-40);
  font-weight: 400;
}

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
}
.nav-toggle__bar { display:block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: transform var(--duration) var(--easing), opacity var(--duration) var(--easing); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 880px) {
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream);
    padding: var(--gutter);
    gap: var(--space-5);
    border-bottom: var(--hairline);
  }
  .site-nav__list { flex-direction: column; align-items: flex-start; gap: var(--space-4); width: 100%; }
  .site-nav__list .has-children { width: 100%; }
  .site-nav__list .has-children > a { width: 100%; justify-content: space-between; }
  .nav-toggle { display: block; }

  /* Submenu jako accordion */
  .submenu {
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0 0 0 var(--space-4);
    margin: var(--space-3) 0 0;
    min-width: 0;
    width: 100%;
    display: none;
    transition: none;
  }
  .submenu::before { display: none; }
  .site-nav__list .has-children.is-open .submenu { display: block; }
  .submenu li { padding: var(--space-2) 0; }
  .submenu a { padding: 8px 0; }
}

/* ---------- 6 · BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 0.9rem; font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  transition: background var(--duration) var(--easing), color var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.btn:hover { background: transparent; color: var(--ink); opacity: 1; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--small { padding: 10px 16px; font-size: 0.8rem; }
.btn .arrow { display: inline-block; transition: transform var(--duration) var(--easing); }
.btn:hover .arrow { transform: translateX(4px); }

.bg-ink .btn { border-color: var(--cream); background: var(--cream); color: var(--ink); }
.bg-ink .btn:hover { background: transparent; color: var(--cream); }
.bg-ink .btn--ghost { background: transparent; color: var(--cream); }
.bg-ink .btn--ghost:hover { background: var(--cream); color: var(--ink); }

/* ---------- 7 · BRAND MARK 3×3 ---------- */
.mark-3x3 {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 18%;
  width: 1em; height: 1em;
}
.mark-3x3 i {
  display: block;
  background: var(--ink);
  border-radius: 50%;
  aspect-ratio: 1;
}
.mark-3x3 i.d-95 { opacity: 0.95; }
.mark-3x3 i.d-50 { opacity: 0.50; }
.mark-3x3 i.d-100 { opacity: 1; }
.bg-ink .mark-3x3 i { background: var(--cream); }

/* ---------- 8 · HERO ---------- */
.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero__copy h1 { margin-bottom: 0.4em; }
.hero__cta { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.hero__visual {
  display: flex; justify-content: center; align-items: center;
}
.hero__mark {
  font-size: clamp(180px, 28vw, 360px);
  width: 1em; height: 1em;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 18%;
}
.hero__mark i {
  display: block;
  background: var(--ink);
  border-radius: 50%;
  aspect-ratio: 1;
}
.hero__mark i.d-95 { opacity: 0.95; }
.hero__mark i.d-50 { opacity: 0.50; }
.hero__mark i.d-100 { opacity: 1; }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
}

/* === Rodzina produktów w hero (Lock / Chime / Color) === */
.hero__products {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
  width: 100%;
  margin-left: auto;
}
.hero__product {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  position: relative;
  transition: background var(--duration) var(--easing),
              border-color var(--duration) var(--easing),
              transform var(--duration) var(--easing);
}
.hero__product:not(.is-disabled):hover {
  background: var(--paper-warm);
  border-color: var(--ink-20);
  opacity: 1;
  transform: translateY(-1px);
}
.hero__product.is-disabled {
  cursor: not-allowed;
  color: var(--ink-60);
}
.hero__product.is-disabled .hero__product__name {
  color: var(--ink-90);
}

.hero__product__mark {
  flex-shrink: 0;
  font-size: 56px !important;
  width: 1em;
  height: 1em;
}

.hero__product__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.hero__product__name {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.hero__product__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-60);
  flex-wrap: wrap;
}
.hero__product__code {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.hero__product__sep { color: var(--ink-20); }

.hero__product__arrow {
  margin-left: auto;
  color: var(--ink-40);
  font-size: 1.1rem;
  transition: transform var(--duration) var(--easing), color var(--duration) var(--easing);
}
.hero__product:hover .hero__product__arrow {
  transform: translateX(4px);
  color: var(--ink);
}

.hero__product__tag {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--ink-40);
  padding: 4px 10px;
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  white-space: nowrap;
}

/* Mobile — karty bardziej zwartymi rzędami */
@media (max-width: 880px) {
  .hero__products { max-width: none; margin-left: 0; }
  .hero__product { padding: var(--space-4); gap: var(--space-4); }
  .hero__product__mark { font-size: 48px !important; }
  .hero__product__name { font-size: 1.25rem; }
}
@media (max-width: 480px) {
  .hero__product__meta span:not(.hero__product__code) { display: none; }
  .hero__product__sep { display: none; }
}

/* === ANIMACJE KROPEK W KARTACH RODZINY === */

/* Wspólne: transform-origin w środku kropki, smooth blending */
.hero__product__mark i {
  transform-origin: center;
  will-change: transform, opacity;
}

/* — KEYPAD (lock): PIN press na hover całej karty —
   Pięć kropek skaluje się po kolei jak naciskanie cyfr PIN-u.
   Sekwencja 7 → 5 → 3 → 9 → 1 (zigzag, czyta się jak losowy kod). */
@keyframes perrugi-key-press {
  0%, 75%, 100% { transform: scale(1); }
  8%, 18%       { transform: scale(0.55); }
}
.hero__product--keypad:hover .hero__product__mark i:nth-child(7),
.hero__product--keypad:hover .hero__product__mark i:nth-child(5),
.hero__product--keypad:hover .hero__product__mark i:nth-child(3),
.hero__product--keypad:hover .hero__product__mark i:nth-child(9),
.hero__product--keypad:hover .hero__product__mark i:nth-child(1) {
  animation: perrugi-key-press 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.hero__product--keypad:hover .hero__product__mark i:nth-child(7) { animation-delay: 0s;     }
.hero__product--keypad:hover .hero__product__mark i:nth-child(5) { animation-delay: 0.22s;  }
.hero__product--keypad:hover .hero__product__mark i:nth-child(3) { animation-delay: 0.44s;  }
.hero__product--keypad:hover .hero__product__mark i:nth-child(9) { animation-delay: 0.66s;  }
.hero__product--keypad:hover .hero__product__mark i:nth-child(1) { animation-delay: 0.88s;  }

/* — CHIME: fala pulsacji z centrum na zewnątrz, zawsze włączona.
   Centrum → krawędzie → narożniki → restart. */
@keyframes perrugi-chime-wave {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(0.7); }
}
.hero__product--chime .hero__product__mark i {
  animation: perrugi-chime-wave 2.4s ease-in-out infinite;
}
.hero__product--chime .hero__product__mark i:nth-child(5) { animation-delay: 0s;   }
.hero__product--chime .hero__product__mark i:nth-child(2),
.hero__product--chime .hero__product__mark i:nth-child(4),
.hero__product--chime .hero__product__mark i:nth-child(6),
.hero__product--chime .hero__product__mark i:nth-child(8) { animation-delay: 0.4s; }
.hero__product--chime .hero__product__mark i:nth-child(1),
.hero__product--chime .hero__product__mark i:nth-child(3),
.hero__product--chime .hero__product__mark i:nth-child(7),
.hero__product--chime .hero__product__mark i:nth-child(9) { animation-delay: 0.8s; }

/* — COLOR: brass shimmer w środku + powolny zegarowy sweep krawędzi.
   Daje efekt „gradientowy" z brand booka. */
@keyframes perrugi-color-shimmer {
  0%, 100% { opacity: 1;    filter: brightness(1); }
  50%      { opacity: 0.78; filter: brightness(1.18); }
}
@keyframes perrugi-color-sweep {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.85; }
}
.hero__product--color .hero__product__mark i:nth-child(5) {
  animation: perrugi-color-shimmer 3.6s ease-in-out infinite;
}
.hero__product--color .hero__product__mark i:nth-child(2),
.hero__product--color .hero__product__mark i:nth-child(6),
.hero__product--color .hero__product__mark i:nth-child(8),
.hero__product--color .hero__product__mark i:nth-child(4) {
  animation: perrugi-color-sweep 4.8s ease-in-out infinite;
}
.hero__product--color .hero__product__mark i:nth-child(2) { animation-delay: 0s;   }
.hero__product--color .hero__product__mark i:nth-child(6) { animation-delay: 1.2s; }
.hero__product--color .hero__product__mark i:nth-child(8) { animation-delay: 2.4s; }
.hero__product--color .hero__product__mark i:nth-child(4) { animation-delay: 3.6s; }

/* === ANIMACJE — DUŻE KARTY RODZINY (homepage rodzina + /produkty/) === */
.product-card__mark i {
  transform-origin: center;
  will-change: transform, opacity;
}

/* Keypad — PIN press na hover */
.product-card--keypad:hover .product-card__mark i:nth-child(7),
.product-card--keypad:hover .product-card__mark i:nth-child(5),
.product-card--keypad:hover .product-card__mark i:nth-child(3),
.product-card--keypad:hover .product-card__mark i:nth-child(9),
.product-card--keypad:hover .product-card__mark i:nth-child(1) {
  animation: perrugi-key-press 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.product-card--keypad:hover .product-card__mark i:nth-child(7) { animation-delay: 0s;    }
.product-card--keypad:hover .product-card__mark i:nth-child(5) { animation-delay: 0.22s; }
.product-card--keypad:hover .product-card__mark i:nth-child(3) { animation-delay: 0.44s; }
.product-card--keypad:hover .product-card__mark i:nth-child(9) { animation-delay: 0.66s; }
.product-card--keypad:hover .product-card__mark i:nth-child(1) { animation-delay: 0.88s; }

/* Chime — fala pulsacji */
.product-card--chime .product-card__mark i {
  animation: perrugi-chime-wave 2.4s ease-in-out infinite;
}
.product-card--chime .product-card__mark i:nth-child(5) { animation-delay: 0s;   }
.product-card--chime .product-card__mark i:nth-child(2),
.product-card--chime .product-card__mark i:nth-child(4),
.product-card--chime .product-card__mark i:nth-child(6),
.product-card--chime .product-card__mark i:nth-child(8) { animation-delay: 0.4s; }
.product-card--chime .product-card__mark i:nth-child(1),
.product-card--chime .product-card__mark i:nth-child(3),
.product-card--chime .product-card__mark i:nth-child(7),
.product-card--chime .product-card__mark i:nth-child(9) { animation-delay: 0.8s; }

/* Color — shimmer + sweep */
.product-card--color .product-card__mark i:nth-child(5) {
  animation: perrugi-color-shimmer 3.6s ease-in-out infinite;
}
.product-card--color .product-card__mark i:nth-child(2),
.product-card--color .product-card__mark i:nth-child(6),
.product-card--color .product-card__mark i:nth-child(8),
.product-card--color .product-card__mark i:nth-child(4) {
  animation: perrugi-color-sweep 4.8s ease-in-out infinite;
}
.product-card--color .product-card__mark i:nth-child(2) { animation-delay: 0s;   }
.product-card--color .product-card__mark i:nth-child(6) { animation-delay: 1.2s; }
.product-card--color .product-card__mark i:nth-child(8) { animation-delay: 2.4s; }
.product-card--color .product-card__mark i:nth-child(4) { animation-delay: 3.6s; }

/* === HEADER BRAND MARK — wake-up na ładowanie strony === */
@keyframes perrugi-brand-wake {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
.site-header__brand .mark-3x3 i {
  transform-origin: center;
  animation: perrugi-brand-wake 700ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.site-header__brand .mark-3x3 i:nth-child(1) { animation-delay: 0ms;   }
.site-header__brand .mark-3x3 i:nth-child(2) { animation-delay: 60ms;  }
.site-header__brand .mark-3x3 i:nth-child(3) { animation-delay: 120ms; }
.site-header__brand .mark-3x3 i:nth-child(4) { animation-delay: 180ms; }
.site-header__brand .mark-3x3 i:nth-child(5) { animation-delay: 240ms; }
.site-header__brand .mark-3x3 i:nth-child(6) { animation-delay: 300ms; }
.site-header__brand .mark-3x3 i:nth-child(7) { animation-delay: 360ms; }
.site-header__brand .mark-3x3 i:nth-child(8) { animation-delay: 420ms; }
.site-header__brand .mark-3x3 i:nth-child(9) { animation-delay: 480ms; }

/* === BIG MARK — sekcje z gigantycznym znakiem (materiały, hero o-marce itp.) === */
@keyframes perrugi-big-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(0.92); }
}
.hero__mark i:nth-child(5) {
  animation: perrugi-big-breathe 4.2s ease-in-out infinite;
  transform-origin: center;
}

/* === PHONE MOCKUP — pulsujący zielony status dot (keypad page) === */
@keyframes perrugi-status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58, 166, 106, 0.55); opacity: 1; }
  70%      { box-shadow: 0 0 0 6px rgba(58, 166, 106, 0); opacity: 0.85; }
}
[style*="background:#3aa66a"] {
  animation: perrugi-status-pulse 2.1s ease-out infinite;
}

/* === BUTTONS — mikro-lift na hover === */
.btn { transition: background var(--duration) var(--easing),
                   color var(--duration) var(--easing),
                   transform var(--duration) var(--easing),
                   box-shadow var(--duration) var(--easing); }
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(26, 24, 21, 0.25);
}
.btn:active { transform: translateY(0); transition-duration: 80ms; }

/* === STAGGER REVEAL dla siatek (product-grid, feature-grid, methods-grid) === */
.product-grid > *,
.feature-grid > *,
.methods-grid > *,
.hero-page__stats > *,
.spec-table__row > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s var(--easing), transform 0.6s var(--easing);
}
section.is-visible .product-grid > *,
section.is-visible .feature-grid > *,
section.is-visible .methods-grid > *,
section.is-visible .hero-page__stats > *,
section.is-visible .spec-table__row > * {
  opacity: 1;
  transform: none;
}
section.is-visible .product-grid > *:nth-child(1),
section.is-visible .feature-grid > *:nth-child(1),
section.is-visible .methods-grid > *:nth-child(1),
section.is-visible .hero-page__stats > *:nth-child(1) { transition-delay: 0.05s; }
section.is-visible .product-grid > *:nth-child(2),
section.is-visible .feature-grid > *:nth-child(2),
section.is-visible .methods-grid > *:nth-child(2),
section.is-visible .hero-page__stats > *:nth-child(2) { transition-delay: 0.15s; }
section.is-visible .product-grid > *:nth-child(3),
section.is-visible .feature-grid > *:nth-child(3),
section.is-visible .methods-grid > *:nth-child(3),
section.is-visible .hero-page__stats > *:nth-child(3) { transition-delay: 0.25s; }
section.is-visible .product-grid > *:nth-child(4),
section.is-visible .feature-grid > *:nth-child(4),
section.is-visible .methods-grid > *:nth-child(4),
section.is-visible .hero-page__stats > *:nth-child(4) { transition-delay: 0.35s; }
section.is-visible .feature-grid > *:nth-child(5),
section.is-visible .hero-page__stats > *:nth-child(5) { transition-delay: 0.45s; }
section.is-visible .feature-grid > *:nth-child(6),
section.is-visible .hero-page__stats > *:nth-child(6) { transition-delay: 0.55s; }

/* === HAIRLINE DRAW — sekcje z `hr.divider` lub border-top === */
@keyframes perrugi-line-draw {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}
section.is-visible .divider,
section.is-visible hr.divider {
  animation: perrugi-line-draw 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* === FORM FIELDS — focus z animowanym borderem === */
.form-field { position: relative; }
.form-field input,
.form-field textarea,
.form-field select {
  position: relative;
}
.form-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--cream);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.form-field:focus-within::after { right: 0; }

/* === PRODUCT CARD — subtelny lift na hover (uzupełnienie istniejącego) === */
.product-card { transition: transform var(--duration) var(--easing), box-shadow var(--duration) var(--easing), opacity var(--duration) var(--easing); }
.product-card:not(.product-card--soon):hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(26, 24, 21, 0.35);
}

/* === REDUCED MOTION — globalny override === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__product__mark i,
  .product-card__mark i,
  .site-header__brand .mark-3x3 i,
  .hero__mark i { animation: none !important; transform: none !important; }
}

/* Hero podstrony — bardziej oszczędny */
.hero-page { padding-top: 4rem; padding-bottom: 2rem; }
.hero-page .display { font-size: clamp(2.6rem, 6.5vw, 5rem); }
.hero-page__lead { margin-top: 1.5rem; }
.hero-page__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: var(--hairline);
}
.stat__num {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-top: 0.4em;
}

/* ---------- 9 · PRODUCT CARDS (rodzina) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 880px) {
  .product-grid { grid-template-columns: 1fr; }
}
.product-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: var(--space-7) var(--space-6);
  display: flex; flex-direction: column;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration) var(--easing);
}
.product-card:hover { opacity: 1; transform: translateY(-2px); }
.product-card__code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.55);
}
.product-card__name {
  font-size: 2rem; font-weight: 600;
  letter-spacing: -0.025em;
  margin: var(--space-3) 0 var(--space-2);
  color: var(--cream);
}
.product-card__desc {
  color: rgba(244,241,234,0.72);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: var(--space-6);
}
.product-card__mark {
  font-size: 80px;
  margin-top: auto;
  margin-left: auto;
  width: 1em; height: 1em;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 18%;
}
.product-card__mark i {
  display: block;
  background: var(--cream);
  border-radius: 50%;
  aspect-ratio: 1;
}
.product-card__mark i.d-95 { opacity: 0.95; }
.product-card__mark i.d-50 { opacity: 0.55; }
.product-card__mark i.d-100 { opacity: 1; }
.product-card__mark i.d-brass { background: var(--brass); opacity: 1; }

.product-card__status {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,241,234,0.25);
  color: rgba(244,241,234,0.75);
}
.product-card--soon { opacity: 0.85; }
.product-card--soon:hover { opacity: 0.9; transform: none; }

/* ---------- 10 · FEATURE GRIDS ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}
.feature {
  padding-top: var(--space-5);
  border-top: var(--hairline);
}
.feature__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: var(--space-3);
}
.feature__title { font-size: 1.1rem; margin-bottom: 0.5em; }
.feature__desc  { color: var(--ink-90); font-size: 0.95rem; line-height: 1.55; }

.bg-ink .feature { border-top-color: rgba(244,241,234,0.15); }
.bg-ink .feature__num { color: rgba(244,241,234,0.45); }
.bg-ink .feature__desc { color: rgba(244,241,234,0.78); }

/* ---------- 11 · METHODS / TILES ---------- */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 1080px) { .methods-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .methods-grid { grid-template-columns: 1fr; } }

.method {
  background: var(--bg-warm);
  border-radius: var(--radius);
  padding: var(--space-6);
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background var(--duration) var(--easing);
}
.method:hover { background: #E5DECC; }
.method__icon {
  width: 36px; height: 36px;
  background: var(--ink); color: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
}
.method__name { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.4em; }
.method__desc { font-size: 0.9rem; line-height: 1.5; color: var(--ink-90); margin: 0; }

/* ---------- 12 · SPEC TABLE ---------- */
.spec-table {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-top: var(--hairline);
}
.spec-table__row {
  display: contents;
}
.spec-table__row > div {
  padding: var(--space-5) var(--space-4);
  border-bottom: var(--hairline);
}
.spec-table__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.spec-table__value {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}
@media (max-width: 720px) {
  .spec-table { grid-template-columns: 1fr; }
  .spec-table__row > div { padding: var(--space-3) 0; border-bottom: none; }
  .spec-table__row > div:last-child { border-bottom: var(--hairline); padding-bottom: var(--space-4); margin-bottom: var(--space-3); }
}

/* ---------- 13 · DUAL COLUMN (image + text) ---------- */
.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 880px) { .dual { grid-template-columns: 1fr; } }
.dual--reverse > :first-child { order: 2; }
@media (max-width: 880px) { .dual--reverse > :first-child { order: 0; } }

.bullet-list { list-style: none; padding: 0; margin: var(--space-5) 0 0; }
.bullet-list li {
  padding: var(--space-3) 0;
  border-top: var(--hairline);
  display: flex; align-items: baseline; gap: var(--space-3);
  font-size: 0.95rem;
}
.bullet-list li::before {
  content: "·";
  font-family: var(--font-mono);
  color: var(--ink-40);
  font-size: 1.4em;
  line-height: 1;
}
.bullet-list li:last-child { border-bottom: var(--hairline); }

/* ---------- 14 · CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { margin-bottom: var(--space-4); }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.65);
  margin-bottom: var(--space-2);
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(244,241,234,0.30);
  padding: 10px 0;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--duration) var(--easing);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--cream);
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-meta {
  font-size: 0.8rem;
  color: rgba(244,241,234,0.55);
  margin-top: var(--space-5);
}

.contact-info dl { display: grid; grid-template-columns: 1fr; gap: var(--space-5); margin: 0; }
.contact-info dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.55);
  margin-bottom: var(--space-2);
}
.contact-info dd { margin: 0; font-size: 1.05rem; color: var(--cream); }

/* ---------- 15 · FOOTER ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-top: var(--space-9);
  padding-bottom: var(--space-6);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-9);
}
@media (max-width: 880px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: 0 0 var(--space-4);
}
.site-footer__brand-text {
  font-size: 0.95rem;
  color: rgba(244,241,234,0.75);
  line-height: 1.55;
  margin-top: var(--space-4);
  max-width: 28em;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: var(--space-3); }
.footer-list a { color: rgba(244,241,234,0.85); font-size: 0.9rem; }
.footer-list a:hover { opacity: 1; color: var(--cream); }

.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(244,241,234,0.12);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: rgba(244,241,234,0.55);
  flex-wrap: wrap;
}

/* ---------- 16 · UTILS ---------- */
.flow > * + * { margin-top: var(--space-4); }
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.hide-mobile { }
@media (max-width: 720px) { .hide-mobile { display: none !important; } }

/* Pojawianie się elementów */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 700ms var(--easing), transform 700ms var(--easing); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 17 · BANNER COMING SOON ---------- */
.soon-banner {
  background: var(--bg-warm);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  flex-wrap: wrap;
}
.soon-banner__title { margin: 0; font-size: 1.1rem; }
.soon-banner__sub { color: var(--ink-60); margin: 0.3em 0 0; font-size: 0.9rem; }

/* ---------- 17.5 · BREADCRUMBS ---------- */
.breadcrumbs {
  background: transparent;
  padding-top: var(--space-5);
  padding-bottom: 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-60);
}
.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs__item a {
  color: var(--ink-60);
  text-decoration: none;
  transition: color var(--duration) var(--easing);
}
.breadcrumbs__item a:hover { color: var(--ink); opacity: 1; }
.breadcrumbs__item.is-current span { color: var(--ink); font-weight: 500; }
.breadcrumbs__sep { color: var(--ink-20); }

/* ---------- 17.6 · BLOG ---------- */
.blog-hero { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.blog-hero h1 { max-width: 18ch; }
.blog-hero p.lead { max-width: 52ch; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
}

.post-card {
  background: transparent;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  color: var(--ink);
  text-decoration: none;
  transition: background var(--duration) var(--easing), border-color var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.post-card:hover {
  background: var(--paper-warm);
  border-color: var(--ink-20);
  transform: translateY(-2px);
  opacity: 1;
}
.post-card__thumb {
  margin: calc(var(--space-6) * -1) calc(var(--space-6) * -1) 0;
  aspect-ratio: 16/10;
  background: var(--bg-warm);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.post-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.post-card__meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--ink-60);
  align-items: center;
  flex-wrap: wrap;
}
.post-card__cat {
  background: var(--ink);
  color: var(--cream);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: lowercase;
}
.post-card__title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}
.post-card__excerpt {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-90);
  margin: 0;
}
.post-card__more {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-card__more .arrow { transition: transform var(--duration) var(--easing); }
.post-card:hover .post-card__more .arrow { transform: translateX(4px); }

/* Pojedynczy wpis */
.single-post-hero {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.single-post-hero__meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--ink-60);
  margin-bottom: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
}
.single-post-hero h1 {
  max-width: 22ch;
  margin: 0 0 1rem;
}
.single-post-hero__lead {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-90);
  max-width: 60ch;
  font-weight: 500;
}
.single-post-thumb {
  margin: 0 0 var(--space-7);
  aspect-ratio: 16/9;
  background: var(--bg-warm);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.single-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-content {
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}
.post-content h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content p, .post-content ul, .post-content ol { margin-bottom: 1.25em; }
.post-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--ink);
  background: var(--bg-warm);
  font-size: 1.1rem;
  font-style: italic;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 2px 6px;
  background: var(--bg-warm);
  border-radius: 4px;
}
.post-content pre {
  background: var(--ink);
  color: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}
.post-content pre code { background: transparent; padding: 0; color: inherit; }
.post-content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-40); text-underline-offset: 3px; }
.post-content a:hover { text-decoration-color: var(--ink); opacity: 1; }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }

.post-footer {
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: var(--hairline);
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.post-tag {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 4px 12px;
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  color: var(--ink-60);
  text-decoration: none;
}
.post-tag:hover { border-color: var(--ink-20); color: var(--ink); opacity: 1; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-7);
}
@media (max-width: 720px) {
  .post-nav { grid-template-columns: 1fr; }
}
.post-nav__link {
  display: block;
  padding: var(--space-5);
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: background var(--duration) var(--easing), border-color var(--duration) var(--easing);
}
.post-nav__link:hover { background: var(--bg-warm); border-color: var(--ink-20); opacity: 1; }
.post-nav__label { font-size: 0.75rem; color: var(--ink-60); text-transform: uppercase; letter-spacing: 0.05em; }
.post-nav__title { font-size: 1rem; font-weight: 600; margin-top: 4px; }
.post-nav--prev { text-align: left; }
.post-nav--next { text-align: right; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-7);
  flex-wrap: wrap;
}
.pagination .page-numbers {
  padding: 8px 14px;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background var(--duration) var(--easing);
}
.pagination .page-numbers:hover { background: var(--bg-warm); opacity: 1; }
.pagination .page-numbers.current { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pagination .page-numbers.dots { border: 0; }

.search-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: var(--space-5) 0;
}
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--ink-12);
  border-radius: var(--radius);
  padding: 10px 14px;
  font: inherit;
  font-size: 0.95rem;
  background: transparent;
  color: var(--ink);
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--ink);
}
.search-form button {
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--cream);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.search-form button:hover { background: transparent; color: var(--ink); }

/* ---------- 18 · MOTYW PRZEWODNI — siatka ---------- */
.bg-with-grid {
  position: relative;
  background:
    linear-gradient(transparent 95%, var(--ink-08) 95%) 0 0 / 1px 80px repeat,
    var(--bg);
}

/* ---------- 19 · HERO · PERRUGI KEYPAD (zdjęcie urządzenia po prawej) ---------- */
.hero-keypad__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-keypad__copy { max-width: 56ch; }

.hero-keypad__device {
  margin: 0;
  align-self: stretch;
  position: relative;
}
.hero-keypad__device-frame {
  position: relative;
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  height: 100%;
}
.hero-keypad__device-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(244,241,234,0.05), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(184,145,92,0.06), transparent 60%);
  pointer-events: none;
}
.hero-keypad__device-frame img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  max-width: 360px;
  margin: 0 auto;
  border-radius: var(--radius);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
}

/* Tablet — układ pozostaje dwukolumnowy, ale ciaśniej */
@media (max-width: 1024px) {
  .hero-keypad__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 2.5rem);
  }
  .hero-keypad__device-frame { min-height: 320px; }
  .hero-keypad__device-frame img { max-width: 300px; }
}

/* Mobile — wtedy dopiero jednokolumnowo */
@media (max-width: 720px) {
  .hero-keypad__grid { grid-template-columns: 1fr; }
  .hero-keypad__device-frame { min-height: 0; padding: 1.25rem; }
  .hero-keypad__device-frame img { max-width: 320px; }
}
