/* ===========================================================================
   pan-reklamo.pl — system designerski (czysty CSS, bez Tailwind, bez build)

   Kolejność:
   1. CSS reset (minimal)
   2. CSS variables (paleta + typografia + spacing + radius + shadow)
   3. Base typography (html, body, headings, p, a)
   4. Display headings + eyebrow + mono
   5. Layout primitives (container, flex, grid, gap, items, justify)
   6. Spacing utilities (m-, mt-, mb-, mx-, p-, pt-, pb-, px-, py-)
   7. Text utilities (text-*, font-*, opacity-*, leading-*, tracking-*)
   8. Width / max-width / position
   9. Components: btn, field, surface, divider, app-header, app-footer,
                  steps-bar, faq, pill, sticky-bar, check-disc, copybox,
                  pan-pic, mark-pic, cookie-banner, loading-screen, helper-card
  10. Responsive (mobile-first + @media >=1024 + @media >=1600)
   =========================================================================== */

/* ---------- 1. Minimal reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }


/* ---------- 2. Design tokens (CSS variables) ---------- */
:root {
  /* paleta — granat / złoto / zieleń + tła */
  --navy:        #1B3A5F;
  --navy-dark:   #0F2540;
  --navy-soft:   #2A5079;
  --gold:        #B8893E;
  --gold-soft:   #D4A85A;
  --gold-bg:     #F5EDD9;
  --green:       #2D6A4F;
  --green-soft:  #4A8B6F;
  --green-bg:    #E5F0EA;
  --red:         #B84141;
  --red-bg:      #F9E5E5;

  /* tła i powierzchnie */
  --bg:          #FAF8F3;
  --bg-warm:     #F4EFE3;
  --surface:     #FFFFFF;

  /* obramowania */
  --border:        #E8E2D5;
  --border-strong: #D4CDBB;

  /* tekst */
  --text:        #1A2332;
  --text-muted:  #6B7280;
  --text-subtle: #9CA3AF;

  /* assety brandingu */
  --pan-img:  url('/assets/img/pan-reklamo-portrait.jpg');
  --mark-img: url('/assets/img/favicon-512.png');

  /* spacing scale (rem-based) */
  --space-1:  0.25rem;  /*  4px */
  --space-2:  0.5rem;   /*  8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */

  /* radius */
  --radius-sm: 6px;
  --radius:    8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* cienie */
  --shadow-sm: 0 1px 2px rgba(15, 37, 64, 0.04);
  --shadow:    0 1px 2px rgba(15, 37, 64, 0.04), 0 4px 12px rgba(15, 37, 64, 0.06);
  --shadow-lg: 0 1px 2px rgba(15, 37, 64, 0.04), 0 12px 32px rgba(15, 37, 64, 0.08), 0 24px 64px rgba(15, 37, 64, 0.06);

  /* container width */
  --container-max:      1280px;
  --container-max-wide: 1440px;
}


/* ---------- 3. Base typography ---------- */
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a:hover { color: var(--navy); }
a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 2px; }
button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

::selection { background: var(--navy); color: #fff; }


/* ---------- 4. Display headings + eyebrow + mono ---------- */
.display     { letter-spacing: -0.025em; line-height: 1.05; font-weight: 700; }
.display-lg  { font-size: 32px; }
.display-md  { font-size: 24px; }
.display-sm  { font-size: 20px; }

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
}


/* ---------- 5. Layout primitives ---------- */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-auto     { flex: 1 1 auto; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch  { align-items: stretch; }

.justify-start    { justify-content: flex-start; }
.justify-center   { justify-content: center; }
.justify-end      { justify-content: flex-end; }
.justify-between  { justify-content: space-between; }
.justify-around   { justify-content: space-around; }

.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-5  { gap: var(--space-5); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

.grid           { display: grid; }
.grid-cols-1    { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3    { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4    { grid-template-columns: repeat(4, minmax(0, 1fr)); }


/* ---------- 6. Spacing utilities ---------- */
.m-0 { margin: 0; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-5  { margin-top: var(--space-5); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-5  { margin-bottom: var(--space-5); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

.mx-auto { margin-left: auto; margin-right: auto; }

.p-0  { padding: 0; }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-5  { padding: var(--space-5); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }

.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }


/* ---------- 7. Text + font utilities ---------- */
.text-xs   { font-size: 12px; }
.text-sm   { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg   { font-size: 18px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }
.text-3xl  { font-size: 30px; }
.text-4xl  { font-size: 36px; }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

.uppercase    { text-transform: uppercase; }
.lowercase    { text-transform: lowercase; }
.capitalize   { text-transform: capitalize; }

.tracking-tight   { letter-spacing: -0.01em; }
.tracking-tighter { letter-spacing: -0.02em; }
.tracking-wide    { letter-spacing: 0.01em; }
.tracking-wider   { letter-spacing: 0.05em; }
.tracking-widest  { letter-spacing: 0.1em; }

.leading-none    { line-height: 1; }
.leading-tight   { line-height: 1.2; }
.leading-snug    { line-height: 1.4; }
.leading-normal  { line-height: 1.55; }
.leading-relaxed { line-height: 1.65; }

.text-default { color: var(--text); }
.text-muted   { color: var(--text-muted); }
.text-subtle  { color: var(--text-subtle); }
.text-navy    { color: var(--navy); }
.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-white   { color: #fff; }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }


/* ---------- 8. Width / position / display utilities ---------- */
/* Utility classes uzywaja !important zeby wygrywac z komponentami (.btn itp.) */
.block        { display: block !important; }
.inline       { display: inline !important; }
.inline-block { display: inline-block !important; }
.hidden       { display: none  !important; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.max-w-md   { max-width: 28rem;  }   /* 448 */
.max-w-lg   { max-width: 32rem;  }   /* 512 */
.max-w-xl   { max-width: 36rem;  }   /* 576 */
.max-w-2xl  { max-width: 42rem;  }   /* 672 */
.max-w-3xl  { max-width: 48rem;  }   /* 768 */
.max-w-prose { max-width: 65ch; }

.overflow-hidden { overflow: hidden; }


/* ---------- 9. Components ---------- */

/* === Surface (karta) === */
.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.surface-warm {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.divider { height: 1px; background: var(--border); border: 0; }

/* === Brand === */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;   /* "pan-reklamo.pl" zawsze w jednej linii */
}
.brand-text .dot { color: var(--gold); }

/* === App header === */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.app-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-header-nav .btn-ghost {
  font-size: 17px;
  padding: 12px 16px;
}

/* === App footer === */
.app-footer {
  background: var(--navy-dark);
  color: #C5D1E0;
  padding: 32px 20px;
  font-size: 14px;
}
.app-footer a       { color: #C5D1E0; }
.app-footer a:hover { color: #fff; }
.app-footer .brand-text { color: #fff; }
.app-footer .brand-text .dot { color: var(--gold-soft); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-dark); color: #fff; }

.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: var(--gold-soft); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--navy); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 10px 14px;
  min-height: 36px;
}
.btn-ghost:hover { background: rgba(27,58,95,0.06); }

.btn-block { display: flex; width: 100%; }

/* === Inputs === */
.field {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: var(--text-subtle); }
.field:hover { border-color: var(--text-muted); }
.field:focus {
  outline: 2px solid var(--navy);
  outline-offset: -1px;
  border-color: var(--navy);
}
.field-textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.6;
}
.field-error {
  border-color: var(--red);
}
.field-error:focus { outline-color: var(--red); border-color: var(--red); }

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.field-error-msg {
  display: block;
  font-size: 13px;
  color: var(--red);
  margin-top: 4px;
}

/* === Radio / Checkbox === */
.radio-card,
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.radio-card:hover,
.checkbox-card:hover { border-color: var(--navy-soft); }
.radio-card input,
.checkbox-card input {
  margin: 4px 0 0 0;
  flex-shrink: 0;
  accent-color: var(--navy);
  width: 18px;
  height: 18px;
}
.radio-card-checked,
.checkbox-card-checked {
  border-color: var(--navy);
  background: rgba(27,58,95,0.04);
}
.radio-card-recommended {
  border-color: var(--gold);
  background: rgba(184,137,62,0.05);
}

/* === Pills === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pill-gold  { background: var(--gold-bg);  color: #7A5820; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-navy  { background: rgba(27,58,95,0.08); color: var(--navy); }
.pill-red   { background: var(--red-bg);   color: var(--red); }

/* === Steps progress === */
.steps-bar {
  display: flex;
  gap: 6px;
}
.steps-bar > div {
  height: 4px;
  flex: 1;
  background: var(--border);
  border-radius: 2px;
}
.steps-bar > div.active { background: var(--navy); }
.steps-bar > div.done   { background: var(--navy-soft); }

/* === Sticky bottom bar === */
.sticky-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* === FAQ accordion === */
details.faq {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%231B3A5F' stroke-width='2' stroke-linecap='round'><path d='M3 5l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .2s ease;
}
details.faq[open] summary::after { transform: rotate(180deg); }
details.faq .faq-body {
  padding: 0 0 22px 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 15px;
}

/* === Check disc (sukces) === */
.check-disc {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--green-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #B7D8C5;
  color: var(--green);
}

/* === Copybox (mail do sklepu, snippet) === */
.copybox {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

/* === Helper card (Wskazówka od Pana Reklamo) === */
.helper-card {
  background: var(--gold-bg);
  border: 1px solid #E8D9B0;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 12px;
}
.helper-card-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.helper-card-body {
  font-size: 13px;
  line-height: 1.55;
  color: #5C4520;
}
.helper-card-title {
  font-weight: 600;
  color: #3D2C0E;
  margin-bottom: 4px;
}
.helper-card-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(232,217,176,0.7);
  font-size: 12.5px;
  color: #5C4520;
}
.helper-card-note strong { color: #3D2C0E; }

/* === Pan Reklamo postać === */
.pan-pic {
  background-image: var(--pan-img);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
}
.mark-pic {
  background-image: var(--mark-img);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
}

/* === Hero grid background (subtelna siatka) === */
.hero-grid-bg {
  background-image:
    linear-gradient(to right, rgba(27,58,95,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27,58,95,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* === Cookie banner === */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  animation: cookie-slide-in .3s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
@keyframes cookie-slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* === Loading screen (Pan Reklamo analizuje / pisze) === */
.loading-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  background: var(--bg);
}
.loading-pan {
  width: 192px;
  height: 192px;
  margin-bottom: 24px;
  animation: loading-pulse 2s ease-in-out infinite;
}
.loading-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.loading-message {
  font-size: 15px;
  color: var(--text-muted);
  min-height: 24px;
  transition: opacity .3s ease;
}
.loading-dots::after {
  content: "...";
  display: inline-block;
  animation: loading-dots 1.5s steps(4, end) infinite;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
}
@keyframes loading-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
@keyframes loading-dots {
  0%   { width: 0; }
  100% { width: 1.2em; }
}

/* === Toast (powiadomienia) === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease, toast-out .25s ease 2.5s forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translate(-50%, 20px); }
}

/* === Skip link (a11y) === */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; color: #fff; }


/* ============================================================
   10. Responsive — mobile first
       Breakpointy: 1024 (desktop), 1600 (wide desktop)
   ============================================================ */

/* ---- Desktop (1024+) ---- */
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-max);
    padding: 0 32px;
  }

  .display-lg  { font-size: 48px; }
  .display-md  { font-size: 32px; }
  .display-sm  { font-size: 24px; }

  /* Klasy desktop-only — !important zeby wygraly z komponentami i inline display */
  .lg\:hidden       { display: none  !important; }
  .lg\:block        { display: block !important; }
  .lg\:flex         { display: flex  !important; }
  .lg\:grid         { display: grid  !important; }
  .lg\:grid-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:flex-row     { flex-direction: row; }
  .lg\:gap-8        { gap: var(--space-8); }
  .lg\:gap-12       { gap: var(--space-12); }
  .lg\:py-12        { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .lg\:py-16        { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .lg\:px-12        { padding-left: var(--space-12); padding-right: var(--space-12); }

  /* App header — większe paddingi na desktop */
  .app-header { padding: 18px 48px; }

  /* App footer — układ kolumn */
  .app-footer { padding: 56px 48px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }

  /* Buttons — większy domyślny rozmiar */
  .btn { font-size: 15px; padding: 14px 24px; }

  /* Field — większy padding */
  .field { padding: 14px 18px; }

  /* Cookie banner — bottom-right */
  .cookie-banner {
    bottom: 24px;
    right: 24px;
    left: auto;
    max-width: 420px;
  }

  /* Loading screen — Pan Reklamo większy */
  .loading-pan { width: 240px; height: 240px; }
  .loading-title { font-size: 28px; }
}


/* ---- Wide desktop (1600+) ---- */
@media (min-width: 1600px) {
  .container {
    max-width: var(--container-max-wide);
  }

  .display-lg  { font-size: 56px; }
  .display-md  { font-size: 36px; }
}


/* ---------- 11. Case A-H ekrany (waitlist + retry) ---------- */

.case-main { padding: 16px 0 32px; }
.case-container { max-width: 720px; }

.case-hero { text-align: center; margin-bottom: 24px; }
.case-pan-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  /* img ma globalnie display:block (sek. 25), wiec text-align:center
     rodzica nie centruje - explicit margin auto. Na desktop ≥1024 grid
     przejmuje pozycjonowanie i auto-margin nie ma znaczenia. */
  margin: 0 auto 16px;
}
.case-title { font-size: clamp(24px, 5vw, 32px); margin-bottom: 12px; }
.case-lead {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 12px;
}
.case-lead:last-child { margin-bottom: 0; }
.case-lead strong { color: var(--text); }

.case-options { padding: 20px; margin-bottom: 16px; }
.case-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.case-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.case-option:first-of-type { border-top: 0; padding-top: 4px; }
.case-option-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.case-option-num-gold { background: var(--gold); }
.case-option-body { flex: 1; }
.case-option-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.case-option-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 4px;
}
.case-option-body p:last-child { margin-bottom: 0; }
.case-option-body a:not(.btn) {
  color: var(--navy);
  text-decoration: underline;
  font-weight: 500;
}
/* CTA w opcjach case-* — flex z .btn, na mobile pelnoszerokowy.
   Wyzsza specyficznosc niz .btn-primary (ktore samo ma 0,1,0) zeby
   nie odziedziczyc color:navy / text-decoration:underline od .case-option-body a. */
.case-option-body .btn { text-decoration: none; }
.case-option-body .btn-primary,
.case-option-body .btn-primary:hover { color: #fff; }
.case-option-body .btn-gold,
.case-option-body .btn-gold:hover { color: #fff; }
.case-option-cta {
  margin-top: 10px;
  align-self: flex-start;
}
@media (max-width: 600px) {
  .case-option-cta {
    display: flex;
    width: 100%;
    align-self: stretch;
  }
}
.case-option-cta-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--navy);
  text-decoration: underline;
  font-weight: 500;
  font-size: 14px;
}
.case-detail {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 4px;
}

.case-back { text-align: center; margin-top: 24px; }

/* === Waitlist form === */
.waitlist-card { padding: 20px; margin: 16px 0; }
.waitlist-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.waitlist-lead {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}
.waitlist-lead strong { color: var(--text); }
.waitlist-error {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.25);
  color: var(--red);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 14px;
}
.waitlist-form .field-group { margin-bottom: 12px; }
.waitlist-consent {
  margin: 12px 0 16px;
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg-warm);
}
.waitlist-consent span { color: var(--text-muted); }
.waitlist-consent span strong { color: var(--text); }
.waitlist-consent a { color: var(--navy); text-decoration: underline; }
.waitlist-submit { margin-top: 4px; }

.waitlist-success { text-align: center; padding: 12px 8px; }
.waitlist-check {
  color: var(--green, #2E7D32);
  margin-bottom: 12px;
}

@media (min-width: 1024px) {
  .case-main { padding: 40px 0 64px; }
  /* .case-container nie potrzebuje wlasnego max-width na desktop -
     globalny .container ma 1280 (--container-max). Mobile nadal 720
     dla czytelnosci komunikatu i opcji. */
  .case-container { max-width: none; }

  /* Hero dwukolumnowy: obrazek po lewej, .case-hero-text po prawej.
     Wrapper .case-hero-text jest WYMAGANY we wszystkich case-* zeby
     h1 + paragrafy renderowaly sie razem w kolumnie 2 (a nie kazdy
     w odrebnej komorce gridu). */
  .case-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    text-align: left;
    margin-bottom: 32px;
  }
  .case-pan-img {
    width: 280px;
    height: 280px;
    margin-bottom: 0;
  }
  .case-hero-text { text-align: left; }
  .case-hero-text > * { text-align: left; max-width: none; margin-left: 0; margin-right: 0; }

  .case-options { padding: 28px; }
  .waitlist-card { padding: 28px; }
}


/* ---------- 12. Static pages (kontakt, logowanie, moje-sprawy) ---------- */

.static-main { padding: 24px 0 48px; }
.static-container-narrow { max-width: 720px; }

.static-page-header { margin-bottom: 24px; }
.static-page-header-center { text-align: center; }
.static-title { margin-bottom: 12px; }
.static-lead {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}
.static-page-header-center .static-lead { max-width: 560px; margin: 0 auto; }

.static-section { padding: 20px; margin-bottom: 16px; }
.static-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.static-section p { line-height: 1.6; margin-bottom: 10px; }
.static-section p:last-child { margin-bottom: 0; }
.static-section a { color: var(--navy); text-decoration: underline; }
.static-note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.contact-email {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  padding: 6px 0;
}

.operator-data {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  font-size: 14.5px;
  margin: 0;
}
.operator-data dt { color: var(--text-muted); font-weight: 500; }
.operator-data dd { margin: 0; color: var(--text); }

.static-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  align-items: center;
}

@media (min-width: 1024px) {
  .static-main { padding: 40px 0 64px; }
  .static-section { padding: 28px; }
  .static-cta { flex-direction: row; justify-content: center; }
}


/* ---------- 13. Error pages (404, 500) ---------- */

.error-main { padding: 48px 0 64px; }
.error-container { max-width: 960px; }

.error-hero { text-align: center; }
.error-pan-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
}
.error-code {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 8px;
}
.error-title {
  font-size: clamp(28px, 6vw, 40px);
  margin-bottom: 12px;
}
.error-lead {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto 24px;
}
.error-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

@media (min-width: 1024px) {
  .error-main { padding: 80px 0 96px; }
  .error-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    text-align: left;
  }
  .error-pan-img {
    width: 280px;
    height: 280px;
    margin: 0;
  }
  .error-hero-text > * { text-align: left; margin-left: 0; margin-right: 0; }
  .error-lead { max-width: none; }
  .error-actions { flex-direction: row; align-items: flex-start; }
}


/* ---------- 14. Legal pages (regulamin, polityka) ---------- */

.legal-main { padding: 24px 0 48px; }
/* .legal-container dziedziczy max-width z .container (1280 / 1440 px) */

.legal-header { margin-bottom: 24px; }
.legal-meta {
  font-size: 15px;
  color: var(--text-subtle);
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.legal-title { margin-bottom: 12px; }
.legal-lead {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.legal-disclaimer-banner {
  background: rgba(181, 163, 106, 0.12);
  border: 1px solid rgba(181, 163, 106, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: #5C4520;
  line-height: 1.55;
}

.legal-toc {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.legal-toc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 24px;
  margin: 0;
  columns: 1;
}
.legal-toc li { padding: 3px 0; font-size: 16px; }
.legal-toc a { color: var(--navy); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

.legal-doc { font-size: 17px; line-height: 1.65; color: var(--text); }
.legal-doc section { margin-bottom: 32px; scroll-margin-top: 80px; }
.legal-doc h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.legal-doc section:first-of-type h2 { padding-top: 0; border-top: 0; }
.legal-doc p { margin-bottom: 12px; }
.legal-doc ul, .legal-doc ol { padding-left: 24px; margin-bottom: 12px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc a { color: var(--navy); text-decoration: underline; }

.legal-doc .legal-todo {
  background: rgba(212, 165, 116, 0.10);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  font-size: 13.5px;
  color: #5C4520;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}
.legal-doc .legal-note {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}
.legal-table th, .legal-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--border);
  vertical-align: top;
}
.legal-table th {
  background: var(--bg-warm);
  font-weight: 700;
  color: var(--text);
}

.legal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

@media (min-width: 1024px) {
  .legal-main { padding: 48px 0 80px; }
  .legal-toc ol { columns: 2; column-gap: 32px; }
  .legal-doc { font-size: 18px; }
}


/* ---- Reduce motion ---- */
@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;
  }
}
