/* ==========================================================================
   PJG – Community & Development
   Główny arkusz stylów
   --------------------------------------------------------------------------
   1. Zmienne (kolory, typografia, odstępy)
   2. Reset i baza
   3. Narzędzia (container, sekcje, nagłówki, przyciski)
   4. Nagłówek i nawigacja
   5. Hero + statystyki
   6. Karty i usługi
   7. Proces
   8. Portfolio
   9. Cennik
   10. CTA
   11. Formularz i kontakt
   12. Stopka, toast
   13. Strona 404
   14. Animacje i responsywność
   ========================================================================== */

/* 1. ZMIENNE ============================================================== */
:root {
  --bg: #09090d;
  --bg-2: #0d0d13;
  --surface: #121219;
  --surface-2: #181822;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text: #ededf3;
  --muted: #a3a3b8;
  --subtle: #7d7d94;

  --accent: #8b5cf6;
  --accent-hover: #7c4ff0;
  --accent-2: #a78bfa;
  --accent-3: #c4b5fd;
  --neon: #d946ef;
  --cyan: #22d3ee;
  --discord: #5865f2;
  --success: #4ade80;
  --danger: #f87171;

  --grad: linear-gradient(120deg, #b69cff 0%, #8b5cf6 45%, #d946ef 100%);
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.08), 0 0 80px -20px rgba(139, 92, 246, 0.45);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

/* 2. RESET I BAZA ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }

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

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* 3. NARZĘDZIA ============================================================ */
.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(80px, 10vw, 128px) 0;
}

.section--alt {
  background:
    radial-gradient(900px 400px at 50% 0%, rgba(139, 92, 246, 0.06), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 660px; margin-bottom: clamp(40px, 5vw, 60px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head--split > div:first-child { max-width: 620px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--accent-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.section-head--center .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.section-title { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.section-lead { color: var(--muted); font-size: 1.075rem; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.req { color: var(--accent-2); }

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px -8px rgba(139, 92, 246, 0.75);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 34px -10px rgba(139, 92, 246, 0.95);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(167, 139, 250, 0.55);
  transform: translateY(-2px);
}

.btn--discord {
  background: var(--discord);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px -10px rgba(88, 101, 242, 0.8);
}
.btn--discord:hover {
  background: #4752e0;
  transform: translateY(-2px);
}
.btn--discord:hover .icon { transform: none; }

.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }

/* 4. NAGŁÓWEK I NAWIGACJA ================================================ */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.header.is-scrolled,
.header.nav-is-open {
  background: rgba(9, 9, 13, 0.78);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
}
.logo img { width: 38px; height: 38px; transition: transform 0.4s var(--ease); }
.logo:hover img { transform: rotate(-8deg) scale(1.05); }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.06em; }
.logo__sub {
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 16px; }
.nav__list { display: flex; gap: 2px; }
.nav__link {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover,
.nav__link.is-active { color: var(--text); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.2s, top 0.35s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* 5. HERO ================================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(48px, 8vw, 104px)) 0 clamp(64px, 8vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 25%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 25%, #000 25%, transparent 75%);
}

.hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.hero__glow--1 {
  top: -180px;
  right: -100px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 68%);
  animation: drift 16s ease-in-out infinite;
}
.hero__glow--2 {
  bottom: -200px;
  left: -160px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.25), transparent 68%);
  animation: drift 20s ease-in-out infinite reverse;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 16px 7px 12px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.09);
  color: var(--accent-3);
  font-size: 0.82rem;
  font-weight: 500;
}
.pill__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}
.pill__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent-2);
  animation: ping 2.4s var(--ease) infinite;
}

.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.lead {
  max-width: 560px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.8rem;
}

/* Okno kodu */
.hero__visual { position: relative; padding: 24px 0; }

.code-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 26, 36, 0.92), rgba(14, 14, 20, 0.96));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), var(--glow);
  transform: perspective(1400px) rotateY(-7deg) rotateX(4deg);
  transition: transform 0.8s var(--ease);
}
.hero__visual:hover .code-window { transform: perspective(1400px) rotateY(0) rotateX(0); }

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.code-window__dots { display: flex; gap: 7px; }
.code-window__dots span { width: 11px; height: 11px; border-radius: 50%; background: #2c2c3a; }
.code-window__dots span:first-child { background: #3d2f55; }
.code-window__tabs {
  display: flex;
  gap: 4px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.74rem;
  white-space: nowrap;
}
.code-window__tab { padding: 4px 10px; border-radius: 6px; color: var(--subtle); }
.code-window__tab.is-active { background: rgba(139, 92, 246, 0.16); color: var(--accent-3); }

.code-window__code {
  margin: 0;
  padding: 22px 22px 22px 14px;
  overflow: hidden;
  color: #cfcfdc;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.85;
  white-space: pre;
}
.ln { display: inline-block; width: 2.2em; padding-right: 0.9em; color: #474758; text-align: right; user-select: none; }
.tk-c { color: #6c6c84; font-style: italic; }
.tk-k { color: #c49bff; }
.tk-f { color: #6ee7f9; }
.tk-s { color: #f0abfc; }
.tk-v { color: #fcd34d; }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--accent-2);
  animation: blink 1.1s steps(1) infinite;
}

.code-window__status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.code-window__status > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(18, 18, 25, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.8);
  animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 0.85rem; line-height: 1.3; }
.float-card small { display: block; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }
.float-card__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.16);
  color: var(--accent-3);
}
.float-card__icon--alt { background: rgba(88, 101, 242, 0.18); color: #aab2ff; }
.float-card__icon .icon { width: 18px; height: 18px; }
.float-card--1 { top: -4px; right: -18px; }
.float-card--2 { bottom: -6px; left: -28px; animation-delay: -3s; }

/* Statystyki */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin-top: clamp(56px, 8vw, 88px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}
.stats:empty { display: none; }
.stat {
  padding: 28px 28px 26px;
  background: linear-gradient(180deg, rgba(18, 18, 25, 0.95), rgba(13, 13, 19, 0.95));
}
.stat__value {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat__affix { color: var(--accent-2); font-size: 0.6em; font-weight: 600; letter-spacing: 0; }
.stat__label { color: var(--muted); font-size: 0.92rem; }

/* 6. KARTY I USŁUGI ====================================================== */
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
/* Światło podążające za kursorem (pozycja ustawiana w main.js) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(139, 92, 246, 0.13), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover {
  border-color: rgba(139, 92, 246, 0.32);
  box-shadow: 0 24px 60px -28px rgba(139, 92, 246, 0.45);
  transform: translateY(-4px);
}
.card:hover::before { opacity: 1; }

.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.service { display: flex; flex-direction: column; }
.service h3 { font-size: 1.45rem; }
.service > p { color: var(--muted); }

.service__icon,
.price-card__icon,
.aside-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(217, 70, 239, 0.08));
  color: var(--accent-3);
  box-shadow: 0 0 30px -8px rgba(139, 92, 246, 0.5);
}
.service__icon .icon { width: 24px; height: 24px; }

.checklist { display: grid; gap: 10px; margin: 6px 0 28px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; color: var(--text); font-size: 0.95rem; }
.checklist .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.14);
  color: var(--accent-2);
  stroke-width: 3;
}
.checklist--sm { margin-bottom: 0; }
.checklist--sm li { color: var(--muted); font-size: 0.9rem; }

.service__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--accent-3);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s, gap 0.25s var(--ease);
}
.service__link .icon { width: 16px; height: 16px; }
.service__link:hover { gap: 12px; color: #fff; }

/* 7. PROCES =============================================================== */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}
.process::before {
  content: "";
  position: absolute;
  top: 29px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.45), transparent);
}
.process__step { position: relative; padding: 0 8px; text-align: center; }
.process__num {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--accent-3);
  font-family: var(--font-display);
  font-weight: 600;
  box-shadow: 0 0 0 6px var(--bg-2), 0 0 30px -6px rgba(139, 92, 246, 0.55);
  transition: background-color 0.3s, color 0.3s;
}
.process__step:hover .process__num { background: var(--accent); color: #fff; }
.process__step h3 { font-size: 1.15rem; }
.process__step p { color: var(--muted); font-size: 0.93rem; }

/* 8. PORTFOLIO ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.filter:hover { color: var(--text); border-color: rgba(167, 139, 250, 0.45); }
.filter[aria-pressed="true"] {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.16);
  color: #fff;
}

.notice,
.pricing__note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 32px;
  padding: 14px 18px;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
}
.notice strong { color: var(--text); }
.notice .icon,
.pricing__note .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-2); }

.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

.project { display: flex; flex-direction: column; padding: 0; }
.project.is-entering { animation: fadeUp 0.5s var(--ease) both; }

.project__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.project__media img,
.project__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.project:hover .project__media img,
.project:hover .project__cover { transform: scale(1.05); }

/* Okładka generowana, gdy projekt nie ma własnego zdjęcia */
.project__cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--cover-bg, linear-gradient(135deg, #2a1b4f, #120d22));
}
.project__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.project__cover::after {
  content: "";
  position: absolute;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cover-glow, rgba(139, 92, 246, 0.5));
  filter: blur(50px);
  opacity: 0.6;
}
.project__cover-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(9, 9, 13, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7);
}
.project__cover-icon .icon { width: 34px; height: 34px; stroke-width: 1.6; }
.project__cover-label {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.cover--minecraft { --cover-bg: linear-gradient(135deg, #1d2b26 0%, #1a1530 60%, #0f0c1a 100%); --cover-glow: rgba(52, 211, 153, 0.35); }
.cover--discord   { --cover-bg: linear-gradient(135deg, #1e2150 0%, #17143a 55%, #0f0c1d 100%); --cover-glow: rgba(88, 101, 242, 0.55); }
.cover--www       { --cover-bg: linear-gradient(135deg, #152a36 0%, #1c1538 60%, #0f0c1a 100%); --cover-glow: rgba(34, 211, 238, 0.35); }
.cover--special   { --cover-bg: linear-gradient(135deg, #3a1540 0%, #1f1238 55%, #100c1b 100%); --cover-glow: rgba(217, 70, 239, 0.45); }

.project__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 10px;
  border: 1px solid rgba(252, 211, 77, 0.4);
  border-radius: 999px;
  background: rgba(9, 9, 13, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fcd34d;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project__body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.project__cat {
  margin-bottom: 8px;
  color: var(--accent-3);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project__title { font-size: 1.22rem; }
.project__desc { color: var(--muted); font-size: 0.93rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 18px; }
.chip {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.project__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent-3);
  font-size: 0.9rem;
  font-weight: 600;
}
.project__link .icon { width: 15px; height: 15px; }
.project__link:hover { color: #fff; }

.portfolio__empty {
  padding: 48px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* 9. CENNIK =============================================================== */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.price-card { display: flex; flex-direction: column; padding: 28px; }
.price-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.price-card__head h3 { margin: 0; font-size: 1.25rem; }
.price-card__icon { width: 46px; height: 46px; margin: 0; border-radius: 13px; }
.price-card__icon .icon { width: 21px; height: 21px; }
.price-card__cat {
  display: block;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-list { margin-bottom: 24px; }
.price-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: 0.94rem;
}
.price-list li:last-child { border-bottom: 0; }
.price {
  flex-shrink: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  white-space: nowrap;
}
.price small { color: var(--subtle); font-family: var(--font); font-size: 0.74rem; font-weight: 500; }

.price-card__btn { margin-top: auto; }

.price-card--special {
  border-color: rgba(139, 92, 246, 0.35);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(217, 70, 239, 0.12), transparent 70%),
    linear-gradient(180deg, #17142a, var(--bg-2));
}
.price-special { margin-bottom: 24px; }
.price-special__value {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.price-special p { color: var(--muted); font-size: 0.93rem; }

.pricing__note { max-width: 820px; margin: 36px auto 0; }

/* 10. CTA ================================================================ */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 7vw, 88px) clamp(24px, 5vw, 64px);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(160deg, #161226 0%, #0e0c17 100%);
  text-align: center;
}
.cta__glow {
  position: absolute;
  top: -50%;
  left: 50%;
  z-index: -1;
  width: 720px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 65%);
  filter: blur(40px);
  transform: translateX(-50%);
}
.cta .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.cta__title { max-width: 760px; margin-inline: auto; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; letter-spacing: -0.035em; }
.cta__text { max-width: 580px; margin: 0 auto 36px; color: var(--muted); font-size: 1.08rem; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* 11. FORMULARZ I KONTAKT ================================================ */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}
.contact .card:hover { transform: none; }

.form { padding: clamp(24px, 4vw, 40px); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 500; }

.input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(9, 9, 13, 0.7);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.input::placeholder { color: var(--subtle); }
.input:hover { border-color: rgba(255, 255, 255, 0.22); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}
textarea.input { min-height: 160px; padding: 13px 15px; line-height: 1.6; resize: vertical; }
select.input {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
select.input option { background: var(--surface); color: var(--text); }

.input[aria-invalid="true"] { border-color: rgba(248, 113, 113, 0.75); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18); }

.field__meta { display: flex; justify-content: space-between; gap: 12px; }
.field__error { min-height: 1.25em; color: #fca5a5; font-size: 0.8rem; line-height: 1.4; }
.field__error:empty { min-height: 0; }
.field__hint { flex-shrink: 0; margin-left: auto; color: var(--subtle); font-family: var(--mono); font-size: 0.75rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__submit { margin-top: 26px; }
.form__submit.is-loading .icon { animation: spin 0.9s linear infinite; }

.form-status {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.form-status.is-visible { display: block; animation: fadeUp 0.4s var(--ease) both; }
.form-status--success { border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.07); color: #bbf7d0; }
.form-status--error { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.07); color: #fecaca; }
.form-status--info { border-color: rgba(167, 139, 250, 0.4); background: rgba(139, 92, 246, 0.07); color: var(--text); }
.form-status strong { display: block; margin-bottom: 4px; }
.form-status p { color: var(--muted); }
.form-status pre {
  max-height: 220px;
  margin: 14px 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.form-status__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.contact-aside { display: grid; gap: 20px; }
.aside-card { padding: 28px; }
.aside-card h3 { font-size: 1.15rem; }
.aside-card p { color: var(--muted); font-size: 0.93rem; }
.aside-card__icon { width: 46px; height: 46px; margin-bottom: 18px; border-radius: 13px; }
.aside-card--discord {
  border-color: rgba(88, 101, 242, 0.35);
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(88, 101, 242, 0.2), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}
.aside-card--discord .aside-card__icon {
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.18);
  color: #b4baff;
  box-shadow: 0 0 30px -8px rgba(88, 101, 242, 0.6);
}
.aside-card--discord p { margin-bottom: 20px; }
.aside-card__link { color: var(--accent-3); font-weight: 600; word-break: break-all; }
.aside-card__link:hover { color: #fff; }

/* 12. STOPKA, TOAST ======================================================= */
.footer {
  padding: 72px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer__brand p { max-width: 320px; margin-top: 18px; color: var(--muted); font-size: 0.92rem; }
.footer__title {
  margin-bottom: 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer__links { display: grid; gap: 10px; }
.footer__links a { color: var(--muted); font-size: 0.93rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.85rem;
}
.footer__bottom p { margin: 0; }
.footer__top { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); transition: color 0.2s; }
.footer__top .icon { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.footer__top:hover { color: var(--text); }
.footer__top:hover .icon { transform: translateY(-3px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  max-width: min(92vw, 460px);
  padding: 14px 20px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 14px;
  background: rgba(18, 18, 25, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.9);
  font-size: 0.92rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* 13. STRONA 404 ========================================================== */
.error-page {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 48px 16px;
  overflow: hidden;
  text-align: center;
}
.error-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 20%, transparent 75%);
}
.error-page__inner { max-width: 560px; }
.error-page__logo { margin-bottom: 40px; }
.error-page__code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.45));
}
.error-page__title { margin-top: 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.error-page__text { margin-bottom: 32px; color: var(--muted); }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* 14. ANIMACJE =========================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), border-color 0.4s, box-shadow 0.4s;
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Hero animuje się od razu po załadowaniu (szybsze pierwsze wyświetlenie) */
.js .hero .reveal {
  opacity: 1;
  transform: none;
  transition: none;
  animation: fadeUp 0.9s var(--ease) both;
  animation-delay: var(--d, 0s);
}
.js .hero .stats.reveal { animation-delay: 0.4s; }
.js .card.reveal.is-visible:hover { transform: translateY(-4px); transition-delay: 0s; }
.js .contact .card.reveal.is-visible:hover { transform: none; }

@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(36px, 44px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@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;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .code-window { transform: none; }
}

/* RESPONSYWNOŚĆ =========================================================== */
@media (max-width: 1080px) {
  .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: block; }

  /* Menu mobilne – panel pod nagłówkiem */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 24px 16px 32px;
    overflow-y: auto;
    background: rgba(9, 9, 13, 0.98);
    border-top: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), visibility 0.3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; gap: 4px; }
  .nav__list li {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
    transition-delay: calc(var(--i) * 0.05s + 0.05s);
  }
  .nav.is-open .nav__list li { opacity: 1; transform: none; }
  .nav__link {
    padding: 16px 8px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text);
  }
  .nav__link::after { left: 8px; right: auto; width: 32px; bottom: 8px; }
  .nav__cta { min-height: 52px; font-size: 1rem; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 600px; width: 100%; margin-inline: auto; }
  .float-card--1 { right: 0; }
  .float-card--2 { left: 0; }

  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .process::before { display: none; }

  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .services,
  .pricing { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .price-card { padding: 24px; }
  .form__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; }
  .code-window__code { font-size: 0.72rem; padding: 18px 14px 18px 6px; }
  .code-window__tab:not(.is-active) { display: none; }
  .float-card { display: none; }
  .code-window { transform: none; }
  .process { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section-head--split { align-items: flex-start; }
  .stat { padding: 22px 20px; }
}

@media (max-width: 400px) {
  .logo__sub { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta__actions .btn { width: 100%; }
}
