/* ==========================================================================
   CYBERNETICS COMPANY, wersja 2: krótsza, skompresowana, biznesowa.
   Fonty: Bricolage Grotesque (nagłówki), stos systemowy (tekst), IBM Plex Mono (etykiety).
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f4f2;
  --ink: #101012;
  --ink-60: rgba(16, 16, 18, 0.62);
  --ink-45: rgba(16, 16, 18, 0.45);
  --ink-25: rgba(16, 16, 18, 0.25);
  --ink-10: rgba(16, 16, 18, 0.08);
  --accent: #2b50e2;
  --accent-soft: rgba(43, 80, 226, 0.07);
  --r-card: 24px;
  --r-big: 40px;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Blokada poziomego przesuwania strony (mobile) */
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--bg); }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }


h1, h2, h3 { font-family: var(--font-display); font-weight: 500; }
.h-display {
  font-size: clamp(42px, 6.4vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.03em;
}
.h-section {
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.muted { color: var(--ink-45); }

/* ============================ NAWIGACJA ============================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--ink-10); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
/* Logotyp: czysty wordmark z niebieską kropką */
.logo-co { color: var(--ink-45); font-weight: 500; }
.logo-dot-b { color: var(--accent); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-60); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-dark, .nav-links a.btn-dark:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
  cursor: pointer;
  border: none;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(16,16,18,0.18); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-10); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-25); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ============================ HERO ============================ */
.hero {
  min-height: 88vh;
  min-height: 88svh; /* stabilna wysokość na mobile: nie skacze przy chowaniu paska adresu */
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 60px;
  background:
    radial-gradient(1000px 480px at 60% -10%, var(--accent-soft), transparent 65%),
    var(--bg);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; width: 100%; }
.hero-copy { text-align: left; }
.hero-copy .h-display { font-size: clamp(38px, 4.6vw, 60px); }

/* --- Wizual hero: minimalistyczny awatar AI w telefonie --- */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 80, 226, 0.16), transparent 65%);
  filter: blur(12px);
  animation: glowpulse 6s ease-in-out infinite;
}
@keyframes glowpulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: 0.7; } }
.phone {
  position: relative;
  width: 350px;
  height: 700px;
  background: var(--ink);
  border-radius: 56px;
  padding: 12px;
  box-shadow: 0 50px 110px rgba(16,16,18,0.26);
  animation: phonefloat 7s ease-in-out infinite;
}
@keyframes phonefloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.phone-screen {
  position: relative;
  background: #fff;
  border-radius: 45px;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
/* Zaokrąglenie także na samym wideo i nakładkach: animowane warstwy kompozytora
   potrafią zignorować overflow rodzica (biały róg wystający z ramki) */
.scan-media, .glitch-slice, .glitch-lines { border-radius: 45px; }
.scan-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: vglitch 7s infinite;
}
/* Glitch: co ~4,5 s wyraźne, ~0,4-sekundowe rozjechanie kanałów RGB i pasów obrazu */
@keyframes vglitch {
  0%, 88%, 96%, 100% { transform: none; filter: none; }
  89% {
    transform: translateX(-8px);
    filter: drop-shadow(4px 0 rgba(255, 0, 90, 0.55)) drop-shadow(-4px 0 rgba(43, 80, 226, 0.6)) saturate(1.5) contrast(1.08);
  }
  91% {
    transform: translateX(7px) skewX(0.8deg);
    filter: drop-shadow(-3px 0 rgba(255, 0, 90, 0.5)) drop-shadow(3px 0 rgba(43, 80, 226, 0.55));
  }
  93% {
    transform: translateX(-3px);
    filter: drop-shadow(2px 0 rgba(255, 0, 90, 0.4)) drop-shadow(-2px 0 rgba(43, 80, 226, 0.45));
  }
  95% { transform: none; filter: none; }
}
.glitch-slice {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("assets/awatar-petla.jpg") center / cover no-repeat;
  opacity: 0;
}
.gs1 { clip-path: inset(18% 0 64% 0); animation: gs1 4.5s infinite; }
.gs2 { clip-path: inset(72% 0 10% 0); animation: gs2 4.5s infinite; }
@keyframes gs1 {
  0%, 88%, 96%, 100% { opacity: 0; transform: none; filter: none; }
  89% { opacity: 0.9; transform: translateX(10px); filter: hue-rotate(-25deg); }
  92% { opacity: 0.7; transform: translateX(-8px); }
  95% { opacity: 0; }
}
@keyframes gs2 {
  0%, 88%, 96%, 100% { opacity: 0; transform: none; filter: none; }
  90% { opacity: 0.85; transform: translateX(-11px); filter: hue-rotate(20deg); }
  93% { opacity: 0.6; transform: translateX(7px); }
  95% { opacity: 0; }
}
.glitch-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(43, 80, 226, 0.3) 6px 8px, transparent 8px 14px);
  mix-blend-mode: screen;
  animation: linesflash 4.5s infinite;
}
@keyframes linesflash {
  0%, 88%, 96%, 100% { opacity: 0; transform: none; }
  89% { opacity: 0.9; transform: translateX(-8px); }
  92% { opacity: 0.5; transform: translateX(7px); }
  95% { opacity: 0; }
}
/* Sygnatura asystentki AI: szklana pigułka z falą głosu */
.ai-voice {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 26px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 15px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(16,16,18,0.14), inset 0 0 0 1px rgba(255,255,255,0.6);
}
.ai-orb {
  width: 11px; height: 11px;
  border-radius: 50%;
  margin-right: 8px;
  background: radial-gradient(circle at 35% 30%, #7a9bff, var(--accent));
  animation: orbpulse 2.4s ease-in-out infinite;
}
@keyframes orbpulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(43, 80, 226, 0.35); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(43, 80, 226, 0); }
}
.ai-voice i {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7a5bff, var(--accent));
  height: 10px;
  animation: wave 1.3s ease-in-out infinite;
}
.ai-voice i:nth-child(2) { animation-delay: 0.10s; }
.ai-voice i:nth-child(3) { animation-delay: 0.22s; animation-name: waveBig; }
.ai-voice i:nth-child(4) { animation-delay: 0.34s; }
.ai-voice i:nth-child(5) { animation-delay: 0.46s; animation-name: waveBig; }
.ai-voice i:nth-child(6) { animation-delay: 0.58s; }
.ai-voice i:nth-child(7) { animation-delay: 0.70s; animation-name: waveBig; }
.ai-voice i:nth-child(8) { animation-delay: 0.82s; }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 20px; } }
@keyframes waveBig { 0%, 100% { height: 10px; } 50% { height: 30px; } }
.hero h1 { max-width: 900px; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes rise { to { transform: translateY(0); } }
.hero h1 .accent-word { color: var(--ink-25); }
.hero-sub { max-width: 480px; margin: 28px 0 36px; font-size: 17.5px; color: var(--ink-60); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================ PASEK WYRÓŻNIEŃ ============================ */
/* --- Statyczny pasek logotypów prasowych ("featured in") --- */
.strip { border-top: 1px solid var(--ink-10); border-bottom: 1px solid var(--ink-10); padding: 26px 0; }
.press-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5.5vw, 76px);
  flex-wrap: wrap;
  padding: 0 28px;
}
.press-bar img { width: auto; filter: grayscale(1); opacity: 0.5; transition: opacity 0.25s; }
.press-bar img:hover { opacity: 0.85; }
.press-bar .l-forbes { height: 26px; }
.press-bar .l-mit { height: 30px; }
.press-bar .l-ms { height: 22px; }
.press-bar .l-ft { height: 20px; }
.press-neweurope {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--ink);
  opacity: 0.5;
  white-space: nowrap;
}

/* ============================ SEKCJE ============================ */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { margin-top: 16px; color: var(--ink-60); max-width: 540px; }

/* --- Usługi: lista wierszy, inwersja koloru na hover, każdy wiersz to mailto --- */
.services-list { display: flex; flex-direction: column; }
.service-row {
  display: grid;
  grid-template-columns: 52px 1.05fr 1.3fr 26px;
  gap: 28px;
  align-items: baseline;
  padding: 24px 26px;
  margin: 0 -26px;
  border-radius: 0;
  border-bottom: 1px solid var(--ink-10);
  text-decoration: none;
  color: inherit;
  transition: background 0.25s, border-color 0.25s, border-radius 0.25s;
}
.service-row:first-child { border-top: 1px solid var(--ink-10); }
.service-row:hover { background: var(--ink); border-color: transparent; border-radius: 18px; }
.service-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-25); transition: color 0.25s; }
.service-row h3 { font-size: 21px; letter-spacing: -0.015em; font-weight: 600; transition: color 0.25s; }
.service-row p { color: var(--ink-60); font-size: 14.5px; transition: color 0.25s; }
.service-arrow { font-size: 17px; color: transparent; transition: color 0.25s, transform 0.25s; }
.service-row:hover .service-num { color: rgba(255,255,255,0.4); }
.service-row:hover h3 { color: #fff; }
.service-row:hover p { color: rgba(255,255,255,0.65); }
.service-row:hover .service-arrow { color: #fff; transform: translateX(4px); }

/* --- Demo: trzy przykłady zastosowań --- */
.demo { background: var(--bg-soft); border-radius: var(--r-big); padding: 64px 48px; }
.demo-head { max-width: 640px; margin-bottom: 40px; }
.demo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.case-card {
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: 0 24px 64px rgba(16,16,18,0.07);
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
}
.case-sector {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 18px;
}
.case-card h3 { font-size: 19.5px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 10px; }
.case-card p { font-size: 14.5px; color: var(--ink-60); margin-bottom: 26px; }
.case-metric { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--ink-10); }
.case-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.case-metric small { display: block; font-size: 13px; color: var(--ink-45); margin-top: 6px; }

/* --- Proces: 4 kolumny --- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-25); display: block; margin-bottom: 10px; }
.step h3 { font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.step p { color: var(--ink-60); font-size: 14px; }

/* --- Założyciel --- */
.founder { background: var(--ink); color: #fff; border-radius: var(--r-big); margin: 0 16px; }
.founder-grid { display: grid; grid-template-columns: 290px 1.15fr 1fr; gap: 44px; align-items: start; }
.founder-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
}
.founder-event { margin: 56px 0 0; }
.founder-event img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
}
.founder h2 { color: #fff; }
.founder-role {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 16px 0 22px;
}
.founder-bio { color: rgba(255,255,255,0.68); font-size: 15.5px; max-width: 540px; }
.founder-bio + .founder-bio { margin-top: 14px; }
.founder-bio a { color: #fff; }
.awards-list { list-style: none; }
.awards-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}
.awards-list li:first-child { border-top: 1px solid rgba(255,255,255,0.1); }
.awards-list b { font-weight: 500; }
.awards-list span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Kompetencje: zwarty rząd chipów --- */
.domains { display: flex; flex-wrap: wrap; gap: 10px; }
.domain {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink-10);
  transition: border-color 0.25s, transform 0.25s;
  cursor: default;
}
.domain:hover { border-color: var(--ink); transform: translateY(-2px); }

/* --- FAQ --- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--ink-10); }
.faq details:first-of-type { border-top: 1px solid var(--ink-10); }
.faq summary {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 500;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--ink-25); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-60); font-size: 15px; padding-bottom: 20px; max-width: 640px; }

/* --- Kontakt --- */
.contact { text-align: center; padding: 120px 0 110px; }
.contact h2 { font-size: clamp(42px, 6.5vw, 88px); letter-spacing: -0.035em; line-height: 1; }
.contact-sub { margin: 24px auto 36px; max-width: 440px; color: var(--ink-60); font-size: 16.5px; }
.contact-details {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-45);
}
.contact-details b { color: var(--ink); font-weight: 500; display: block; margin-bottom: 3px; }
.contact-details a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink-25); }

footer { border-top: 1px solid var(--ink-10); padding: 32px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-45);
}
.footer-inner .mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; }

/* --- Animacje wejścia (progresywne ulepszenie) --- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 110px 0 50px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .phone { width: 280px; height: 560px; }
  .hero-visual::before { width: 320px; height: 320px; margin: -160px 0 0 -160px; }
  .service-row { grid-template-columns: 36px 1fr 20px; padding: 20px 18px; margin: 0 -18px; }
  .service-row p { grid-column: 2; }
  .demo { padding: 48px 28px; }
  .demo-cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .founder-grid { grid-template-columns: 1fr; gap: 40px; }
  .founder-photo { max-width: 300px; }
  .founder-event img { height: 260px; }
  .founder { margin: 0 10px; }
  .nav-links a:not(.btn):not(.lang-link) { display: none; }
  .nav-links { gap: 12px; }
  .logo-co { display: none; } /* na mobile samo "Cybernetics." */
  .hero-copy .h-display { font-size: clamp(28px, 8.4vw, 38px); }
}

.founder-event figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-align: right;
}

/* --- Przełącznik języka w nawigacji: wyraźna pigułka --- */
.lang-link {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink-10);
  transition: box-shadow 0.2s;
}
.lang-link:hover { box-shadow: inset 0 0 0 1.5px var(--ink-25); }

/* Poszanowanie ustawienia ograniczonego ruchu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
