/* =========================================================
   ZIV — ziv.pl
   Dark, technical one-page theme
   ========================================================= */

:root {
  --bg: #0a0e13;
  --bg-alt: #0d1218;
  --surface: #111821;
  --surface-2: #16202b;
  --border: #1f2b38;
  --border-strong: #2a3a4a;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #2ee6c5;
  --accent-2: #7c9cff;
  --accent-ink: #04221d;
  --danger: #ff6b6b;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1160px;
  --header-h: 68px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle blueprint grid in the background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(46, 230, 197, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 230, 197, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em;
  border-radius: 999px;
  font: 600 1rem/1 var(--font);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(46, 230, 197, 0);
}
.btn-primary:hover { box-shadow: 0 8px 28px -6px rgba(46, 230, 197, .55); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .6em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(10, 14, 19, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(10, 14, 19, .9); }

.nav { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-word { font: 700 1.5rem/1 var(--mono); letter-spacing: .02em; }
.cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.nav-tools { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--border-strong); border-radius: 999px;
}
.lang-switch button {
  font: 600 .75rem/1 var(--mono);
  color: var(--muted); background: none; border: 0;
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--surface-2); color: var(--accent); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px; padding: 10px 9px;
  background: none; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(64px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-block;
  font-size: .85rem; color: var(--muted);
  padding: 6px 12px; margin-bottom: 22px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: rgba(17, 24, 33, .6);
}
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 58ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 40px; }

.hero-stats {
  list-style: none; margin: 0; padding: 22px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  border-top: 1px solid var(--border);
}
.hero-stats strong { display: block; font: 700 1.5rem/1.2 var(--mono); color: var(--accent); }
.hero-stats span { font-size: .88rem; color: var(--muted); line-height: 1.4; display: block; }

.hero-visual { position: relative; }
.glow {
  position: absolute; inset: 10% -5% -10% 10%; z-index: -1;
  background: radial-gradient(closest-side, rgba(46, 230, 197, .22), rgba(124, 156, 255, .12), transparent);
  filter: blur(30px);
}

.terminal {
  background: #070a0e;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(46, 230, 197, .06);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 14px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.terminal-title { margin-left: 10px; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal-body {
  margin: 0; padding: 20px 20px 24px;
  min-height: 330px;
  font-size: .86rem; line-height: 1.75;
  color: #c9d4de;
  white-space: pre-wrap; word-break: break-word;
}
.terminal-body .t-prompt { color: var(--accent); }
.terminal-body .t-ai { color: var(--accent-2); }
.terminal-body .t-ok { color: #6ee787; }
.terminal-body .t-dim { color: #5d6b78; }
.terminal-body .t-add { color: #6ee787; }
.terminal-body .t-del { color: var(--danger); }
.t-caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--accent); animation: blink 1s steps(1) infinite; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.kicker { color: var(--accent); font-size: .85rem; margin-bottom: 12px; letter-spacing: .04em; }
.section-lead { color: var(--muted); font-size: 1.08rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover { border-color: rgba(46, 230, 197, .45); transform: translateY(-3px); background: var(--surface-2); }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card-icon {
  width: 46px; height: 46px; margin-bottom: 18px;
  display: grid; place-items: center;
  font-size: 1.05rem; font-weight: 700; color: var(--accent);
  background: rgba(46, 230, 197, .08);
  border: 1px solid rgba(46, 230, 197, .25);
  border-radius: 12px;
}
.card-highlight {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  border: 1px solid transparent;
}
.card-highlight:hover {
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
}

/* for-who paths */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.path {
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.path h3 { font-size: 1.4rem; }
.path > p { color: var(--muted); }
.path-tag { color: var(--accent-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }

.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  font: 700 .95rem/1.65 var(--mono); color: var(--accent);
}

/* process */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.step::after {
  content: ""; position: absolute; top: 44px; right: -19px;
  width: 18px; height: 1px; background: var(--border-strong);
}
.step:last-child::after { display: none; }
.step-no { display: block; font-size: 1.6rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; opacity: .9; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

/* why */
.why-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.why-grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.why-list { display: grid; gap: 16px; }
.why {
  padding: 26px 28px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.why p { color: var(--muted); margin: 0; }

/* tech */
.tech-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tech-group {
  padding: 26px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.tech-group:last-child { grid-column: 1 / -1; }
.tech-group h3 { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: 16px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  font: 500 .88rem/1 var(--mono);
  padding: 9px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s, color .2s;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }
.chips .chip-accent { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.chips .chip-accent:hover { color: var(--accent-ink); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  position: relative;
  padding: 34px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.plan > p:not(.plan-sub) { color: var(--muted); }
.plan h3 { font-size: 1.4rem; margin-bottom: 4px; }
.plan-sub { color: var(--accent); font-size: .85rem; margin-bottom: 16px; }
.plan-featured { border-color: var(--accent); box-shadow: 0 20px 60px -30px rgba(46, 230, 197, .5); }
.badge {
  position: absolute; top: -12px; left: 30px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}

/* faq */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.faq details[open] { border-color: rgba(46, 230, 197, .4); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font: 400 1.5rem/1 var(--mono); color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 24px 22px; margin: 0; color: var(--muted); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-meta { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.contact-meta li { font-size: 1.02rem; }
.contact-meta .mono { display: inline-block; min-width: 56px; }

.contact-form {
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid; gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  font: 400 1rem/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 230, 197, .15);
}
.field .invalid, .field input.invalid, .field textarea.invalid { border-color: var(--danger); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.consent.invalid span { color: var(--danger); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { margin: 0; min-height: 1.5em; font-size: .95rem; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--danger); }

/* footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-grid p { margin: 0; }
.footer-grid .brand + p { margin-top: 6px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cursor, .t-caret { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step::after { display: none; }
}

@media (max-width: 960px) {
  .hero-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-grid .section-head { position: static; }
  .cards, .plans { grid-template-columns: 1fr 1fr; }
  .plans { gap: 28px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 24px 24px;
    background: rgba(10, 14, 19, .98);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-links .btn { margin-top: 18px; }
  .nav-tools { margin-left: auto; }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .cards, .paths, .plans, .tech-groups, .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .hero-stats li { display: flex; align-items: baseline; gap: 12px; }
  .hero-stats strong { min-width: 70px; }
  .path, .contact-form, .plan { padding: 26px 22px; }
  .terminal-body { font-size: .78rem; min-height: 400px; padding: 16px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}
