/* ==========================================================================
   Kreator postów na Facebooka - Post w jednym przepływie
   Jasny motyw w kolorze Facebooka. Kierunek: redakcyjny generator sygnałów.
   ========================================================================== */

/* --- Fonty (lokalne, latin + latin-ext) --------------------------------- */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/dm-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/dm-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F0F2F5;
  --bg-2: #E4E6EB;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --ink: #0F1419;
  --ink-2: #1C1E21;
  --muted: #5B6473;
  --fb: #1877F2;
  --fb-ui: #1466D6;
  --fb-deep: #0E4FAE;
  --fb-soft: #E7F0FE;
  --navy: #0B1F3F;
  --navy-2: #122B52;
  --green: #31A24C;
  --green-soft: #E3F5E8;
  --green-ink: #146C2E;
  --red: #E41E3F;
  --line: rgba(15, 20, 25, 0.12);
  --line-strong: rgba(15, 20, 25, 0.24);
  --line-light: rgba(255, 255, 255, 0.16);

  --font-head: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", "Space Grotesk", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1480px;
  --nav-h: 72px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px rgba(11, 31, 63, 0.12), 0 2px 6px rgba(11, 31, 63, 0.06);

  --grid-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath d='M96 0H0v96' fill='none' stroke='%230B1F3F' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E");
  --grid-svg-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath d='M96 0H0v96' fill='none' stroke='%23FFFFFF' stroke-opacity='0.09' stroke-width='1'/%3E%3C/svg%3E");
  --grain-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--grid-svg);
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
body.has-modal { overflow: hidden; }
img, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1; margin: 0; letter-spacing: -0.02em; overflow-wrap: normal; word-break: normal; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--bg-2); padding: 0.1em 0.4em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--fb-ui); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--fb); color: #fff; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.accent { color: var(--fb); font-style: normal; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0.01; }

/* --- Ziarno ------------------------------------------------------------- */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 60;
  background-image: var(--grain-svg);
  opacity: 0.05;
  mix-blend-mode: multiply;
}

/* --- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute; top: -200px; left: var(--gutter);
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200;
  font-weight: 700; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* --- Nawigacja ---------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(11, 31, 63, 0.06);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 12px; min-width: 0; font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; }
.nav__mark { width: 14px; height: 14px; background: var(--fb); border-radius: 3px; box-shadow: 18px 0 0 -4px var(--ink); margin-right: 14px; flex: none; }
.nav__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__list { display: flex; align-items: center; gap: 28px; }
.nav__link { position: relative; font-weight: 500; color: var(--ink); padding: 6px 0; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--fb); transition: right 0.35s var(--ease); }
.nav__link:hover::after, .nav__link:focus-visible::after { right: 0; }

.nav__toggle {
  display: none; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.nav__toggle-bar { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease); }
.nav__toggle-bar + .nav__toggle-bar { margin-top: 4px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:first-child { transform: translateY(3px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
.nav__toggle-text { font-weight: 600; font-size: 0.95rem; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__panel {
    position: absolute; top: calc(var(--nav-h) - 8px); right: var(--gutter); left: var(--gutter);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px; display: none; box-shadow: var(--shadow);
  }
  .nav__panel.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__link { display: block; padding: 14px 14px; border-radius: 8px; }
  .nav__link:hover { background: var(--surface-2); }
  .nav__link::after { display: none; }
  .nav__list .btn { margin-top: 8px; justify-content: center; }
  .nav.is-scrolled, .nav.is-open { background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
@media (max-width: 420px) {
  .nav__inner { gap: 12px; }
  .nav__name { font-size: 0.84rem; }
  .nav__mark { width: 12px; height: 12px; margin-right: 10px; box-shadow: 15px 0 0 -4px var(--ink); }
  .nav__toggle { padding: 8px 12px; gap: 8px; }
}

/* --- Przyciski ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--fb-ui); color: #fff; box-shadow: 0 10px 24px rgba(20, 102, 214, 0.28); }
.btn--primary:hover { background: var(--fb-deep); }
.btn--secondary { background: var(--ink); color: #fff; }
.btn--secondary:hover { background: var(--navy); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn--small { padding: 10px 18px; font-size: 0.95rem; }
.btn--large { padding: 20px 40px; font-size: 1.2rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* --- Elementy wspólne --------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fb-ui);
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.eyebrow--light { color: #fff; }
.h2 { font-size: clamp(2.2rem, 5.2vw, 4.6rem); margin-top: 14px; max-width: 14ch; }
.section { padding-block: clamp(80px, 11vw, 150px); }
.section__head { margin-bottom: clamp(40px, 6vw, 80px); }
.section__lead { color: var(--muted); font-size: 1.15rem; max-width: 52ch; margin-top: 22px; }
.section__head--row { display: grid; gap: 24px; align-items: end; }
@media (min-width: 900px) {
  .section__head--row { grid-template-columns: 1fr 1fr; }
  .section__head--row .section__lead { margin-top: 0; justify-self: end; max-width: 42ch; }
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.pill--lime { background: var(--green-soft); color: var(--green-ink); }
.pill--mist { background: var(--bg-2); color: var(--ink); }
.pill--coral { background: var(--fb-soft); color: var(--fb-deep); }
.pill.is-busy { background: var(--fb-soft); color: var(--fb-deep); }
.pill.is-busy::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fb-ui); animation: blink 0.8s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* Okno generatora */
.window {
  position: relative; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.window__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.window__dots { display: flex; gap: 6px; }
.window__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); }
.window__dots i:first-child { background: var(--fb); }
.window__title { font-family: var(--font-head); font-weight: 500; font-size: 0.9rem; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window__body { padding: 16px; }

.preview-canvas { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.preview-canvas canvas { width: 100%; height: 100%; }
.preview-text { margin-top: 14px; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }

.tag {
  position: absolute; z-index: 2;
  background: var(--ink); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.02em;
  padding: 8px 14px; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(11, 31, 63, 0.25);
  max-width: 70%;
}
.tag--a { top: -16px; left: -18px; transform: rotate(-4deg); background: var(--fb-ui); }
.tag--b { bottom: 28%; right: -18px; transform: rotate(3deg); }

/* --- HERO --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding-block: calc(var(--nav-h) + 24px) 48px;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -10% -30% auto; width: 60vw; max-width: 900px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(24, 119, 242, 0.22), transparent 70%);
  pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; position: relative; }
.hero__inner > * { min-width: 0; }
.hero__copy { position: relative; z-index: 2; }
.hero__title { font-size: clamp(3.1rem, 9.6vw, 10.2rem); line-height: 0.92; margin-top: 22px; max-width: 100%; }
.hero__line { display: block; }
.hero__lead { margin-top: 28px; max-width: 46ch; font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__steps { display: flex; gap: 26px; margin-top: 40px; font-family: var(--font-head); font-weight: 500; color: var(--muted); font-size: 0.95rem; }
.hero__steps li { display: flex; align-items: baseline; gap: 8px; }
.hero__step-num { color: var(--fb-ui); font-size: 0.75rem; font-weight: 700; }

.hero__preview { position: relative; z-index: 1; }
.window--hero { max-width: 460px; margin-inline: auto; }

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px; }
  .hero__preview { justify-self: end; width: 100%; }
  .window--hero { margin-inline: 0 0; margin-left: auto; }
}
@media (min-width: 960px) and (max-height: 900px) {
  .window--hero { max-width: 400px; }
  .hero__title { font-size: clamp(3.1rem, 8.4vw, 8.6rem); }
}
@media (max-width: 959px) {
  .hero { padding-bottom: 32px; }
  .hero__steps { display: none; }
  .window--hero { margin-top: 10px; }
  .tag--a { left: 4px; }
  .tag--b { right: 4px; }
}
@media (max-width: 480px) { .hero__actions .btn { flex: 1 1 100%; } }

/* --- Pasek słów --------------------------------------------------------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 18px; background: var(--surface); }
.marquee__track { display: flex; width: max-content; gap: 0; animation: marquee 40s linear infinite; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 28px; padding-inline: 14px;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.9rem); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.marquee__item::after { content: ""; width: 10px; height: 10px; background: var(--fb); border-radius: 2px; transform: rotate(45deg); }
.marquee__item:nth-child(3n)::after { background: var(--ink); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Kroki -------------------------------------------------------------- */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.step { position: relative; background: var(--surface); padding: 36px 28px 32px; transition: background 0.4s var(--ease); }
.step:hover { background: var(--fb-soft); }
.step__index { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; color: var(--fb-ui); letter-spacing: 0.1em; }
.step__title { font-size: clamp(1.6rem, 2.4vw, 2.3rem); margin-top: 48px; }
.step__text { margin-top: 16px; color: var(--muted); max-width: 34ch; }
.step__io { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 0.85rem; font-weight: 500; }
.step__io span { padding: 3px 9px; border-radius: 4px; background: var(--fb-soft); color: var(--fb-deep); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 700; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } .step { padding: 44px 36px 40px; } .step__title { margin-top: 90px; } }

/* --- Generator ---------------------------------------------------------- */
.section--generator { position: relative; }
.section--generator::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--fb), transparent); }
.gen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.gen > * { min-width: 0; }
@media (min-width: 1000px) { .gen { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 36px; } }

.gen__form { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.field + .field { margin-top: 18px; }
.field__label { display: block; font-family: var(--font-head); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.field__input {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 14px 16px; font-size: 1.05rem; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field__input::placeholder { color: #7a8391; }
.field__input:hover { border-color: var(--ink); }
.field__input:focus { outline: none; border-color: var(--fb-ui); box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.25); }
.field__select-wrap { position: relative; }
.field__select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.field__select-wrap::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--fb-ui); border-bottom: 2px solid var(--fb-ui);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field__hint { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.field__error { margin-top: 14px; color: var(--red); font-weight: 500; font-size: 0.95rem; min-height: 1.4em; }
.field__input[aria-invalid="true"] { border-color: var(--red); }

/* Własne zdjęcie */
.photo { position: relative; }
.photo__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo__drop {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2);
  color: var(--muted); font-size: 0.95rem; transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.photo__drop:hover, .photo.is-drag .photo__drop { border-color: var(--fb-ui); background: var(--fb-soft); color: var(--ink); }
.photo__input:focus-visible + .photo__drop { outline: 3px solid var(--fb-ui); outline-offset: 3px; }
.photo__icon { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--fb-ui); position: relative; }
.photo__icon::before, .photo__icon::after { content: ""; position: absolute; background: #fff; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 2px; }
.photo__icon::before { width: 14px; height: 2px; }
.photo__icon::after { width: 2px; height: 14px; }
.photo__preview { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.photo__preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.photo__remove { margin-left: auto; background: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.photo__remove:hover { border-color: var(--red); color: var(--red); }

.process { margin-top: 20px; display: grid; gap: 8px; }
.process__step { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-size: 0.9rem; color: var(--muted); transition: color 0.3s var(--ease); }
.process__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; transition: all 0.3s var(--ease); }
.process__step.is-active { color: var(--ink); }
.process__step.is-active .process__dot { border-color: var(--fb-ui); background: var(--fb-ui); box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.22); }
.process__step.is-done { color: var(--ink); }
.process__step.is-done .process__dot { border-color: var(--green); background: var(--green); }

.gen__result { min-width: 0; }
.gen__grid { display: grid; gap: 20px; padding: 20px; }
@media (min-width: 760px) { .gen__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 24px; } }
.gen__label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.gen__count { color: var(--fb-ui); }
.post { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-height: 240px; white-space: pre-wrap; line-height: 1.6; font-size: 1rem; }
.gen__actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 20px 20px; }
@media (min-width: 760px) { .gen__actions { padding: 0 24px 24px; } }
@media (max-width: 480px) { .gen__actions .btn { flex: 1 1 100%; } }

/* --- Sekcja kontrastowa (granat) ---------------------------------------- */
.section--light { background: var(--navy); color: #fff; background-image: var(--grid-svg-light); }
.section--light .eyebrow--dark, .section--light .eyebrow { color: #fff; }
.section--light .section__lead { color: rgba(255, 255, 255, 0.72); }
.section--light ::selection { background: #fff; color: var(--navy); }
.formats { display: grid; gap: 20px; }
@media (min-width: 820px) { .formats { grid-template-columns: 1fr 1fr; gap: 24px; } }
.format {
  position: relative; padding: 36px 30px 34px;
  border: 1px solid var(--line-light); border-radius: var(--radius); background: var(--navy-2);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.format:hover { transform: translateY(-4px); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3); }
.format--accent { background: var(--surface); color: var(--ink); border-color: var(--surface); }
.format__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; color: var(--fb); }
.format__title { font-size: clamp(1.7rem, 3vw, 2.6rem); margin-top: 20px; }
.format__text { margin-top: 16px; color: rgba(255, 255, 255, 0.72); max-width: 42ch; }
.format--accent .format__text { color: var(--muted); }
.format__list { margin-top: 26px; display: grid; gap: 10px; font-weight: 500; }
.format__list li { position: relative; padding-left: 24px; }
.format__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 2px; background: var(--fb); }
@media (min-width: 820px) { .format { padding: 44px 40px 42px; } .format--accent { margin-top: 48px; } }

/* --- Końcowe CTA -------------------------------------------------------- */
.section--cta { position: relative; overflow: hidden; padding-block: clamp(100px, 14vw, 200px); }
.section--cta::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 110vw; max-width: 1400px; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(24, 119, 242, 0.18), transparent 70%);
  pointer-events: none;
}
.cta { position: relative; text-align: center; display: grid; justify-items: center; }
.cta__title { font-size: clamp(2.4rem, 7vw, 6.8rem); margin-top: 18px; max-width: 16ch; line-height: 0.98; }
.cta .hero__actions { justify-content: center; margin-top: 36px; }

/* --- Strony dokumentów -------------------------------------------------- */
.legal { padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 96px)); }
.legal__wrap { max-width: 820px; }
.legal__title { font-size: clamp(2.2rem, 5vw, 4rem); margin-top: 14px; }
.legal__meta { color: var(--muted); margin-top: 14px; }
.legal h2 { font-size: 1.45rem; margin-top: 44px; margin-bottom: 14px; }
.legal h3 { font-size: 1.15rem; margin-top: 26px; margin-bottom: 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ol, .legal ul { list-style: decimal; padding-left: 24px; display: grid; gap: 8px; }
.legal ul { list-style: disc; }
.legal a { color: var(--fb-ui); text-decoration: underline; text-underline-offset: 3px; }
.legal__table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.95rem; }
.legal__table th, .legal__table td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal__table th { background: var(--surface-2); font-family: var(--font-head); }
@media (max-width: 600px) { .legal__table { display: block; overflow-x: auto; } }

/* --- Checkboxy ---------------------------------------------------------- */
.check { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; font-size: 0.92rem; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--fb-ui); cursor: pointer; }
.check em { color: var(--muted); font-style: normal; }
.check a { color: var(--fb-ui); text-decoration: underline; text-underline-offset: 3px; }
.check--inline { margin-top: 10px; }

/* --- Okno leadowe ------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(11, 31, 63, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal__panel {
  position: relative; width: min(100%, 520px); max-height: calc(100svh - 40px); overflow: auto;
  background: var(--surface); border-radius: 18px; padding: 32px 28px 24px; box-shadow: var(--shadow);
  animation: modal-in 0.4s var(--ease);
}
@keyframes modal-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal__close:hover { background: var(--surface-2); }
.modal__title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 12px; }
.modal__desc { margin-top: 12px; color: var(--muted); }
.modal__form { margin-top: 20px; }
.modal__form .btn { margin-top: 18px; }
.modal__small { margin-top: 14px; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }

/* --- Baner cookies ------------------------------------------------------ */
.cookie {
  position: fixed; left: 50%; bottom: 16px; z-index: 130;
  width: min(calc(100% - 32px), 900px); transform: translate(-50%, 24px); opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.cookie.is-visible { transform: translate(-50%, 0); opacity: 1; }
.cookie[hidden] { display: none; }
.cookie__inner { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
@media (min-width: 760px) { .cookie__inner { grid-template-columns: 1fr auto; align-items: end; } }
.cookie__title { font-family: var(--font-head); font-weight: 700; margin-bottom: 6px; }
.cookie__text p { font-size: 0.95rem; color: var(--ink-2); }
.cookie__text a { color: var(--fb-ui); text-decoration: underline; text-underline-offset: 3px; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) { .cookie__actions .btn { flex: 1 1 100%; } }

/* --- Stopka ------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 48px 36px; background: var(--surface); }
.footer__inner { display: grid; gap: 24px; }
@media (min-width: 860px) { .footer__inner { grid-template-columns: 1fr 1fr auto; align-items: start; } .footer__copy { grid-column: 1 / -1; } }
.footer__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; }
.footer__note { color: var(--muted); font-size: 0.95rem; }
.footer__mail { color: var(--fb-ui); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; font-weight: 500; }
.footer__links a:hover, .footer__linkbtn:hover { color: var(--fb-ui); }
.footer__linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; }
.footer__copy { color: var(--muted); font-size: 0.85rem; padding-top: 24px; border-top: 1px solid var(--line); }

/* --- Komunikaty --------------------------------------------------------- */
.toast-stack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 150; display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  padding: 14px 18px; border-radius: 12px;
  font-family: var(--font-head); font-weight: 700;
  box-shadow: 0 20px 50px rgba(11, 31, 63, 0.35);
  animation: toast-in 0.4s var(--ease);
}
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
.toast--error::before { background: var(--red); }
.toast.is-leaving { animation: toast-out 0.35s var(--ease) forwards; }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(12px); opacity: 0; } }

/* --- Ruch: ograniczenie ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee__track { animation: none; }
  .btn:hover, .format:hover { transform: none; }
  .cookie { transform: translate(-50%, 0); opacity: 1; }
}

/* --- Brief: wybór tła, style zdjęcia, nastrój --------------------------- */
.fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.fieldset legend { padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row--mt { margin-top: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 0.95rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--fb-ui); border-color: var(--fb-ui); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--fb-ui); outline-offset: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 0.92rem; font-weight: 500;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.chip span::before {
  content: ""; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--line-strong); background: var(--surface);
  flex: none; transition: all 0.2s var(--ease);
}
.chip:hover span { border-color: var(--line-strong); }
.chip input:checked + span { background: var(--fb-soft); border-color: var(--fb-ui); color: var(--fb-deep); }
.chip input:checked + span::before {
  background: var(--fb-ui); border-color: var(--fb-ui);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.chip input:focus-visible + span { outline: 3px solid var(--fb-ui); outline-offset: 3px; }
