/* ============================================================
   detechtive.pl — landing page
   Motyw: ciemny domyślnie, jasny przez prefers-color-scheme.
   ============================================================ */

:root {
  --bg:            #0b0e14;
  --bg-alt:        #10141d;
  --surface:       #151a25;
  --surface-hi:    #1b2130;
  --border:        #262d3d;
  --border-hi:     #38425a;

  --text:          #e8ecf4;
  --text-muted:    #9aa4b8;
  --text-faint:    #6b7688;

  --accent:        #f5b841;   /* lampa detektywa */
  --accent-hi:     #ffcb63;
  --accent-ink:    #1a1204;   /* tekst na akcencie */
  --accent-soft:   rgba(245, 184, 65, .12);

  --ok:            #4ade80;
  --err:           #f87171;

  --radius:        14px;
  --radius-sm:     10px;
  --shell:         1120px;
  --shell-narrow:  720px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --shadow: 0 18px 50px -22px rgba(0, 0, 0, .8);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #fbfaf7;
    --bg-alt:     #f3f1ec;
    --surface:    #ffffff;
    --surface-hi: #fdfcfa;
    --border:     #e3ded4;
    --border-hi:  #cfc7b8;

    --text:       #16181d;
    --text-muted: #5a6070;
    --text-faint: #868d9c;

    --accent:     #b8791a;
    --accent-hi:  #96610f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(184, 121, 26, .1);

    --ok:         #15803d;
    --err:        #b91c1c;

    --shadow: 0 16px 40px -24px rgba(30, 25, 15, .35);
  }
}

/* ————————————————— Baza ————————————————— */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

img, svg { max-width: 100%; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .6rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 22px;
}

.shell-narrow { max-width: var(--shell-narrow); }

/* ————————————————— Header ————————————————— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--border);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 1.12rem;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}

.brand-tld { color: var(--text-faint); font-weight: 500; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: .94rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .16s ease;
}

.site-nav a:hover { color: var(--text); }

@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ————————————————— Przyciski ————————————————— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: .85rem 1.4rem;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease,
              transform .12s ease, color .16s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-hi); }

.btn-primary[disabled] {
  opacity: .6;
  cursor: progress;
}

.btn-ghost {
  border-color: var(--border-hi);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm { padding: .55rem 1rem; font-size: .9rem; }

/* ————————————————— Hero ————————————————— */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-glow {
  position: absolute;
  top: -320px;
  left: 50%;
  width: 900px;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    var(--accent-soft) 0%,
    transparent 68%
  );
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin-bottom: 1.6rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  font-size: clamp(2.3rem, 6.4vw, 4rem);
  font-weight: 780;
  margin-bottom: 1.3rem;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  font-size: clamp(1.05rem, 2.2vw, 1.24rem);
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 2.4rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 2.4rem;
  list-style: none;
  margin: 2.6rem 0 0;
  padding: 0;
  font-size: .92rem;
  color: var(--text-faint);
}

.hero-stats strong {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
  margin-right: .35rem;
}

/* ————————————————— Formularz ————————————————— */

.signup { max-width: 560px; scroll-margin-top: 90px; }

.signup-row {
  display: flex;
  gap: .7rem;
}

@media (max-width: 560px) {
  .signup-row { flex-direction: column; }
  .signup-row .btn { width: 100%; }
}

.signup-input {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  padding: .85rem 1.05rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.signup-input::placeholder { color: var(--text-faint); }

.signup-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.signup-input[aria-invalid="true"] {
  border-color: var(--err);
}

.signup-note {
  margin-top: .95rem;
  font-size: .85rem;
  color: var(--text-faint);
}

.form-status {
  margin-top: .8rem;
  font-size: .92rem;
  min-height: 1.4em;
}

.form-status.is-ok  { color: var(--ok); }
.form-status.is-err { color: var(--err); }

/* honeypot — ukryty przed ludźmi, widoczny dla botów */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ————————————————— Sekcje ————————————————— */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.65rem, 3.8vw, 2.4rem);
  font-weight: 730;
  margin-bottom: .9rem;
}

.section-lede {
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 2.8rem;
}

/* ————————————————— Karty ————————————————— */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.1rem;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem 1.6rem;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-num {
  display: block;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: .8rem;
}

.card h3 {
  font-size: 1.13rem;
  font-weight: 680;
  margin-bottom: .6rem;
}

.card p {
  color: var(--text-muted);
  font-size: .95rem;
}

/* ————————————————— Split / lista / cytat ————————————————— */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

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

.split-col .section-lede { margin-bottom: 1.6rem; }

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .95rem;
}

.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.quote {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.8rem 1.7rem 1.5rem;
}

.quote p {
  font-size: 1.06rem;
  margin-bottom: 1.1rem;
}

.quote footer { font-size: .88rem; }

.quote-author { color: var(--text-faint); }

/* ————————————————— Numery ————————————————— */

.issues {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.issue { border-bottom: 1px solid var(--border); }

.issue-link {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: .3rem 1.6rem;
  padding: 1.5rem .6rem;
  text-decoration: none;
  transition: background .16s ease, padding-left .16s ease;
}

.issue-link:hover {
  background: var(--surface);
  padding-left: 1.1rem;
}

@media (max-width: 640px) {
  .issue-link { grid-template-columns: 1fr; }
  .issue-link:hover { padding-left: .6rem; }
}

.issue-meta {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--accent);
  padding-top: .2em;
}

.issue-title {
  font-weight: 640;
  font-size: 1.08rem;
  grid-column: 2;
}

.issue-teaser {
  grid-column: 2;
  color: var(--text-muted);
  font-size: .93rem;
}

@media (max-width: 640px) {
  .issue-title,
  .issue-teaser { grid-column: 1; }
}

.issues-note {
  margin-top: 1.6rem;
  font-size: .88rem;
  color: var(--text-faint);
}

/* ————————————————— FAQ ————————————————— */

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-of-type { border-top: 1px solid var(--border); }

.faq-item summary {
  cursor: pointer;
  padding: 1.15rem .4rem;
  font-weight: 620;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color .16s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { color: var(--accent); }

.faq-item summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease, border-color .16s ease;
}

.faq-item[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
  border-color: var(--accent);
}

.faq-item p {
  padding: 0 .4rem 1.35rem;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ————————————————— Strony tekstowe ————————————————— */

.doc-block {
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 0;
}

.doc-block:first-of-type { border-top: 1px solid var(--border); }

.doc-block h2 {
  font-size: 1.08rem;
  font-weight: 650;
  margin-bottom: .55rem;
}

.doc-block p {
  color: var(--text-muted);
  max-width: 62ch;
  padding: 0;
}

/* ————————————————— CTA ————————————————— */

.cta {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background:
    radial-gradient(ellipse 700px 300px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--border);
}

.cta-inner { text-align: center; }

.cta-title {
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  font-weight: 730;
  margin-bottom: .8rem;
}

.cta-lede {
  color: var(--text-muted);
  margin-bottom: 2.2rem;
}

.signup-compact { margin-inline: auto; }

/* ————————————————— Footer ————————————————— */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2.8rem 0;
  font-size: .9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.footer-tagline {
  font-weight: 400;
  font-size: .85rem;
  color: var(--text-faint);
  letter-spacing: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .16s ease;
}

.footer-nav a:hover { color: var(--accent); }

.footer-copy {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: .82rem;
}
