/* ============================================================
   ai.urandom.it — style
   ============================================================ */

:root {
  --bg: #0b0e14;
  --bg-alt: #11151f;
  --bg-card: #161b27;
  --border: #232a3a;
  --text: #e6e9f0;
  --text-dim: #9aa3b5;
  --primary: #6d5cff;
  --primary-2: #38e1b7;
  --grad: linear-gradient(120deg, #6d5cff 0%, #38e1b7 100%);
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1120px, 92%); margin-inline: auto; }
.container-narrow { width: min(780px, 92%); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-family: var(--font);
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-primary { background: var(--grad); color: #0b0e14; box-shadow: 0 6px 20px rgba(109, 92, 255, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(109, 92, 255, 0.5); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-2); transform: translateY(-2px); }

/* ---------- nawigacja ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(11, 14, 20, 0.95); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad);
  color: #0b0e14;
  font-family: var(--mono);
  font-weight: 700;
  border-radius: 9px;
  font-size: 13px;
}
.logo-text { font-family: var(--mono); font-size: 15px; color: var(--text); }

.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; font-weight: 500; color: var(--text-dim); }
.nav-links a:not(.btn):hover { color: var(--text); }

.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(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 170px 0 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 400px at 85% -10%, rgba(109, 92, 255, 0.25), transparent 60%),
    radial-gradient(600px 380px at 10% 110%, rgba(56, 225, 183, 0.15), transparent 60%);
}
.hero-inner { max-width: 820px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(22, 27, 39, 0.7);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-2); box-shadow: 0 0 0 0 rgba(56, 225, 183, 0.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 225, 183, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(56, 225, 183, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 225, 183, 0); }
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 22px;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 18px; color: var(--text-dim); max-width: 640px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--text-dim); font-size: 14px; }

/* ---------- statystyki ---------- */
.stats { border-block: 1px solid var(--border); background: var(--bg-alt); padding: 46px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat-num { font-size: 40px; font-weight: 800; font-family: var(--mono); letter-spacing: -0.02em; }
.stat-label { color: var(--text-dim); font-size: 14px; margin-top: 6px; }

/* ---------- sekcje ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 14px; }
.section-head p:last-child { color: var(--text-dim); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-2);
  margin-bottom: 14px;
}

/* ---------- karty usług ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.service {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.service:hover { transform: translateY(-4px); border-color: var(--primary); }
.service-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: rgba(109, 92, 255, 0.14);
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 18px;
}
.service h3 { font-size: 18px; margin-bottom: 10px; }
.service p { color: var(--text-dim); font-size: 14.5px; }
.service-tag { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--primary-2); }

/* ---------- split (agent) ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split-text h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.015em; margin-bottom: 16px; }
.split-text > p { color: var(--text-dim); margin-bottom: 22px; }
.checklist { display: grid; gap: 12px; margin-bottom: 28px; }
.checklist li { position: relative; padding-left: 30px; font-size: 15px; color: var(--text-dim); }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--primary-2);
  font-weight: 700;
}
.agent-type { margin-bottom: 28px; }
.agent-type h3 { font-size: 18px; margin-bottom: 8px; }
.agent-type p { color: var(--text-dim); font-size: 14.5px; margin-bottom: 12px; }
.agent-type .checklist { margin-bottom: 0; }
.split-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.modele-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 30px;
  max-width: 760px;
}

/* demo okienko */
.demo-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.demo-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.demo-bar em { margin-left: 10px; font-style: normal; }
.demo-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2a3247; }
.demo-bar span:nth-child(1) { background: #ff5f57; }
.demo-bar span:nth-child(2) { background: #febc2e; }
.demo-bar span:nth-child(3) { background: #28c840; }
.demo-body { display: grid; gap: 12px; padding: 20px; max-height: 420px; overflow: hidden; }

.msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}
.msg.ai { background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); justify-self: start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--grad); color: #0b0e14; justify-self: end; font-weight: 500; border-bottom-right-radius: 4px; }
.msg.done { align-self: center; text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--primary-2); border-color: rgba(56, 225, 183, 0.3); }

/* ---------- kroki ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step-num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

/* ---------- FAQ ---------- */
.accordion { display: grid; gap: 12px; }
.acc-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.acc-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  background: none; border: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.acc-chevron { transition: transform 0.25s ease; color: var(--text-dim); font-size: 20px; }
.acc-item.open .acc-chevron { transform: rotate(90deg); color: var(--primary-2); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-body p { padding: 0 22px 20px; color: var(--text-dim); font-size: 14.5px; }

/* ---------- CTA ---------- */
.section-cta { padding: 0 0 100px; }
.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px 200px at 50% -30%, rgba(109, 92, 255, 0.22), transparent 65%),
    radial-gradient(400px 200px at 90% 120%, rgba(56, 225, 183, 0.12), transparent 60%);
  pointer-events: none;
}
.cta-box h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.015em; margin-bottom: 14px; position: relative; }
.cta-box p { color: var(--text-dim); max-width: 560px; margin: 0 auto 30px; position: relative; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- stopka ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 14px; }
.footer ul { display: grid; gap: 9px; }
.footer ul a { color: var(--text-dim); font-size: 14px; }
.footer ul a:hover { color: var(--text); }
.footer-note { color: var(--text-dim); font-size: 14px; max-width: 260px; margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 22px; color: var(--text-dim); font-size: 13px; }

/* ---------- czat ---------- */
.chat-fab {
  position: fixed;
  bottom: 26px; right: 26px;
  z-index: 60;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--grad);
  color: #0b0e14;
  border: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(109, 92, 255, 0.45);
  transition: transform 0.2s ease;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab svg { width: 26px; height: 26px; }

.chat {
  position: fixed;
  bottom: 96px; right: 26px;
  z-index: 60;
  width: min(380px, calc(100vw - 40px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  max-height: 560px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.chat.open { opacity: 1; visibility: visible; transform: none; }

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 16px 16px 0 0;
}
.chat-head strong { font-size: 15px; display: block; }
.chat-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--primary-2); }
.chat-status .pulse-dot { width: 7px; height: 7px; }
.chat-close { background: none; border: 0; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 4px 6px; }
.chat-close:hover { color: var(--text); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px; max-height: 380px;
}
.chat-body .msg { max-width: 92%; }

.chat-input {
  display: flex; gap: 9px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.chat-input input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
}
.chat-input input:focus { outline: none; border-color: var(--primary); }
.chat-input .btn { padding: 11px 15px; font-size: 15px; }

.typing {
  display: inline-flex; gap: 5px; align-items: center;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  justify-self: start;
}
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); animation: blink 1.3s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* ---------- responsywność ---------- */
@media (max-width: 920px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: rgba(11, 14, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 20px 4%;
    display: none;
  }
  .nav-links.open { display: flex; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 140px 0 70px; }
  .section { padding: 70px 0; }
  .cta-box { padding: 44px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-actions .btn { width: 100%; }
  .modele-list { grid-template-columns: 1fr; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
