/* ═══════════════════════════════════════════════════════
   QLab v3.0 — style.css
   Mobile-first · No Tailwind · Inter font
═══════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg:          #ffffff;
  --bg-soft:     #f8fafc;
  --bg-card:     #f1f5f9;
  --border:      #e2e8f0;
  --border-2:    #cbd5e1;
  --text:        #111827;
  --muted:       #6b7280;
  --faint:       #9ca3af;
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-mid:  #bfdbfe;
  --white:       #ffffff;

  --font: "Inter", system-ui, -apple-system, sans-serif;

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;

  --max:   1080px;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul { list-style: none; }

p { text-align: justify; hyphens: auto; max-width: 68ch; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; }

::selection { background: var(--accent-mid); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

/* ── Layout ─────────────────────────────────────────── */
.wrap {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

section { padding: 88px 0; }

/* Alternating bg */
.bg-soft { background: var(--bg-soft); }

/* ── Fade-in ────────────────────────────────────────── */
.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.fade.d1 { transition-delay: .08s; }
.fade.d2 { transition-delay: .16s; }
.fade.d3 { transition-delay: .24s; }
.fade.in  { opacity: 1; transform: none; }

/* ── NAV ────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
#nav.scrolled { border-color: var(--border); }

.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 68px; gap: 24px;
}

.nav-logo {
  font-size: 17px; font-weight: 700;
  letter-spacing: -.03em; color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em; color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 9px 20px; border-radius: var(--r-md);
  background: var(--accent); color: var(--white) !important;
  font-size: 13px !important; font-weight: 600 !important;
  letter-spacing: .02em !important;
  transition: background .2s, transform .2s var(--ease) !important;
}
.nav-cta:hover { background: var(--accent-dark) !important; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  color: var(--text);
}

/* Mobile overlay menu */
.mob-menu {
  display: none; flex-direction: column;
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg);
  padding: 90px 28px 40px;
  gap: 0;
}
.mob-menu.open { display: flex; }

.mob-menu a {
  font-size: 26px; font-weight: 600; letter-spacing: -.02em;
  padding: 18px 0; border-bottom: 1px solid var(--border);
  color: var(--text); transition: color .2s;
}
.mob-menu a:last-of-type { border-bottom: none; }
.mob-menu a:hover { color: var(--accent); }

.mob-close {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--muted);
}

/* ── HERO ───────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  background: var(--bg);
  position: relative; overflow: hidden;
}

/* Subtle dot grid */
#hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, #e2e8f0 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .6;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 64px; align-items: center;
  position: relative; z-index: 1;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: ""; width: 24px; height: 2px;
  background: var(--accent); flex-shrink: 0;
}

.hero-name {
  font-size: clamp(52px, 7.5vw, 100px);
  font-weight: 800; letter-spacing: -.04em;
  color: var(--text); line-height: .92;
  margin-bottom: 6px;
}
.hero-brand {
  font-size: clamp(52px, 7.5vw, 100px);
  font-weight: 800; letter-spacing: -.04em;
  color: var(--accent); line-height: .92;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 400; color: var(--muted);
  margin-bottom: 28px; line-height: 1.4;
}
.hero-title strong { color: var(--text); font-weight: 600; }

.hero-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 40px;
}
.pill {
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--bg-soft);
  transition: border-color .2s, color .2s;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-md);
  background: var(--accent); color: var(--white);
  font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-md);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--bg);
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--border-2); background: var(--bg-soft); }

/* Hero illustration area */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
}

/* ── SECTION HEADER ─────────────────────────────────── */
.sec-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}
.sec-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800; letter-spacing: -.03em;
  color: var(--text); margin-bottom: 16px;
}
.sec-sub {
  font-size: 16px; color: var(--muted);
  max-width: 54ch; line-height: 1.7;
  margin-bottom: 52px;
  text-align: left;
}

/* ── O FIRMIE ───────────────────────────────────────── */
.about-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.about-block {
  padding: 36px 32px; background: var(--bg);
  transition: background .2s;
}
.about-block:hover { background: var(--bg-soft); }
.about-block h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px;
}
.about-block p {
  font-size: 15px; color: var(--text); line-height: 1.75;
  text-align: justify; hyphens: auto;
}
.about-block .ab-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 16px;
  flex-shrink: 0;
}

/* ── KOMPETENCJE ────────────────────────────────────── */
.badges-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.badge:hover {
  border-color: var(--accent-mid);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(37,99,235,.08);
}
.badge svg { width: 14px; height: 14px; flex-shrink: 0; }

.badge-special {
  border-color: var(--accent-mid);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── USŁUGI ─────────────────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.svc-card {
  padding: 30px 26px; background: var(--bg);
  cursor: pointer; position: relative;
  transition: background .2s;
}
.svc-card:hover { background: var(--accent-soft); }
.svc-card:hover .svc-icon { background: var(--accent); color: var(--white); }
.svc-card:hover .svc-arrow { opacity: 1; transform: translate(3px,-3px); }

.svc-num {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--faint); font-family: monospace; margin-bottom: 16px;
}
.svc-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--bg-card); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px;
  transition: background .2s, color .2s;
}
.svc-icon svg { width: 18px; height: 18px; }

.svc-card h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; line-height: 1.2;
}
.svc-card p {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  text-align: left; hyphens: none; max-width: none;
}
.svc-arrow {
  position: absolute; top: 22px; right: 22px;
  color: var(--accent); opacity: 0;
  transition: opacity .2s, transform .2s var(--ease);
}
.svc-arrow svg { width: 16px; height: 16px; }

/* ── KONTAKT ─────────────────────────────────────────── */
.contact-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.contact-card {
  border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.contact-card-head {
  padding: 22px 28px; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.contact-links { display: flex; flex-direction: column; }
.c-row {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  transition: background .18s, color .18s;
}
.c-row:last-child { border-bottom: none; }
.c-row:hover { background: var(--bg-soft); }
a.c-row:hover { color: var(--accent); }
a.c-row:hover .c-icon { color: var(--accent); }
.c-icon { color: var(--faint); flex-shrink: 0; transition: color .18s; }
.c-icon svg { width: 18px; height: 18px; }
.c-label {
  font-size: 11px; color: var(--faint);
  letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 1px;
}
.c-val { font-size: 14px; font-weight: 500; color: var(--text); display: block; }
a .c-val { transition: color .18s; }
a:hover .c-val { color: var(--accent); }

.b2b-box {
  padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 20px; height: 100%;
}
.b2b-box h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.b2b-box p {
  font-size: 15px; color: var(--text); line-height: 1.75;
  text-align: justify; hyphens: auto;
}
.b2b-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  font-size: 13px; font-weight: 600; color: var(--accent);
  margin-top: 16px; align-self: flex-start;
}
.b2b-badge svg { width: 15px; height: 15px; }

/* ── MODAL ──────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 540px; width: 100%;
  padding: 36px; max-height: 90svh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.97);
  transition: transform .3s var(--ease);
}
.modal-bg.open .modal-box { transform: none; }

.modal-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; margin-bottom: 20px;
}
.modal-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; flex-shrink: 0;
}
.modal-icon svg { width: 22px; height: 22px; }

.modal-close {
  width: 36px; height: 36px; border: 1px solid var(--border);
  border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--muted); transition: color .2s, border-color .2s;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); border-color: var(--border-2); }
.modal-close svg { width: 16px; height: 16px; }

.modal-num {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--faint); font-family: monospace; margin-bottom: 6px;
}
.modal-title {
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text); line-height: 1.15; margin-bottom: 16px;
}
.modal-desc {
  font-size: 15px; color: var(--muted); line-height: 1.75;
  margin-bottom: 24px; text-align: justify; hyphens: auto; max-width: 100%;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tag {
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--muted);
}

/* ── FOOTER ─────────────────────────────────────────── */
footer {
  padding: 44px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.foot-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.foot-logo { font-size: 15px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.foot-logo span { color: var(--accent); }
.foot-copy { font-size: 13px; color: var(--faint); }

/* ── BACK TO TOP ────────────────────────────────────── */
#btt {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center; color: var(--muted);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .2s, color .2s, border-color .2s;
}
#btt svg { width: 18px; height: 18px; }
#btt.show { opacity: 1; pointer-events: auto; }
#btt:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-2px); }

/* ═══════════════════════════════
   MOBILE — 900px breakpoint
═══════════════════════════════ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-body { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .contact-body { grid-template-columns: 1fr; }
  .svc-arrow { opacity: 1; }
  .hero-visual { order: -1; }
}

/* ═══════════════════════════════
   MOBILE — 640px breakpoint
═══════════════════════════════ */
@media (max-width: 640px) {
  section { padding: 64px 0; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-name,
  .hero-brand { font-size: clamp(44px, 13vw, 72px); }

  .services-grid { grid-template-columns: 1fr; }

  .about-block,
  .svc-card { padding: 24px 20px; }

  .c-row { padding: 16px 20px; }
  .contact-card-head { padding: 16px 20px; }
  .b2b-box { padding: 22px 20px; }

  .modal-box { padding: 24px 20px; }

  .foot-inner { flex-direction: column; text-align: center; gap: 8px; }

  #btt { bottom: 16px; right: 16px; }
}
