/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(24, 24, 27, 0.78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}

.nav__inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

/* Znak: kroki automatyzacji (dwa szare kroki -> limonkowy efekt) */
.nav__brand-logo,
.footer__brand-logo {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='12' viewBox='0 0 26 12'><line x1='3.2' y1='6' x2='21.4' y2='6' stroke='%235a5a63' stroke-width='1.6'/><circle cx='3.2' cy='6' r='2.6' fill='%238a8a93'/><circle cx='11.6' cy='6' r='2.6' fill='%238a8a93'/><circle cx='21.4' cy='6' r='4' fill='%23d2ff45'/></svg>") center / 26px 12px no-repeat;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 2px;
}

.nav__brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.nav__brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.nav__link:hover { color: var(--text-1); background: var(--bg-1); }

.nav__cta { margin-left: 6px; }

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav__burger span,
.nav__burger span::before,
.nav__burger span::after {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--text-1);
  transition: transform 0.3s var(--ease-out);
}
.nav__burger span { position: relative; }
.nav__burger span::before, .nav__burger span::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }

.nav.is-open .nav__burger span { background: transparent; }
.nav.is-open .nav__burger span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__burger span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    /* Zamknięte menu chowa się w całości nad ekranem. Przy -110% dolny pasek z limonkowym
       przyciskiem zostawał pod paskiem stanu iPhone'a i Safari barwiło go na żółto. */
    transform: translateY(calc(-100% - var(--nav-height) - 24px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-out), visibility 0s linear 0.35s;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
  .nav.is-open .nav__links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-out), visibility 0s linear 0s;
  }
  .nav__link { font-size: 16px; padding: 12px 16px; }
  .nav__cta { margin: 8px 0 0; width: 100%; min-height: 48px; }
  .nav__burger { display: inline-flex; }

  /* Lock body scroll when menu open */
  body.menu-open { overflow: hidden; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  white-space: nowrap;
  position: relative;
}

.btn--primary {
  background: var(--lime);
  color: var(--bg-0);
}
.btn--primary:hover {
  background: #defe6a;
  transform: translateY(-1px);
  box-shadow: 0 0 0 6px var(--lime-soft);
}

.btn--secondary {
  background: var(--bg-1);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
}
.btn--secondary:hover {
  background: var(--bg-2);
  border-color: var(--text-3);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
  padding: 0 12px;
}
.btn--ghost:hover { color: var(--text-1); background: var(--bg-1); }

.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }

.btn .arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(2px); }

/* ============ BENTO CARDS ============ */
.bento-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-spring), border-color 0.4s var(--ease-out), background 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-2);
}

.bento-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-3);
}

.bento-card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-4);
}

.bento-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 6px;
}

.bento-card h3 { margin-bottom: 10px; font-size: 22px; line-height: 1.15; }

.bento-card__desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin-bottom: var(--space-4);
}

.bento-card__visual {
  margin-top: auto;
  padding-top: var(--space-4);
}

.bento-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.bento-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.bento-card__list li::before {
  content: '+';
  color: var(--lime);
  flex-shrink: 0;
  font-weight: 600;
}

.bento-card--wide { grid-column: span 2; }

@media (max-width: 900px) {
  .bento-card--wide { grid-column: span 1; }
}

/* ============ MOCK CHAT (used as visual) ============ */
.mock-chat {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.mock-chat__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.mock-chat__avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.mock-chat__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.mock-chat__status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.mock-chat__status::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--status-online);
  box-shadow: 0 0 6px var(--status-online-glow);
}

.bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.bubble--user {
  align-self: flex-end;
  background: var(--bubble-ai);
  color: var(--bg-0);
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.bubble--ai {
  align-self: flex-start;
  background: var(--bubble-user);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 12px 14px;
  background: var(--bubble-user);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}

.bubble--typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.4s infinite ease-in-out;
}

.bubble--typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble--typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Bubble enter animation */
.bubble {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.bubble.is-in { opacity: 1; transform: translateY(0); }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-7) 0 var(--space-6);
  margin-top: var(--space-9);
}

.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.footer__brand-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.footer__brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 2px;
}
.footer__tag {
  font-size: 14px;
  color: var(--text-3);
  max-width: 320px;
  line-height: 1.55;
}

.footer__col-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  display: block;
}

.footer__col a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s var(--ease-out);
}

.footer__col a:hover { color: var(--lime); }

.footer__bottom {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-4);
}
