/*
 * AlphaRoute — arkusz stylów strony.
 * Tokeny i ich uzasadnienie: wiki/landing/projekt.md §6. Kontrast par kolorów pilnuje test
 * tests/contrast.test.mjs — liczy go z wartości w TYM pliku.
 */

/* Fonty (OFL), serwowane lokalnie — pobiera je tools/fetch-fonts.sh. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/manrope-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/assets/fonts/red-hat-display-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/assets/fonts/red-hat-display-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --surface-100: #F8FAFC;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --ink: #0F172A;
  --ink-muted: #64748B;
  --brand: #E75321;
  --brand-hover: #CF4517;
  --brand-active: #B93B11;
  --brand-subtle: #FDEDE7;
  --info: #2457C5;
  --focus-ring: #E75321;
  --action-solid: #0F172A;
  --action-solid-hover: #1E293B;
  --action-solid-active: #020617;
  --on-action-solid: #FFFFFF;
  --feature-bg: #1A1A1A;
  --feature-ink: #FFFFFF;
  --feature-muted: #9E9EA3;
  --feature-pill: #333336;

  --font-display: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --display-size: 52px;  --display-lh: 56px;
  --heading-lg-size: 32px; --heading-lg-lh: 40px;
  --body-size: 16px;     --body-lh: 24px;
  --body-sm-size: 14px;  --body-sm-lh: 20px;
  --label-size: 13px;    --label-lh: 16px;  --label-tracking: 0.04em;
  --caption-size: 12px;  --caption-lh: 16px;

  --space-050: 4px;
  --space-100: 8px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 40px;
  --space-500: 64px;
  --space-600: 96px;
  --layout-max: 1200px;
  --gutter: var(--space-300);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-button: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-100: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-200: 0 2px 8px rgba(15, 23, 42, .08);
  --shadow-300: 0 12px 32px rgba(15, 23, 42, .12);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 35%, transparent);

  --ease-standard: cubic-bezier(.2, 0, .2, 1);
  --duration-fast: 120ms;

  --tap-min: 44px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-100: #0D0D0E;
    --surface-raised: #171718;
    --surface-sunken: #09090A;
    --border: #28282A;
    --border-strong: #3A3A3D;
    --ink: #D9D9DC;
    --ink-muted: #9E9EA3;
    --brand: #FF7A47;
    --brand-hover: #FF9166;
    --brand-active: #FF7A47;
    --brand-subtle: #2A1509;
    --info: #6FA1FF;
    --focus-ring: #FF7A47;
    --action-solid: #D9D9DC;
    --action-solid-hover: #E4E4E7;
    --action-solid-active: #C6C6CA;
    --on-action-solid: #0D0D0E;
    --feature-bg: #171718;
    --feature-pill: #28282A;
    --shadow-100: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-200: 0 2px 8px rgba(0, 0, 0, .55);
    --shadow-300: 0 12px 32px rgba(0, 0, 0, .6);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; }
}

/* --- podstawa --- */

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

html {
  scroll-padding-top: calc(var(--header-h) + var(--space-200));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

main { flex: 1; }
main:focus { outline: none; }

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

a:focus-visible {
  outline: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-focus);
}

abbr[title] { text-decoration: none; }

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

/* --- link „przejdź do treści” --- */

.skip {
  position: absolute;
  left: var(--space-200);
  top: -100px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-200);
  border-radius: var(--radius-button);
  background: var(--action-solid);
  color: var(--on-action-solid);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus-visible { top: var(--space-200); }

/* --- nagłówek --- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--surface-100) 98%, transparent),
    color-mix(in srgb, var(--surface-100) 85%, transparent) 65%,
    transparent);
}

.header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-100) var(--space-300);
  min-height: var(--header-h);
  padding-top: var(--space-100);
  padding-bottom: var(--space-100);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-100);
  min-height: var(--tap-min);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand);
}

.nav { margin-left: auto; }
.nav ul, .lang ul { display: flex; gap: var(--space-050); }

.nav a, .lang a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: var(--body-sm-size);
  line-height: var(--body-sm-lh);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.nav a:hover, .lang a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

.lang a { position: relative; letter-spacing: var(--label-tracking); }

.lang a[aria-current="page"] { background: var(--surface-sunken); }
.lang a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--brand);
}

/* --- elementy wspólne --- */

.eyebrow span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--space-100);
  border-radius: var(--radius-sm);
  background: var(--brand-subtle);
  color: var(--brand-active);
  font-size: var(--label-size);
  line-height: var(--label-lh);
  font-weight: 600;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.eyebrow--dark span {
  background: var(--feature-pill);
  color: var(--feature-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-100);
  min-height: var(--tap-min);
  padding: 0 var(--space-300);
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  background: var(--action-solid);
  color: var(--on-action-solid);
  font-size: var(--label-size);
  font-weight: 600;
  letter-spacing: var(--label-tracking);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.btn:hover { background: var(--action-solid-hover); }
.btn:active { background: var(--action-solid-active); transform: translateY(1px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-050);
  min-height: var(--tap-min);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.link-arrow:hover { color: var(--brand-active); }

.section { padding: calc(var(--space-500) + var(--space-200)) 0 0; }

.section__title {
  font-family: var(--font-display);
  font-size: var(--heading-lg-size);
  line-height: var(--heading-lg-lh);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* --- hero --- */

.hero {
  position: relative;
  isolation: isolate;
  padding: var(--space-500) 0 var(--space-200);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 -10%;
  z-index: -1;
  background:
    radial-gradient(40% 55% at 78% 40%, color-mix(in srgb, var(--brand) 30%, transparent), transparent),
    radial-gradient(35% 50% at 92% 75%, color-mix(in srgb, var(--info) 24%, transparent), transparent);
  filter: blur(24px);
  pointer-events: none;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-200);
}

.hero__title {
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: var(--display-size);
  line-height: var(--display-lh);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 52ch;
  font-size: 18px;
  line-height: 28px;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-200) var(--space-300);
  margin-top: var(--space-200);
}

/* --- obszary działalności --- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-300);
  margin-top: var(--space-400);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-100);
  padding: var(--space-300);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--ink) 4%, transparent), color-mix(in srgb, var(--ink) 1%, transparent) 60%),
    var(--surface-raised);
  box-shadow: var(--shadow-200);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-100);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--brand);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  font-weight: 800;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

/* Tekst karty w --ink: --ink-muted na tle z gradientem daje 4.40:1 (< 4.5). */
.card p { color: var(--ink); }

/* --- o spółce (ciemny blok) --- */

.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-200);
  padding: var(--space-500);
  border-radius: var(--radius-lg);
  background: var(--feature-bg);
  color: var(--feature-ink);
  box-shadow: var(--shadow-200);
}

.feature__title {
  font-family: var(--font-display);
  font-size: var(--heading-lg-size);
  line-height: var(--heading-lg-lh);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.feature__text { max-width: 65ch; font-size: 18px; line-height: 28px; }

/* --- dane spółki --- */

.registry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-300);
  margin-top: var(--space-400);
}

.data {
  padding: var(--space-300);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-100);
}

.data__kicker {
  font-size: var(--label-size);
  line-height: var(--label-lh);
  font-weight: 600;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.data__name {
  margin-top: var(--space-100);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.data__form { color: var(--ink-muted); font-size: var(--body-sm-size); line-height: var(--body-sm-lh); }

.data dl { margin-top: var(--space-300); }

.data__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--space-100) var(--space-200);
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.data__row dt { color: var(--ink-muted); font-size: var(--body-sm-size); line-height: var(--body-sm-lh); padding-top: 2px; }
.data__row dd { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.copyable { user-select: all; -webkit-user-select: all; }

/* --- stopka --- */

.footer {
  margin-top: calc(var(--space-600) + var(--space-200));
  color: var(--ink-muted);
  font-size: var(--caption-size);
  line-height: var(--caption-lh);
}

.footer__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-300) var(--space-400);
  padding-top: var(--space-400);
  padding-bottom: var(--space-300);
  border-top: 1px solid var(--border);
}

.footer .brand { font-size: 18px; }
.footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-300); }
.footer__title { margin-bottom: var(--space-050); color: var(--ink); font-weight: 700; }
.footer__legal { grid-column: 1 / -1; }

/* --- 404 --- */

.nf { padding: var(--space-500) 0; }
.nf__list { display: grid; gap: var(--space-300); margin-top: var(--space-300); }
.nf__title {
  font-family: var(--font-display);
  font-size: var(--heading-lg-size);
  line-height: var(--heading-lg-lh);
  font-weight: 800;
}

/* --- tablet --- */

@media (max-width: 900px) {
  :root { --header-h: 64px; --display-size: 40px; --display-lh: 44px; }
  .header__inner { column-gap: var(--space-100); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: var(--space-400) var(--space-300); }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
}

/* --- telefon --- */

@media (max-width: 600px) {
  :root {
    --gutter: var(--space-200);
    --display-size: 32px; --display-lh: 40px;
    --heading-lg-size: 26px; --heading-lg-lh: 32px;
  }
  /* Nagłówek w dwóch rzędach nie może być przyklejony — zjadałby pół ekranu. */
  .header { position: static; }
  html { scroll-padding-top: var(--space-200); }
  .nav { order: 3; width: 100%; margin: 0 calc(-1 * 12px); }
  .lang { margin-left: auto; }
  .hero__lead, .feature__text { font-size: var(--body-size); line-height: var(--body-lh); }
  .hero__actions .btn { width: 100%; min-height: 48px; }
  .registry, .footer__cols { grid-template-columns: minmax(0, 1fr); }
  .data__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer { font-size: var(--body-sm-size); line-height: var(--body-sm-lh); }
}

/* --- druk: compliance drukuje dane spółki do akt --- */

@media print {
  :root { --surface-100: #FFFFFF; --surface-raised: #FFFFFF; --ink: #000000; --ink-muted: #333333; --border: #999999; }
  .header, .skip, .hero::before, .hero__actions, .card__icon { display: none; }
  .header { position: static; }
  .feature { background: none; color: #000000; padding: 0; box-shadow: none; }
  .eyebrow--dark span { background: none; color: #333333; padding: 0; }
  .card, .data { box-shadow: none; break-inside: avoid; }
  .section { padding-top: var(--space-400); }
}
