/* Understand Sp. z o.o. — strona firmowa
   Tokeny: paper #F5F7FB · ink #0C1220 · cobalt #2743E3 · mist #DDE4F2 · slate #5A6478
   Typografia: Clash Display (display) · Satoshi (tekst) · ui-monospace (dane rejestrowe) */

@font-face {
  font-family: 'Clash Display';
  src: url('../assets/fonts/ClashDisplay-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('../assets/fonts/ClashDisplay-Semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/Satoshi-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/Satoshi-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../assets/fonts/Satoshi-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #F5F7FB;
  --ink: #0C1220;
  --cobalt: #2743E3;
  --cobalt-deep: #1B2FA8;
  --mist: #DDE4F2;
  --slate: #5A6478;
  --display: 'Clash Display', 'Avenir Next', sans-serif;
  --body: 'Satoshi', -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cobalt); color: #fff; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 22px;
  letter-spacing: -0.02em; text-decoration: none;
}
.wordmark .dot { color: var(--cobalt); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang { display: flex; border: 1px solid var(--mist); border-radius: 999px; overflow: hidden; background: #fff; }
.lang button, .lang a {
  font-family: var(--body); font-size: 13px; font-weight: 700;
  padding: 6px 13px; border: 0; background: transparent; color: var(--slate); cursor: pointer;
}
.lang button[aria-pressed="true"], .lang a[aria-pressed="true"] { background: var(--ink); color: #fff; }
.nav-contact {
  font-weight: 700; font-size: 15px; text-decoration: none;
  border-bottom: 2px solid var(--cobalt); padding-bottom: 1px;
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) clamp(48px, 9vh, 96px);
}
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--slate); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.06; letter-spacing: -0.025em;
  max-width: 15ch;
}
.hero-sub { margin-top: 20px; max-width: 52ch; color: var(--slate); font-size: clamp(16px, 1.6vw, 19px); }
.hero-cta {
  display: inline-block; margin-top: 32px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  color: #fff; background: var(--cobalt);
  padding: 13px 26px; border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
}
.hero-cta:hover { background: var(--cobalt-deep); transform: translateY(-1px); }

/* wejście tekstu hero po złożeniu cząstek */
.hero-copy > * { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.hero-copy.in > * { opacity: 1; transform: none; }
.hero-copy.in > .eyebrow { transition-delay: .05s; }
.hero-copy.in > h1 { transition-delay: .15s; }
.hero-copy.in > .hero-sub { transition-delay: .3s; }
.hero-copy.in > .hero-cta { transition-delay: .45s; }

/* ---------- sekcje ---------- */
main section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 9vh, 110px) clamp(20px, 4vw, 48px) 0; }
.section-label {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cobalt); margin-bottom: 28px;
}

/* produkty */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.products .section-label { grid-column: 1 / -1; margin-bottom: 8px; }
.card {
  background: #fff; border: 1px solid var(--mist); border-radius: 18px;
  padding: 28px 28px 24px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--key, var(--cobalt));
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(12, 18, 32, .08); }
.card-shot {
  display: block; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--mist); background: var(--paper);
  aspect-ratio: 16 / 10; margin-bottom: 6px;
}
.card-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  display: block; transition: transform .35s ease;
}
.card:hover .card-shot img { transform: scale(1.03); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h2 { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; }
.chip {
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--slate); background: var(--paper);
  border: 1px solid var(--mist); border-radius: 999px; padding: 4px 11px;
  white-space: nowrap;
}
.card-lead { font-weight: 700; font-size: 16.5px; }
.card-desc { color: var(--slate); font-size: 15.5px; flex: 1; }
.card-price { font-family: var(--mono); font-size: 14.5px; font-weight: 500; }
.card-price .price-note { color: var(--slate); }
.card-link {
  font-weight: 700; font-size: 15px; text-decoration: none; color: var(--cobalt);
  margin-top: 4px; width: fit-content;
}
.card-link::after { content: ' →'; }
.card-link:hover { text-decoration: underline; }

/* o firmie */
.about-lead {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(22px, 3vw, 32px); line-height: 1.3; letter-spacing: -0.015em;
  max-width: 30ch;
}
.facts { list-style: none; display: flex; gap: clamp(28px, 6vw, 72px); margin-top: 40px; flex-wrap: wrap; }
.facts li { display: flex; flex-direction: column; gap: 2px; }
.facts strong { font-family: var(--display); font-weight: 600; font-size: 24px; }
.facts span { color: var(--slate); font-size: 14.5px; }

/* kontakt */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-row { display: block; font-size: clamp(16px, 1.8vw, 19px); font-weight: 700; text-decoration: none; margin-bottom: 10px; width: fit-content; }
a.contact-row:hover { color: var(--cobalt); }
.contact-row.muted { font-weight: 400; color: var(--slate); font-size: 14px; margin-top: 14px; }
.legal { border-left: 1px solid var(--mist); padding-left: 32px; }
.legal-title { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); margin-bottom: 12px; }
.legal p:not(.legal-title) { font-family: var(--mono); font-size: 13px; line-height: 1.8; color: var(--slate); }

/* stopka */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 8vh, 90px) clamp(20px, 4vw, 48px) 36px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 14px;
}
.muted { color: var(--slate); }
/* Dane rejestrowe: dyskretnie w stopce (decyzja 21.07 — bez "wyciagu z KRS" przy kontakcie) */
.footer-legal { flex-basis: 100%; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--slate); opacity: .72; margin-top: 6px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsywność ---------- */
@media (max-width: 820px) {
  .products { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .legal { border-left: 0; padding-left: 0; border-top: 1px solid var(--mist); padding-top: 24px; }
  .nav-contact { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-copy > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card, .hero-cta { transition: none; }
}
