/* ===== DESIGN TOKENS — GrafIT Solutions, kolorystyka zgodna z GrafIT Academy ===== */
:root {
  /* Light enterprise palette — brand orange scale + slate, jak w Academy */
  --bg:         #ffffff;
  --surface:    #f8fafc;
  --bg-card:    #ffffff;
  --border:     #e2e8f0;
  --border-strong: #cbd5e1;
  --text:       #0f172a;
  --text-mid:   #475569;
  --muted:      #64748b;
  --white:      #ffffff;

  /* Dark contrast (stopka, sekcje "eksperckości"/CTA — świadomy, ograniczony akcent, nie cały motyw) */
  --dark:       #0f172a;
  --dark-mid:   #1e293b;

  /* Accent — brand orange scale Academy */
  --accent:      #ea580c;
  --accent-hover:#c2410c;
  --accent-soft: #fb923c;
  --accent-tint: #fff7ed;

  /* UI */
  --radius:     10px;
  --radius-lg:  16px;
  --max:        1180px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  --shadow-elevated: 0 4px 12px -2px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.04);

  /* Typography — Public Sans throughout (display + body, self-hosted), JetBrains Mono dla danych/tagów */
  --display: 'Public Sans', -apple-system, sans-serif;
  --body:    'Public Sans', -apple-system, sans-serif;
  --mono:    'JetBrains Mono', 'IBM Plex Mono', monospace;
}

/* ===== @FONT-FACE — Public Sans, self-hosted, /fonts/ (zastępuje Google Fonts CDN dla Inter) ===== */
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans-400-latin-ext.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-500-latin-ext.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-500-latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-500italic-latin-ext.woff2') format('woff2');
  font-weight: 500; font-style: italic; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-500italic-latin.woff2') format('woff2');
  font-weight: 500; font-style: italic; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-600-latin-ext.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-600-latin.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-700-latin-ext.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-700-latin.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-800-latin-ext.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
  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: 'Public Sans';
  src: url('/fonts/public-sans-800-latin.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
  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;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text-mid);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Zabezpieczenie przed poziomym "grid blowout": długie, niełamliwe ciągi (adresy
   e-mail, URL-e) potrafią wymusić szerokość kolumny grid/flex większą niż
   dostępna przestrzeń, wypychając całą sekcję poza ekran na wąskich telefonach
   (znalezione i potwierdzone na przykładzie kontakt@grafitsolutions.pl). */
h1, h2, h3, h4, p, a, span, li, dd, dt, blockquote {
  overflow-wrap: break-word;
  word-break: break-word;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.015em; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: .95rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin-bottom: .9em;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
  border-radius: 2px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff;
  padding: .6em 1.2em; font-size: .85rem; z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ===== FOCUS ===== */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== HEADER ===== */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  text-decoration: none; color: var(--text);
}
.logo img { height: 34px; width: 34px; border-radius: 6px; }
.logo span.sub {
  display: block; font-family: var(--mono); font-weight: 400;
  font-size: .58rem; letter-spacing: .14em; color: var(--muted);
  text-transform: uppercase; margin-top: 3px;
}

nav.primary { display: flex; align-items: center; gap: 8px; }
nav.primary > ul {
  display: flex; list-style: none; margin: 0; padding: 0; gap: 2px;
}
nav.primary > ul > li { position: relative; }
nav.primary a {
  display: block; padding: 9px 13px; text-decoration: none;
  font-size: .88rem; font-weight: 500; border-radius: var(--radius);
  color: var(--text-mid);
  transition: background .15s, color .15s;
}
nav.primary > ul > li > a:hover,
nav.primary > ul > li > a:focus-visible {
  background: var(--surface); color: var(--text);
}

.submenu {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 210px;
  box-shadow: var(--shadow-elevated);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
nav.primary > ul > li:hover .submenu,
nav.primary > ul > li:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu a { font-size: .87rem; padding: 9px 12px; border-radius: 6px; color: var(--text-mid); }
.submenu a:hover { background: var(--accent-tint); color: var(--accent-hover); }

/* CTA buttons — smooth hover + subtelny "shine" micro-interaction (Stripe-style:
   wąski, jasny pas przesuwający się po tle przy hoverze, nie błysk/glow). */
.cta-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--display); font-weight: 600; font-size: .87rem;
  padding: 10px 20px; border-radius: 999px; text-decoration: none;
  transition: background .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1),
    transform .2s cubic-bezier(.16,1,.3,1), border-color .25s cubic-bezier(.16,1,.3,1);
  white-space: nowrap;
}
.cta-btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.22) 45%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .6s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.cta-btn:hover::after { transform: translateX(120%); }
/* Tło przycisków celowo używa --accent-hover (nie --accent) — biały tekst na
   samym --accent daje kontrast 3.56:1, poniżej progu WCAG AA (4.5:1) dla tekstu
   normalnej wielkości; --accent-hover daje 5.18:1. */
.cta-btn.fill,
.cta-btn.amber {
  background: var(--accent-hover); color: #fff;
  border: 2px solid var(--accent-hover);
  box-shadow: 0 2px 10px rgba(234,88,12,.2);
}
.cta-btn.fill:hover,
.cta-btn.amber:hover {
  background: #9a3412; border-color: #9a3412;
  box-shadow: 0 6px 20px rgba(234,88,12,.32);
  transform: translateY(-2px);
}
.cta-btn.gold {
  background: var(--accent-hover); border: 2px solid var(--accent-hover); color: #fff;
  box-shadow: 0 2px 10px rgba(234,88,12,.2);
}
.cta-btn.gold:hover {
  background: #9a3412; border-color: #9a3412;
  box-shadow: 0 6px 20px rgba(234,88,12,.32);
  transform: translateY(-2px);
}
.cta-btn.outline {
  background: transparent; border: 2px solid var(--border-strong); color: var(--text-mid);
}
.cta-btn.outline:hover { background: var(--surface); border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 8px 10px; cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { display: block; width: 22px; height: 22px; }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 85% -10%, var(--accent-tint), transparent 60%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, black, transparent 85%);
}
@keyframes heroDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2.5%, 2%) scale(1.05); }
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
  padding-top: 84px; padding-bottom: 76px; position: relative; z-index: 1;
}
.hero h1 { color: var(--text); margin: .2em 0 .6em; }
.hero-lead {
  font-size: 1.08rem; color: var(--text-mid); max-width: 48ch; margin-bottom: 1.8em; line-height: 1.7;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2em; }
.hero-trust {
  font-size: .82rem; color: var(--muted);
  display: flex; align-items: center; gap: .6em;
}
.hero-trust strong { color: var(--accent-hover); }
.hero-art { width: 100%; height: auto; }

/* Wejście hero na load (nie scroll-reveal — hero jest zawsze nad "fold") — czysty
   CSS, stagger przez :nth-child, bez zależności od JS. */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > div:first-child > * {
  opacity: 0;
  animation: heroFadeUp .8s cubic-bezier(.16,1,.3,1) forwards;
}
.hero-inner > div:first-child > *:nth-child(1) { animation-delay: .05s; }
.hero-inner > div:first-child > *:nth-child(2) { animation-delay: .13s; }
.hero-inner > div:first-child > *:nth-child(3) { animation-delay: .21s; }
.hero-inner > div:first-child > *:nth-child(4) { animation-delay: .29s; }
.hero-inner > div:first-child > *:nth-child(5) { animation-delay: .37s; }
.hero-inner > div:first-child > *:nth-child(6) { animation-delay: .45s; }
.hero-art {
  opacity: 0;
  animation: heroFadeUp 1s cubic-bezier(.16,1,.3,1) .3s forwards;
  cursor: default;
}
.hero-art:focus { outline: none; }
.hero-art:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }

/* Odznaka ochrony spoczywa lekko obok ekranu i "najeżdża"/nachodzi na jego róg po
   najechaniu kursorem na całą ilustrację (albo po focusie z klawiatury). */
.hero-it-badge {
  transform-box: view-box; transform-origin: 408px 272px;
  transform: translate(24px, 22px) scale(.88) rotate(-10deg);
  transition: transform .55s cubic-bezier(.16,1,.3,1);
}
.hero-art:hover .hero-it-badge,
.hero-art:focus-visible .hero-it-badge {
  transform: translate(0, 0) scale(1) rotate(0deg);
}

/* Migające "kropki na żywo" — sygnalizują ciągły nadzór nad infrastrukturą IT */
.hero-it-dot { transform-box: view-box; transform-origin: 360px 96px; animation: heroDotPulse 2.4s ease-in-out infinite; }
.hero-it-dot--2 { animation-delay: .5s; }
@keyframes heroDotPulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50%      { opacity: 1; transform: scale(1); }
}

/* draw-line — klasa jest na samym <path>, nie na przodku (stąd selektory złożone, nie potomne) */
path.draw-line { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 1.4s ease-out; }
path.draw-line.in-view { stroke-dashoffset: 0; }

/* ===== SECTIONS ===== */
section { padding: 84px 0; }
section.alt { background: var(--surface); }
section.dark { background: var(--dark); color: #fff; }
section.dark h2, section.dark h3 { color: #fff; }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1rem; margin-top: .5em; }

/* ===== GRIDS ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* ===== CARDS =====
   Delikatny border + subtelny cień + hover animation + lekki gradient, jak w briefie —
   gradient stonowany (róg w kolorze akcentu przy bardzo niskiej opacity), nie ozdobnik. */
.card {
  position: relative;
  background:
    linear-gradient(155deg, rgba(234,88,12,.035), transparent 45%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1), border-color .35s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}
.card:hover {
  box-shadow: var(--shadow-elevated);
  border-color: #fed7aa;
  transform: translateY(-5px) scale(1.008);
}
section.alt .card { background: linear-gradient(155deg, rgba(234,88,12,.035), transparent 45%), var(--bg-card); }
section.dark .card {
  background: linear-gradient(155deg, rgba(255,157,66,.08), transparent 45%), rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}
section.dark .card:hover { border-color: rgba(255,157,66,.4); }
section.dark .card h3 { color: #fff; }
section.dark .card p { color: rgba(255,255,255,.7); }

.card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-hover);
  flex-shrink: 0; margin-bottom: 4px;
}
.card .icon svg { width: 22px; height: 22px; }
section.dark .card .icon { background: rgba(255,255,255,.1); color: var(--accent-soft); }

.card h3 { margin-bottom: 2px; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: .4em; }
.card ul { margin: 0; padding-left: 1em; font-size: .9rem; color: var(--muted); }
.card ul li { margin-bottom: .4em; }
.card .tag {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-hover); font-weight: 500;
}
.card-link {
  margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600; font-size: .85rem; color: var(--accent-hover); text-decoration: none;
}
.card-link:hover { color: #9a3412; }
.card-link svg { width: 14px; height: 14px; }

/* ===== DIFF CARDS ===== */
.diff-card {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  background: none; border-radius: 0; padding-top: 4px; padding-bottom: 4px;
  box-shadow: none; border-top: none; border-right: none; border-bottom: none;
  gap: 6px;
}
.diff-card:hover { transform: none; box-shadow: none; border-color: var(--accent-hover); }
.diff-card h3 { margin-bottom: 5px; }
.diff-card p { color: var(--muted); font-size: .95rem; }

/* ===== TECH BADGES ===== */
.tech-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tech-badge {
  font-family: var(--mono); font-size: .78rem;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 16px; background: var(--bg-card); color: var(--muted);
  transition: border-color .15s, color .15s;
}
.tech-badge:hover { border-color: var(--accent); color: var(--accent-hover); }

/* ===== ABOUT ===== */
.about-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--border); aspect-ratio: 1/1; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-top: .4em; color: var(--text); }
.about-role { font-size: .85rem; color: var(--accent-hover); margin-bottom: .8em; font-weight: 500; }
.social-links { display: flex; gap: 10px; margin-top: .6em; }
.social-links a {
  width: 38px; height: 38px; border: 1.5px solid var(--border-strong); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  color: var(--muted); transition: background .15s, color .15s, border-color .15s;
}
.social-links a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.social-links svg { width: 18px; height: 18px; }

/* ===== STATS ===== */
.stat { text-align: left; }
.stat .num {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem); color: var(--accent); letter-spacing: -.02em;
}
.stat .label { color: var(--muted); font-size: .9rem; margin-top: .3em; }

section.dark .stat .num { color: var(--accent-soft); }
section.dark .stat .label { color: rgba(255,255,255,.65); }

/* ===== TOOLS (kept for compat — nieużywane po usunięciu sekcji Narzędzia) ===== */
.tool-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-card); }
button.btn {
  font-family: var(--display); font-weight: 600; font-size: .9rem;
  border: 2px solid var(--border-strong); border-radius: 999px; padding: 9px 20px;
  background: transparent; cursor: pointer; color: var(--text-mid);
  transition: background .2s cubic-bezier(.16,1,.3,1), border-color .2s cubic-bezier(.16,1,.3,1),
    color .2s cubic-bezier(.16,1,.3,1), transform .2s cubic-bezier(.16,1,.3,1);
}
button.btn:hover { transform: translateY(-1px); }
button.btn:hover { background: var(--surface); border-color: var(--accent); color: var(--text); }
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ===== FAQ ===== */
details.faq {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); padding: 0 22px; margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
details.faq:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }
details.faq summary {
  font-family: var(--display); font-weight: 600; cursor: pointer;
  padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  color: var(--text);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; font-weight: 400; font-size: 1.3rem; color: var(--accent-hover); flex-shrink: 0; line-height: 1;
}
details.faq[open] summary::after { content: "−"; }
details.faq p { padding-bottom: 18px; color: var(--muted); margin: 0; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.contact-card {
  background: var(--dark); color: #fff;
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-elevated);
}
.contact-card .eyebrow { color: var(--accent-soft); }
.contact-card .eyebrow::before { background: var(--accent-soft); }
.contact-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.contact-row:first-of-type { border-top: none; }
.contact-row .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent-soft);
}
.contact-row .icon svg { width: 18px; height: 18px; }
.contact-row a { text-decoration: none; font-weight: 500; color: #fff; }
.contact-row a:hover { color: var(--accent-soft); }
.contact-row .label {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.5); display: block; margin-bottom: 2px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark); color: #fff;
  padding: 60px 0 28px;
  position: relative;
}
footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 44px; }
footer h4 {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-soft); margin-bottom: 16px; font-weight: 500;
}
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
footer a { text-decoration: none; color: rgba(255,255,255,.65); font-size: .9rem; transition: color .15s; }
footer a:hover { color: var(--accent-soft); }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  color: #fff; text-decoration: none; margin-bottom: 14px;
}
.footer-logo img { height: 30px; width: 30px; border-radius: 6px; }
.footer-desc { color: rgba(255,255,255,.55); font-size: .9rem; max-width: 32ch; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .82rem; color: rgba(255,255,255,.45);
}
.footer-cookie-link {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: var(--body); font-size: .82rem; color: rgba(255,255,255,.45);
  text-decoration: underline; text-underline-offset: 2px; transition: color .15s;
}
.footer-cookie-link:hover { color: var(--accent-soft); }

/* ===== COOKIE BANNER (wstrzykiwany przez main.js na każdej stronie) ===== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: -160px; z-index: 60;
  max-width: 860px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated); padding: 18px 22px;
  transition: bottom .45s cubic-bezier(.16,1,.3,1), opacity .45s ease;
  opacity: 0;
}
.cookie-banner.is-visible { bottom: 16px; opacity: 1; }
.cookie-banner-inner { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cookie-banner-text { flex: 1 1 360px; font-size: .86rem; line-height: 1.55; color: var(--text-mid); margin: 0; }
.cookie-banner-text a { color: var(--accent-hover); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  font-family: var(--body); font-size: .84rem; font-weight: 600; padding: 10px 22px; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.cookie-btn-accent { background: var(--accent); color: #fff; }
.cookie-btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cookie-btn-ghost { background: transparent; color: var(--muted); border-color: var(--border-strong); }
.cookie-btn-ghost:hover { color: var(--text); border-color: var(--text-mid); }
.cookie-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .cookie-banner { left: 10px; right: 10px; padding: 16px; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* ===== SUBPAGE HERO ===== */
.page-hero {
  background:
    radial-gradient(900px 400px at 88% -20%, var(--accent-tint), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 64px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, black, transparent 85%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .container > * {
  opacity: 0;
  animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) forwards;
}
.page-hero .container > *:nth-child(1) { animation-delay: .04s; }
.page-hero .container > *:nth-child(2) { animation-delay: .1s; }
.page-hero .container > *:nth-child(3) { animation-delay: .16s; }
.page-hero .container > *:nth-child(4) { animation-delay: .22s; }
.page-hero h1 { margin: .2em 0 .5em; color: var(--text); }
.page-hero .eyebrow { color: var(--accent-hover); }
.page-hero .eyebrow::before { background: var(--accent); }
.page-hero .kicker {
  font-family: var(--body); font-weight: 500; font-style: italic;
  color: var(--text-mid); font-size: 1.05rem; margin-bottom: .6em;
}
.page-hero .lead { font-size: 1.05rem; color: var(--text-mid); max-width: 68ch; }
.page-hero .lead + .lead { margin-top: -.4em; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: .78rem; color: var(--muted); margin-bottom: 1em;
}
.breadcrumb a { color: var(--text-mid); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-hover); text-decoration: underline; }
.breadcrumb span { margin: 0 .4em; }

/* ===== NUMBERED LIST ===== */
.num-list { display: flex; flex-direction: column; gap: 28px; }
.num-item { display: flex; gap: 22px; align-items: flex-start; }
.num-item .num {
  font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  color: var(--accent-hover); flex-shrink: 0; min-width: 1.4em; line-height: 1.3;
  opacity: .8;
}
.num-item h3 { margin-bottom: .3em; }
.num-item p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ===== CALLOUT ===== */
.callout {
  background: var(--accent-tint); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 24px 28px;
}
.callout p { color: var(--text-mid); margin: 0 0 .6em; font-size: .95rem; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }

/* ===== CHECK LIST ===== */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .97rem; color: var(--text-mid); }
.check-list .check {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-hover);
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.check-list .check svg { width: 13px; height: 13px; }

/* ===== QUOTE ===== */
blockquote.quote {
  font-family: var(--display); font-size: 1.2rem; font-weight: 700; line-height: 1.45;
  border-left: 4px solid var(--accent); padding-left: 24px; margin: 0; color: var(--text);
}
blockquote.quote footer { font-size: .8rem; color: var(--muted); margin-top: 12px; font-style: normal; font-weight: 400; background: none; border: none; padding: 0; }

/* ===== CONTACT FORM ===== */
form.contact-form { display: flex; flex-direction: column; gap: 18px; }
form.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
form.contact-form label {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 7px; font-weight: 500;
}
form.contact-form input, form.contact-form textarea, form.contact-form select {
  width: 100%; font-family: var(--body); font-size: .95rem; padding: 12px 15px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
form.contact-form input::placeholder, form.contact-form textarea::placeholder { color: var(--muted); }
form.contact-form input:focus, form.contact-form textarea:focus, form.contact-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
form.contact-form textarea { min-height: 140px; resize: vertical; }
form.contact-form .consent { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--muted); }
form.contact-form .consent input { width: auto; margin-top: 3px; accent-color: var(--accent); }
form.contact-form .consent a { color: var(--accent-hover); text-decoration: underline; }

/* --- Wymagane pole, błędy walidacji, honeypot, status i stan ładowania --- */
form.contact-form .req { color: var(--accent-hover); }
form.contact-form input[aria-invalid="true"],
form.contact-form textarea[aria-invalid="true"],
form.contact-form select[aria-invalid="true"] {
  border-color: #dc2626;
}
form.contact-form input[aria-invalid="true"]:focus,
form.contact-form textarea[aria-invalid="true"]:focus,
form.contact-form select[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}
.field-error {
  font-size: .8rem; color: #dc2626; margin: 6px 0 0; min-height: 1.1em;
}

/* Honeypot — offscreen, nie display:none (część botów pomija ukryte przez display:none) */
.hp-field {
  position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.form-status {
  font-size: .92rem; padding: 13px 16px; border-radius: var(--radius); margin-bottom: 20px;
  border: 1px solid transparent;
}
.form-status.is-success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.form-status.is-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

#cfSubmit { position: relative; }
#cfSubmit.is-loading { opacity: .75; cursor: progress; pointer-events: none; }
#cfSubmit.is-loading .btn-label::after {
  content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 9px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  vertical-align: -2px; animation: cfSpin .7s linear infinite;
}
@keyframes cfSpin { to { transform: rotate(360deg); } }

/* ===== SECTION MORE LINK ===== */
.section-head .more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: .6em;
  font-weight: 600; font-size: .9rem; color: var(--accent-hover); text-decoration: none;
}
.section-head .more:hover { color: #9a3412; }
.section-head .more svg { width: 14px; height: 14px; }

/* ===== PENCIL HIGHLIGHT (kept for compat) ===== */
.pencil { position: relative; white-space: nowrap; color: var(--accent-hover); }
.pencil::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: .05em;
  height: .38em; background: rgba(234,88,12,.18); z-index: -1;
  transform: rotate(-1deg); border-radius: 2px 6px 2px 5px;
}

/* ===== SCROLL REVEAL =====
   Ukryty stan istnieje TYLKO pod .js (dodawane przez main.js, nie inline-script —
   CSP tej strony ma script-src 'self' bez 'unsafe-inline'). Bez JS albo zanim się
   wykona, .reveal jest w pełni widoczny — progressive enhancement, nie wymóg. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.js .reveal.in-view { opacity: 1; transform: translateY(0); }

/* Stagger w siatkach kart/statystyk — kolejne elementy pojawiają się z niewielkim
   przesunięciem w czasie zamiast wszystkie naraz. */
.grid-2 > .reveal:nth-child(1), .grid-3 > .reveal:nth-child(1), .grid-4 > .reveal:nth-child(1) { transition-delay: 0ms; }
.grid-2 > .reveal:nth-child(2), .grid-3 > .reveal:nth-child(2), .grid-4 > .reveal:nth-child(2) { transition-delay: 90ms; }
.grid-2 > .reveal:nth-child(3), .grid-3 > .reveal:nth-child(3), .grid-4 > .reveal:nth-child(3) { transition-delay: 180ms; }
.grid-3 > .reveal:nth-child(4), .grid-4 > .reveal:nth-child(4) { transition-delay: 270ms; }
.grid-4 > .reveal:nth-child(5) { transition-delay: 340ms; }

/* ===== GRAFIT DIABETES PREVIEW =====
   Pokaz jednego z własnych produktów — wykres trendu glukozy jako kod SVG (technika
   stroke-dashoffset identyczna jak podpis w hero, patrz .draw-line), nie obraz. */
.product-preview {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.product-preview .copy .check-list { margin-top: 22px; }
.product-card {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: "";
  position: absolute; inset: -20%;
  background: radial-gradient(260px 260px at 85% 15%, rgba(234,88,12,.16), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  animation: heroDrift 20s ease-in-out infinite alternate;
}
.product-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; position: relative; z-index: 1;
}
.product-card-head .dot-row { display: flex; gap: 6px; }
.product-card-head .dot-row span {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.18);
}
.product-card-head .live {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-soft); display: flex; align-items: center; gap: 6px;
}
.product-card-head .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
.product-chart { position: relative; z-index: 1; margin-bottom: 20px; }
.product-chart svg { width: 100%; height: auto; display: block; }
.product-chart .chart-dot {
  animation: dotPulse 2.4s ease-in-out infinite;
}
.product-chart .chart-dot:nth-child(2) { animation-delay: .5s; }
.product-chart .chart-dot:nth-child(3) { animation-delay: 1s; }
@keyframes dotPulse {
  0%, 100% { r: 3.5; opacity: .9; }
  50% { r: 5; opacity: 1; }
}
.product-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  position: relative; z-index: 1;
}
.product-stats .p-stat {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.product-stats .p-stat .num {
  font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--accent-soft);
  display: block; font-variant-numeric: tabular-nums;
}
.product-stats .p-stat .label {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255,255,255,.55); display: block; margin-top: 4px;
}

/* ===== METRIC TILE (jasny wariant p-stat — do sekcji na białym/surface tle) ===== */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  transition: border-color .25s cubic-bezier(.16,1,.3,1), box-shadow .25s cubic-bezier(.16,1,.3,1), transform .25s cubic-bezier(.16,1,.3,1);
}
.metric-tile:hover { border-color: #fed7aa; box-shadow: var(--shadow-card); transform: translateY(-2px); }
.metric-tile .num {
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--accent);
  display: block; font-variant-numeric: tabular-nums;
}
.metric-tile .label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); display: block; margin-top: 4px;
}

/* ===== FLOW DIAGRAM (OCR / Synchronizacja danych) ===== */
.flow-diagram {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.flow-step {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; text-align: center; min-width: 150px;
  box-shadow: var(--shadow-card);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.flow-step:hover { border-color: #fed7aa; box-shadow: var(--shadow-elevated); transform: translateY(-3px); }
.flow-step .flow-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint);
  color: var(--accent-hover); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.flow-step .flow-icon svg { width: 20px; height: 20px; }
.flow-step .flow-title { font-weight: 600; font-size: .92rem; color: var(--text); }
.flow-step .flow-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.flow-arrow { color: var(--border-strong); flex-shrink: 0; }
.flow-arrow svg { width: 22px; height: 22px; display: block; }
@media (max-width: 720px) {
  .flow-diagram { flex-direction: column; }
  .flow-arrow svg { transform: rotate(90deg); }
}

/* ===== AGP BAND CHART ===== */
.agp-chart-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card); }
.agp-chart-wrap svg { width: 100%; height: auto; display: block; }
.agp-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: .8rem; color: var(--muted); }
.agp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.agp-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ===== SEGMENTED RANGE TOGGLE (AGP 7/14/30 dni) ===== */
.range-toggle-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.range-toggle { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.range-toggle button {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .03em; text-transform: uppercase;
  border: none; background: transparent; color: var(--muted); padding: 7px 18px; border-radius: 999px;
  cursor: pointer; transition: background .25s cubic-bezier(.16,1,.3,1), color .25s cubic-bezier(.16,1,.3,1);
}
.range-toggle button:hover { color: var(--text); }
.range-toggle button.is-active { background: var(--accent); color: #fff; }
.range-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== INTERAKTYWNY WYKRES (Glucose Analytics + AGP hit-testing) ===== */
.glucose-chart-wrap { position: relative; }
.chart-hint { text-align: center; color: var(--muted); font-size: .78rem; margin: 14px 0 0; }
.chart-hit-area { cursor: crosshair; pointer-events: all; }
.chart-hover-dot, .chart-guide-line { pointer-events: none; }
.chart-guide-line { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 4; transition: opacity .15s ease; }
.chart-hover-dot { transition: opacity .15s ease; }
.chart-tooltip {
  position: absolute; top: 0; left: 0; transform: translate(-50%, -122%);
  background: var(--dark); color: #fff; padding: 8px 12px; border-radius: 8px;
  font-family: var(--mono); font-size: .74rem; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s ease; box-shadow: var(--shadow-elevated); z-index: 5;
}
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip .tt-time { color: rgba(255,255,255,.5); margin-right: 7px; }
.chart-tooltip .tt-status { display: block; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; margin-top: 3px; }
.chart-tooltip .tt-status.ok { color: #86efac; }
.chart-tooltip .tt-status.low { color: #fca5a5; }
.chart-tooltip .tt-status.high { color: #fdba74; }

/* ===== HERO — puls na wykresie (SMIL animateMotion, dodawany przez JS z poszanowaniem reduced-motion) ===== */
.chart-pulse-dot { filter: drop-shadow(0 0 4px rgba(251,146,60,.85)); transition: opacity .4s ease; }

@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .range-toggle button { padding: 6px 13px; font-size: .68rem; }
}

/* ==========================================================================
   GRAFIT DIABETES — demo OCR/makra, odpowiedź posiłkowa, Training Intelligence
   (dalszy rozwój tej samej sesji; utrzymane w OBECNYM, żywym języku wizualnym
   strony — .card/.accent/.chart-*, NIE w zarzuconym systemie .gr-*)
   ========================================================================== */

/* --- OCR + kalkulator makr --- */
.ocr-demo { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; margin-top: 32px; }
.ocr-photo-frame {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
}
.ocr-photo-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .35s ease;
}
.ocr-photo-img.is-loaded { opacity: 1; }
.ocr-photo-frame.has-photo .ocr-photo-icon { opacity: 0; }
.ocr-photo-icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; transition: opacity .25s ease; }
.ocr-photo-frame svg { width: 56%; height: 56%; color: var(--border-strong); transition: color .3s ease; }
.ocr-photo-frame.is-scanning svg { color: var(--accent-soft); }
.ocr-scan-line {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px 1px rgba(234,88,12,.6);
  opacity: 0; pointer-events: none;
}
.ocr-photo-frame.is-scanning .ocr-scan-line { opacity: 1; animation: ocrScanSweep 1.1s ease-in-out; }
@keyframes ocrScanSweep { 0% { top: 0; } 100% { top: 100%; } }
.ocr-scan-btn { margin-top: 14px; width: 100%; justify-content: center; }

.ocr-demo-result .dish-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 0 0 4px; color: var(--text); }
.ocr-demo-result .dish-placeholder { color: var(--muted); font-style: italic; }
.macro-input-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 14px; }
.macro-input-row label {
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.macro-input-row input {
  width: 84px; font-family: var(--display); font-size: 1.05rem; font-weight: 600; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px;
  background: var(--bg-card); transition: border-color .2s ease;
}
.macro-input-row input:focus { outline: none; border-color: var(--accent); }
.ocr-calories-line { font-size: 1.05rem; color: var(--text); margin: 0 0 14px; }
.ocr-calories-line strong { font-family: var(--display); font-weight: 800; color: var(--accent-hover); font-size: 1.3rem; }
.formula-note { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.ocr-uncertainty {
  display: flex; gap: 9px; align-items: flex-start; font-size: .86rem; color: var(--muted);
  background: var(--surface); border-radius: var(--radius); padding: 12px 14px; margin: 0;
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease;
}
.ocr-uncertainty.is-visible { opacity: 1; transform: translateY(0); }
.ocr-uncertainty svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--accent-hover); }

@media (max-width: 720px) {
  .ocr-demo { grid-template-columns: 1fr; }
  .ocr-photo-frame { max-width: 220px; margin: 0 auto; }
}

/* --- Odpowiedź glikemiczna na posiłek (Glucose Analytics) --- */
.meal-response-wrap { margin-top: 28px; }
.meal-response-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.meal-response-tabs button {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .02em;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--muted);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: all .2s ease;
}
.meal-response-tabs button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.meal-response-callouts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.mr-callout {
  flex: 1 1 160px; background: var(--surface); border-radius: var(--radius); padding: 14px 16px;
  opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease;
}
.mr-callout.is-visible { opacity: 1; transform: translateY(0); }
.mr-callout .mr-num { display: block; font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--accent-hover); }
.mr-callout .mr-label { font-size: .78rem; color: var(--muted); }

/* --- Training Intelligence: lista treningów + oś ryzyka opóźnionej hipoglikemii --- */
.workout-list { display: grid; gap: 10px; margin-top: 18px; }
.workout-row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; opacity: 0; transform: translateX(-10px); transition: opacity .45s ease, transform .45s ease;
}
.workout-row.is-visible { opacity: 1; transform: translateX(0); }
.workout-row .workout-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-tint); color: var(--accent-hover); display: flex; align-items: center; justify-content: center; }
.workout-row .workout-icon svg { width: 17px; height: 17px; }
.workout-row .workout-name { font-weight: 600; color: var(--text); font-size: .92rem; }
.workout-row .workout-meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.workout-row .workout-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: .76rem; color: var(--text-mid); min-width: 0; }
.workout-row .workout-stats span { white-space: nowrap; }

.risk-timeline-wrap { margin-top: 32px; }
.risk-timeline { position: relative; height: 64px; margin: 30px 0 10px; }
.risk-timeline-track { position: absolute; left: 0; right: 0; top: 28px; height: 6px; background: var(--surface); border-radius: 3px; }
.risk-timeline-window {
  position: absolute; top: 28px; height: 6px; border-radius: 3px;
  background: var(--accent-tint); box-shadow: inset 0 0 0 1px rgba(234,88,12,.25);
}
.risk-timeline-window::after {
  content: "Okno 3–12h"; position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .66rem; color: var(--accent-hover); white-space: nowrap;
}
.risk-timeline-hours { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .68rem; color: var(--muted); margin-top: 6px; }
.risk-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.risk-badge {
  flex: 1 1 150px; border-radius: var(--radius); padding: 14px 16px; background: var(--surface);
  opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease;
}
.risk-badge.is-visible { opacity: 1; transform: translateY(0); }
.risk-badge .rb-activity { font-weight: 600; color: var(--text); font-size: .9rem; margin-bottom: 6px; }
.risk-badge .rb-bar-track { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-bottom: 6px; }
.risk-badge .rb-bar-fill { height: 100%; border-radius: 3px; width: 0; transition: width 1s cubic-bezier(.16,1,.3,1); }
.risk-badge.risk-low .rb-bar-fill { background: #22c55e; }
.risk-badge.risk-moderate .rb-bar-fill { background: #f59e0b; }
.risk-badge.risk-high .rb-bar-fill { background: #ef4444; }
.risk-badge .rb-pct { font-family: var(--mono); font-size: .78rem; color: var(--muted); }

@media (max-width: 720px) {
  .meal-response-callouts, .risk-badges { flex-direction: column; }
  .workout-row { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "icon name" "icon stats"; }
  .workout-row .workout-stats { grid-area: stats; }
}

/* ==========================================================================
   GRAFIT DIABETES — "tech magazine" layout (strona produktu, nie sitewide)
   Asymetryczne szerokości sekcji + własny komponent modułu zamiast .grid-4
   jednakowych kart. Kolory/fonty/cienie z ISTNIEJĄCEGO, żywego systemu strony
   (--accent/--card/--border itd.) — NIE z zarzuconego systemu .gr-*.
   ========================================================================== */

/* --- Asymetryczne dwukolumnowe układy (zamiast jednego .grid-2 1fr/1fr) --- */
.mag-split-60-40 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.mag-split-40-60 { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start; }
.mag-split-70-30 { display: grid; grid-template-columns: 2.3fr 1fr; gap: 48px; align-items: start; }

/* --- Szeroki "breakout" kontener — szerszy niż zwykły .container, do momentów wizualnych --- */
.mag-wide { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

/* --- Wąska kolumna do czytania — dla sekcji tekstowych (Founder Story) --- */
.mag-narrow { max-width: 640px; }

/* --- Numer sekcji w marginesie — edytorialny detal zamiast wyśrodkowanego eyebrow --- */
.mag-index {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--muted);
  display: block; margin-bottom: 10px;
}

@media (max-width: 900px) {
  .mag-split-60-40, .mag-split-40-60, .mag-split-70-30 { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Moduł platformy: karta odmienna od .card (numer + akcentowa krawędź + rozwijanie) --- */
.module-groups { display: flex; flex-direction: column; gap: 52px; margin-top: 8px; }
.module-group-label {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-hover); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.module-card {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 16px 16px 14px; text-align: left; cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.module-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-2px); }
.module-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.module-card-num { font-family: var(--mono); font-size: .64rem; color: var(--muted); letter-spacing: .04em; }
.module-card-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent-tint); color: var(--accent-hover);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 10px 0 10px;
}
.module-card-icon svg { width: 16px; height: 16px; }
.module-card h3 { font-family: var(--display); font-weight: 700; font-size: .92rem; margin: 0; color: var(--text); line-height: 1.3; }
.module-card .module-desc {
  font-size: .78rem; color: var(--muted); margin: 4px 0 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.module-card-details {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .35s cubic-bezier(.16,1,.3,1), opacity .3s ease, margin-top .35s ease;
}
.module-card.is-open .module-card-details { max-height: 320px; opacity: 1; margin-top: 14px; }
.module-card-details-inner { padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.module-card-details dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.module-card-details dt:first-child { margin-top: 0; }
.module-card-details dd { margin: 3px 0 0; font-size: .86rem; color: var(--text-mid); }
.module-card-expand-hint {
  display: flex; align-items: center; gap: 6px; margin-top: 14px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .03em; color: var(--accent-hover);
}
.module-card-expand-hint svg { width: 13px; height: 13px; transition: transform .3s ease; }
.module-card.is-open .module-card-expand-hint svg { transform: rotate(180deg); }

@media (max-width: 1080px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .module-groups { gap: 40px; }
}
@media (max-width: 480px) {
  .module-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DATA ECOSYSTEM — animowany diagram przepływu danych (6 węzłów)
   ========================================================================== */
.ecosystem-wrap {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 56px 28px 40px; overflow: visible;
}
.ecosystem-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.eco-node-circle { fill: var(--bg-card); stroke: var(--border-strong); stroke-width: 1.6; transition: stroke .25s, fill .25s; }
.eco-node.is-in-view .eco-node-circle { stroke: var(--accent); }
.eco-node-icon { color: var(--accent-hover); }
.eco-node-label { font-family: var(--display); font-weight: 700; font-size: 13px; fill: var(--text); }
.eco-node-sub { font-family: var(--mono); font-size: 9.5px; fill: var(--muted); letter-spacing: .02em; }
.eco-path-base { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 3 5; }
.eco-particle { filter: drop-shadow(0 0 4px rgba(234,88,12,.55)); }
.ecosystem-caption {
  margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--border-strong);
  font-size: .87rem; color: var(--muted); max-width: 640px;
}
@media (max-width: 780px) {
  .ecosystem-wrap { padding: 32px 16px; }
}

/* ==========================================================================
   REAL LIFE TESTING — asymetryczny pasek sprzętu
   ========================================================================== */
.hw-strip { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hw-chip {
  display: flex; align-items: center; gap: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 999px; padding: 10px 20px 10px 12px;
  box-shadow: var(--shadow-card);
}
.hw-chip .hw-icon {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-hover);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hw-chip .hw-icon svg { width: 17px; height: 17px; }
.hw-chip .hw-name { font-weight: 700; font-size: .88rem; color: var(--text); display: block; }
.hw-chip .hw-role { font-size: .74rem; color: var(--muted); }
.hw-disclaimer {
  margin-top: 24px; font-family: var(--mono); font-size: .74rem; letter-spacing: .01em;
  color: var(--muted); border-left: 2px solid var(--border-strong); padding-left: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .product-preview { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 52px; }
  .hero-art { order: -1; max-height: 240px; }
  .about-wrap { grid-template-columns: 200px 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  nav.primary {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: 8px 16px 16px;
    box-shadow: var(--shadow-elevated);
    display: flex;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s cubic-bezier(.16,1,.3,1), transform .22s cubic-bezier(.16,1,.3,1), visibility .22s;
  }
  nav.primary.open { opacity: 1; visibility: visible; transform: translateY(0); }
  nav.primary > ul { flex-direction: column; width: 100%; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: none; box-shadow: none; padding-left: 14px; display: none;
  }
  nav.primary > ul > li.open .submenu { display: flex; flex-direction: column; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 10px; }
  .cta-btn, .cookie-btn { min-height: 48px; padding: 13px 24px; }
  .hero-ctas .cta-btn { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .about-wrap { grid-template-columns: 1fr; text-align: left; }
  .about-photo { max-width: 200px; }
  .footer-grid { grid-template-columns: 1fr; }
  form.contact-form .row { grid-template-columns: 1fr; }
}

/* Poniżej ~480px dwa przyciski obok siebie nie mieszczą pełnego, nieprzełamanego
   tekstu ("Potrzebuję wsparcia IT" itp.) nawet przy flex-shrink — powodowało to
   poziomy overflow całej sekcji hero na wąskich telefonach (zmierzone przy 320px).
   Zamiast zawężać przyciski do ciasnoty, układamy je w kolumnie na pełną szerokość. */
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .cta-btn { width: 100%; flex: none; }
}
