/* =========================================================================
   MazXai — core stylesheet
   Design system + components. Responsive breakpoints live in responsive.css.
   Written in plain CSS3 — no build step, no framework.
   ========================================================================= */

/* ---------- Brand tokens -------------------------------------------- */
:root {
  --primary: #4C5EF6;
  --primary-dark: #3745C4;
  --primary-light: #EEF0FE;
  --secondary: #0B0F1A;
  --accent: #21D4B4;
  --accent-glow: rgba(33, 212, 180, 0.35);

  --background: #FFFFFF;
  --surface: #F7F8FC;
  --surface-alt: #F1F2FA;
  --text: #10131E;
  --text-muted: #565C72;
  --text-inverse: #FFFFFF;
  --border: #E4E6F1;
  --border-strong: #CBD0E6;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 19, 30, 0.06);
  --shadow: 0 8px 24px rgba(16, 19, 30, 0.08);
  --shadow-lg: 0 24px 64px rgba(16, 19, 30, 0.12);
  --shadow-glow: 0 0 0 1px rgba(76, 94, 246, 0.08), 0 20px 48px rgba(76, 94, 246, 0.18);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Manrope', 'Inter', -apple-system, sans-serif;

  --container-width: 1240px;
  --header-height: 76px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark surfaces reused for hero / CTA panels regardless of light/dark mode
   preference — this product intentionally uses a fixed light theme, with
   deep-navy panels as a deliberate design accent (see .panel-dark). */
:root {
  --panel-dark-bg: #0B0F1A;
  --panel-dark-bg-2: #141A2E;
  --panel-dark-text: #F4F5FB;
  --panel-dark-muted: #A6ACC4;
  --panel-dark-border: rgba(255, 255, 255, 0.1);
}

/* ---------- Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Safety net: the page body must never scroll horizontally. Wide content
   (diagrams, tables, code) should scroll inside its own container instead
   — see e.g. .flow-card / .integration-grid — but this guards against any
   flex/grid child's intrinsic min-content width pushing the page wider
   than the viewport. */
html, body { max-width: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

img, svg, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { color: var(--text-muted); }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -60px;
  background: var(--secondary); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: var(--radius-sm);
  z-index: 1000; transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding-block: clamp(56px, 8vw, 108px); }
.section-tight { padding-block: clamp(40px, 5vw, 64px); }
.bg-surface { background: var(--surface); }
.bg-dark { background: var(--panel-dark-bg); color: var(--panel-dark-text); }
.bg-dark h2, .bg-dark h3 { color: var(--panel-dark-text); }
.bg-dark p { color: var(--panel-dark-muted); }

/* ---------- Section header ------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.bg-dark .eyebrow { background: rgba(76, 94, 246, 0.18); color: #A9B4FF; }

.section-header { max-width: 720px; margin-bottom: 3rem; }
.section-header--center { margin-inline: auto; text-align: center; }
.section-subtitle { margin-top: 0.9rem; font-size: 1.08rem; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-arrow { transition: transform var(--transition); }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
[dir="rtl"] .btn-primary:hover .btn-arrow { transform: translateX(-3px) scaleX(-1); }

.btn-secondary {
  background: var(--background);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.bg-dark .btn-secondary { background: transparent; color: var(--panel-dark-text); border-color: var(--panel-dark-border); }
.bg-dark .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-block { width: 100%; }

.cta-buttons { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.cta-buttons--center { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--primary); font-weight: 600;
  transition: gap var(--transition);
}
.link-arrow:hover { gap: 0.65rem; }
[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }

/* ---------- Header / navigation ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}
.logo { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--text); flex-shrink: 0; }
.logo-mark { display: flex; align-items: center; height: 32px; width: auto; color: var(--primary); }
.logo-mark svg { width: 100%; height: 100%; }
.logo-mark img { height: 100%; width: auto; display: block; }

.primary-nav { display: flex; align-items: center; gap: 1.75rem; flex: 1; justify-content: flex-end; }
.nav-list { display: flex; align-items: center; gap: 0.35rem; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.6rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  background: transparent; border: none; transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--primary); background: var(--surface); }
.chevron { width: 10px; height: 7px; transition: transform var(--transition); }
.nav-dropdown-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0;
  min-width: 280px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 50;
}
.dropdown--grid { min-width: 460px; grid-template-columns: 1fr 1fr; gap: 0.15rem; }
.has-dropdown.is-open .dropdown { display: flex; }
.has-dropdown.is-open .dropdown--grid { display: grid; }

.dropdown-link {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.65rem 0.75rem; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.dropdown-link:hover { background: var(--surface); }
.dropdown-link-icon { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.dropdown-link-icon svg { width: 100%; height: 100%; }
.dropdown-link strong { display: block; font-size: 0.92rem; font-weight: 600; }
.dropdown-link small { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 0.15rem; }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; margin-inline-start: 0.5rem; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }

/* ---------- Language switcher -------------------------------------------- */
.lang-switcher { position: relative; }
.lang-switcher-trigger {
  display: flex; align-items: center; gap: 0.35rem;
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.5rem 0.75rem; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 700;
}
.lang-switcher-trigger svg { width: 15px; height: 15px; }
.lang-switcher-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  background: var(--background); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 170px; padding: 0.4rem; display: none; z-index: 50;
}
.lang-switcher.is-open .lang-switcher-menu { display: block; }
.lang-switcher-option { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
.lang-switcher-option:hover { background: var(--surface); }
.lang-switcher-option.is-active { color: var(--primary); font-weight: 700; }
.lang-code { font-weight: 700; }
.lang-native { color: var(--text-muted); }
.footer-bottom .lang-switcher-trigger { background: transparent; border-color: var(--border-strong); }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 10vw, 120px) clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset-inline-end: -10%; top: -20%;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero-grid > * { min-width: 0; }
.hero-copy h1 { margin-bottom: 1.4rem; }
.hero-copy .section-subtitle { font-size: 1.15rem; max-width: 560px; margin-top: 0; margin-bottom: 2rem; }
.hero-tertiary { margin-top: 1.5rem; }

/* Hero workflow diagram */
.hero-visual { position: relative; }
.flow-card {
  background: var(--panel-dark-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  color: var(--panel-dark-text);
  position: relative;
  overflow: hidden;
}
.flow-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(76,94,246,0.35), transparent 55%);
  pointer-events: none;
}
.flow-card-label { font-size: 0.78rem; letter-spacing: 0.08em; color: var(--panel-dark-muted); font-weight: 700; margin-bottom: 1.4rem; position: relative; }
.flow-diagram { display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; }
.flow-node {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--panel-dark-bg-2);
  border: 1px solid var(--panel-dark-border);
  border-radius: var(--radius);
  padding: 0.75rem 1.15rem;
  font-size: 0.88rem; font-weight: 600;
  min-width: 190px; justify-content: center;
}
.flow-node svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.flow-node--agent { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 6px rgba(76,94,246,0.18); }
.flow-node--agent svg { color: #fff; }
.flow-arrow { width: 2px; height: 26px; background: linear-gradient(var(--panel-dark-border), var(--accent)); position: relative; }
.flow-arrow::after {
  content: ""; position: absolute; bottom: -1px; inset-inline-start: -3px;
  border: 4px solid transparent; border-top-color: var(--accent);
}
.flow-branch { display: flex; gap: 2.2rem; margin-block: 0; }
.flow-branch-col { display: flex; flex-direction: column; align-items: center; }
.flow-branch-connector { display: flex; align-items: center; width: 100%; position: relative; height: 26px; }
.flow-branch-connector::before {
  content: ""; position: absolute; top: 0; inset-inline-start: 50%; height: 26px; width: 2px;
  background: linear-gradient(var(--accent), var(--panel-dark-border));
}

/* pulse animation for the agent node — subtle */
.flow-node--agent { animation: pulse-glow 3.2s ease-in-out infinite; }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(76,94,246,0.18); }
  50% { box-shadow: 0 0 0 12px rgba(76,94,246,0.08); }
}

/* ---------- Trust strip --------------------------------------------------- */
.trust-strip { text-align: center; }
.trust-strip h2 { max-width: 780px; margin-inline: auto; }
.trust-strip p { max-width: 640px; margin-inline: auto; margin-top: 1rem; font-size: 1.05rem; }

/* ---------- Split section (What is an AI agent) --------------------------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center;
}
.split > * { min-width: 0; }
.split-reverse .split-media { order: 2; }
.agent-steps { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.75rem; }
.agent-step {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 1.1rem;
}
.agent-step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.agent-step span:last-child { font-size: 0.95rem; font-weight: 600; }

.chat-vs-agent { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compare-card { border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); }
.compare-card--chat { background: var(--surface); }
.compare-card--agent { background: var(--panel-dark-bg); color: var(--panel-dark-text); border-color: transparent; }
.compare-card--agent p { color: var(--panel-dark-muted); }
.compare-card h4 { font-family: var(--font-display); margin-bottom: 0.5rem; }

/* Vertical flow (customer email -> response) reused across pages */
.mini-flow { display: flex; flex-direction: column; gap: 0; margin-top: 1.5rem; }
.mini-flow-step {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0; font-size: 0.95rem; font-weight: 600;
}
.mini-flow-step svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.mini-flow-connector { width: 2px; height: 18px; background: var(--border-strong); margin-inline-start: 9px; }

/* ---------- Cards / feature grid ------------------------------------------ */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%; /* grid rows already stretch equally; without this the card
                   itself stays content-sized, so shorter text = shorter card */
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.94rem; }

/* fade-up reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Workflow / process diagrams ------------------------------------ */
.workflow--vertical { display: flex; flex-direction: column; align-items: stretch; max-width: 480px; margin-inline: auto; }
.workflow-step { display: flex; flex-direction: column; align-items: center; }
.workflow-step-box {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1.25rem; font-weight: 600; font-size: 0.95rem;
}
.workflow-step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.workflow-connector { width: 2px; height: 22px; background: var(--border-strong); }

.workflow--horizontal { display: flex; align-items: center; flex-wrap: wrap; gap: 0; justify-content: center; }
.workflow--horizontal .workflow-step { flex-direction: row; }
.workflow--horizontal .workflow-connector { width: 30px; height: 2px; margin-inline: 0.4rem; }

/* Process cards connected with a line (How It Works stages) */
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.process-card { position: relative; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.process-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--primary-light); -webkit-text-stroke: 1.5px var(--primary); margin-bottom: 0.75rem; }
.process-card h3 { margin-bottom: 0.5rem; }

/* Approval loop diagram */
.approval-flow { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; max-width: 900px; margin-inline: auto; }
.approval-node {
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; text-align: center; font-weight: 700; font-size: 0.92rem; min-width: 170px;
}
.approval-node--highlight { background: var(--primary); color: #fff; border-color: var(--primary); }
.approval-arrow { width: 46px; display: flex; justify-content: center; color: var(--border-strong); flex-shrink: 0; }
[dir="rtl"] .approval-arrow svg { transform: scaleX(-1); }

/* ---------- Steps (builder / how) ------------------------------------------ */
.steps-list { display: flex; flex-direction: column; gap: 1.25rem; }
.step { display: grid; grid-template-columns: auto auto 1fr; gap: 1.1rem; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); }
.step-number { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--border-strong); }
.step-icon { width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.step-icon svg { width: 20px; height: 20px; }
.step-body h3 { margin-bottom: 0.35rem; }
.step-body p { font-size: 0.94rem; }

/* Mock UI panel used on the Builder page */
.mock-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.mock-panel-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-panel-title { margin-inline-start: auto; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.mock-field { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.85rem 1rem; margin-bottom: 0.85rem; }
.mock-field-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 0.3rem; }
.mock-field-value { font-size: 0.92rem; font-weight: 600; }
.mock-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mock-tool-pill { background: var(--primary-light); color: var(--primary); border-radius: var(--radius-full); padding: 0.3rem 0.75rem; font-size: 0.78rem; font-weight: 700; }
.mock-status-pill { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface-alt); border-radius: var(--radius-full); padding: 0.35rem 0.85rem; font-size: 0.8rem; font-weight: 700; }
.mock-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Tabs (agent examples) ------------------------------------------ */
.tabs-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.tab-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 0.6rem 1.15rem; font-size: 0.88rem; font-weight: 600; color: var(--text-muted);
}
.tab-btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.agent-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.agent-detail > * { min-width: 0; }
.agent-detail-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }
.agent-detail-list li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.95rem; font-weight: 500; }
.agent-detail-list svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }

/* ---------- Timeline (example workflow) ------------------------------------ */
.timeline { position: relative; max-width: 640px; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; inset-inline-start: 19px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--primary), var(--accent));
}
.timeline-item { position: relative; padding-inline-start: 3.2rem; padding-block: 0.9rem; }
[dir="rtl"] .timeline-item { padding-inline-start: 0; padding-inline-end: 3.2rem; }
[dir="rtl"] .timeline::before { inset-inline-start: auto; inset-inline-end: 19px; }
.timeline-dot {
  position: absolute; inset-inline-start: 10px; top: 1rem; width: 20px; height: 20px; border-radius: 50%;
  background: var(--background); border: 3px solid var(--primary);
}
[dir="rtl"] .timeline-dot { inset-inline-start: auto; inset-inline-end: 10px; }
.timeline-item p { font-weight: 600; color: var(--text); font-size: 0.98rem; }
.timeline-quote {
  background: var(--surface); border-inline-start: 3px solid var(--primary); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; font-style: italic; color: var(--text); font-weight: 600; margin-bottom: 1.5rem;
}

/* ---------- Integrations grid ----------------------------------------------- */
.integration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.integration-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1rem; text-align: center; transition: box-shadow var(--transition), transform var(--transition);
}
.integration-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.integration-tile-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 800; color: var(--primary); font-size: 1.1rem;
}
.integration-tile-name { font-weight: 700; font-size: 0.92rem; }
.badge {
  font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.badge-available { background: rgba(33, 212, 180, 0.15); color: #12876F; }
.badge-coming_soon { background: var(--surface-alt); color: var(--text-muted); }
.badge-custom { background: var(--primary-light); color: var(--primary); }
.category-block { margin-bottom: 2.75rem; }
.category-block h3 { margin-bottom: 1rem; }

/* ---------- Pricing --------------------------------------------------------- */
.toggle-switch { position: relative; width: 52px; height: 28px; background: var(--border-strong); border-radius: var(--radius-full); border: none; flex-shrink: 0; }
.toggle-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform var(--transition); }
.toggle-switch[aria-checked="true"] { background: var(--primary); }
.toggle-switch[aria-checked="true"]::after { transform: translateX(24px); }
[dir="rtl"] .toggle-switch[aria-checked="true"]::after { transform: translateX(-24px); }
.toggle-label { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); }
.toggle-label.is-active { color: var(--text); }
.toggle-note { font-size: 0.8rem; color: var(--accent); font-weight: 700; }

.pricing-group { margin-bottom: 4rem; }
.pricing-group:last-of-type { margin-bottom: 0; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: stretch; }
/* Plan groups (Starters / Teams / Enterprise) hold 2 or 1 cards, not 4 —
   center them at a readable width instead of stretching across the full grid. */
.pricing-grid--pair { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-inline: auto; }
.pricing-grid--single { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }
.price-card {
  display: flex; flex-direction: column; background: var(--background); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.6rem; position: relative;
}
.price-card--highlighted { border-color: var(--primary); box-shadow: var(--shadow-glow); background: linear-gradient(180deg, var(--primary-light) 0%, var(--background) 22%); }
.price-card-badge {
  position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0.3rem 0.9rem; border-radius: var(--radius-full);
}
[dir="rtl"] .price-card-badge { transform: translateX(50%); }
.price-card h3 { margin-bottom: 0.4rem; }
.price-card-desc { font-size: 0.88rem; min-height: 42px; margin-bottom: 1.25rem; }
.price-card-amount { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; margin-bottom: 1.5rem; }
.price-card-amount:has(+ .price-card-note) { margin-bottom: 0.35rem; }
.price-card-amount small { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }
.price-card-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.15rem; }
.price-features { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.75rem; flex: 1; }
.price-features li { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.87rem; font-weight: 500; }
.price-features svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.price-features li.price-feature--negative { color: var(--text-muted); }
.price-features li.price-feature--negative svg { color: #D64545; }

.pricing-note { text-align: center; max-width: 600px; margin: 3rem auto 0; padding: 1.5rem; background: var(--surface); border-radius: var(--radius); }

/* ---------- FAQ accordion --------------------------------------------------- */
.faq-search { position: relative; max-width: 480px; margin: 0 auto 2.5rem; }
.faq-search input {
  width: 100%; padding: 0.85rem 1.2rem; border-radius: var(--radius-full);
  border: 1px solid var(--border-strong); font-size: 0.95rem;
}
.faq-categories { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }
.faq-list { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.5rem; font-weight: 700; font-size: 0.98rem; cursor: pointer; list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--text); border-radius: 2px; }
.faq-icon::before { width: 100%; height: 2px; top: 8px; }
.faq-icon::after { width: 2px; height: 100%; inset-inline-start: 8px; transition: transform var(--transition); }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-answer { padding: 0 1.5rem 1.4rem; font-size: 0.94rem; }
.faq-no-results { text-align: center; color: var(--text-muted); padding: 2rem 0; display: none; }

/* ---------- Forms ------------------------------------------------------------ */
.form-panel { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.form-field.span-2 { grid-column: 1 / -1; }
.form-field label { font-size: 0.85rem; font-weight: 700; }
.form-field label .req { color: #D64545; }
.form-field label .opt { color: var(--text-muted); font-weight: 500; }
.form-field input, .form-field select, .form-field textarea {
  padding: 0.75rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 0.95rem; background: var(--background); width: 100%;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--primary); }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: #D64545; }
.form-error-text { font-size: 0.8rem; color: #D64545; min-height: 1em; }
.form-honeypot { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 1rem; }
.form-alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-weight: 600; font-size: 0.92rem; }
.form-alert--success { background: rgba(33, 212, 180, 0.12); color: #128567; }
.form-alert--error { background: rgba(214, 69, 69, 0.1); color: #B33A3A; }

/* ---------- CTA panels -------------------------------------------------------- */
.cta-panel {
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-panel--dark { background: var(--panel-dark-bg); color: var(--panel-dark-text); }
.cta-panel--dark::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(76,94,246,0.35), transparent 55%), radial-gradient(circle at 85% 80%, var(--accent-glow), transparent 50%);
  pointer-events: none;
}
.cta-panel--dark h2 { color: #fff; }
.cta-panel--dark p { color: var(--panel-dark-muted); }
.cta-panel-content { position: relative; z-index: 1; max-width: 640px; margin-inline: auto; }
.cta-panel-content p { margin-block: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Custom AI solutions (alternating panel) --------------------------- */
.custom-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; background: var(--surface); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.5rem); }
.custom-panel > * { min-width: 0; }
.custom-list { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1.5rem; }
.custom-list li { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 0.95rem; }
.custom-list svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.custom-visual { display: grid; gap: 0.85rem; }
.custom-visual-card { background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: 0.85rem; font-weight: 700; font-size: 0.9rem; }
.custom-visual-card svg { width: 22px; height: 22px; color: var(--accent); }

/* ---------- Logo / integration strip -------------------------------------------- */
.logo-strip { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.logo-strip-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.65rem 1.2rem; font-weight: 700; font-size: 0.85rem; color: var(--text-muted);
}

/* ---------- Footer --------------------------------------------------------------- */
.site-footer { background: var(--panel-dark-bg); color: var(--panel-dark-text); padding-block: 4.5rem 2rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--panel-dark-border); }
.footer-brand .logo { color: #fff; }
.footer-tagline { color: var(--panel-dark-muted); font-size: 0.9rem; margin-block: 1rem 1.25rem; max-width: 220px; }
.footer-social { display: flex; gap: 0.7rem; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.footer-social a:hover { background: var(--primary); }
.footer-social svg { width: 16px; height: 16px; color: #fff; }
.footer-col h3 { color: #fff; font-size: 0.85rem; letter-spacing: 0.04em; margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { color: var(--panel-dark-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 2rem; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: var(--panel-dark-muted); font-size: 0.85rem; }
.footer-bottom .lang-switcher-trigger { color: var(--panel-dark-text); }
.footer-bottom .lang-switcher-menu { inset-inline-end: 0; inset-inline-start: auto; }

/* ---------- Cookie banner --------------------------------------------------------- */
.cookie-banner {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 200;
  background: var(--background); border-top: 1px solid var(--border);
  box-shadow: 0 -12px 32px rgba(16,19,30,0.12);
  padding: 1.25rem 1.5rem;
}
.cookie-banner-inner { max-width: var(--container-width); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cookie-banner-text h2 { font-size: 1rem; margin-bottom: 0.35rem; }
.cookie-banner-text p { font-size: 0.85rem; }
.cookie-banner-text a { color: var(--primary); font-weight: 700; }
.cookie-banner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-preferences-panel { max-width: var(--container-width); margin-inline: auto; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.cookie-preferences-panel[hidden] { display: none; }
.cookie-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cookie-pref-row p { font-size: 0.82rem; margin-top: 0.2rem; }
.cookie-pref-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- 404 --------------------------------------------------------------------- */
.notfound-hero { text-align: center; padding-block: clamp(80px, 14vw, 160px); }
.notfound-code { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--primary-light); -webkit-text-stroke: 2px var(--primary); margin-bottom: 1rem; }

/* ---------- Legal pages -------------------------------------------------------------- */
.legal-content { max-width: 760px; margin-inline: auto; }
.legal-content h2 { margin-top: 2.5rem; margin-bottom: 0.75rem; font-size: 1.35rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 0.5rem; }
.legal-updated { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 2rem; }
.legal-intro { padding: 1.1rem 1.4rem; background: var(--surface); border-radius: var(--radius); font-size: 0.92rem; margin-bottom: 2.5rem; }
mark.placeholder { background: rgba(244, 180, 60, 0.25); color: #7A5310; border-radius: 4px; padding: 0.05em 0.35em; font-weight: 600; font-style: normal; }

/* ---------- Alternating rows helper (visual variety) --------------------------------- */
.row-alt:nth-child(even) .split { direction: rtl; }
.row-alt:nth-child(even) .split > * { direction: ltr; }
[dir="rtl"] .row-alt:nth-child(even) .split { direction: ltr; }

/* ---------- Utility ------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.mx-auto { margin-inline: auto; }
.max-w-prose { max-width: 640px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
