/* ===== Klysoft — dark green edition ===== */
:root {
  --bg:        #06130c;
  --bg-soft:   #0a1f13;
  --panel:     rgba(255, 255, 255, .03);
  --panel-brd: rgba(74, 222, 128, .14);
  --green:     #22c55e;
  --green-hi:  #4ade80;
  --green-dim: #14532d;
  --ink:       #e8f5ec;
  --ink-soft:  #9db9a8;
  --mono:      "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:      "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius:    16px;
  --container: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(34, 197, 94, .13), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(34, 197, 94, .07), transparent 60%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--green); color: var(--bg); }

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

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--green-hi); }

/* Poświata za kursorem + ziarno */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 30%), rgba(74, 222, 128, .04), transparent 65%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
header, main, footer { position: relative; z-index: 2; }

/* Siatka w tle hero */
.hero {
  position: relative;
  padding: 90px 0 70px;
}
/* Siatka jako pseudoelement — maska wygasza tylko tło, nie treść sekcji */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 222, 128, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
          mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.hero > .container { position: relative; }

/* ===== Przyciski ===== */
.btn {
  display: inline-block;
  padding: .85em 1.7em;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s, color .15s, border-color .15s, box-shadow .2s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green);
  color: #04110a;
  box-shadow: 0 0 24px rgba(34, 197, 94, .35);
}
.btn-primary:hover { background: var(--green-hi); box-shadow: 0 0 34px rgba(74, 222, 128, .5); }
.btn-ghost { border-color: var(--panel-brd); color: var(--ink); background: var(--panel); }
.btn-ghost:hover { border-color: var(--green-hi); color: var(--green-hi); }
.btn-sm { padding: .55em 1.2em; font-size: .95rem; }
.btn-block { width: 100%; }

/* ===== Nagłówek ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 19, 12, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 222, 128, .1);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-text { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; }
.cursor-blink { color: var(--green-hi); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .98rem;
}
.site-nav a:not(.btn):hover { color: var(--green-hi); }

.nav-right { display: flex; align-items: center; gap: 18px; }
.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 600;
}
.lang-switch a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 2px;
}
.lang-switch a:hover { color: var(--green-hi); }
.lang-switch .active { color: var(--green-hi); }
.lang-switch .sep { color: rgba(74, 222, 128, .3); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--green-hi);
  margin-bottom: 18px;
}
h1 em {
  font-style: normal;
  color: var(--green-hi);
}
.glow {
  position: relative;
  white-space: nowrap;
  text-shadow: 0 0 26px rgba(74, 222, 128, .55);
}
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Terminal */
.terminal {
  background: #04110a;
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 44px rgba(34, 197, 94, .1);
  overflow: hidden;
  font-family: var(--mono);
  font-size: .88rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(74, 222, 128, .1);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #f87171; } .dot.yellow { background: #fbbf24; } .dot.green { background: #34d399; }
.terminal-title { margin-left: 10px; color: var(--ink-soft); font-size: .78rem; }
.terminal-body {
  margin: 0;
  padding: 18px 20px;
  min-height: 190px;
  color: #b9e8c9;
  white-space: pre-wrap;
  line-height: 1.75;
}
.terminal-body .ok { color: var(--green-hi); }
.terminal-body .cmd { color: var(--ink); }
.terminal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid rgba(74, 222, 128, .1);
  color: var(--green-hi);
  font-size: .8rem;
}
.pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green-hi);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(74, 222, 128, .12);
  padding: 16px 0;
  background: rgba(34, 197, 94, .04);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(74, 222, 128, .55);
  white-space: nowrap;
}
.marquee-track i { color: var(--green-hi); font-style: normal; font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Sekcje ===== */
.section { padding: 52px 0; }
.section-index {
  font-family: var(--mono);
  color: var(--green-hi);
  font-size: .85rem;
  margin-bottom: 10px;
}
.section-lead { color: var(--ink-soft); max-width: 44em; margin-bottom: 46px; font-size: 1.05rem; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Karty usług ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .25s;
}
.card:hover {
  border-color: rgba(74, 222, 128, .45);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35), 0 0 30px rgba(34, 197, 94, .12);
}
.card-num {
  position: absolute;
  top: -14px;
  right: 6px;
  font-family: var(--mono);
  font-size: 4.4rem;
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(74, 222, 128, .22);
  pointer-events: none;
}
.card h3 { color: var(--ink); margin-top: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ===== Proces — timeline ===== */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--green-hi), rgba(74, 222, 128, .06));
}
.timeline-step {
  display: flex;
  gap: 26px;
  padding: 0 0 38px;
  position: relative;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-num {
  flex: 0 0 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid rgba(74, 222, 128, .4);
  color: var(--green-hi);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 0 18px rgba(34, 197, 94, .18);
  position: relative;
  z-index: 1;
}
.timeline-step h3 { margin-bottom: .3em; }
.timeline-step p { margin: 0; color: var(--ink-soft); max-width: 46em; }

/* ===== Dobre fundamenty ===== */
.tech-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}
.tech-group p { color: var(--ink-soft); margin: 0; }
.tech-group h3 {
  font-family: var(--mono);
  color: var(--green-hi);
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tags li {
  font-family: var(--mono);
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(74, 222, 128, .25);
  color: var(--ink);
  border-radius: 8px;
  padding: .38em .9em;
  font-size: .86rem;
  transition: border-color .15s, background .15s;
}
.tags li:hover { border-color: var(--green-hi); background: rgba(34, 197, 94, .16); }

/* ===== Portfolio ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.portfolio-card {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .25s;
}
.portfolio-card:hover {
  border-color: rgba(74, 222, 128, .5);
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4), 0 0 34px rgba(34, 197, 94, .14);
}
.img-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--green-hi);
  font-family: var(--mono);
  font-size: .82rem;
  border-bottom: 1px dashed rgba(74, 222, 128, .35);
  background:
    repeating-linear-gradient(45deg, rgba(34, 197, 94, .05) 0 12px, transparent 12px 24px),
    #04110a;
}
.portfolio-placeholder { aspect-ratio: 16 / 9; }
/* Screenshot produktu: jasna plansza wyeksponowana na ciemnym tle karty */
.portfolio-media {
  display: grid;
  place-items: center;
  padding: 30px 26px;
  background:
    repeating-linear-gradient(45deg, rgba(34, 197, 94, .05) 0 12px, transparent 12px 24px),
    #04110a;
  border-bottom: 1px solid var(--panel-brd);
}
.portfolio-media img {
  display: block;
  width: 88%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 2px 10px rgba(0, 0, 0, .35);
}
.portfolio-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.portfolio-tag {
  font-family: var(--mono);
  color: var(--green-hi);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.portfolio-body > p:not(.portfolio-tag) { color: var(--ink-soft); flex: 1; }
.portfolio-link { font-weight: 600; text-decoration: none; }
.portfolio-link:hover { text-decoration: underline; }

/* ===== Dlaczego my ===== */
.why-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 52px;
  align-items: center;
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  padding-left: 36px;
  position: relative;
  margin-bottom: 20px;
  color: var(--ink-soft);
}
.checklist li strong { color: var(--ink); }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(34, 197, 94, .14);
  border: 1px solid rgba(74, 222, 128, .4);
  color: var(--green-hi);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: .8rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--green-hi);
  text-shadow: 0 0 20px rgba(74, 222, 128, .4);
}
/* Wariant dla wyróżnień będących zdaniem, a nie samą liczbą. */
.stat-num.is-text {
  font-size: 1.1rem;
  line-height: 1.35;
  text-shadow: 0 0 16px rgba(74, 222, 128, .3);
  margin-bottom: 6px;
  text-wrap: balance;
}
.stat-label { color: var(--ink-soft); font-size: .88rem; }

/* ===== Kontakt ===== */
.section-contact {
  background:
    radial-gradient(700px 400px at 20% 0%, rgba(34, 197, 94, .1), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid rgba(74, 222, 128, .12);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 52px;
  align-items: start;
}
.contact-copy p { color: var(--ink-soft); }
.contact-details {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 1.02rem;
}
.contact-details li { margin-bottom: 10px; }
.contact-details a { color: var(--ink); text-decoration: none; }
.contact-details a:hover { color: var(--green-hi); }
.prompt { color: var(--green-hi); }

.contact-form {
  background: #04110a;
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  font-size: .92rem;
}
.optional { color: var(--ink-soft); font-weight: 400; font-size: .82rem; }
.field input,
.field textarea {
  width: 100%;
  padding: .78em 1em;
  border: 1px solid rgba(74, 222, 128, .22);
  border-radius: 10px;
  font: inherit;
  font-size: .96rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .03);
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder,
.field textarea::placeholder { color: #5f7a6b; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-hi);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}
.form-note {
  margin: 14px 0 0;
  text-align: center;
  color: var(--green-hi);
  font-weight: 600;
  font-size: .92rem;
}
.form-note.is-error { color: #f87171; }

/* ===== Stopka ===== */
.site-footer {
  background: #030d07;
  border-top: 1px solid rgba(74, 222, 128, .1);
  color: var(--ink-soft);
  padding: 58px 0 0;
  font-size: .94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 42px;
}
.site-footer h3 {
  font-family: var(--mono);
  color: var(--green-hi);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--green-hi); }
.logo-footer .logo-text { font-size: 1.05rem; }
.footer-tagline { margin-top: 12px; color: var(--ink-soft); }
address { font-style: normal; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(74, 222, 128, .08);
  padding-block: 18px;
  font-size: .82rem;
}
.footer-bottom p { margin: 0; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .pulse, .cursor-blink { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .portfolio-card, .btn { transition: none; }
}

/* ===== Mobile ===== */
/* Menu zwija się do hamburgera już przy 1080px — sześć pozycji nawigacji
   nie mieści się obok logo i przełącznika języka w węższym oknie. */
@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #04110a;
    border-bottom: 1px solid rgba(74, 222, 128, .18);
    padding: 8px 22px 22px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 4px; border-bottom: 1px solid rgba(74, 222, 128, .1); }
  .site-nav .btn { margin-top: 16px; text-align: center; }
}

@media (max-width: 940px) {
  .hero-grid,
  .why-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .tech-groups { grid-template-columns: 1fr; gap: 24px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 48px 0 44px; }
  .cards, .tech-groups, .stats, .footer-grid { grid-template-columns: 1fr; }
  .glow { white-space: normal; }

  .timeline::before { left: 21px; }
  .timeline-num { flex-basis: 44px; height: 44px; font-size: 1rem; }
  .timeline-step { gap: 18px; padding-bottom: 30px; }
}
