:root {
  --bg: #f5f7fc;
  --ink: #0c1424;
  --muted: #4a5570;
  --blue: #1646b8;
  --blue-soft: #e3eafb;
  --line: #d5ddef;
  --card: #ffffff;
  --on-accent: #ffffff;
  --accent-shadow: #0c2d7a;
  --accent2: var(--blue);
  --accent2-soft: var(--blue-soft);
  --radius: 14px;
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light dark;
}

/* Tryb ciemny — włącza się automatycznie według ustawień systemu */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --ink: #e6ecf8;
    --muted: #9eaac6;
    --blue: #7aa2ff;
    --blue-soft: #18244a;
    --line: #1f2b4a;
    --card: #111a2e;
    --on-accent: #0b1120;
    --accent-shadow: #2d4fa8;
  }
  .grid-bg { opacity: 0.6; }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse at top, #000 20%, transparent 75%);
}

.mono { font-family: var(--mono); }
.accent { color: var(--blue); }

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

a { color: inherit; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 5vw, 4rem);
  background: rgba(245, 247, 252, 0.85);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img { border-radius: 8px; }

.nav nav { display: flex; gap: 1.5rem; }

.nav nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav nav a:hover { color: var(--blue); }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 4rem 0;
}

.tag {
  display: inline-block;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 2rem;
}

.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: var(--on-accent);
  box-shadow: 0 6px 0 var(--accent-shadow);
}

.btn-primary:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--accent-shadow); }

.btn-ghost {
  border: 2px solid var(--ink);
}

.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* Browser-window frame, echoing the logo */
.window {
  border: 3px solid var(--blue);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  box-shadow: 14px 14px 0 var(--blue-soft), 14px 14px 0 3px var(--blue);
  transform: rotate(2deg);
  max-width: 380px;
  margin-left: auto;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 3px solid var(--blue);
  color: var(--blue);
  font-size: 0.8rem;
}

.dot {
  width: 11px;
  height: 11px;
  border: 2.5px solid var(--blue);
  border-radius: 50%;
}

.window-bar .mono { margin-left: 0.5rem; }
.close { margin-left: auto; font-weight: 700; font-size: 1.1rem; line-height: 1; }

.window img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }

/* SECTIONS */
.section { padding: 5rem 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.num { font-size: 1rem; color: var(--blue); }

.section-lead, .about p, .split p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 46rem;
}

.about p + p { margin-top: 1rem; }
.section-lead { margin-bottom: 2rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.section-lead + .cards { margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover { transform: translateY(-4px); border-color: var(--blue); }

.card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.98rem; }

.icon {
  font-size: 1.6rem;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.label { color: var(--blue) !important; font-size: 0.85rem !important; margin-bottom: 0.6rem; }

.split {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: center;
}

.logo-big {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.checklist { list-style: none; margin-top: 1.5rem; display: grid; gap: 0.7rem; }

.checklist li {
  position: relative;
  padding-left: 2rem;
}

.checklist li::before {
  content: "▸";
  position: absolute;
  left: 0.4rem;
  color: var(--blue);
  font-weight: 700;
}

/* SOCIALS */
.socials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.social {
  --c: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 2rem 1.6rem;
  border-radius: var(--radius);
  background: var(--c);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s;
}

.social:hover { transform: translateY(-4px) rotate(-0.5deg); }

.social .mono { opacity: 0.8; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.social strong { font-size: 1.5rem; }

.social .arrow {
  position: absolute;
  right: 1.4rem;
  bottom: 1.2rem;
  font-size: 1.8rem;
  transition: transform 0.2s;
}

.social:hover .arrow { transform: translateX(6px); }

.discord { --c: #5865f2; }
.twitch { --c: #9146ff; }
.youtube { --c: #e62117; }

/* FOOTER */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer img { border-radius: 6px; }

/* RESPONSIVE */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 3rem 0; }
  .window { margin: 1rem auto 0; transform: rotate(1deg); }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .logo-big { max-width: 220px; margin: 0 auto; }
  .section { padding: 3.5rem 0; }
  h2 { flex-wrap: wrap; gap: 0.5rem; }
  .nav { padding: 0.7rem 1rem; gap: 0.6rem; }
  .window { max-width: 300px; }
  .socials, .cards { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .nav nav { width: 100%; overflow-x: auto; white-space: nowrap; gap: 1.2rem; padding-bottom: 0.2rem; }
}

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