/* ==========================================================================
   RunItself v4 — jeden krój, jedna skala odstępów, dwa przyciski.
   Tokeny i paleta ze szkicu 2026-08-14. Zero wartości spoza tokenów.
   ========================================================================== */

/* ---------- Fonty (self-host, pliki z v3) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/dm-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/dm-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokeny ---------- */
:root {
  --ink: #14251e;
  --muted: #5c6b63;
  --paper: #f7f3ea;
  --card: #fffdf7;
  --line: rgba(20, 37, 30, 0.16);
  --green: #0b4a34;
  --green-deep: #092f24;
  --yellow: #f4cf4e;
  --dark-text: #f2efe4;
  --dark-muted: #b9cdc2;
  --dark-line: rgba(255, 255, 255, 0.18);

  /* jedna skala odstępów, nic poza nią */
  --s1: 8px;
  --s2: 16px;
  --s3: 32px;
  --s4: 56px;
  --s5: 104px;

  --w-text: 720px;
  --w-wide: 960px;
  --radius: 10px;

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }
.dark :focus-visible { outline-color: var(--yellow); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-deep);
  color: #fff;
  padding: var(--s1) var(--s2);
  border-radius: var(--radius);
  z-index: 60;
}
.skip-link:focus-visible { left: var(--s2); top: var(--s2); }

/* ---------- Typografia. Jeden krój, trzy stopnie ---------- */
h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 18ch;
}
h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 800;
  max-width: 24ch;
  margin-bottom: var(--s3);
}
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--s2);
}

.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
small, .small { font-size: 14px; line-height: 1.55; }

/* ---------- Szkielet ---------- */
.wrap { max-width: var(--w-wide); margin-inline: auto; padding-inline: var(--s3); }
.narrow { max-width: var(--w-text); }
section { padding-block: var(--s5); }
section + section { border-top: 1px solid var(--line); }
section.dark { background: var(--green-deep); color: var(--dark-text); border-top: 0; }
section.dark + section { border-top: 0; }
section.dark .eyebrow { color: var(--yellow); }
section.dark .muted, section.dark .lead { color: var(--dark-muted); }

/* ---------- Nagłówek strony ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  max-width: var(--w-wide);
  margin-inline: auto;
  padding: var(--s2) var(--s3);
  position: relative;
}
.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s1);
}
.brand i { width: 12px; height: 12px; border-radius: 3px; background: var(--green); display: inline-block; }

.site-nav { display: flex; align-items: center; gap: var(--s3); }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--green); text-decoration: underline; }
.site-nav .lang-link { color: var(--muted); }
.site-nav .nav-cta { color: var(--green); font-weight: 700; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s1) var(--s2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Przyciski. Dwa style, koniec ---------- */
.btn {
  display: inline-block;
  padding: var(--s2) var(--s3);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover { background: var(--green); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.dark .btn-primary { background: var(--yellow); color: var(--ink); }
.dark .btn-primary:hover { background: #fff; }
.dark .btn-ghost { border-color: var(--dark-line); color: var(--dark-text); }
.dark .btn-ghost:hover { border-color: var(--dark-text); }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s4) var(--s5); }
.hero .lead { margin-top: var(--s3); }
.hero-trust { margin-top: var(--s2); font-weight: 600; color: var(--green); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); align-items: center; }
.hero-founder {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
  max-width: var(--w-text);
}
.hero-founder img { width: var(--s4); height: var(--s4); border-radius: var(--radius); object-fit: cover; }
.hero-founder b { display: block; font-size: 15px; line-height: 1.3; }
.hero-founder span { display: block; font-size: 14px; color: var(--muted); }

/* ---------- Problem ---------- */
.plain-list { list-style: none; max-width: var(--w-text); }
.plain-list li {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: var(--s2);
  font-size: 18px;
}
.plain-list li::before { content: "→"; color: var(--green); font-weight: 700; }

/* ---------- Manifest ---------- */
.manifesto-copy { max-width: var(--w-text); }
.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s3);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chain span { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s1) var(--s2); background: var(--card); }
.chain strong { border: 1px solid var(--green); border-radius: var(--radius); padding: var(--s1) var(--s2); background: var(--yellow); font-weight: 500; }
.chain i { color: var(--green); font-style: normal; font-weight: 500; }

.memes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s4); }
.memes figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.memes img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.memes figcaption { padding: var(--s2); font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Case study ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-block: var(--s4); }
.stats div { border-top: 2px solid var(--yellow); padding-top: var(--s2); }
.stats b { display: block; font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stats span { font-size: 14px; color: var(--dark-muted); }
.story { display: grid; gap: var(--s2); max-width: var(--w-text); }
.story p b { color: #fff; }

/* Jeden zrzut = pełna szerokość. Po dodaniu kolejnych zmień na repeat(2, 1fr). */
.case-thumbs {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
  margin-top: var(--s4);
}
.case-thumb {
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
  text-align: left;
  color: inherit;
  font: inherit;
  display: block;
  width: 100%;
}
.case-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.case-thumb span {
  display: block;
  padding: var(--s2);
  font-size: 13px;
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-line);
}
.case-thumb:hover { border-color: var(--yellow); }

/* ---------- Jak działa system ---------- */
.section-intro { max-width: var(--w-text); margin-bottom: var(--s4); color: var(--muted); }
.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); max-width: var(--w-wide); }
.steps li { border-top: 1px solid var(--line); padding-top: var(--s2); }
.steps li b {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: var(--s1);
}
.steps h3 { margin-bottom: var(--s1); }
.steps p { color: var(--muted); }

.sysmap { margin-top: var(--s4); max-width: var(--w-text); display: grid; gap: 0; }
.sysmap-row { display: grid; gap: var(--s2); }
.sysmap-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s1);
}
.sysmap-chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.sysmap-chips span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--s1) var(--s2);
  font-size: 14px;
}
.sysmap-arrow {
  text-align: center;
  color: var(--green);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  padding-block: var(--s2);
  max-width: var(--w-text);
  animation: sysflow 2.4s ease-in-out infinite;
}
.sysmap-arrow:nth-child(4) { animation-delay: 0.3s; }
.sysmap-arrow:nth-child(6) { animation-delay: 0.6s; }
.sysmap-arrow:nth-child(8) { animation-delay: 0.9s; }
@keyframes sysflow {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(4px); opacity: 1; }
}
.sysmap-core {
  background: var(--green-deep);
  color: var(--dark-text);
  border-radius: var(--radius);
  padding: var(--s3);
}
.sysmap-core .sysmap-label { color: var(--yellow); margin-bottom: var(--s1); }
.sysmap-core p { color: var(--dark-muted); font-size: 15px; }
.sysmap-sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.sysmap-sub div { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: var(--s2); }
.sysmap-sub b { display: block; font-size: 15px; font-weight: 700; }
.sysmap-sub span { font-size: 13px; color: var(--muted); }
.sysmap-gate {
  border: 1px solid var(--green);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--s2) var(--s3);
}
.sysmap-gate p { font-weight: 600; }
.sysmap-result { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3); color: var(--muted); }
.sysmap-result b { color: var(--ink); }

/* ---------- Projekty ---------- */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.project { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.project img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; }
.project div { padding: var(--s2); }
.project h3 { margin-bottom: var(--s1); }
.project p { font-size: 15px; color: var(--muted); }

/* ---------- Ścieżka ---------- */
.path { counter-reset: step; max-width: var(--w-text); list-style: none; }
.path li {
  counter-increment: step;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: var(--s4) 1fr;
  gap: var(--s2);
}
.path li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--green);
  padding-top: var(--s1);
}
.path h3 span { color: var(--muted); font-weight: 600; font-size: 15px; margin-left: var(--s1); }
.path p { margin-top: var(--s1); color: var(--muted); }
.path .btn { margin-top: var(--s2); }
.path-price { margin-top: var(--s1); color: var(--ink); font-weight: 600; }
.path-note { margin-top: var(--s3); max-width: var(--w-text); }
.path-note .btn { margin-top: var(--s2); }

/* ---------- O mnie ---------- */
.bio { display: grid; grid-template-columns: 300px 1fr; gap: var(--s4); align-items: start; }
.bio img { border-radius: var(--radius); width: 100%; }
.bio-story { display: grid; gap: var(--s2); max-width: 58ch; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--w-text); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item button {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: var(--s2) 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
}
.faq-item button b { color: var(--green); font-weight: 400; font-size: 22px; line-height: 1; }
.faq-item [hidden] { display: none; }
.faq-answer p { padding-bottom: var(--s2); color: var(--muted); max-width: 60ch; }

/* ---------- CTA końcowe ---------- */
.cta-final .lead { margin-bottom: var(--s3); }

/* ---------- Newsletter ---------- */
.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: center; }
.newsletter h2 { margin-bottom: var(--s2); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: var(--s2); }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.newsletter-form input[type="email"] {
  flex: 1 1 240px;
  padding: var(--s2);
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.newsletter-form input[type="email"]:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.newsletter-consent { margin-top: var(--s2); color: var(--muted); }
.newsletter-status { margin-top: var(--s2); font-weight: 600; color: var(--green); }
.newsletter-status[data-state="error"] { color: var(--ink); }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  max-width: var(--w-wide);
  margin-inline: auto;
  padding: var(--s3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--muted);
}
.footer-row a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; }
.cookie-settings {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0;
  padding: var(--s2);
  background: transparent;
  max-width: min(96vw, 1280px);
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(9, 47, 36, 0.9); }
.lightbox img { border-radius: var(--radius); max-height: 84vh; width: auto; max-width: 100%; margin-inline: auto; }
.lightbox-close {
  display: block;
  margin-left: auto;
  margin-bottom: var(--s1);
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: var(--radius);
  font-size: 22px;
  line-height: 1;
  padding: var(--s1) var(--s2);
  cursor: pointer;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  :root { --s5: 72px; --s4: 48px; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--s2);
    right: var(--s2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--s2);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
    z-index: 50;
  }
  .site-nav.is-open { display: flex; }

  .stats { grid-template-columns: 1fr 1fr; }
  .memes { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .sysmap-sub { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .bio { grid-template-columns: 1fr; }
  .bio img { max-width: 300px; }
  .newsletter { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .path li { grid-template-columns: 1fr; gap: var(--s1); }
  .hero-actions .btn { width: 100%; text-align: center; }
  .case-thumbs { grid-template-columns: 1fr; }
}
