/* ===================== KacprzakLab — Design System ===================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root{
  --bg: #05070d;
  --bg-alt: #080c17;
  --surface: #0d1424;
  --surface-2: #10182b;
  --border: rgba(101, 168, 255, 0.14);
  --border-strong: rgba(101, 168, 255, 0.32);
  --text: #eaf1ff;
  --text-muted: #90a0c2;
  --text-dim: #5b6788;
  --primary: #1e6fff;
  --primary-2: #3ba7ff;
  --cyan: #4fe0ff;
  --grad: linear-gradient(135deg, #4fe0ff 0%, #2f8bff 45%, #0033ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,224,255,.16), rgba(0,51,255,.10));
  --shadow-glow: 0 0 40px rgba(59, 167, 255, .25);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.16,.84,.44,1);
  --header-h: 84px;
}

*, *::before, *::after{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }
html,body{ height:100%; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll{ overflow: hidden; }

h1,h2,h3,h4{
  /* Rajdhani, not Orbitron: Orbitron's lowercase descenders (y, g, p, j)
     and Polish ogonki (ą, ę) render as a flat geometric cut by design —
     fine for short uppercase labels, but reads as "clipped" in full
     lowercase Polish sentences. Orbitron stays reserved for tags/buttons/
     nav/logo where it already looks right. */
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.15;
  color: var(--text);
}
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select{ font-family: inherit; color: inherit; }

::selection{ background: var(--primary-2); color: #04070f; }

/* Scrollbar */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: linear-gradient(var(--primary-2), var(--primary)); border-radius: 10px; }

.container{
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section{ position: relative; padding: 140px 0; }
.section--tight{ padding: 100px 0; }

.section-tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.section-tag::before{
  content:"";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.section-head{ max-width: 680px; margin-bottom: 64px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-title{ font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 16px; }
.section-title .accent{
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-desc{ color: var(--text-muted); font-size: 1.08rem; font-weight: 500; }

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

/* Buttons */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 16px 30px;
  border-radius: 10px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn-primary{
  color: #04070f;
  background: var(--grad);
  background-size: 160% 160%;
  box-shadow: 0 8px 30px -8px rgba(47,139,255,.65);
}
.btn-primary:hover{ transform: translateY(-3px); box-shadow: 0 14px 40px -8px rgba(47,139,255,.85); background-position: 100% 100%; }
.btn-primary:active{ transform: translateY(-1px); }

.btn-outline{
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(6px);
}
.btn-outline:hover{ border-color: var(--cyan); background: rgba(79,224,255,.08); transform: translateY(-3px); }

.btn-discord{
  color: #04070f;
  background: linear-gradient(135deg,#8ea1ff,#5865F2);
  box-shadow: 0 8px 30px -8px rgba(88,101,242,.55);
}
.btn-discord:hover{ transform: translateY(-3px); box-shadow: 0 14px 40px -8px rgba(88,101,242,.8); }

.btn-block{ width: 100%; }
.btn svg{ width: 18px; height: 18px; flex-shrink:0; }

/* ===================== Background FX ===================== */
.grid-overlay{
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(101,168,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101,168,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  z-index: -2;
}
#particles{ position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.cursor-glow{
  position: fixed; top:0; left:0; width: 440px; height: 440px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,224,255,.18), rgba(30,111,255,.08) 45%, transparent 72%);
  transform: translate(-999px,-999px);
  pointer-events: none; z-index: -1; mix-blend-mode: screen;
  opacity: 0; transition: opacity .5s ease;
  will-change: transform;
}
@media (hover: none), (pointer: coarse){ .cursor-glow{ display:none; } }
.noise-overlay{
  position: fixed; inset:0;
  pointer-events:none; z-index: 2;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glow-blob{
  position: absolute; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index:0;
  opacity:.55;
}

/* ===================== Preloader ===================== */
#preloader{
  position: fixed; inset:0; z-index: 9999;
  background: var(--bg);
  display:flex; align-items:center; justify-content:center; flex-direction:column; gap:22px;
  transition: opacity .7s var(--ease), visibility .7s var(--ease);
}
#preloader.is-hidden{ opacity:0; visibility:hidden; pointer-events:none; }
.preloader-logo{ width: 88px; height: 88px; position:relative; }
.preloader-logo img{ width:100%; height:100%; object-fit:contain; animation: pulseLogo 1.8s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(79,224,255,.55)); }
@keyframes pulseLogo{ 0%,100%{ transform: scale(1); opacity:1; } 50%{ transform: scale(1.08); opacity:.75; } }
.preloader-bar{ width: 220px; height: 3px; border-radius: 3px; background: var(--surface-2); overflow:hidden; }
.preloader-bar::after{
  content:""; display:block; height:100%; width: 40%;
  background: var(--grad); border-radius: 3px;
  animation: barSlide 1.1s ease-in-out infinite;
}
@keyframes barSlide{ 0%{ transform: translateX(-100%);} 100%{ transform: translateX(350%);} }
.preloader-label{ font-family:'Orbitron',sans-serif; font-size: 11px; letter-spacing:.3em; color: var(--text-dim); text-transform:uppercase; }

/* ===================== Header ===================== */
header{
  position: fixed; top:0; left:0; right:0; z-index: 900;
  height: var(--header-h);
  display:flex; align-items:center;
  transition: background .4s var(--ease), border-color .4s var(--ease), height .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
header.is-scrolled{
  height: 68px;
  background: rgba(5,7,13,.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav{ position: relative; display:flex; align-items:center; justify-content:space-between; width:100%; }
.brand{ display:flex; align-items:center; gap:12px; font-family:'Orbitron',sans-serif; font-weight:800; font-size: 1.05rem; letter-spacing:.03em; z-index: 60; }
.brand img{ width: 38px; height: 38px; object-fit:contain; filter: drop-shadow(0 0 12px rgba(79,224,255,.5)); }
.brand span.lab{ color: var(--cyan); }

.nav-links{
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display:flex; align-items:center; gap: 6px;
}
.nav-links a{
  position:relative;
  font-size: .92rem; font-weight:600; letter-spacing:.03em;
  color: var(--text-muted);
  padding: 10px 16px; border-radius: 8px;
  transition: color .3s ease, background .3s ease;
  white-space: nowrap;
}
.nav-links a:hover{ color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active{ color: var(--cyan); }
.nav-links a.active::after{
  content:""; position:absolute; left:16px; right:16px; bottom:6px; height:2px;
  background: var(--grad); border-radius:2px;
}

.nav-actions{ display:flex; align-items:center; gap: 10px; }
.nav-actions .btn{ padding: 11px 20px; font-size: 11.5px; }

.btn-sm{ padding: 10px 18px !important; font-size: 11px !important; }

.burger{
  display:none; width: 42px; height:42px; border-radius: 8px;
  align-items:center; justify-content:center; flex-direction:column; gap:5px;
  border: 1px solid var(--border); z-index: 60;
}
.burger span{ width: 18px; height:2px; background: var(--text); transition: transform .35s var(--ease), opacity .35s var(--ease); }
.burger.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2){ opacity:0; }
.burger.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero{
  position: relative;
  min-height: 100vh;
  display:flex; align-items:center;
  padding-top: var(--header-h);
}
.hero-inner{ position: relative; z-index: 3; width:100%; text-align:center; padding: 32px 0; margin: 0 auto; }

.hero-logo{
  width: 104px; height: 104px; margin: 0 auto 18px;
  animation: floatY 5s ease-in-out infinite;
  filter: drop-shadow(0 0 34px rgba(59,167,255,.55));
}
.hero-logo img{ width:100%; height:100%; object-fit:contain; display:block; }
@keyframes floatY{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

.hero-eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-family:'Orbitron',sans-serif; font-size:12px; font-weight:700;
  letter-spacing:.28em; text-transform:uppercase; color: var(--cyan);
  margin-bottom: 16px; opacity:0;
}
.hero-eyebrow .dot{ width:7px; height:7px; border-radius:50%; background: var(--cyan); box-shadow:0 0 12px var(--cyan); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink{ 0%,100%{opacity:1;} 50%{opacity:.25;} }

.hero-title{
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.04;
  margin-bottom: 18px;
  letter-spacing: .01em;
}
.hero-title span{ display:block; }
.hero-title .accent{ background: var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }

.hero-sub{
  max-width: 640px; margin: 0 auto 30px;
  font-size: 1.1rem; color: var(--text-muted); font-weight:500;
}
.hero-sub b{ color: var(--text); font-weight:700; }

.hero-actions{ display:flex; align-items:center; justify-content:center; gap:16px; flex-wrap:wrap; margin-bottom: 46px; }

.hero-stats{
  display:grid; grid-template-columns: repeat(4,1fr);
  max-width: 820px; margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.stat{ text-align:center; padding: 0 10px; border-right: 1px solid var(--border); }
.stat:last-child{ border-right:none; }
.stat-num{ font-family:'Orbitron',sans-serif; font-size: clamp(1.5rem,3vw,2.2rem); font-weight:800; background: var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.stat-label{ font-size:.82rem; color: var(--text-dim); text-transform:uppercase; letter-spacing:.08em; margin-top:6px; font-weight:600; }

.scroll-cue{
  position:absolute; left:50%; bottom: 34px; transform: translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  color: var(--text-dim); font-size:11px; letter-spacing:.2em; text-transform:uppercase;
  z-index:3; font-family:'Orbitron',sans-serif;
}
.scroll-cue .line{ width:1px; height:34px; background: linear-gradient(var(--cyan), transparent); animation: scrollLine 1.8s ease-in-out infinite; }
@keyframes scrollLine{ 0%{ transform: scaleY(0); transform-origin: top;} 50%{ transform: scaleY(1); transform-origin: top;} 51%{ transform-origin: bottom;} 100%{ transform: scaleY(0); transform-origin: bottom;} }

/* ===================== Reveal on scroll ===================== */
[data-reveal]{ opacity:0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].is-visible{ opacity:1; transform:none; }
[data-reveal-delay="1"]{ transition-delay: .1s; }
[data-reveal-delay="2"]{ transition-delay: .2s; }
[data-reveal-delay="3"]{ transition-delay: .3s; }
[data-reveal-delay="4"]{ transition-delay: .4s; }
[data-reveal-delay="5"]{ transition-delay: .5s; }
[data-reveal-delay="6"]{ transition-delay: .6s; }

/* ===================== About ===================== */
.about-grid{ display:grid; grid-template-columns: .95fr 1.05fr; gap: 70px; align-items:center; }
.about-visual{ position:relative; }
.orbit-frame{
  position:relative; aspect-ratio:1/1; border-radius: 24px;
  border: 1px solid var(--border-strong);
  background: radial-gradient(circle at 30% 20%, rgba(79,224,255,.14), transparent 55%), var(--surface);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.orbit-frame::before{
  content:""; position:absolute; inset:0;
  background-image: radial-gradient(rgba(101,168,255,.35) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity:.4;
}
.orbit-frame img{ width: 46%; filter: drop-shadow(0 0 30px rgba(79,224,255,.5)); position:relative; z-index:2; animation: floatY 5s ease-in-out infinite; }
@keyframes spinSlow{ from{ transform: rotate(0deg);} to{ transform: rotate(360deg);} }
.orbit-ring{ position:absolute; border:1px dashed var(--border-strong); border-radius:50%; }
.orbit-ring.r1{ inset: 12%; animation: spinSlow 30s linear infinite; }
.orbit-ring.r2{ inset: 26%; animation: spinSlow 22s linear infinite reverse; }

.about-badge{
  position:absolute; bottom:-22px; right:-18px;
  background: var(--surface-2); border:1px solid var(--border-strong);
  border-radius: var(--radius); padding: 18px 22px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6);
  display:flex; align-items:center; gap:14px;
}
.about-badge .num{ font-family:'Orbitron',sans-serif; font-weight:800; font-size:1.6rem; color: var(--cyan); }
.about-badge .lbl{ font-size:.78rem; color: var(--text-muted); max-width:110px; line-height:1.3; }

.about-text p{ color: var(--text-muted); margin-bottom: 18px; font-size: 1.05rem; }
.feature-list{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.feature-item{
  display:flex; gap:14px; align-items:flex-start;
  padding: 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,.015);
  transition: border-color .3s ease, transform .3s ease, background .3s ease;
}
.feature-item:hover{ border-color: var(--border-strong); transform: translateY(-4px); background: rgba(79,224,255,.04); }
.feature-icon{
  width: 40px; height:40px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--cyan);
}
.feature-icon svg{ width:20px; height:20px; }
.feature-item h4{ font-family:'Rajdhani',sans-serif; font-weight:700; font-size: 1rem; margin-bottom:4px; }
.feature-item p{ font-size: .86rem; color: var(--text-dim); }

/* ===================== Portfolio ===================== */
.filters{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 44px; }
.filter-btn{
  font-family:'Orbitron',sans-serif; font-size: 11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-muted); transition: all .3s ease;
}
.filter-btn:hover{ color: var(--text); border-color: var(--border-strong); }
.filter-btn.active{ color:#04070f; background: var(--grad); border-color: transparent; }

.portfolio-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project-card{
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow:hidden;
  transition: transform .12s linear, border-color .35s ease, box-shadow .35s ease;
  transform-style: preserve-3d;
}
.project-card:hover{ border-color: var(--border-strong); box-shadow: 0 24px 60px -24px rgba(47,139,255,.45); }
.project-card.is-hidden{ display:none; }
.project-thumb{
  position:relative; aspect-ratio: 4/3;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(155deg, var(--pc1, #0d2b52), var(--pc2, #071022));
  overflow:hidden;
}
.project-thumb::before{
  content:""; position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 18px 18px; opacity:.08;
}
.project-thumb svg{ width: 74px; height:74px; color: rgba(255,255,255,.9); filter: drop-shadow(0 0 20px rgba(79,224,255,.6)); position:relative; z-index:2; transition: transform .5s var(--ease); }
.project-card:hover .project-thumb svg{ transform: scale(1.12) rotate(-4deg); }
.project-thumb img.project-photo{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1;
  transition: transform .5s var(--ease);
}
.project-card:hover .project-thumb img.project-photo{ transform: scale(1.06); }
.project-tag{
  position:absolute; top:14px; left:14px; z-index:3;
  font-family:'Orbitron',sans-serif; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  background: rgba(5,7,13,.65); border:1px solid var(--border-strong); color: var(--cyan);
  padding:6px 12px; border-radius:999px; backdrop-filter: blur(6px);
}
.project-body{ padding: 26px; }
.project-body h3{ font-family:'Rajdhani',sans-serif; font-weight:700; font-size: 1.34rem; margin-bottom:10px; }
.project-body p{ color: var(--text-muted); font-size:.95rem; line-height:1.55; margin-bottom:18px; }
.project-meta{ display:flex; flex-wrap:wrap; gap:8px; }
.project-meta span{
  font-size: .74rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  color: var(--cyan); border:1px solid var(--border-strong); padding:5px 11px; border-radius:6px;
  background: rgba(79,224,255,.06);
}

/* big gradient stat row above the grid — same visual language as .hero-stats,
   used to give page intros (Portfolio, Oferta...) the same weight as the hero
   instead of a plain bordered text strip */
.portfolio-summary{
  display:flex; flex-wrap:wrap; justify-content:center;
  max-width: 720px; margin: 0 auto 56px;
  border-top: 1px solid var(--border); padding-top: 30px;
}
.portfolio-summary > div{
  flex: 1 1 0; min-width: 150px; text-align:center; padding: 0 18px;
  border-right: 1px solid var(--border);
}
.portfolio-summary > div:last-child{ border-right:none; }
.portfolio-summary strong{
  display:block; font-family:'Orbitron',sans-serif; font-weight:800;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  background: var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.portfolio-summary span{
  display:block; margin-top: 6px; font-size:.8rem; color: var(--text-dim);
  text-transform:uppercase; letter-spacing:.06em; font-weight:600;
}

/* ===================== Services ===================== */
.services-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-card{
  position:relative; padding: 32px 26px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .35s var(--ease), border-color .35s ease, background .35s ease;
  overflow: hidden;
}
.service-card::after{
  content:""; position:absolute; inset:0; opacity:0; transition: opacity .4s ease;
  background: radial-gradient(circle at 50% 0%, rgba(79,224,255,.16), transparent 70%);
}
.service-card:hover{ transform: translateY(-8px); border-color: var(--border-strong); }
.service-card:hover::after{ opacity:1; }
.service-num{ font-family:'Orbitron',sans-serif; font-weight:800; font-size:.78rem; color: var(--text-dim); margin-bottom: 22px; letter-spacing:.1em; }
.service-icon{
  width:52px; height:52px; border-radius:14px; margin-bottom:22px;
  display:flex; align-items:center; justify-content:center;
  background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--cyan);
}
.service-icon svg{ width:26px; height:26px; }
.service-card h3{ font-family:'Rajdhani',sans-serif; font-weight:700; font-size:1.18rem; margin-bottom:10px; position:relative; }
.service-card p{ color: var(--text-dim); font-size:.9rem; position:relative; }

/* ===================== Process ===================== */
.process{ display:grid; grid-template-columns: repeat(4,1fr); gap: 0; position:relative; }
.process::before{
  content:""; position:absolute; top:26px; left:8%; right:8%; height:1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.process-step{ text-align:center; padding: 0 18px; position:relative; }
.process-step .idx{
  width:54px; height:54px; border-radius:50%; margin:0 auto 22px;
  display:flex; align-items:center; justify-content:center;
  font-family:'Orbitron',sans-serif; font-weight:800; font-size:1.1rem;
  background: var(--bg); border: 1px solid var(--border-strong); color: var(--cyan);
  position:relative; z-index:2;
  box-shadow: 0 0 0 6px var(--bg);
}
.process-step h4{ font-family:'Rajdhani',sans-serif; font-size:1.05rem; font-weight:700; margin-bottom:8px; }
.process-step p{ color: var(--text-dim); font-size:.86rem; }

/* ===================== Discord CTA ===================== */
.discord-card{
  position:relative; border-radius: 28px; overflow:hidden;
  border: 1px solid var(--border-strong);
  padding: 70px 50px;
  background:
    radial-gradient(circle at 15% 20%, rgba(88,101,242,.28), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(79,224,255,.22), transparent 45%),
    var(--surface);
  display:grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items:center;
}
.discord-card::before{
  content:""; position:absolute; inset:0; z-index:0;
  background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 26px 26px; opacity:.05;
}
.discord-content{ position:relative; z-index:2; }
.discord-content h2{ font-size: clamp(1.8rem,3.4vw,2.5rem); margin-bottom:18px; }
.discord-content p{ color: var(--text-muted); font-size:1.05rem; margin-bottom:30px; max-width: 520px; }
.discord-perks{ display:flex; flex-wrap:wrap; gap:12px 26px; margin-bottom:34px; }
.discord-perks li{ display:flex; align-items:center; gap:9px; font-size:.9rem; color:var(--text-muted); font-weight:600; }
.discord-perks svg{ width:17px; height:17px; color: var(--cyan); flex-shrink:0; }

.discord-panel{
  position:relative; z-index:2;
  background: rgba(8,12,23,.7); border:1px solid var(--border-strong); border-radius: var(--radius);
  padding: 30px; backdrop-filter: blur(10px);
}
.discord-panel-head{ display:flex; align-items:center; gap:14px; margin-bottom:24px; }
.discord-panel-head .ic{
  width:46px; height:46px; border-radius:12px; background: linear-gradient(135deg,#8ea1ff,#5865F2);
  display:flex; align-items:center; justify-content:center;
}
.discord-panel-head .ic svg{ width:24px; height:24px; color:#04070f; }
.discord-panel-head strong{ font-family:'Rajdhani',sans-serif; font-size:1.05rem; }
.discord-panel-head span{ display:block; font-size:.78rem; color: var(--text-dim); }
.discord-stats{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:24px; }
.discord-stats div{ background: rgba(255,255,255,.03); border:1px solid var(--border); border-radius:10px; padding:14px; text-align:center; }
.discord-stats .n{ font-family:'Orbitron',sans-serif; font-weight:800; color: var(--cyan); font-size:1.3rem; }
.discord-stats .l{ font-size:.72rem; color: var(--text-dim); text-transform:uppercase; letter-spacing:.06em; margin-top:4px; }

/* ===================== Contact ===================== */
.contact-grid{ display:grid; grid-template-columns: .8fr 1.2fr; gap: 54px; }
.contact-info{ display:flex; flex-direction:column; gap:18px; }
.info-card{
  display:flex; gap:16px; align-items:flex-start;
  padding:22px; border-radius: var(--radius-sm); border:1px solid var(--border); background: var(--surface);
  transition: border-color .3s ease, transform .3s ease;
}
.info-card:hover{ border-color: var(--border-strong); transform: translateX(4px); }
.info-icon{
  width:44px; height:44px; border-radius:12px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--cyan);
}
.info-icon svg{ width:21px; height:21px; }
.info-card h4{ font-family:'Rajdhani',sans-serif; font-size:1rem; font-weight:700; margin-bottom:4px; }
.info-card p, .info-card a{ font-size:.88rem; color: var(--text-muted); }
.info-card a:hover{ color: var(--cyan); }

.contact-form{
  border-radius: var(--radius); border:1px solid var(--border); background: var(--surface);
  padding: 40px;
}
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.field{ margin-bottom: 22px; position:relative; }
.field label{ display:block; font-size:.8rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color: var(--text-dim); margin-bottom:9px; }
.field input, .field textarea, .field select{
  width:100%; padding: 14px 16px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  color: var(--text); font-size: .98rem; transition: border-color .3s ease, background .3s ease;
}
.field select{ appearance:none; -webkit-appearance:none; cursor:pointer; }
.field textarea{ resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus{ outline:none; border-color: var(--cyan); background: rgba(79,224,255,.05); }
.field .err{ display:none; font-size:.76rem; color:#ff6b81; margin-top:6px; font-weight:600; }
.field.has-error input, .field.has-error textarea, .field.has-error select{ border-color:#ff6b81; }
.field.has-error .err{ display:block; }

.form-note{ font-size:.78rem; color: var(--text-dim); margin-top:6px; }
.form-note a{ color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.form-success{
  display:none; align-items:center; gap:12px; margin-top:18px;
  padding:14px 18px; border-radius:10px; border:1px solid rgba(79,224,255,.4);
  background: rgba(79,224,255,.08); color: var(--cyan); font-size:.88rem; font-weight:600;
}
.form-success.show{ display:flex; animation: fadeSlide .5s var(--ease); }
@keyframes fadeSlide{ from{ opacity:0; transform: translateY(-6px);} to{ opacity:1; transform:none; } }

/* ===================== Section preview / "see more" link ===================== */
.section-more{ text-align:center; margin-top: 44px; }

/* ===================== Compact team chips (homepage preview) ===================== */
.team-chip-row{ display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin-bottom: 60px; }
.team-chip{
  display:flex; align-items:center; gap:10px;
  padding: 12px 20px 12px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s ease;
}
.team-chip:hover{ transform: translateY(-3px); border-color: var(--border-strong); }
.team-chip .ic{
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--cyan);
}
.team-chip .ic svg{ width:16px; height:16px; }
.team-chip span{ font-family:'Rajdhani',sans-serif; font-weight:600; font-size:.92rem; white-space:nowrap; }

/* ===================== Team ===================== */
.team-grid{ display:grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.team-card{
  padding: 30px 22px; border-radius: var(--radius); text-align:center;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .35s var(--ease), border-color .35s ease;
}
.team-card:hover{ transform: translateY(-8px); border-color: var(--border-strong); }
.team-avatar{
  width: 60px; height:60px; border-radius:50%; margin: 0 auto 20px;
  display:flex; align-items:center; justify-content:center;
  background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--cyan);
}
.team-avatar svg{ width:26px; height:26px; }
.team-card h3{ font-family:'Rajdhani',sans-serif; font-weight:700; font-size:1.02rem; margin-bottom:10px; }
.team-card p{ color: var(--text-dim); font-size:.85rem; }
.team-card--join{
  border-style: dashed; border-color: var(--border-strong);
  background: var(--grad-soft);
  display:flex; flex-direction:column; align-items:center;
}
.team-card--join .team-avatar{ background: var(--grad); color:#04070f; border-color: transparent; }
.team-card--join .btn{ margin-top: 14px; }

/* ===================== News ===================== */
.news-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
/* homepage preview shows 3 cards — one row instead of an orphaned 3rd card
   in a 2-column grid with a dangling empty cell */
#aktualnosci-preview .news-grid{ grid-template-columns: repeat(3, 1fr); }
#aktualnosci-preview .news-card{ flex-direction: column; }
#aktualnosci-preview .news-date{ flex-direction: row; gap: 8px; width: auto; height: auto; padding: 6px 12px; border-radius: 999px; }
#aktualnosci-preview .news-date .m{ margin-top: 0; }
.news-card{
  display:flex; gap: 20px; padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s ease;
}
.news-card:hover{ transform: translateY(-6px); border-color: var(--border-strong); }
.news-photo{
  display:block; width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius-sm); margin-bottom: 16px;
}
.news-date{
  flex-shrink:0; width: 62px; height: 62px; border-radius: 12px;
  background: var(--grad-soft); border:1px solid var(--border-strong);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.news-date .d{ font-family:'Orbitron',sans-serif; font-weight:800; font-size:1.15rem; color: var(--cyan); line-height:1; }
.news-date .m{ font-size:.66rem; letter-spacing:.1em; color: var(--text-dim); margin-top:4px; text-transform:uppercase; }
.news-tag{
  display:inline-block; font-size:.7rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color: var(--cyan); margin-bottom:8px;
}
.news-body h3{ font-family:'Rajdhani',sans-serif; font-weight:700; font-size:1.05rem; margin-bottom:8px; line-height:1.3; }
.news-body p{ color: var(--text-dim); font-size:.86rem; }

/* ===================== FAQ ===================== */
.faq-list{ max-width: 760px; margin: 0 auto; display:flex; flex-direction:column; gap:12px; }
.faq-item{ border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow:hidden; }
.faq-q{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding: 20px 22px; text-align:left; font-family:'Rajdhani',sans-serif; font-weight:700; font-size: 1rem; color: var(--text);
}
.faq-q svg{ width:18px; height:18px; flex-shrink:0; color: var(--cyan); transition: transform .35s var(--ease); }
.faq-item.open .faq-q svg{ transform: rotate(180deg); }
.faq-a{ max-height:0; overflow:hidden; transition: max-height .4s var(--ease); }
.faq-a p{ padding: 0 22px 20px; color: var(--text-muted); font-size:.92rem; }
.faq-item.open .faq-a{ max-height: 220px; }

/* ===================== Testimonials ===================== */
.testimonial-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testimonial-card{
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  display:flex; flex-direction:column; transition: transform .3s var(--ease), border-color .3s ease;
}
.testimonial-card:hover{ transform: translateY(-6px); border-color: var(--border-strong); }
.testimonial-stars{ display:flex; gap:4px; margin-bottom:16px; color: var(--cyan); }
.testimonial-stars svg{ width:15px; height:15px; }
.testimonial-card p{ color: var(--text-muted); font-size: .94rem; line-height:1.6; margin-bottom: 20px; flex-grow:1; }
.testimonial-author{ padding-top:14px; border-top: 1px solid var(--border); }
.testimonial-author strong{ display:block; font-family:'Rajdhani',sans-serif; font-size:.95rem; }
.testimonial-author span{ font-size:.78rem; color: var(--text-dim); }
.testimonial-note{ text-align:center; margin-top: 30px; font-size:.76rem; color: var(--text-dim); font-style: italic; }

/* ===================== Project Modal ===================== */
.modal-overlay{
  position: fixed; inset:0; z-index: 2000;
  background: rgba(4,6,12,.78); backdrop-filter: blur(8px);
  display:flex; align-items:center; justify-content:center; padding: 24px;
  opacity:0; visibility:hidden; transition: opacity .35s ease, visibility .35s ease;
}
.modal-overlay.open{ opacity:1; visibility:visible; }
.modal-box{
  position:relative; width: 100%; max-width: 620px; max-height: 88vh; overflow-y:auto;
  background: var(--surface-2); border:1px solid var(--border-strong); border-radius: var(--radius);
  transform: translateY(24px) scale(.98); transition: transform .4s var(--ease);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
.modal-overlay.open .modal-box{ transform: none; }
.modal-close{
  position:absolute; top:16px; right:16px; z-index:2;
  width:38px; height:38px; border-radius:50%; background: rgba(5,7,13,.6); border:1px solid var(--border-strong);
  display:flex; align-items:center; justify-content:center; color: var(--text);
}
.modal-close svg{ width:18px; height:18px; }
.modal-close:hover{ background: var(--grad); color:#04070f; }
.modal-thumb{
  aspect-ratio: 21/8; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(155deg, var(--pc1, #0d2b52), var(--pc2, #071022));
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-thumb svg{ width:64px; height:64px; color:rgba(255,255,255,.9); filter: drop-shadow(0 0 20px rgba(79,224,255,.6)); }
.modal-content{ padding: 28px 30px 32px; }
.modal-content h3{ font-family:'Rajdhani',sans-serif; font-weight:700; font-size:1.4rem; margin: 10px 0 12px; }
.modal-content p{ color: var(--text-muted); font-size:.96rem; margin-bottom: 20px; }
.modal-specs{ display:grid; grid-template-columns: repeat(3,1fr); gap:10px; margin-bottom:20px; }
.modal-specs div{ background: rgba(255,255,255,.03); border:1px solid var(--border); border-radius:10px; padding:12px; }
.modal-specs span{ display:block; font-size:.68rem; text-transform:uppercase; letter-spacing:.05em; color: var(--text-dim); margin-bottom:4px; }
.modal-specs strong{ font-family:'Rajdhani',sans-serif; font-size:.9rem; color: var(--text); }

/* ===================== Legal page ===================== */
.legal-page{ padding-top: calc(var(--header-h) + 70px); }
.legal-page .container{ max-width: 820px; }
.legal-page .section-desc{ margin-top: 6px; margin-bottom: 50px; }
.legal-content h2{ font-family:'Rajdhani',sans-serif; font-size:1.3rem; font-weight:700; margin: 40px 0 14px; }
.legal-content h2:first-child{ margin-top:0; }
.legal-content p{ color: var(--text-muted); font-size:.98rem; margin-bottom: 14px; }
.legal-content ul{ margin: 0 0 14px 0; padding-left: 22px; color: var(--text-muted); font-size:.98rem; }
.legal-content li{ margin-bottom: 8px; list-style: disc; }
.legal-content a{ color: var(--cyan); }
.legal-content strong{ color: var(--text); }

/* ===================== Error page (404) ===================== */
.error-page{
  min-height: 100vh; display:flex; align-items:center; justify-content:center;
  text-align:center; padding: calc(var(--header-h) + 40px) 24px 60px;
}
.error-code{
  font-family:'Orbitron',sans-serif; font-weight:900; font-size: clamp(5rem, 16vw, 10rem);
  line-height:1; background: var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
  filter: drop-shadow(0 0 40px rgba(59,167,255,.35));
}
.error-page h1{ font-size: clamp(1.4rem, 3vw, 2rem); margin: 10px 0 14px; }
.error-page p{ color: var(--text-muted); max-width: 460px; margin: 0 auto 34px; }

/* ===================== Footer ===================== */
footer{ position:relative; border-top: 1px solid var(--border); padding: 70px 0 30px; }
.footer-top{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-brand .brand{ margin-bottom:16px; }
.footer-brand p{ color: var(--text-dim); font-size:.9rem; max-width: 300px; margin-bottom: 22px; }
.social-row{ display:flex; gap:10px; }
.social-row a{
  width:40px; height:40px; border-radius:10px; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color: var(--text-muted);
  transition: all .3s ease;
}
.social-row a:hover{ color:#04070f; background: var(--grad); border-color:transparent; transform: translateY(-3px); }
.social-row svg{ width:18px; height:18px; }

.footer-col h5{ font-family:'Orbitron',sans-serif; font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; color: var(--text); margin-bottom:20px; }
.footer-col ul{ display:flex; flex-direction:column; gap:12px; }
.footer-col a{ color: var(--text-dim); font-size:.9rem; transition: color .3s ease, padding-left .3s ease; }
.footer-col a:hover{ color: var(--cyan); padding-left:4px; }

.footer-bottom{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px;
  padding-top: 26px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .82rem;
}
.footer-bottom a{ color: var(--text-dim); }
.footer-bottom a:hover{ color: var(--cyan); }

/* Back to top */
#backToTop{
  position: fixed; right: 26px; bottom: 26px; z-index: 400;
  width: 48px; height:48px; border-radius:50%;
  background: var(--surface-2); border:1px solid var(--border-strong);
  display:flex; align-items:center; justify-content:center; color: var(--cyan);
  opacity:0; visibility:hidden; transform: translateY(10px);
  transition: all .35s var(--ease);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
}
#backToTop.show{ opacity:1; visibility:visible; transform:none; }
#backToTop:hover{ background: var(--grad); color:#04070f; }
#backToTop svg{ width:20px; height:20px; }

/* ===================== Responsive ===================== */
@media (max-width: 1024px){
  .about-grid{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns: repeat(3,1fr); }
  .portfolio-grid{ grid-template-columns: repeat(2,1fr); }
  .news-grid{ grid-template-columns: 1fr; }
  /* 3 cards: skip the 2-column step, it strands the 3rd card alone */
  #aktualnosci-preview .news-grid{ grid-template-columns: 1fr; }
  .testimonial-grid{ grid-template-columns: 1fr; }
  .services-grid{ grid-template-columns: repeat(2,1fr); }
  .process{ grid-template-columns: repeat(2,1fr); gap: 40px 0; }
  .process::before{ display:none; }
  .discord-card{ grid-template-columns: 1fr; padding: 50px 34px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .footer-top{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px){
  .nav-links, .nav-actions .btn-outline{ display:none; }
  .burger{ display:flex; }
  .nav-actions{ gap: 10px; }

  .nav-links.mobile-open{
    display:flex; flex-direction:column; position:fixed; inset: 0 0 0 0;
    background: rgba(5,7,13,.98); backdrop-filter: blur(20px);
    justify-content:center; align-items:center; gap: 2px; z-index: 50;
    overflow-y: auto; padding: 90px 0 30px;
  }
  .nav-links.mobile-open a{ font-size: 1.15rem; padding: 11px 26px; }

  .hero-stats{ grid-template-columns: repeat(2,1fr); row-gap: 26px; }
  .stat:nth-child(2){ border-right:none; }
  .form-row{ grid-template-columns: 1fr; }
}
@media (max-width: 480px){
  .brand{ font-size: .85rem; gap: 8px; }
  .brand img{ width: 30px; height: 30px; }
  .nav-actions{ gap: 8px; }
  .nav-actions .btn-primary{ display:none; }
}
@media (max-width: 640px){
  .section{ padding: 90px 0; }
  .team-grid{ grid-template-columns: 1fr 1fr; }
  .portfolio-grid{ grid-template-columns: 1fr; }
  .services-grid{ grid-template-columns: 1fr; }
  .process{ grid-template-columns: 1fr; }
  .footer-top{ grid-template-columns: 1fr; }
  .contact-form{ padding: 26px; }
  .discord-card{ padding: 40px 22px; }
  .about-badge{ position:static; margin-top:18px; width:fit-content; }
  .news-card{ flex-direction:column; }
  .modal-specs{ grid-template-columns: 1fr 1fr; }
}
