/* ==========================================================================
   MC — podstrony (kassandra / astro / o-mnie / kontakt)
   Wspólna warstwa: ciemne tło, siatka, karty faktów, bloki treści, pager.
   ========================================================================== */

:root {
  --bg: #04060a;
  --bg-soft: #070c13;
  --ink: #e8fbff;
  --dim: rgba(232, 251, 255, 0.70);
  --faint: rgba(232, 251, 255, 0.34);
  --cyan: #5ef2ff;
  --mag: #ff3ea5;
  --violet: #8b5cf6;
  --line: rgba(94, 242, 255, 0.20);
  --line-soft: rgba(94, 242, 255, 0.10);
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(20px, 5vw, 96px);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.page {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(120% 80% at 50% -10%, #08131c 0%, #04060a 55%, #020306 100%);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--cyan); color: #02121a; }

a { color: var(--cyan); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* ── warstwy ─────────────────────────────────────────────────────────── */

#matrix-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.24;
  pointer-events: none;
}

.fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.fx--grain {
  opacity: 0.055;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: grain 1.1s steps(3) infinite;
}

.fx--scan {
  opacity: 0.30;
  background: repeating-linear-gradient(to bottom, rgba(190, 246, 255, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  mix-blend-mode: soft-light;
}

.fx--vignette {
  background:
    radial-gradient(140% 110% at 50% 30%, rgba(0, 0, 0, 0) 45%, rgba(2, 4, 8, 0.55) 80%, rgba(2, 3, 6, 0.92) 100%),
    linear-gradient(to bottom, rgba(2, 4, 8, 0.6) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 80%, rgba(2, 3, 6, 0.7) 100%);
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(-4%, 2%, 0); }
  66% { transform: translate3d(3%, -3%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ── ramka narożna ───────────────────────────────────────────────────── */

.frame { position: fixed; inset: 18px; z-index: 3; pointer-events: none; }
.frame i { position: absolute; width: 22px; height: 22px; border: 1px solid var(--line); }
.frame__tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame__tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.frame__bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.frame__br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* ── pasek nawigacji ─────────────────────────────────────────────────── */

.pnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 62px;
  padding: 0 clamp(22px, 3.6vw, 56px);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(4, 6, 10, 0.72);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
}

.pnav__back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  letter-spacing: 0.22em;
}
.pnav__back:hover, .pnav__back:focus-visible { color: var(--cyan); text-decoration: none; }
.pnav__back i {
  display: inline-block;
  font-style: normal;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pnav__back:hover i { transform: translateX(-4px); }

.pnav__crumb { color: var(--faint); letter-spacing: 0.24em; }
.pnav__crumb b { color: var(--cyan); font-weight: 400; }

.pnav__tag {
  color: var(--faint);
  font-size: 9.5px;
  border: 1px solid var(--line-soft);
  padding: 4px 8px;
}

/* ── arkusz ──────────────────────────────────────────────────────────── */

.sheet {
  position: relative;
  z-index: 2;
  width: min(1080px, 100% - var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(48px, 8vh, 110px) 0 clamp(60px, 9vh, 120px);
}

.sheet__eyebrow {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}
.sheet__eyebrow span {
  color: var(--cyan);
  border: 1px solid var(--line);
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.sheet__title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7.6vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  background: linear-gradient(100deg, #ffffff 0%, #b8f4ff 38%, var(--cyan) 62%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 70px rgba(94, 242, 255, 0.18);
}

.sheet__lead {
  margin: 0 0 46px;
  max-width: 68ch;
  font-size: clamp(14px, 1.35vw, 17px);
  line-height: 1.85;
  color: var(--dim);
}
.sheet__lead strong { color: var(--ink); font-weight: 400; }

/* ── karty faktów ────────────────────────────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin: 0 0 56px;
}

.fact {
  background: rgba(4, 7, 12, 0.82);
  padding: 22px 22px 20px;
  transition: background 0.35s ease;
}
.fact:hover { background: rgba(8, 20, 28, 0.86); }

.fact b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1;
  color: var(--cyan);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.fact span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.5;
}

/* ── bloki treści ────────────────────────────────────────────────────── */

.blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: clamp(26px, 3.8vw, 54px) clamp(22px, 3.4vw, 46px);
  margin: 0 0 56px;
}

.block { position: relative; padding-left: 18px; }
.block::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), rgba(94, 242, 255, 0) 92%);
  opacity: 0.55;
}

.block h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.02rem, 1.55vw, 1.24rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.block p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.85; color: var(--dim); }
.block p:last-child { margin-bottom: 0; }

.block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.block li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--dim);
}
.block li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan);
  font-size: 11px;
  line-height: 1.9;
  opacity: 0.8;
}
.block li b { color: var(--ink); font-weight: 400; }

/* pasek technologii */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 56px;
  padding: 0;
  list-style: none;
}
.stack li {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 7px 11px;
  background: rgba(94, 242, 255, 0.03);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.stack li:hover { color: var(--ink); border-color: var(--cyan); background: rgba(94, 242, 255, 0.08); }

/* ── pager ───────────────────────────────────────────────────────────── */

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.pager a {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.pager a:hover, .pager a:focus-visible { color: var(--cyan); text-decoration: none; }
.pager a b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  letter-spacing: 0.02em;
  color: var(--ink);
}
.pager a:hover b { color: var(--cyan); }

.pager__mid {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line-soft);
  padding: 6px 10px;
}

/* ── stopka ──────────────────────────────────────────────────────────── */

.pfoot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-soft);
  padding: 22px clamp(22px, 3.6vw, 56px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}
.pfoot__legal {
  flex-basis: 100%;
  text-align: right;
  color: #ffffff;
  opacity: 1;
}
.pfoot__mail {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  opacity: 1;
  transition: opacity 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.pfoot__mail svg { display: block; }
.pfoot__mail:hover, .pfoot__mail:focus-visible { opacity: 1; color: var(--cyan); transform: translateY(-1px); }
.pfoot a { color: #ffffff; }
.pfoot a:hover { color: var(--cyan); }

/* ── animacja wejścia ────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to { opacity: 1; transform: none; }
}

.sheet > * { animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both; }
.sheet > *:nth-child(1) { animation-delay: 0.05s; }
.sheet > *:nth-child(2) { animation-delay: 0.11s; }
.sheet > *:nth-child(3) { animation-delay: 0.17s; }
.sheet > *:nth-child(4) { animation-delay: 0.23s; }
.sheet > *:nth-child(5) { animation-delay: 0.29s; }
.sheet > *:nth-child(6) { animation-delay: 0.35s; }
.sheet > *:nth-child(n + 7) { animation-delay: 0.4s; }

/* karta kontaktowa */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.55);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.35s ease;
  margin: 0 0 22px;
}
.contact-card:hover {
  border-color: var(--cyan);
  background: rgba(8, 24, 32, 0.82);
  box-shadow: 0 0 0 1px rgba(94, 242, 255, 0.18), 0 0 60px rgba(94, 242, 255, 0.12);
  text-decoration: none;
}
.contact-card span {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}
.contact-card b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.1vw, 1.48rem);
  letter-spacing: 0.01em;
  color: var(--ink);
  word-break: break-word;
}
.contact-card:hover b { color: var(--cyan); }

/* ── responsywność ───────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .frame { display: none; }
  .pnav { height: 54px; font-size: 9.5px; letter-spacing: 0.14em; }
  .pnav__tag { display: none; }
  .sheet { padding-top: 40px; }
  .sheet__lead { font-size: 13.5px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 18px 16px 16px; }
  .blocks { grid-template-columns: 1fr; gap: 30px; }
  .block p, .block li { font-size: 13px; }
  .pager { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pager__mid { order: -1; }
  .pfoot { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx--grain { animation: none; }
  .sheet > * { animation: none; }
}

/* ── formularz kontaktowy ────────────────────────────────────────────── */

.contact-form { margin: 38px 0 4px; }

.contact-form > h2 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.contact-form__lead {
  margin: 0 0 20px;
  max-width: 66ch;
  color: var(--dim);
  font-size: 13px;
}

.cform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.55);
  box-shadow: inset 0 0 60px rgba(94, 242, 255, 0.03);
}

.cform[hidden] { display: none; }

.cform__row { display: flex; flex-direction: column; gap: 7px; }
.cform__row--wide { grid-column: 1 / -1; }

.cform label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.cform__opt { letter-spacing: 0.08em; text-transform: none; opacity: 0.7; }

.cform input[type="text"],
.cform input[type="email"],
.cform textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cform textarea { min-height: 152px; resize: vertical; }

.cform input:hover,
.cform textarea:hover { border-color: rgba(94, 242, 255, 0.34); }

.cform input:focus,
.cform textarea:focus {
  border-color: var(--cyan);
  background: rgba(6, 16, 22, 0.9);
  box-shadow: 0 0 0 1px rgba(94, 242, 255, 0.20), 0 0 26px rgba(94, 242, 255, 0.10);
}

.cform input[aria-invalid="true"],
.cform textarea[aria-invalid="true"] { border-color: var(--mag); }

.cform .cform__consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
  cursor: pointer;
}

.cform__consent input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.cform__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cform__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.cform__send {
  appearance: none;
  padding: 13px 24px;
  border: 1px solid var(--cyan);
  background: rgba(94, 242, 255, 0.10);
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.cform__send:hover:not(:disabled),
.cform__send:focus-visible {
  background: var(--cyan);
  color: #04121a;
  box-shadow: 0 0 24px rgba(94, 242, 255, 0.35);
}

.cform__send:disabled { opacity: 0.55; cursor: progress; }

.cform__status {
  margin: 0;
  min-height: 1.4em;
  font-size: 11.5px;
  color: var(--dim);
}

.cform__status.is-error { color: var(--mag); }
.cform__status.is-ok { color: var(--cyan); }

.cform__hint {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  font-size: 10.5px;
  color: var(--faint);
}
.cform__hint a { color: var(--dim); border-bottom: 1px solid var(--line); }
.cform__hint a:hover { color: var(--cyan); }

.cform__done {
  padding: 30px 26px;
  border: 1px solid var(--line);
  background: rgba(8, 24, 32, 0.72);
  box-shadow: inset 0 0 70px rgba(94, 242, 255, 0.06);
}
.cform__done[hidden] { display: none; }
.cform__done:focus { outline: none; }

.cform__done-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  color: var(--cyan);
}

.cform__done-text { margin: 0 0 20px; color: var(--dim); font-size: 13px; }

.cform__again {
  appearance: none;
  padding: 11px 20px;
  border: 1px solid var(--line);
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.cform__again:hover { border-color: var(--cyan); color: var(--cyan); }

@media (max-width: 720px) {
  .cform { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
  .contact-form { margin-top: 30px; }
}
