@charset "UTF-8";

/* ===========================================================================
   NARZĘDZIA DLA BIZNESU — Design system „Digital Purple”
   1. Tokeny      2. Reset      3. Typografia
   4. Layout      5. Powierzchnie (light / cloud / dark)
   6. Utilities   7. Dostępność i reduced motion
   =========================================================================== */

/* --- 1. Tokeny ----------------------------------------------------------- */

:root {
  /* Paleta bazowa — rozdz. 2 specyfikacji */
  --navy-950: #0b1023;
  --navy-900: #111827;
  --violet-700: #6d28d9;
  --violet-600: #7c3aed;
  --violet-500: #8b5cf6;
  --violet-300: #a78bfa;
  --magenta-500: #d946ef;
  --indigo-500: #6366f1;
  --white: #ffffff;
  --cloud: #f8fafc;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-300: #cbd5e1;
  --mint-300: #67e8f9;

  /* --- Baza premium: ciepła biel zamiast chłodnego szarego -------------- */
  /* Jasność niesie całą stronę; ciemny jest akcentem, nie tłem. */
  --paper: #ffffff;
  --bone: #faf9f6;
  --sand: #f2efe9;
  --ink: #141218;
  --ink-700: #3a3542;
  --ink-500: #5d5668;
  --line: rgba(20, 18, 24, 0.12);
  --line-strong: rgba(20, 18, 24, 0.24);
  --violet-050: #f4efff;
  --violet-100: #e7dcff;

  /* Akcenty rozszerzające paletę — używane oszczędnie, do kontrapunktu */
  --cyan-400: #22d3ee;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;

  /* Gradient marki */
  --gradient-brand: linear-gradient(120deg, #7c3aed 0%, #d946ef 55%, #6366f1 100%);
  --gradient-brand-soft: linear-gradient(
    120deg,
    rgba(124, 58, 237, 0.14) 0%,
    rgba(217, 70, 239, 0.12) 55%,
    rgba(99, 102, 241, 0.14) 100%
  );
  --gradient-text: linear-gradient(100deg, #a78bfa 0%, #d946ef 50%, #67e8f9 100%);

  /* Typografia — kroje marki: Poppins (nagłówki i interfejs) + Lato (treść) */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  /* Elementy sterujące (przyciski, nawigacja, etykiety) idą krojem nagłówkowym —
     Lato nie ma wag 500/600, a Poppins trzyma w nich równy rytm. */
  --font-ui: var(--font-display);

  /* Skala celowo agresywna — nagłówek strony głównej idzie przez całą
     szerokość kontenera, więc ma miejsce na rozmach. */
  --fs-display: clamp(2.75rem, 8.4vw, 8rem);     /* 44 → 128 px */
  --fs-h1: clamp(2.5rem, 6vw, 5.5rem);           /* 40 → 88 px  */
  /* Nagłówki sekcji idą teraz przez całą szerokość kontenera, więc mogą
     urosnąć — przy 1320 px dłuższy tytuł mieści się w dwóch wierszach. */
  --fs-h2: clamp(2.25rem, 5vw, 5rem);            /* 36 → 80 px  */
  --fs-h3: clamp(1.4375rem, 1.9vw, 2rem);        /* 23 → 32 px  */
  --fs-h4: clamp(1.1875rem, 1.3vw, 1.4375rem);   /* 19 → 23 px  */
  /* Lato ma niższą wysokość x niż Inter — podnosimy stopień, żeby zachować
     tę samą czytelność tekstu ciągłego. */
  --fs-body: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem); /* 17 → 19 px */
  --fs-lead: clamp(1.125rem, 0.6vw + 1rem, 1.4375rem);
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Promienie: ZERO. Kierunek edytorski — ostre krawędzie, twarde kadry.
     Okręgi (border-radius: 50%) zostają tam, gdzie kształt jest okrągły
     z natury: kursor, pierścień postępu, punktory. */
  --r-btn: 0px;
  --r-card: 0px;
  --r-xl: 0px;
  --r-pill: 0px;

  /* Siatka i rytm */
  --container: 1320px;
  --container-narrow: 1040px;
  --gutter: clamp(1rem, 4vw, 4.5rem);
  --section-y: clamp(4.5rem, 9vw, 9rem);
  --stack: clamp(1.5rem, 2.5vw, 2.5rem);

  /* Cienie */
  --shadow-sm: 0 1px 2px rgba(11, 16, 35, 0.06), 0 2px 8px rgba(11, 16, 35, 0.04);
  --shadow-md: 0 4px 12px rgba(11, 16, 35, 0.07), 0 16px 32px -12px rgba(11, 16, 35, 0.12);
  --shadow-lg: 0 24px 60px -20px rgba(11, 16, 35, 0.28), 0 8px 20px -8px rgba(11, 16, 35, 0.14);
  --shadow-violet: 0 18px 44px -16px rgba(124, 58, 237, 0.55);

  /* Ruch */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
  --t-slow: 520ms;

  --header-h: 72px;
  color-scheme: light;
}

@media (min-width: 1024px) {
  :root {
    --header-h: 84px;
  }
}

/* --- 2. Reset ------------------------------------------------------------ */

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

* {
  margin: 0;
}

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

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
  /* Nic nie wychodzi poza oś poziomą — wymóg z rozdz. 15 */
  overflow-x: clip;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  flex-shrink: 0;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--c-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

table {
  border-collapse: collapse;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-border);
}

::selection {
  background: rgba(124, 58, 237, 0.22);
  color: inherit;
}

/* --- 3. Typografia ------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  /* Poppins jest szerszy i bardziej okrągły niż krój geometryczny — mniej
     ujemnego światła, inaczej litery zaczynają się sklejać. */
  letter-spacing: -0.018em;
  text-wrap: balance;
  color: var(--c-heading);
}

.t-display {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

h1,
.t-h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.026em;
}

h2,
.t-h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
}

h3,
.t-h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
}

h4,
.t-h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

p {
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--c-text-muted);
  letter-spacing: -0.012em;
}

.t-muted {
  color: var(--c-text-muted);
}

.t-sm {
  font-size: var(--fs-sm);
}

.t-xs {
  font-size: var(--fs-xs);
}

/* Nadruk gradientowy — wyłącznie krótkie frazy (zakaz z rozdz. 2) */
.t-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Zapas na podcięcia glifów, żeby „ą/ę/ż” nie były ucięte */
  padding-right: 0.06em;
}

.surface-light .t-gradient,
.surface-cloud .t-gradient {
  background: linear-gradient(100deg, #6d28d9 0%, #c026d3 55%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Etykieta nad nagłówkiem */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-eyebrow);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

.eyebrow--plain::before {
  display: none;
}

/* Numer porządkowy sekcji (01, 02 …) */
.section-index {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  opacity: 0.6;
}

/* --- 4. Layout ----------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  background-color: var(--c-bg);
  color: var(--c-text);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
  display: grid;
  gap: 1.1rem;
}

.section__head--center {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section__head--wide {
  max-width: 58rem;
}

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.stack {
  display: grid;
  gap: var(--stack);
  align-content: start;
}

.stack--sm {
  gap: 0.75rem;
}

.stack--md {
  gap: 1.25rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
}

@media (min-width: 640px) and (max-width: 1023.98px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- 5. Powierzchnie ------------------------------------------------------ */

/* Komponenty czytają wyłącznie zmienne semantyczne, więc ta sama karta
   działa poprawnie na tle jasnym i ciemnym.
   Każda powierzchnia maluje też własne tło i kolor tekstu — dzięki temu
   działa na dowolnym elemencie, nie tylko na .section. */

.surface-light,
.surface-cloud,
.surface-dark {
  background-color: var(--c-bg);
  color: var(--c-text);
}

.surface-light {
  --c-bg: var(--paper);
  --c-heading: var(--ink);
  --c-text: var(--ink-700);
  --c-text-muted: var(--ink-500);
  --c-border: var(--line);
  --c-border-strong: var(--line-strong);
  --c-card: var(--paper);
  --c-card-hover: var(--paper);
  --c-link: var(--violet-700);
  --c-eyebrow: var(--violet-700);
  --c-chip: var(--violet-050);
  --c-shadow: none;
  --c-shadow-hover: none;
  color-scheme: light;
}

.surface-cloud {
  --c-bg: var(--bone);
  --c-heading: var(--ink);
  --c-text: var(--ink-700);
  --c-text-muted: var(--ink-500);
  --c-border: var(--line);
  --c-border-strong: var(--line-strong);
  --c-card: var(--paper);
  --c-card-hover: var(--paper);
  --c-link: var(--violet-700);
  --c-eyebrow: var(--violet-700);
  --c-chip: var(--violet-050);
  --c-shadow: none;
  --c-shadow-hover: none;
  color-scheme: light;
}

/* Trzecia jasna powierzchnia — ciepły piasek, do rozbicia rytmu bielą */
.surface-sand {
  --c-bg: var(--sand);
  --c-heading: var(--ink);
  --c-text: var(--ink-700);
  --c-text-muted: var(--ink-500);
  --c-border: rgba(20, 18, 24, 0.14);
  --c-border-strong: rgba(20, 18, 24, 0.28);
  --c-card: var(--paper);
  --c-card-hover: var(--paper);
  --c-link: var(--violet-700);
  --c-eyebrow: var(--violet-700);
  --c-chip: rgba(255, 255, 255, 0.7);
  --c-shadow: none;
  --c-shadow-hover: none;
  background-color: var(--c-bg);
  color: var(--c-text);
  color-scheme: light;
}

/* Sekcja zalana kolorem marki — mocny akcent, używany raz, może dwa razy
   na stronie. Tekst zawsze biały, bo tło jest nasycone. */
.surface-brand {
  --c-bg: var(--violet-600);
  --c-heading: var(--white);
  --c-text: #f6f1ff;
  --c-text-muted: rgba(255, 255, 255, 0.9);
  --c-border: rgba(255, 255, 255, 0.28);
  --c-border-strong: rgba(255, 255, 255, 0.5);
  --c-card: rgba(255, 255, 255, 0.1);
  --c-card-hover: rgba(255, 255, 255, 0.16);
  --c-link: var(--white);
  --c-eyebrow: var(--amber-400);
  --c-chip: rgba(255, 255, 255, 0.14);
  --c-shadow: none;
  --c-shadow-hover: none;
  background-color: var(--c-bg);
  background-image: linear-gradient(135deg, #6d28d9 0%, #a21caf 48%, #4f46e5 100%);
  color: var(--c-text);
  color-scheme: dark;
}

.surface-dark {
  --c-bg: var(--ink);
  --c-heading: var(--white);
  --c-text: #ece9f2;
  --c-text-muted: #b9b3c4;
  --c-border: rgba(255, 255, 255, 0.12);
  --c-border-strong: rgba(255, 255, 255, 0.22);
  --c-card: rgba(255, 255, 255, 0.045);
  --c-card-hover: rgba(255, 255, 255, 0.075);
  --c-link: var(--violet-300);
  --c-eyebrow: var(--mint-300);
  --c-chip: rgba(255, 255, 255, 0.08);
  --c-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --c-shadow-hover: 0 24px 60px -24px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  color-scheme: dark;
}

/* Domyślna powierzchnia dokumentu */
body {
  --c-bg: var(--bone);
  --c-heading: var(--ink);
  --c-text: var(--ink-700);
  --c-text-muted: var(--ink-500);
  --c-border: var(--line);
  --c-border-strong: var(--line-strong);
  --c-card: var(--paper);
  --c-card-hover: var(--paper);
  --c-link: var(--violet-700);
  --c-eyebrow: var(--violet-700);
  --c-chip: var(--violet-050);
  --c-shadow: none;
  --c-shadow-hover: none;
}

/* --- 6. Utilities --------------------------------------------------------- */

.u-center {
  text-align: center;
}

.u-balance {
  text-wrap: balance;
}

.u-measure {
  max-width: 62ch;
}

.u-measure-sm {
  max-width: 48ch;
}

.u-relative {
  position: relative;
}

.u-mt-auto {
  margin-top: auto;
}

.u-hide {
  display: none !important;
}

@media (max-width: 767.98px) {
  .u-hide\@sm {
    display: none !important;
  }
}

@media (max-width: 1023.98px) {
  .u-hide\@md {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .u-only\@md {
    display: none !important;
  }
}

/* Dekoracyjna poświata gradientowa — zawsze pod treścią i bez zdarzeń myszy */
.glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}

.glow--violet {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.75) 0%, rgba(124, 58, 237, 0) 70%);
}

.glow--magenta {
  background: radial-gradient(circle, rgba(217, 70, 239, 0.6) 0%, rgba(217, 70, 239, 0) 70%);
}

.glow--indigo {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.62) 0%, rgba(99, 102, 241, 0) 70%);
}

/* Delikatne ziarno — zdejmuje „plastik” z dużych ciemnych płaszczyzn */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.u-layer {
  position: relative;
  z-index: 2;
}

/* --- 7. Dostępność -------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  color: var(--white);
  background: var(--violet-600);
  border-radius: var(--r-btn);
  transform: translateY(-160%);
  transition: transform var(--t-base) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

.surface-dark :focus-visible {
  outline-color: var(--mint-300);
}

/* Minimalny obszar dotykowy 44×44 px — rozdz. 2 i 12 */
a,
button,
input[type="checkbox"],
input[type="radio"],
summary {
  touch-action: manipulation;
}

/* Reduced motion: zostają stany końcowe i treść, znika ruch dekoracyjny. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .glow {
    animation: none !important;
  }
}
