/* =========================================================================
   Panel produkcji — LANDING · GroDev
   Self-contained. Premium, ciemny, kinetyczny. Zero zależności.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

:root {
  --bg:        #050505;
  --bg-1:      #0a0a0b;
  --panel:     #0e0e10;
  --panel-2:   #131316;
  --line:      rgba(232,228,218,.10);
  --line-2:    rgba(232,228,218,.16);
  --text:      #E8E4DA;
  --muted:     #9c988f;
  --muted-2:   #7d7a72;
  --accent:    #B73D2C;
  --accent-text:#e0897b;
  --accent-ink:#f0d9d3;
  --danger:    #e0897b;
  --focus:     #d8b7ac;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

body { font-family: var(--sans); background: var(--bg); color: var(--text); overflow-x: hidden; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 6px;
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

/* ---------- Typografia pomocnicza ---------- */
.eyebrow, .section-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.section-eyebrow .idx { color: var(--accent-text); margin-right: 6px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 7px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #17171a; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 30px rgba(183,61,44,.28); }
.btn--primary:hover { background: #cb4634; border-color: #cb4634; box-shadow: 0 12px 40px rgba(183,61,44,.4); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: rgba(232,228,218,.05); }
.btn--lg { padding: 15px 26px; font-size: 15.5px; }

/* =========================================================================
   NAV
   ========================================================================= */
.lnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px clamp(20px, 5vw, 40px);
  transition: background .3s var(--ease), border-color .3s var(--ease), padding .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.lnav.is-stuck { background: rgba(5,5,5,.72); backdrop-filter: blur(12px); border-bottom-color: var(--line); padding-top: 11px; padding-bottom: 11px; }
.lnav__brand { display: flex; align-items: center; gap: 11px; }
.lnav__mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--accent); background: var(--panel); }
.lnav__word { display: flex; flex-direction: column; line-height: 1.15; }
.lnav__word b { font-size: 15px; letter-spacing: -.01em; }
.lnav__word small { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.lnav__links { display: flex; gap: 26px; }
.lnav__links a { font-size: 13.5px; color: var(--muted); transition: color .2s var(--ease); position: relative; }
.lnav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--accent); transition: right .25s var(--ease); }
.lnav__links a:hover { color: var(--text); }
.lnav__links a:hover::after { right: 0; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 130px 0 90px; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 82% 20%, transparent 0%, rgba(5,5,5,.35) 55%, var(--bg) 88%),
    linear-gradient(180deg, rgba(5,5,5,.4) 0%, transparent 25%, transparent 60%, var(--bg) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

.hero__title {
  font-size: clamp(40px, 8vw, 84px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700;
  margin: 18px 0 22px; max-width: 15ch;
}
.hero__title .ln { display: block; }
.hero__title .accent {
  background: linear-gradient(100deg, var(--accent-text), #f2c4ba 60%, var(--accent-text));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* zapas na descendery (j, y) — gradient wypełnia też padding-box */
  padding-bottom: .16em; margin-bottom: -.1em;
}
.hero__lead { font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 58ch; line-height: 1.65; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__signature { margin-top: 26px; font-family: var(--mono); font-size: 12.5px; color: var(--muted-2); letter-spacing: .02em; padding-left: 14px; border-left: 2px solid var(--accent); }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 44px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--line); max-width: 760px;
}
.hstat { background: linear-gradient(180deg, rgba(19,19,22,.9), rgba(14,14,16,.9)); padding: 16px 16px; backdrop-filter: blur(4px); }
.hstat__k { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); }
.hstat__v { display: block; font-family: var(--mono); font-size: clamp(18px, 2.4vw, 22px); font-variant-numeric: tabular-nums; margin-top: 7px; letter-spacing: -.01em; }
.hstat__v em { font-style: normal; font-size: 12px; color: var(--muted); }
.hstat__v.accent { color: var(--accent-ink); }
.hstat__v.danger { color: var(--danger); }

.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 1px solid var(--line-2); border-radius: 14px; display: grid; place-items: start center; padding-top: 8px; }
.hero__scroll span { width: 4px; height: 8px; border-radius: 2px; background: var(--accent-text); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0%{ transform: translateY(0); opacity: 1;} 70%{ transform: translateY(14px); opacity: 0;} 100%{ transform: translateY(0); opacity: 0;} }

/* =========================================================================
   SEKCJE
   ========================================================================= */
.band { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--line); position: relative; }
.band--alt { background: linear-gradient(180deg, var(--bg-1), var(--bg)); }
.band--intro { padding-top: clamp(70px, 11vw, 130px); }
.band__title { font-size: clamp(24px, 4vw, 40px); letter-spacing: -.025em; line-height: 1.1; margin: 16px 0 0; max-width: 22ch; }
.band--intro .band__title { max-width: 20ch; }
.band__sub { font-size: clamp(15px, 2vw, 17px); color: var(--muted); max-width: 62ch; margin-top: 22px; line-height: 1.7; }
.band__sub--tight { margin-top: 28px; max-width: 66ch; }

/* Karty wartości */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.vcard {
  padding: 26px 24px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.vcard:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.vcard__ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; color: var(--accent-text); background: rgba(183,61,44,.1); border: 1px solid rgba(183,61,44,.24); margin-bottom: 20px; }
.vcard h3 { font-size: 18px; letter-spacing: -.01em; margin-bottom: 10px; }
.vcard p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* Role */
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; }
.role {
  position: relative; padding: 24px 20px 22px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease); min-height: 190px;
}
.role::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity .25s var(--ease); }
.role:hover { border-color: var(--line-2); transform: translateY(-4px); }
.role:hover::before { opacity: 1; }
.role__tag { font-family: var(--mono); font-size: 12px; color: var(--accent-text); letter-spacing: .1em; }
.role h3 { font-size: 18px; margin: 14px 0 8px; letter-spacing: -.01em; }
.role p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Pipeline */
.pipeline { margin-top: 52px; position: relative; }
.pipeline__track { position: relative; height: 2px; background: var(--line-2); border-radius: 2px; margin-bottom: 22px; }
.pipeline__dot { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 0 4px rgba(183,61,44,.2); animation: flow 6s var(--ease) infinite; }
@keyframes flow { 0%{ left: 0%; } 100%{ left: 100%; } }
.pipeline__stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pipeline__stages li { font-size: 13px; font-weight: 600; color: var(--text); padding: 14px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pipeline__stages .pn { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); letter-spacing: .1em; margin-bottom: 6px; }

/* Kroki scenariusza */
.steps { margin-top: 48px; counter-reset: st; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.steps li { position: relative; padding: 18px 18px 18px 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.steps li b { color: var(--text); font-weight: 600; }
.steps li::before {
  counter-increment: st; content: counter(st, decimal-leading-zero);
  position: absolute; left: 16px; top: 16px; font-family: var(--mono); font-size: 13px;
  color: var(--accent-text); border: 1px solid rgba(183,61,44,.3); border-radius: 8px;
  width: 30px; height: 30px; display: grid; place-items: center; background: rgba(183,61,44,.08);
}

/* Final CTA */
.cta-band { padding: clamp(70px, 11vw, 130px) 0; border-top: 1px solid var(--line); background:
  radial-gradient(120% 140% at 50% 0%, rgba(183,61,44,.12), transparent 60%), var(--bg); text-align: center; }
.cta-band__inner h2 { font-size: clamp(26px, 4.5vw, 44px); letter-spacing: -.025em; line-height: 1.08; max-width: 20ch; margin: 0 auto; }
.cta-band__inner p { color: var(--muted); font-size: 16px; margin: 18px auto 30px; max-width: 52ch; }

/* Footer */
.lfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 26px clamp(20px, 5vw, 40px); border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.lfoot .sep { color: var(--muted-2); }

/* =========================================================================
   REVEAL (IntersectionObserver dokłada .is-in)
   ========================================================================= */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.js .reveal.is-in { opacity: 1; transform: none; }
.cards3 .reveal.is-in:nth-child(2) { transition-delay: .08s; }
.cards3 .reveal.is-in:nth-child(3) { transition-delay: .16s; }
.roles .reveal.is-in:nth-child(2) { transition-delay: .06s; }
.roles .reveal.is-in:nth-child(3) { transition-delay: .12s; }
.roles .reveal.is-in:nth-child(4) { transition-delay: .18s; }
.steps .reveal.is-in:nth-child(even) { transition-delay: .06s; }

/* =========================================================================
   RESPONSYWNOŚĆ
   ========================================================================= */
@media (max-width: 940px) {
  .lnav__links { display: none; }
  .cards3 { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr 1fr; max-width: 460px; }
  .pipeline__stages { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 520px) {
  .roles { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 110px; }
  .hero__cta .btn { flex: 1; }
  .lfoot { justify-content: center; text-align: center; }
  .pipeline__stages { grid-template-columns: 1fr 1fr; }
}

/* =========================================================================
   REDUKCJA RUCHU
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .pipeline__dot { animation: none; left: 50%; }
  .hero__scroll span { animation: none; }
}
