/* ===== Tokens ===== */
:root{
  --ink: #222E34;
  --ink-soft: #4F7588;
  --paper: #F4F7F7;
  --paper-alt: #E3EBEE;
  --line: #D3DBE8;
  --primary: #A9BAC5;
  --accent: #0F9BB1;
  --accent-2: #FFBC7D;
  --dark: #16202A;
  --dark-2: #0E1620;
  --white: #FFFFFF;

  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --hero-ground: #0B131A;

  --container: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: auto; }
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3{ font-family: var(--font-head); color: var(--ink); margin: 0; letter-spacing: -0.01em; }
p{ margin: 0 0 1rem; color: var(--ink-soft); max-width: 60ch; }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display:block; }
ul{ padding:0; margin:0; list-style:none; }

.wrap{ max-width: var(--container); margin: 0 auto; padding: 0 28px; }

::selection{ background: var(--accent); color: var(--white); }

/* subtle grain overlay for texture, avoids flat "AI slop" look */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress-bar{
  position: fixed; top:0; left:0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 9999;
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 14px 28px; border-radius: 100px;
  font-family: var(--font-head); font-weight:600; font-size: 0.95rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 8px 24px -8px rgba(15,155,177,0.35);
}
.btn-primary:hover{ transform: translateY(-3px); background: var(--accent); box-shadow: 0 14px 30px -8px rgba(15,155,177,0.5); }
.btn-ghost{
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn-lg{ padding: 18px 36px; font-size: 1.05rem; }

.eyebrow{
  font-family: var(--font-head); font-weight:600; font-size: 0.85rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 14px;
}

.section-title{ font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; margin-bottom: 20px; max-width: 18ch; }

/* ===== Header ===== */
.site-header{
  position: fixed; top:0; left:0; right:0; z-index: 200;
  padding: 20px 0;
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}
.site-header.scrolled{
  background: rgba(244,247,247,0.85);
  backdrop-filter: blur(14px) saturate(140%);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--line);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; }
.logo{ display:flex; flex-direction:row; align-items:center; gap:10px; }
.logo-icon{
  width: 28px; height: 28px; flex-shrink: 0;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.logo-text{ display:flex; flex-direction:column; gap:2px; line-height:1; }
.logo-word{ font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--white); transition: color .4s ease; }
.logo-accent{ color: var(--accent); }
.logo-by{
  font-family: var(--font-body); font-weight: 400; font-size: 0.62rem;
  letter-spacing: 0.05em; color: rgba(244,247,247,0.5); transition: color .4s ease;
}
.main-nav{ display:flex; align-items:center; gap: 34px; }
.main-nav a{ font-size: 0.95rem; font-weight: 500; color: var(--white); position:relative; transition: color .4s ease; }
.main-nav a:not(.nav-cta)::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.main-nav a:not(.nav-cta):hover::after{ transform: scaleX(1); transform-origin: left; }
.nav-cta{
  background: var(--ink); color: var(--white); padding: 10px 20px; border-radius: 100px;
  font-weight: 600; transition: background .3s ease;
}
.nav-cta:hover{ background: var(--accent); }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:6px; }
.nav-toggle span{ width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: background .4s ease; }

.site-header.scrolled .logo-word,
.site-header.scrolled .main-nav a:not(.nav-cta){ color: var(--ink); }
.site-header.scrolled .logo-by{ color: rgba(34,46,52,0.55); }
.site-header.scrolled .nav-toggle span{ background: var(--ink); }

/* ===== Hero ===== */
.hero{
  position: relative;
  min-height: 100svh;
  display:flex; align-items:center;
  overflow: hidden;
  background: var(--hero-ground);
}
#heroCanvas{
  position:absolute; inset:0; width:100%; height:100%;
  transform-origin: center; animation: canvasBreathe 11s ease-in-out infinite;
}
@keyframes canvasBreathe{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.025); } }
.hero-vignette{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(11,19,26,0.35) 0%, rgba(11,19,26,0.05) 30%, rgba(11,19,26,0.35) 72%, var(--ink) 100%);
  pointer-events:none;
}
#heroParticles{
  position:absolute; inset:0; width:100%; height:100%;
  z-index:1; opacity:0.65; pointer-events:none;
}
.hero-inner{ position:relative; z-index:2; padding-top: 40px; }
.hero-title{
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 14px;
  color: var(--white);
}
.split-line{ display:block; overflow:hidden; }
.accent-text{ color: var(--accent-2); }
.hero-sub{ font-size: 1.05rem; max-width: 46ch; margin-bottom: 18px; color: rgba(244,247,247,0.78); }
.hero-actions{ display:flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-ghost{ border-color: rgba(244,247,247,0.35); color: var(--white); }
.hero .btn-ghost:hover{ border-color: var(--accent-2); color: var(--accent-2); }

/* ===== Hero network: scattered agent constellation spanning the whole hero =====
   Small labelled markers sit wherever their agent lives across the full
   screen (top corners, right edge, bottom edge) — the network reads as
   filling the whole hero, not boxed into one corner. Only the currently
   spotlighted agent gets a full detail card, always in the same safe spot
   next to the hub, connected back to its marker by a line. */
.hero-network{
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
}
.network-node{ display: contents; }
.hero-network-lines{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.network-line{
  fill:none; stroke: rgba(15,155,177,0.5); stroke-width: 0.3;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .7s var(--ease);
}
.network-line.is-drawn{ stroke-dashoffset: 0; animation: linePulse 2.6s ease-in-out infinite; }
@keyframes linePulse{ 0%,100%{ opacity: 0.5; } 50%{ opacity: 1; } }

.network-hub{
  position:absolute; left:80%; top:48%; transform:translate(-50%,-50%);
  width: 62px; height: 62px;
  border-radius:50%;
  background: radial-gradient(circle at 35% 30%, rgba(15,155,177,0.4), rgba(11,19,26,0.92) 72%);
  border:1px solid rgba(15,155,177,0.55);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 0 0 8px rgba(15,155,177,0.08), 0 0 46px rgba(15,155,177,0.28);
  z-index:2;
  animation: hubBreathe 3.2s ease-in-out infinite;
}
.network-hub::before, .network-hub::after{
  content:""; position:absolute; inset:0; border-radius:50%;
  border: 1.5px solid rgba(15,155,177,0.5);
  animation: hubPing 3.2s cubic-bezier(0.2,0.6,0.4,1) infinite;
  pointer-events:none;
}
.network-hub::after{ animation-delay: 1.6s; }
@keyframes hubBreathe{
  0%,100%{ box-shadow: 0 0 0 8px rgba(15,155,177,0.08), 0 0 46px rgba(15,155,177,0.28); }
  50%{ box-shadow: 0 0 0 11px rgba(15,155,177,0.12), 0 0 60px rgba(15,155,177,0.4); }
}
@keyframes hubPing{
  0%{ transform:scale(1); opacity:0.75; }
  100%{ transform:scale(2.15); opacity:0; }
}
.network-hub-globe{
  width: 56%; height: 56%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  animation: hubSpin 18s linear infinite;
}
@keyframes hubSpin{ to{ transform: rotate(360deg); } }

/* small scattered marker — always visible once its agent has joined */
.network-marker{
  position:absolute; transform: translate(-50%,-50%);
  display:flex; align-items:center; gap:6px;
  opacity:0; pointer-events:none; z-index:1;
  transition: opacity .5s var(--ease);
  animation: markerFloat 4.2s ease-in-out infinite;
}
.network-node.is-joined .network-marker{ opacity:1; pointer-events:auto; }
.network-node.is-active .network-marker{ z-index:3; }
.network-marker-dot{
  width:7px; height:7px; border-radius:50%; flex-shrink:0;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15,155,177,0.18), 0 0 10px rgba(15,155,177,0.55);
  transition: background .4s ease, box-shadow .4s ease;
}
.network-node.is-active .network-marker-dot{
  background: var(--accent-2);
  box-shadow: 0 0 0 5px rgba(255,188,125,0.22), 0 0 14px rgba(255,188,125,0.7);
}
.network-marker-label{
  font-family: var(--font-head); font-weight:600; font-size:0.72rem; white-space:nowrap;
  color: rgba(244,247,247,0.88);
  background: rgba(11,19,26,0.6); backdrop-filter: blur(4px);
  padding: 3px 9px; border-radius:100px; border:1px solid rgba(244,247,247,0.12);
}
@keyframes markerFloat{ 0%,100%{ transform: translate(-50%,-50%) translateY(0); } 50%{ transform: translate(-50%,-50%) translateY(-3px); } }
.network-node[data-node="0"] .network-marker{ animation-delay:-0.2s; }
.network-node[data-node="1"] .network-marker{ animation-delay:-1.4s; }
.network-node[data-node="2"] .network-marker{ animation-delay:-2.3s; }
.network-node[data-node="3"] .network-marker{ animation-delay:-0.8s; }
.network-node[data-node="4"] .network-marker{ animation-delay:-3.1s; }
.network-node[data-node="5"] .network-marker{ animation-delay:-1.9s; }
.network-node[data-node="6"] .network-marker{ animation-delay:-2.7s; }

/* fixed detail card — one safe spot, always the same, whichever agent is current */
.network-card{
  position:absolute; left:80%; top:71%; transform: translate(-50%,-50%) scale(0.85);
  z-index:1; width: 172px;
  background: rgba(13,22,29,0.72);
  backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(244,247,247,0.14);
  border-radius: 14px;
  padding: 11px 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease), border-color .4s ease, box-shadow .4s ease;
}
.network-node.is-active .network-card{
  opacity: 1; transform: translate(-50%,-50%) scale(1);
  border-color: rgba(15,155,177,0.55);
  box-shadow: 0 20px 44px -18px rgba(0,0,0,0.55), 0 0 0 1px rgba(15,155,177,0.18);
  z-index: 3;
  pointer-events: auto;
}
.network-node-body{ animation: nodeFloat 3.8s ease-in-out infinite; }
@keyframes nodeFloat{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-4px); } }
.network-node-icon{
  width: 25px; height: 25px; border-radius: 7px;
  background: rgba(15,155,177,0.16); border: 1px solid rgba(15,155,177,0.4);
  display:flex; align-items:center; justify-content:center;
  color: var(--accent-2); margin-bottom: 7px;
}
.network-node-icon svg{ width: 13px; height: 13px; }
.network-node-title{ color: var(--white); font-family: var(--font-head); font-weight:600; font-size: 0.85rem; }
.network-node-list{
  list-style:none; margin: 7px 0 0; padding:0; display:flex; flex-direction:column; gap:4px;
}
.network-node-list li{ position:relative; padding-left:17px; font-size:0.73rem; color: rgba(244,247,247,0.72); }
.network-node-list li::before{
  content:"✓"; position:absolute; left:0; top:0.5px;
  width:12px; height:12px; border-radius:50%; background: var(--accent);
  color:var(--white); font-size:0.5rem; display:flex; align-items:center; justify-content:center;
}
.network-dots{ display:none; }

/* Below desktop width there isn't room to scatter markers across the screen —
   and on short mobile viewports the whole hero is one fixed pinned screen,
   so a stack of 7 cards would just run off the bottom with no way to reach
   it. Instead: a progress row of dots that fills up, plus the one current
   agent expanded below it. Same reveal logic driving it, compact footprint. */
@media (max-width: 1150px){
  .hero{ flex-direction: column; padding: 84px 0 30px; }
  .hero-inner{ width: 100%; padding-top: 0; }
  .hero-network{
    position: static;
    display: flex; flex-direction: column; align-items: center;
    width: 100%; max-width: 300px;
    margin: 10px auto 0; gap: 10px;
    pointer-events: auto;
  }
  .hero-network-lines{ display: none; }
  .network-marker{ display: none; }
  .network-hub{
    position: relative; left:auto; top:auto; transform:none;
    width: 34px; height: 34px;
  }
  .network-dots{ display:flex; gap: 7px; }
  .network-dots span{
    width: 6px; height: 6px; border-radius: 50%; background: rgba(244,247,247,0.25);
    transition: background .4s ease, transform .4s ease;
  }
  .network-dots span.is-joined{ background: rgba(15,155,177,0.6); }
  .network-dots span.is-active{ background: var(--accent-2); transform: scale(1.4); }
  .network-card,
  .network-node.is-active .network-card{
    position: static; left:auto; top:auto; transform:none; width: 100%; max-width: 280px;
    display:none;
  }
  .network-node.is-active .network-card{ display:block; }
}

@media (max-width: 480px){
  .hero-network{ max-width: 100%; }
}

/* ===== Strip ===== */
.strip{ background: var(--ink); padding: 40px 0; }
.strip-inner{ display:flex; flex-wrap:wrap; justify-content:space-between; gap: 24px; }
.strip-item{ color: var(--white); display:flex; flex-direction:column; gap:4px; }
.strip-item strong{ font-family: var(--font-head); font-size: 1.5rem; color: var(--accent-2); }
.strip-item span{ color: #B9C6CC; font-size: 0.92rem; }

/* ===== Services ===== */
.services{ padding: 130px 0; }
.service-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px;
}
.service-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s ease;
}
.service-card:hover{
  transform: translateY(-8px);
  box-shadow: 0 24px 50px -20px rgba(34,46,52,0.18);
  border-color: transparent;
}
.service-num{
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  color: var(--accent); margin-bottom: 18px;
}
.service-card h3{ font-size: 1.25rem; margin-bottom: 10px; }
.service-card p{ font-size: 0.98rem; margin-bottom: 0; }

/* ===== Spotlight (Agent głosowy) ===== */
.spotlight{ padding: 60px 0 140px; }
.spotlight-inner{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items:center; }
.check-list{ margin: 22px 0 30px; display:flex; flex-direction:column; gap: 12px; }
.check-list li{ padding-left: 30px; position:relative; color: var(--ink); font-weight: 500; }
.check-list li::before{
  content:"✓"; position:absolute; left:0; top:0;
  width:20px; height:20px; border-radius:50%; background: var(--accent); color:var(--white);
  font-size: 0.7rem; display:flex; align-items:center; justify-content:center;
}
.spotlight-visual{ display:flex; justify-content:center; }
.call-card{
  width: 100%; max-width: 360px;
  background: var(--dark);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 40px 80px -30px rgba(14,22,32,0.5);
}
.call-card-top{
  display:flex; align-items:center; gap:10px;
  color: #DCE6E8; font-size: 0.85rem; font-weight: 600; margin-bottom: 26px;
}
.dot{ width:8px; height:8px; border-radius:50%; background: #4ADE80; }
.dot.pulse{ box-shadow: 0 0 0 0 rgba(74,222,128,0.6); animation: pulseDot 1.6s infinite; }
@keyframes pulseDot{
  0%{ box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
  70%{ box-shadow: 0 0 0 10px rgba(74,222,128,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.waveform{ height: 90px; display:flex; align-items:center; gap:4px; margin-bottom: 22px; }
.waveform span{
  display:block; width: 4px; border-radius: 4px; background: var(--accent);
  animation: wave 1.2s ease-in-out infinite;
}
@keyframes wave{ 0%,100%{ transform: scaleY(0.3); } 50%{ transform: scaleY(1); } }
.call-card-bottom{ color: #8FA3AB; font-size: 0.82rem; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; }

.spotlight--reverse .spotlight-inner{ grid-template-columns: 0.9fr 1.1fr; }
.training-card{
  width: 100%; max-width: 380px;
  background: var(--dark);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 40px 80px -30px rgba(14,22,32,0.5);
}
.training-card-top{
  display:flex; align-items:center; gap:10px;
  color: #DCE6E8; font-size: 0.85rem; font-weight: 600; margin-bottom: 22px;
}
.training-modules{ list-style:none; padding:0; margin: 0 0 20px; display:flex; flex-direction:column; gap: 14px; }
.training-modules li{
  display:flex; align-items:center; gap: 12px;
  font-size: 0.92rem; color: rgba(255,255,255,0.45);
}
.training-check{
  width:22px; height:22px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:0.7rem; border:1.5px solid rgba(255,255,255,0.18); color:transparent;
}
.training-modules li.is-done{ color: #DCE6E8; }
.training-modules li.is-done .training-check{ background: var(--accent); border-color: var(--accent); color: var(--white); }
.training-modules li.is-active{ color: var(--white); font-weight: 600; }
.training-modules li.is-active .training-check{
  border-color: var(--accent-2); color: var(--accent-2);
  background: rgba(255,188,125,0.14);
  animation: trainingPulse 1.6s infinite;
}
@keyframes trainingPulse{
  0%,100%{ box-shadow: 0 0 0 0 rgba(255,188,125,0.4); }
  50%{ box-shadow: 0 0 0 6px rgba(255,188,125,0); }
}
.training-card-bottom{ color: #8FA3AB; font-size: 0.82rem; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; }

/* ===== Second Brain ===== */
.second-brain{
  position: relative;
  background: var(--dark);
  padding: 150px 0;
  overflow: hidden;
}
#brainCanvas{ position:absolute; inset:0; width:100%; height:100%; opacity: 0.9; }
.brain-inner{ position:relative; z-index:2; max-width: 640px; }
.second-brain .eyebrow{ color: var(--accent-2); }
.second-brain h2, .second-brain p{ color: var(--white); }
.second-brain p{ color: #B9C6CC; }

/* ===== Process (pinned) ===== */
.process{ position: relative; }
.process-sticky{ padding-top: 110px; }
.process-track{
  display:flex; gap: 26px; margin-top: 60px; padding: 10px 4px 40px;
  width: max-content;
}
.process-step{
  width: min(420px, 80vw);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 34px;
}
.process-index{ font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--paper-alt); margin-bottom: 18px; -webkit-text-stroke: 1.5px var(--accent); color: transparent; }
.process-step h3{ font-size: 1.3rem; margin-bottom: 10px; }

@media (min-width: 901px){
  .process-track{ will-change: transform; }
}

/* ===== CTA ===== */
.cta{ padding: 150px 0; text-align:center; }
.cta-inner{ display:flex; flex-direction:column; align-items:center; }
.cta-title{ font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; margin-bottom: 20px; }
.cta p{ text-align:center; margin-bottom: 34px; }

/* ===== Footer ===== */
.site-footer{ background: var(--ink); padding: 40px 0; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; }
.site-footer .logo-word{ color: var(--white); }
.site-footer p{ color: #93A4AB; font-size: 0.88rem; margin:0; }

/* ===== Reveal animation base states (GSAP toggles .is-visible) ===== */
.reveal-up{ opacity: 0; transform: translateY(28px); }
.reveal-up.is-visible{ opacity: 1; transform: translateY(0); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-card{ opacity: 0; transform: translateY(36px); }
.reveal-card.is-visible{ opacity: 1; transform: translateY(0); transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ===== Responsive ===== */
@media (max-width: 900px){
  .main-nav{
    position: fixed; inset: 0 0 auto 0; top: 0; padding: 100px 28px 40px;
    background: var(--paper); flex-direction: column; align-items:flex-start; gap: 22px;
    transform: translateY(-110%); transition: transform .45s var(--ease);
    z-index: 150;
  }
  .main-nav.open{ transform: translateY(0); }
  .main-nav.open a:not(.nav-cta){ color: var(--ink); }
  .main-nav.open + .nav-toggle span{ background: var(--ink); }
  .nav-toggle{ display:flex; z-index: 210; }
  .service-grid{ grid-template-columns: 1fr; }
  .spotlight-inner,
  .spotlight--reverse .spotlight-inner{ grid-template-columns: 1fr; }
  .spotlight-visual{ order:-1; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
