/* Złap Pirata — publiczna strona (zlappirata.pl). Proste, statyczne, mobile-first. */

:root {
  /* Strona ma tylko jasny motyw. color-scheme: light samo w sobie nie wystarcza —
     Chromium/Edge "wymuś ciemny motyw" i tak heurystycznie przemalowuje kolory (np. tekst
     na biały na jasnym tle), bo strona nie miała ŻADNEJ reguły @media (prefers-color-scheme).
     Pusty/identyczny blok dark niżej jest tu właśnie po to, żeby przeglądarka uznała, że
     strona sama obsługuje dark mode, i wyłączyła swoją automatyczną heurystykę. */
  color-scheme: light;

  --color-bg: #ffffff;
  --color-bg-alt: #f6f7f9;
  --color-text: #1b1f27;
  --color-text-muted: #5b6372;
  --color-border: #e1e4e9;
  --color-brand: #d62828;
  --color-brand-dark: #a81e1e;
  --color-brand-contrast: #ffffff;
  --color-navy: #10213f;
  --container-width: 1100px;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
    --color-bg: #ffffff;
    --color-bg-alt: #f6f7f9;
    --color-text: #1b1f27;
    --color-text-muted: #5b6372;
    --color-border: #e1e4e9;
    --color-brand: #d62828;
    --color-brand-dark: #a81e1e;
    --color-brand-contrast: #ffffff;
    --color-navy: #10213f;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
}

/* "html body" zamiast "body": FluentUI v5 (lib.module.js) wstrzykuje adopted stylesheet
   z body { height: 100dvh; overflow: hidden; font-family/color/... }, który przy tej samej
   specyficzności wygrywa z site.css — przez to strona nie scrollowała się na mobilkach. */
html body {
  height: auto;
  overflow: visible;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

.site {
  background: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-main {
  background: var(--color-bg);
  flex: 1;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-text);
}

p {
  margin: 0 0 1em;
  color: var(--color-text);
}

a {
  color: var(--color-brand-dark);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--color-brand-dark);
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 22px;
  cursor: pointer;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

@media (max-width: 720px) {
  .nav-toggle-label {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .main-nav a {
    padding: 0.75rem 1.25rem;
  }

  .nav-toggle:checked ~ .main-nav {
    display: flex;
  }
}

/* ---------- Generic sections ---------- */

.page-section {
  padding: 3rem 0;
  background: var(--color-bg);
}

.page-section--alt {
  background: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.4em;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* ---------- Hero ---------- */

.hero {
  padding: 2.5rem 0 3rem;
  background: var(--color-bg);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  color: var(--color-navy);
}

.hero-claim {
  display: inline-block;
  background: var(--color-brand);
  color: var(--color-brand-contrast);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

@media (min-width: 860px) {
  .hero-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .hero-copy {
    flex: 1;
  }

  .hero-lead {
    margin: 0 0 1.5rem;
  }

  .hero-media {
    flex: 1;
  }
}

/* ---------- Placeholder graphics ---------- */

.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 1.5rem;
  min-height: 160px;
}

.placeholder-img--hero {
  min-height: 260px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.placeholder-img--small {
  min-height: 90px;
  margin-bottom: 1rem;
}

.placeholder-img--badge {
  min-height: 44px;
  width: 170px;
  border-radius: 8px;
  font-size: 0.7rem;
  padding: 0.5rem;
}

/* ---------- Store badges / CTA ---------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (min-width: 860px) {
  .store-badges {
    justify-content: flex-start;
  }
}

.store-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 170px;
  min-height: 52px;
  border-radius: 8px;
  background: var(--color-navy);
  color: #fff;
  opacity: 0.55;
  cursor: default;
  text-align: center;
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
}

.store-badge strong {
  font-size: 0.95rem;
}

.store-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

@media (min-width: 860px) {
  .store-note {
    text-align: left;
  }
}

/* ---------- Steps / cards ---------- */

.steps-grid,
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card,
.benefit-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.step-number {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.75rem;
}

.step-number-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.step-number-text {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-card h3,
.benefit-card h3 {
  font-size: 1.05rem;
}

/* ---------- Benefit icons ---------- */

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fbe4e4;
  color: var(--color-brand);
  margin-bottom: 1rem;
}

.benefit-icon svg {
  width: 30px;
  height: 30px;
}

/* ---------- FAQ ---------- */

.faq-list details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
  background: var(--color-bg);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
}

.faq-list details p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin: 0;
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- Simple pages (regulamin/polityka/o nas) ---------- */

.simple-page {
  padding: 3rem 0;
  min-height: 40vh;
}

.simple-page h1 {
  margin-bottom: 1rem;
}

.simple-page .placeholder-note {
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--color-bg-alt);
}

/* ---------- Forms (kontakt) ---------- */

.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  width: 100%;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
  background: var(--color-brand);
  color: var(--color-brand-contrast);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--color-brand-dark);
}

.validation-message {
  color: var(--color-brand-dark);
  font-size: 0.8rem;
  margin: -0.5rem 0 0;
}

.form-error {
  background: #fff1f0;
  border: 1px solid var(--color-brand);
  color: var(--color-brand-dark);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.form-success {
  background: #eefaf0;
  border: 1px solid #2f9e44;
  color: #237a37;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-align: center;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
