:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #525252;
  --line: #d9d9d9;
  --max: 1120px;
  --gutter: 20px;
  --section: 56px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 72px; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
main[tabindex]:focus, section[tabindex]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) { body { font-size: 18px; } }

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

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

h1, h2, h3, dt { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }

h1 { font-size: clamp(2.125rem, 1.2rem + 3.2vw, 3.5rem); line-height: 1.08; letter-spacing: -0.04em; max-width: 19ch; }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.18; letter-spacing: -0.03em; }
h3, .h3-size { font-size: 1.1875rem; line-height: 1.3; }
p { text-wrap: pretty; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; }
.skip-link:focus { left: 8px; top: 8px; }

/* Typography helpers */
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.lead { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.5; color: var(--muted); max-width: 60ch; }
.body { color: var(--muted); max-width: 62ch; }
.body + .body { margin-top: 16px; }
.note { font-size: 0.9375rem; color: var(--muted); max-width: 52ch; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  background: var(--ink); color: #fff;
  font: 700 1rem/1.2 var(--font); text-decoration: none;
  border: 1px solid var(--ink); border-radius: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn:focus-visible { outline-offset: 3px; }

.text-link { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-logo { width: auto; height: 16px; }
.brand-divider { width: 1px; height: 18px; background: var(--line); }
.brand-name { font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.01em; white-space: nowrap; }
@media (min-width: 768px) { .brand-logo { height: 19px; } .brand-name { font-size: 1rem; } }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-more { position: relative; font-size: 0.9375rem; }
.nav-more summary { padding: 10px 0; min-height: 44px; cursor: pointer; }
.nav-more-links { position: absolute; top: 100%; right: 0; min-width: 248px; padding: 8px 16px; background: var(--bg); border: 1px solid var(--line); }
.nav-more-links a { white-space: nowrap; }
@media (max-width: 1099px) {
  .nav-more summary { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-more-links { position: static; min-width: 0; padding: 0 16px; border: 0; }
  .nav-more-links a { white-space: normal; }
}
.nav-links a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9375rem; text-decoration: none; padding: 8px 0; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }
.nav-cta { min-height: 44px; padding: 10px 18px; font-size: 0.9375rem; background: var(--bg); color: var(--ink); }
.nav-cta:hover { background: var(--ink); color: var(--bg); }

.menu-toggle { display: none; }

@media (max-width: 1099px) {
  .has-js .menu-toggle {
    display: inline-flex; align-items: center; justify-content: flex-end; min-height: 44px; min-width: 44px; padding: 8px 0;
    background: none; border: 0; color: var(--ink);
    font: 700 0.875rem var(--font); text-decoration: underline; text-underline-offset: 5px; cursor: pointer;
  }
  .nav { position: relative; flex-wrap: wrap; gap: 0 12px; }
  .brand { gap: 8px; }
  .brand-logo { height: 16px; }
  .brand-name { font-size: 0.9375rem; }
  .nav-links {
    width: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 0 20px;
  }
  .has-js .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 80px); overflow-y: auto; padding: 8px var(--gutter) 20px; }
  .has-js .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-cta { margin-top: 16px; min-height: 48px; }
}
@media (max-width: 359px) {
  .brand-logo { height: 13px; }
  .brand-name { font-size: 0.875rem; }
}

/* Hero */
.hero { padding: 40px 0 48px; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 24px; max-width: 48ch; line-height: 1.6; }
#formy-wspolpracy { padding-top: 0; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 64px; }
  .hero-grid { display: grid; grid-template-columns: 6fr 5fr; column-gap: 64px; align-items: end; }
  .hero .eyebrow { grid-column: 1 / -1; margin-bottom: 28px; }
  .hero h1 { margin-bottom: 0; }
  .hero .lead { font-size: 1.1875rem; margin-bottom: 28px; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section-ruled > .container { border-top: 1px solid var(--line); padding-top: var(--section); }
.section-ruled { padding-top: 0; }
.section-compact { padding-bottom: calc(var(--section) * 0.75); }
.section-head { margin-bottom: 32px; }
.section-head h2 + .body { margin-top: 16px; }
@media (min-width: 768px) { .section-head { margin-bottom: 32px; } }
#formy-wspolpracy .section-head h2 { max-width: 28ch; }

/* Products */
.products { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); }
.product { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; padding: 28px 0; border-bottom: 1px solid var(--line); }
.product-image { display: block; width: 100%; }
.product-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-name { font-size: 1.25rem; line-height: 1.35; }
.product-meta { display: block; margin-top: 8px; font-size: 0.9375rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.product-pricing { display: grid; gap: 4px; }
.price-history { max-width: 48ch; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.price-history summary { padding: 3px 0; cursor: pointer; }
.price-history summary:hover { color: var(--ink); }
.price-history p { margin-top: 4px; }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.625rem; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.product-price span { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.product-desc { color: var(--muted); font-size: 1rem; line-height: 1.65; max-width: 48ch; }
.product-desc strong { display: block; color: var(--ink); font-size: 1.0625rem; line-height: 1.4; margin-bottom: 10px; text-wrap: balance; }
.product-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; padding: 8px 0; font-size: 1rem; }
@media (min-width: 900px) {
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-image img { height: 240px; }
  .product { padding: 28px 28px 20px; }
  .product:first-child { padding-left: 0; }
  .product:last-child { padding-right: 0; }
  .product + .product { border-left: 1px solid var(--line); }
}
.product-param { display: inline-block; font-size: 1rem; font-weight: 700; margin: 0 0 24px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }

/* Value list */
.value-list { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.value-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.value-item dt { font-size: 1.375rem; margin-bottom: 8px; }
.value-item dd { color: var(--muted); max-width: 46ch; }
@media (min-width: 900px) {
  .value-list { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .value-item { padding: 28px 32px 32px 0; border-bottom: 0; }
  .value-item + .value-item { padding-left: 32px; border-left: 1px solid var(--line); }
  .value-item dt { font-size: 1.5rem; margin-bottom: 12px; }
}

/* Split layout */
.split { display: grid; grid-template-columns: 1fr; gap: 32px; }
.split-main h2 { margin-bottom: 20px; }
.split-side h3 { margin-bottom: 8px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
  .split-main h2 { margin-bottom: 24px; }
  .split-side { padding-left: 32px; border-left: 1px solid var(--line); }
  .split-main { position: sticky; top: 100px; }
}

.ruled-list { border-top: 1px solid var(--ink); margin: 16px 0 24px; }
.ruled-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }

.cta-block { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
@media (max-width: 480px) { .cta-block .btn, .hero .btn, .final .btn { width: 100%; } }

/* Steps */
.steps { border-top: 1px solid var(--ink); }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.step-number { font-weight: 700; font-size: 1.1875rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); max-width: 58ch; }
@media (min-width: 900px) {
  .step { grid-template-columns: 96px 5fr 6fr; gap: 0 32px; padding: 28px 0; }
  .step > div { display: contents; }
  .step h3 { margin: 0; }
}

/* Team */
.team { display: grid; grid-template-columns: 1fr; gap: 32px; }
.team-names { font-weight: 700; font-size: 1.1875rem; margin: 12px 0 20px; }
.team-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.team-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.team-photos figcaption { display: flex; flex-direction: column; align-items: flex-start; font-size: 0.9375rem; font-weight: 700; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.team-profile { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 900px) {
  .team { grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; }
  .team-photos { gap: 20px; }
}

/* Consultation */
.consult { display: grid; grid-template-columns: 1fr; gap: 16px; }
.consult .body { margin-bottom: 16px; }
@media (min-width: 900px) { .consult { grid-template-columns: 5fr 6fr; gap: 80px; } }

/* FAQ */
.faq { border-top: 1px solid var(--ink); }
.faq-more { margin-top: 24px; font-size: 0.9375rem; }
.faq-more a { display: inline-flex; align-items: center; min-height: 44px; }
.faq-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.faq-item dt { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.faq-item dd { color: var(--muted); max-width: 62ch; }
@media (min-width: 900px) {
  .faq-item { display: grid; grid-template-columns: 4fr 7fr; gap: 64px; padding: 26px 0; }
  .faq-item dt { margin: 0; }
}

/* Final CTA */
.final { background: var(--ink); color: #fff; }
.final h2 { max-width: 20ch; margin-bottom: 20px; }
.final .lead { color: #d4d4d4; margin-bottom: 32px; }
.final .btn { background: #fff; color: var(--ink); border-color: #fff; }
.final .btn:hover { background: var(--ink); color: #fff; }
.final .btn:focus-visible { outline-color: #fff; }
@media (min-width: 900px) {
  .final > .container { display: grid; grid-template-columns: 5fr 6fr; gap: 28px 64px; align-items: start; }
  .final h2 { grid-row: span 2; margin-bottom: 0; }
  .final .lead { font-size: 1.125rem; margin-bottom: 0; max-width: 48ch; }
  .final .btn { justify-self: start; }
}

/* Footer */
.site-footer { padding: 48px 0 32px; font-size: 0.9375rem; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-brand .note { margin-top: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-legal a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.footer-bottom { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; color: var(--muted); font-size: 0.875rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 899px) {
  .footer-links { gap: 0; }
  .footer-links a, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (min-width: 900px) {
  .site-footer { padding-top: 64px; }
  .footer-top { grid-template-columns: 2fr 1fr 1.4fr; gap: 48px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}
