/* SmartPrawnik — shared styles (Paleta A) */
:root {
  --bg: #F4F0E8;
  --bg-2: #FBF8F1;
  --bg-3: #EFE9DC;
  --bg-ink: #0D1F3C;
  --ink: #0D1F3C;
  --ink-2: #3A4A68;
  --ink-3: #4D5872;
  --ink-muted: #5C5040;
  --line: #D8CFBE;
  --line-2: #C4B89E;
  --line-dark: rgba(255,255,255,.12);
  --accent: #B88746;
  --accent-dark: #8A5F2E;
  --accent-light: #E8D0A8;
  --success: #2F6F4E;
  --warning: #B55C2E;
  --danger: #A53B3B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.mono { font-family: 'JetBrains Mono', monospace; }
.serif { font-family: 'Fraunces', Georgia, serif; }
.serif-it { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; }
.caslon { font-family: 'Libre Caslon Text', Georgia, serif; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .num { color: var(--accent-dark); }

.btn { padding: 13px 22px; font-size: 14px; font-weight: 500; border-radius: 2px; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; font-family: inherit; cursor: pointer; border: none; }
.btn-primary { background: var(--ink); color: var(--bg-2); }
.btn-primary:hover { background: #001640; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--bg-2); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg-2); }
.btn-ghost-light { background: transparent; color: var(--bg-2); border: 1px solid rgba(251,248,241,.3); }
.btn-ghost-light:hover { background: var(--bg-2); color: var(--ink); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px; }
.badge-accent { background: rgba(184,135,70,.14); color: var(--accent-dark); }
.badge-success { background: rgba(47,111,78,.1); color: var(--success); }

.cite { color: var(--accent-dark); border-bottom: 1px dashed var(--accent); cursor: pointer; font-weight: 500; }

/* Section paddings */
.section { padding: 112px 0; border-top: 1px solid var(--line); }
.section-dark { background: var(--bg-ink); color: var(--bg-2); border-color: transparent; }
.section-paper { background: var(--bg-2); }

.hd-kicker { margin-bottom: 20px; display: block; }
h1.display { font-size: clamp(48px, 6.2vw, 88px); font-weight: 400; letter-spacing: -0.035em; line-height: 1; }
h2.sec-title { font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 20px; }
h3.card-title { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.5; max-width: 620px; }
.section-dark h2.sec-title { color: var(--bg-2); }
.section-dark .lead { color: rgba(251,248,241,.7); }
.section-dark .eyebrow { color: var(--accent-light); }

.divider-row { display: flex; align-items: center; gap: 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.divider-row .line { flex: 1; height: 1px; background: var(--line); }

/* ================ Microanimations ================ */

/* A04 — feature card hover: subtle lift + accent edge */
.fc {
  position: relative;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .25s;
  will-change: transform;
}
.fc::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.fc:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px rgba(13,31,60,.22); border-color: var(--line-2); }
.fc:hover::after { transform: scaleY(1); }
.fc .fc-arrow { transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .2s; opacity: 0; transform: translate(-6px, 0); }
.fc:hover .fc-arrow { opacity: 1; transform: translate(0,0); }

/* A05 — button press + enhanced arrow travel */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: translateY(0) scale(.98); transition: transform .08s; }
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120px 120px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.18), transparent 70%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.btn:hover::before { opacity: 1; }
.btn-ghost::before { background: radial-gradient(120px 120px at var(--mx, 50%) var(--my, 50%), rgba(13,31,60,.12), transparent 70%); }

/* A06 — reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"].is-visible { transition-delay: .08s; }
.reveal[data-delay="2"].is-visible { transition-delay: .16s; }
.reveal[data-delay="3"].is-visible { transition-delay: .24s; }
.reveal[data-delay="4"].is-visible { transition-delay: .32s; }

/* A07 — marquee */
.marquee { overflow: hidden; position: relative; mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent); }
.marquee-track { display: flex; gap: 64px; animation: marquee 38s linear infinite; width: max-content; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Link hover-underline (nav links) */
a.nav-link { position: relative; }
a.nav-link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
a.nav-link:hover::after { transform: scaleX(1); }
a.nav-link:hover { color: var(--ink); }

/* ================ Signature pattern ================ */
/* Subtelny ornament § w tle — znak rozpoznawczy marki */
.sig-pattern {
  position: relative;
  isolation: isolate;
}
.sig-pattern::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='none' stroke='%23B88746' stroke-width='0.6' opacity='0.14'><text x='30' y='70' font-family='Fraunces, Georgia, serif' font-size='52' font-style='italic' font-weight='300' fill='%23B88746' opacity='0.35' stroke='none'>§</text><circle cx='40' cy='55' r='28' /><line x1='90' y1='20' x2='90' y2='160'/><line x1='20' y1='90' x2='160' y2='90'/><text x='120' y='150' font-family='JetBrains Mono, monospace' font-size='8' fill='%238A5F2E' opacity='0.4' stroke='none' letter-spacing='0.15em'>ART.</text></g></svg>");
  background-size: 360px 360px;
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 75% 30%, rgba(0,0,0,0.9), rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(ellipse at 75% 30%, rgba(0,0,0,0.9), rgba(0,0,0,0) 70%);
}
.sig-pattern-dark::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='none' stroke='%23E8D0A8' stroke-width='0.5' opacity='0.28'><text x='30' y='70' font-family='Fraunces, Georgia, serif' font-size='52' font-style='italic' font-weight='300' fill='%23E8D0A8' opacity='0.4' stroke='none'>§</text><circle cx='40' cy='55' r='28' /><line x1='90' y1='20' x2='90' y2='160'/><line x1='20' y1='90' x2='160' y2='90'/><text x='120' y='150' font-family='JetBrains Mono, monospace' font-size='8' fill='%23B88746' opacity='0.55' stroke='none' letter-spacing='0.15em'>ART.</text></g></svg>");
  mask-image: radial-gradient(ellipse at 20% 80%, rgba(0,0,0,0.6), rgba(0,0,0,0) 65%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 80%, rgba(0,0,0,0.6), rgba(0,0,0,0) 65%);
  opacity: 0.6;
}
.sig-pattern > * { position: relative; z-index: 1; }

/* ================ Comparison table ================ */
.cmp-wrap { overflow-x: auto; margin: 0 -12px; padding: 0 12px; }
.cmp-table { width: 100%; border-collapse: collapse; border-spacing: 0; min-width: 880px; }
.cmp-table thead th {
  text-align: center; vertical-align: bottom;
  padding: 0 20px 24px; border-bottom: 1px solid var(--line);
  position: relative;
}
.cmp-table thead th:first-child { border-bottom: none; }
.cmp-table thead th.is-us {
  background: var(--ink); color: var(--bg-2);
  border-bottom-color: var(--ink);
  border-top-left-radius: 2px; border-top-right-radius: 2px;
  padding-top: 28px;
}
.cmp-col-name { font-family: Fraunces, serif; font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }
.cmp-col-sub { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.cmp-table thead th.is-us .cmp-col-sub { color: var(--accent-light); }

.cmp-group-row td {
  padding: 40px 20px 16px; border-bottom: 1px solid var(--line);
}
.cmp-group-num {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--accent-dark); margin-right: 14px;
}
.cmp-group-name {
  font-family: Fraunces, serif; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); font-weight: 500;
}

.cmp-row td { padding: 18px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp-row:last-child td { border-bottom-color: var(--line-2); }
.cmp-label { font-family: 'Libre Caslon Text', serif; font-size: 16px; color: var(--ink); line-height: 1.35; }
.cmp-note { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
.cmp-cell { text-align: center; }
.cmp-cell.is-us { background: rgba(13,31,60,.04); }
.cmp-table tbody tr:last-child .cmp-cell.is-us { border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; }

.cmp-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
}
.cmp-full { background: rgba(47,111,78,.12); color: var(--success); }
.cmp-full.is-us { background: var(--accent); color: var(--bg-2); }
.cmp-partial { background: rgba(181,92,46,.14); color: var(--warning); }
.cmp-none { background: transparent; color: var(--ink-3); opacity: .5; }
.cmp-text { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.04em; }

@media (max-width: 880px) {
  .cmp-wrap { margin: 0 -40px; padding: 0 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================ Tweaks panel ================ */
.tweaks-panel {
  position: fixed; right: 24px; bottom: 24px; width: 340px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -20px rgba(13,31,60,.25), 0 4px 12px rgba(13,31,60,.08);
  z-index: 9999; border-radius: 2px;
  font-family: 'Geist', sans-serif;
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  animation: tp-in .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes tp-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.tp-head {
  padding: 18px 20px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: var(--bg);
}
.tp-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-dark); }
.tp-title { font-family: Fraunces, serif; font-weight: 500; font-size: 20px; letter-spacing: -0.02em; margin-top: 4px; color: var(--ink); }
.tp-close { width: 28px; height: 28px; border-radius: 2px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); transition: background .15s; }
.tp-close:hover { background: var(--bg-3); color: var(--ink); }

.tp-body { padding: 20px; overflow-y: auto; flex: 1; }
.tp-group { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tp-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.tp-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.tp-val { color: var(--accent-dark); }
.tp-caption { font-family: 'Libre Caslon Text', serif; font-size: 12px; color: var(--ink-3); margin-top: 10px; font-style: italic; }

.tp-swatches { display: flex; gap: 10px; }
.tp-swatch {
  width: 40px; height: 40px; border-radius: 50%; border: none; padding: 0;
  position: relative; cursor: pointer; transition: transform .15s;
}
.tp-swatch:hover { transform: scale(1.08); }
.tp-swatch-ring {
  position: absolute; inset: -5px; border: 1.5px solid transparent; border-radius: 50%;
  transition: border-color .2s;
}
.tp-swatch.is-active .tp-swatch-ring { border-color: currentColor; }

.tp-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-pill {
  padding: 8px 14px; font-size: 13px; background: transparent;
  border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); cursor: pointer;
  transition: all .15s;
}
.tp-pill:hover { border-color: var(--line-2); color: var(--ink); }
.tp-pill.is-active { background: var(--ink); color: var(--bg-2); border-color: var(--ink); }

.tp-stack { display: flex; flex-direction: column; gap: 6px; }
.tp-row {
  display: flex; align-items: baseline; gap: 12px; padding: 10px 12px;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; text-align: left; transition: all .15s;
}
.tp-row:hover { border-color: var(--line-2); background: var(--bg); }
.tp-row.is-active { border-color: var(--accent); background: rgba(184,135,70,.06); }
.tp-row-k {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-dark); flex-shrink: 0; width: 70px;
}
.tp-row-v { font-family: Fraunces, serif; font-style: italic; font-size: 13px; color: var(--ink); line-height: 1.3; }

.tp-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 3px;
  background: var(--line); border-radius: 99px; outline: none;
}
.tp-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: 2px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--accent-dark);
}
.tp-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: 2px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

.tp-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: 13px; color: var(--ink); padding: 4px 0;
}
.tp-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tp-switch {
  width: 36px; height: 20px; background: var(--line); border-radius: 99px;
  position: relative; transition: background .2s;
}
.tp-switch::before {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-2); box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .2s;
}
.tp-toggle input:checked ~ .tp-switch { background: var(--accent); }
.tp-toggle input:checked ~ .tp-switch::before { transform: translateX(16px); }

.tp-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg); }
.tp-reset {
  width: 100%; padding: 8px; background: transparent; border: 1px dashed var(--line-2);
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-muted); cursor: pointer;
  transition: all .15s; border-radius: 2px;
}
.tp-reset:hover { color: var(--accent-dark); border-color: var(--accent); }

@media (max-width: 600px) {
  .tweaks-panel { right: 12px; left: 12px; bottom: 12px; width: auto; }
  /* Czytelność: mono micro-labelki (eyebrow/badge/cmp/tp) 10-11px → min 12px na telefonie */
  .eyebrow, .badge, .mono, .cmp-col-sub, .cmp-note, .tp-eyebrow, .divider-row,
  div[style*="font-size: 10px"], div[style*="font-size: 10.5px"], div[style*="font-size: 11px"],
  span[style*="font-size: 10px"], span[style*="font-size: 10.5px"], span[style*="font-size: 11px"] {
    font-size: 12px !important;
  }
}

/* ================ Mega-menu ================ */
@keyframes mega-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-seeall {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-dark); padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.mega-seeall:hover { border-bottom-color: var(--accent); color: var(--accent-dark); }
.mega-seeall svg { transition: transform .2s; }
.mega-seeall:hover svg { transform: translateX(3px); }

.mega-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px; margin: 0 -12px;
  border-radius: 2px;
  transition: background .15s;
  position: relative;
}
.mega-item:hover { background: var(--bg); }
.mega-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark);
  transition: all .2s;
}
.mega-item:hover .mega-icon {
  background: var(--ink); border-color: var(--ink); color: var(--accent-light);
}
.mega-item-name {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em;
}
.mega-item-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 6px; background: var(--bg-3); color: var(--ink-muted);
  border-radius: 2px;
}
.mega-item-desc {
  display: block;
  font-family: 'Libre Caslon Text', serif; font-size: 13px;
  color: var(--ink-3); margin-top: 3px;
  line-height: 1.4;
}
.mega-arrow {
  font-size: 14px; color: var(--accent-dark);
  opacity: 0; transform: translateX(-4px);
  transition: all .2s;
  align-self: center; margin-left: auto;
}
.mega-item:hover .mega-arrow { opacity: 1; transform: translateX(0); }

.mega-feature {
  position: relative;
  background: var(--ink);
  padding: 32px 28px;
  border-radius: 2px;
  color: var(--bg-2);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  min-height: 340px;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.mega-feature:hover { transform: translateY(-3px); }
.mega-feature-bg {
  position: absolute; inset: 0;
  color: var(--accent-light); opacity: 0.1;
  pointer-events: none;
}
.mega-feature-mark {
  position: absolute; right: 22px; top: 22px;
  color: var(--accent-dark);
  opacity: 0.45;
}
.mega-feature-cta {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-light);
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding-top: 18px;
  border-top: 1px solid rgba(251,248,241,.15);
  margin-top: auto;
}
.mega-feature-cta svg { transition: transform .2s; }
.mega-feature:hover .mega-feature-cta svg { transform: translateX(4px); }

@media (max-width: 960px) {
  .mega .wrap { grid-template-columns: 1fr !important; }
}


/* ================================================================ */
/* RESPONSIVE — tablet + mobile (added v1.0.1, 2026-04-27)            */
/* ================================================================ */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .wrap { padding: 0 28px; }
  .section { padding: 88px 0; }
  h1.display { font-size: clamp(40px, 7vw, 64px); }
  h2.sec-title { font-size: clamp(28px, 5vw, 40px); }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  html { scroll-padding-top: 64px; }
  .wrap { padding: 0 18px; }
  .section { padding: 56px 0; }

  h1.display { font-size: clamp(32px, 9vw, 44px) !important; line-height: 1.05; }
  h2.sec-title { font-size: clamp(24px, 6vw, 32px) !important; line-height: 1.1; }
  h3.card-title { font-size: 19px; }
  .lead { font-size: 16px; line-height: 1.55; }
  .eyebrow { font-size: 10.5px; }

  /* Inline grids 4-col / 3-col / 2-col → stack na mobile */
  div[style*="repeat(4, 1fr)"],
  div[style*="repeat(3, 1fr)"],
  div[style*="repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Buttons większy touch target */
  .btn { padding: 14px 22px; font-size: 14.5px; min-height: 46px; }

  /* Forms full-width */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], textarea, select {
    width: 100% !important; font-size: 16px; /* prevents iOS zoom */
    box-sizing: border-box;
  }

  /* Tables — horizontal scroll */
  .cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
  .cmp-table { min-width: 640px; }

  /* Footer columns stack */
  footer div[style*="grid-template-columns"], footer div[style*="gridTemplateColumns"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Marquee speed up na mobile */
  .marquee-track { gap: 36px !important; animation-duration: 28s !important; }

  /* Hero CTA stack */
  div[style*="display: flex"][style*="gap: 16"],
  div[style*="display: flex"][style*="gap: 20"],
  div[style*="display: flex"][style*="gap: 24"] {
    flex-wrap: wrap;
  }

  /* Sticky ToC w regulamin → unsticky na mobile */
  aside[style*="position: sticky"], aside[style*="position:sticky"] {
    position: static !important;
    margin-bottom: 32px;
  }

  /* Mega-menu hidden — used hamburger instead */
  nav .mega, nav [data-mega-panel] { display: none !important; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .section { padding: 44px 0; }
  h1.display { font-size: clamp(26px, 8vw, 34px) !important; }
  h2.sec-title { font-size: clamp(22px, 5.5vw, 28px) !important; }

  /* Nav tighter */
  nav { padding: 12px 14px !important; }
  nav a[style*="font-family"] { font-size: 19px !important; }

  /* Hero metric large numbers smaller */
  span[class*="serif"][style*="fontSize: 46"],
  span[class*="serif"][style*="fontSize: 64"] {
    font-size: 36px !important;
  }

  /* Pricing card padding */
  article[class*="fc"] { padding: 22px !important; }
}

/* === MOBILE NAV — hamburger === */
.mobile-nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: 2px; cursor: pointer;
  padding: 0;
}
.mobile-nav-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  position: relative;
}
.mobile-nav-toggle span::before,
.mobile-nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink);
  transition: transform .2s;
}
.mobile-nav-toggle span::before { top: -6px; }
.mobile-nav-toggle span::after { top: 6px; }
.mobile-nav-toggle.is-open span { background: transparent; }
.mobile-nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.mobile-nav-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

.mobile-drawer {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 99; padding: 32px 24px;
  overflow-y: auto; border-top: 1px solid var(--line);
  animation: drawer-in .25s cubic-bezier(.2,.8,.2,1);
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer a {
  display: block; padding: 14px 0; font-size: 17px; color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: 'Geist', sans-serif; font-weight: 500;
}
.mobile-drawer a:hover { color: var(--accent-dark); }
.mobile-drawer .group-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-dark); margin-top: 28px; margin-bottom: 8px;
  padding-bottom: 8px; border-bottom: 2px solid var(--accent);
}
.mobile-drawer .cta-row {
  margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--ink);
  display: flex; flex-direction: column; gap: 12px;
}

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 880px) {
  .mobile-nav-toggle { display: inline-flex !important; }
  nav .nav-link, nav button[data-mega-trigger] { display: none !important; }
  nav div[style*="display: flex"][style*="gap: 12"] > a.btn:first-of-type { display: none !important; }
}


/* ================================================================ */
/* HARD MOBILE FIX v1.0.2 — overflow + nav strict (2026-04-27)         */
/* ================================================================ */

/* HARD overflow guard — sticky-friendly globally, hard limit on mobile.
   overflow-x: clip preserves position: sticky (used by verification-layers).
   overflow-x: hidden BREAKS sticky descendants — nigdy nie używać global. */
html, body { overflow-x: clip; }
@supports not (overflow-x: clip) {
  @media (max-width: 880px) { html, body { overflow-x: hidden; } }
}
@media (max-width: 880px) {
  html, body { max-width: 100vw; }
}

@media (max-width: 880px) {
  /* Strict nav — ukryj WSZYSTKO oprócz logo, hamburger, primary CTA-button */
  nav > div > div:not(.mobile-nav-toggle):not(:first-child) > a:not(.mobile-nav-toggle):not([href="/"]):not([href*="logo"]),
  nav > div > div:not(:first-child) > button:not(.mobile-nav-toggle),
  nav .mega,
  nav [role="dialog"],
  nav .nav-link {
    display: none !important;
  }

  /* Force nav layout simple */
  nav > div, nav > div.wrap {
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }

  /* Logo first child grupy stays */
  nav > div > div:first-child {
    flex: 1; min-width: 0;
  }

  /* Hide secondary CTA buttons in nav (Umów prezentację — keep only hamburger) */
  nav .btn, nav a.btn { display: none !important; }
  nav .mobile-nav-toggle { display: inline-flex !important; }

  /* Comparison table — pozwól się skurczyć */
  .cmp-table { min-width: 100% !important; font-size: 13px; }
  .cmp-wrap { margin: 0 !important; padding: 0 !important; overflow-x: auto; }
  .cmp-row td, .cmp-group-row td { padding: 12px 8px !important; }

  /* Pricing tabela cech (cennik.html) */
  table { font-size: 13px; }
  td, th { padding: 10px 8px !important; word-break: break-word; }

  /* Wide containers fix */
  .wrap, [class*="wrap"] {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Marquee — ogranicz */
  .marquee { max-width: 100vw; }
  .marquee-track { max-width: none; }

  /* Sekcje — pełna szerokość */
  section, .section, main, footer {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Dla wszystkich gridów inline z 4/3/2 col — w tym warianty dziesiętne (1.05fr/1.4fr/1.5fr/1fr 1.1fr...) */
  div[style*="repeat(4"],
  div[style*="repeat(3"],
  div[style*="repeat(2"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="gridTemplateColumns: 1fr 1fr"],
  div[style*="grid-template-columns: 1.05fr"],
  div[style*="grid-template-columns: 1.15fr"],
  div[style*="grid-template-columns: 1.3fr"],
  div[style*="grid-template-columns: 1.4fr"],
  div[style*="grid-template-columns: 1.5fr"],
  div[style*="grid-template-columns"][style*="fr 1fr"],
  div[style*="grid-template-columns"][style*="fr 1.1fr"],
  div[style*="grid-template-columns"][style*="fr 1.2fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Wide flex rows wrap */
  div[style*="display: flex"] {
    flex-wrap: wrap;
  }

  /* Full-bleed image guard */
  img, svg, video, iframe {
    max-width: 100%;
    height: auto;
  }
}

/* Final guard for tiny screens — content padding */
@media (max-width: 380px) {
  .wrap { padding: 0 12px !important; }
  h1.display { font-size: 26px !important; }
  h2.sec-title { font-size: 22px !important; }
  .btn { padding: 12px 16px !important; font-size: 13.5px !important; }
}

/* ================================================================ */
/* A11Y (iter 6, 2026-05-16): focus-visible, skip-to-content, reduced-motion, AA contrast */
/* ================================================================ */

:root {
  --ink-muted-aa: #4A3E2A;
}

.skip-to-content {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--ink); color: var(--bg-2); padding: 12px 18px;
  font-family: 'Geist', sans-serif; font-size: 14px; font-weight: 500;
}

.skip-to-content:focus { left: 16px; top: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

@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;
  }
}

/* ===== STRICT MOBILE A11Y (≤600px) — czytelne etykiety + tap-targety ≥44px ===== */
@media (max-width: 600px) {
  /* Micro-etykiety 10–11px → min 12px (czytelność na telefonie) */
  .eyebrow, .badge, .divider-row, .cmp-col-sub, .cmp-note, .tp-eyebrow,
  .meta-kicker, .contact-kicker, .m-ruler, .meta-list .k, .cf-field label,
  .response-line .when, [class*="kicker"], [class*="-ruler"], [class*="-eyebrow"],
  [style*="font-size: 8.5px"], [style*="font-size:8.5px"],
  [style*="font-size: 9px"], [style*="font-size:9px"],
  [style*="font-size: 9.5px"], [style*="font-size:9.5px"],
  [style*="font-size: 10px"], [style*="font-size:10px"],
  [style*="font-size: 10.5px"], [style*="font-size:10.5px"],
  [style*="font-size: 11px"], [style*="font-size:11px"],
  [style*="font-size: 11.5px"], [style*="font-size:11.5px"],
  .m-ruler, .m-ruler span, .mobile-drawer div, .mobile-drawer span, .mobile-drawer a {
    font-size: 12px !important;
  }

  /* Tap-targety przyciskowe ≥44px */
  .btn, .btn-primary, .btn-accent, .btn-ghost, .btn-ghost-light,
  button, [role="button"], .plan-card, .cf-topic label { min-height: 44px; }
  #sp-cookie-banner button { min-height: 44px !important; padding: 13px 18px !important; }
  [class*="close"], [aria-label*="zamknij" i], [aria-label*="close" i] {
    min-width: 44px !important; min-height: 44px !important;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* Linki tekstowe nawigacji/stopki/drawera/disclaimer → tap-area 44px */
  nav a, header a, footer a, .mini-footer a, .meta-list a, .cf-footer a,
  .nav-link, .mobile-drawer a, .cmp-label a,
  [class*="disclaimer"] a, [class*="banner"] a, a[href="disclaimer.html"] {
    display: inline-block; min-height: 44px; box-sizing: border-box;
    padding-top: 13px; padding-bottom: 13px; line-height: 1.4;
  }
}

/* ===== KONTRAST WCAG AA — patch (noc 2026-06-05) ===== */
/* Jasny copper #B88746 nie utrzyma 4.5:1 z tekstem → przyciski accent na bronze */
.btn-accent, a.btn-accent { background: var(--accent-dark); color: #fff !important; }
.btn-accent:hover, a.btn-accent:hover { background: #6E4A22; }
.badge-accent { background: rgba(138,95,46,.16); color: #5E3F1C !important; }
/* cookie „Zaakceptuj wszystkie" — przyciemnij tło pod biały tekst */
#sp-cookie-banner .accept-all, #sp-cookie-banner button:last-child { background: var(--accent-dark) !important; color: #fff !important; }
