/* ─── Kaspi POS Automation — marketing site stylesheet ───────────────────────
 * Single shared stylesheet used by every page under /site/. Vanilla CSS,
 * no preprocessor, no build step.
 *
 * Palette (per phase 4d brief):
 *   --brand        : #E2261D  Kaspi-red (sparingly — primary CTAs only)
 *   --bg           : #FFFFFF
 *   --bg-soft      : #FAFAFA  (alt sections)
 *   --text         : #1A1A1A
 *   --muted        : #6B7280
 *   --border       : #E5E7EB
 *   --accent       : #0EA5E9  (featured pricing card)
 * ────────────────────────────────────────────────────────────────────────── */

:root {
  --brand: #E2261D;
  --brand-dark: #B91C13;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-code: #0F172A;
  --text: #1A1A1A;
  --muted: #6B7280;
  --border: #E5E7EB;
  --accent: #0EA5E9;
  --accent-dark: #0284C7;
  --danger: #DC2626;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --maxw: 1120px;
  --gutter: 24px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 700; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

ul { padding-left: 1.25em; }

/* ─── Container helpers ──────────────────────────────────────────────────── */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Header / nav ───────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}

.site-logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.site-logo span { color: var(--brand); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}
.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--brand); text-decoration: none; }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language switcher */
.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  background: var(--bg);
}
.lang-switcher button {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lang-switcher button.is-active {
  background: var(--text);
  color: #fff;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
}
.btn--primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn--sm {
  padding: 6px 14px;
  font-size: 0.875rem;
}
.btn--lg {
  padding: 14px 26px;
  font-size: 1.05rem;
}
.btn--block {
  display: flex;
  width: 100%;
}
.btn:disabled, .btn.is-busy {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 64px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(226, 38, 29, 0.06), transparent 60%),
    var(--bg);
}
.hero__badge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero__title {
  font-size: 3rem;
  max-width: 820px;
  margin: 0 auto 18px;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 28px;
  color: var(--muted);
}
.hero__cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Section primitives ─────────────────────────────────────────────────── */

section.section {
  padding: 72px 0;
}
section.section--soft { background: var(--bg-soft); }
section.section__head {
  text-align: center;
  margin-bottom: 40px;
}
.section__title {
  font-size: 2rem;
  margin-bottom: 8px;
}
.section__subtitle {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ─── Features grid ──────────────────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.feature-card h3 {
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--muted);
  margin: 0;
}

/* ─── Pricing ────────────────────────────────────────────────────────────── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.pricing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.pricing-card--featured {
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.12);
  position: relative;
}
.pricing-card--featured::before {
  content: '★';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.pricing-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pricing-card__price {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
}
.pricing-card__period {
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
  margin-left: 4px;
}
.pricing-card__limit {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pricing-card__features li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
}
.pricing-card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}
.pricing-footnote {
  text-align: center;
  color: var(--muted);
  margin-top: 28px;
  font-size: 0.9rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Onboarding steps ───────────────────────────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.step-card h3 {
  margin-bottom: 6px;
}
.step-card p {
  color: var(--muted);
  margin: 0;
}

/* ─── FAQ accordion (native <details>) ───────────────────────────────────── */

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item__body {
  margin-top: 10px;
  color: var(--muted);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  color: var(--text);
}
.footer-col a:hover {
  color: var(--brand);
}
.footer-tagline {
  color: var(--muted);
  max-width: 320px;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* ─── Forms (login / signup) ─────────────────────────────────────────────── */

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--gutter);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 22px;
  text-align: center;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.field input {
  font: inherit;
  font-size: 1rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.1em;
}
.form-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0 0 12px;
  min-height: 1.1em;
  text-align: center;
}
.auth-card__footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-card__footer a {
  font-weight: 600;
}

/* ─── For-AI page ────────────────────────────────────────────────────────── */

.ai-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 40px;
}
.ai-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 500;
}
.ai-link:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}
.code-block {
  background: var(--bg-code);
  color: #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 820px;
  margin: 0 auto;
}

/* ─── Docs page ──────────────────────────────────────────────────────────── */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 820px;
  margin: 24px auto 0;
}
.docs-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text);
}
.docs-tile:hover {
  border-color: var(--brand);
  text-decoration: none;
}
.docs-tile strong { color: var(--text); font-size: 1.05rem; }
.docs-tile span { color: var(--muted); font-size: 0.9rem; }

/* ─── Responsive (mobile breakpoint ≤ 768 px) ────────────────────────────── */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero__title { font-size: 2.1rem; }
  .hero__subtitle { font-size: 1rem; }
  .hero { padding: 48px 0 40px; }
  section.section { padding: 48px 0; }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 14px;
    padding-bottom: 4px;
  }
  .site-nav a { font-size: 0.85rem; white-space: nowrap; }

  .features-grid,
  .pricing-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card--featured { transform: none; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-tagline { grid-column: 1 / -1; }

  .docs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 22px; }
  .site-header__actions { gap: 6px; }
  .site-header__actions .btn { padding: 8px 12px; font-size: 0.85rem; }
}
