/* ══════════════════════════════════════════════════════════
   EVRST Invoice — Design System
   Inter-only · Royal-blue accent (from logo) · Slate neutrals
   Shared by every page in the site
   ══════════════════════════════════════════════════════════ */

:root {
  /* Brand & neutrals — royal blue, aligned to logo.png gradient */
  --brand: #2563EB;
  --brand-dark: #1E40AF;
  --brand-navy: #1E3A8A;
  --brand-sky: #3B82F6;
  --brand-soft: #EFF6FF;
  --brand-soft-2: #BFDBFE;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;
  --ink-4: #94A3B8;
  --line: #E2E8F0;
  --line-2: #F1F5F9;
  --surface: #F8FAFC;
  --white: #FFFFFF;

  /* Status */
  --success: #10B981;
  --success-dark: #059669;
  --success-soft: #ECFDF5;
  --success-soft-2: #D1FAE5;
  --success-border: #BBF7D0;
  --success-text: #166534;
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-soft: #FFFBEB;
  --amber-border: #FDE68A;
  --amber-text: #B45309;
  --rose: #EF4444;
  --rose-soft: #FEF2F2;
  --rose-border: #FECACA;
  --rose-text: #B91C1C;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #FFFFFF;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--brand); color: #fff; }

/* ── Tabular numbers (used everywhere a number appears) ── */
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-2);
  transition: box-shadow 200ms var(--ease);
}
.nav.is-scrolled { box-shadow: 0 1px 3px rgba(15,23,42,0.04); }
.nav-link {
  position: relative; padding: 6px 12px; border-radius: 8px;
  transition: background 150ms ease-out, color 150ms ease-out;
  font-size: 14px; font-weight: 500; color: var(--ink-3);
  display: inline-flex; align-items: center;
}
.nav-link:hover { background: var(--line-2); color: var(--ink); }
.nav-link.is-active { background: var(--line-2); color: var(--ink); }
.nav-mobile {
  display: none;
  position: absolute; top: 56px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 24px 20px;
  flex-direction: column; gap: 4px;
}
.nav-mobile.is-open { display: flex; }
.nav-mobile .nav-link { padding: 10px 12px; font-size: 15px; }
@media (max-width: 767px) {
  .nav-links-desktop { display: none !important; }

  /* ── Tap-target sizing (WCAG 2.5.5 / Apple HIG ≥ 44×44) ── */
  .lang-switcher button {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .btn-primary,
  .btn-outline,
  .btn-ink { min-height: 44px; }
  .btn-hero,
  .btn-white { min-height: 44px; padding: 12px 22px; }
  .btn-ghost { min-height: 44px; }
  .checkout-btn { min-height: 44px; padding: 12px 14px; }
  .font-option,
  .layout-option { min-height: 44px; padding: 12px 12px; }
  .color-swatch { width: 32px; height: 32px; }
  details.faq > summary { min-height: 44px; padding: 14px 0; }

  /* Hero mockup on mobile — drop fixed min-height, hide DB shadow stack,
     and remove the inline margin that pushes the mockup off-screen. */
  .hero-mockup-col { min-height: 0 !important; }
  .db-layer { display: none; }
  .hero-mockup-ml { margin-left: 0 !important; }

  /* Tighten heavy section padding on mobile. */
  .section-pad-lg { padding-top: 56px; padding-bottom: 56px; }
  .section-pad-md { padding-top: 40px; padding-bottom: 40px; }
  .cta-card-pad { padding: 28px 20px; }

  /* Inventory mockup grid — 12-col layout collapses on narrow viewports.
     Stack rows: name spans left, qty/cost stack right, status spans full width. */
  .inv-row {
    grid-template-columns: 1fr 70px;
    grid-template-areas:
      "name qty"
      "name cost"
      "status status";
    row-gap: 2px;
  }
  .inv-row > div:nth-child(1) { grid-area: name; }
  .inv-row > div:nth-child(2) { grid-area: qty; text-align: right !important; }
  .inv-row > div:nth-child(3) { grid-area: cost; text-align: right !important; }
  .inv-row > div:nth-child(4) { grid-area: status; text-align: right; }

  /* Pricing compare table — let it scroll horizontally on narrow screens,
     and add visual affordance. */
  .compare-table-wrap {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
  }

  /* Footer grid — reduce gap on mobile */
  footer .grid { gap: 32px; }

  /* Hero stat chips — allow wrap so they never overflow viewport */
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .hero-stats > * { flex: 1 1 30%; min-width: 90px; }

  /* POS / loyalty mockup buttons — raise padding to 44px */
  .pos-mock-btn { min-height: 44px; padding: 12px 16px; }

  /* Two-column content sections — reduce gap on mobile */
  .section-gap-lg { gap: 32px; }
  .section-gap-md { gap: 24px; }

  /* Email links — let long addresses break instead of overflowing */
  .contact-email { word-break: break-all; }
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--brand); color: #fff; border-radius: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  transition: background 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
  box-shadow: 0 1px 3px rgba(37,99,235,0.3);
  cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.btn-primary:active { transform: scale(0.95); }

.btn-hero {
  background: var(--brand); color: #fff; border-radius: 12px;
  padding: 14px 28px; font-size: 15px; font-weight: 600;
  transition: background 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
  cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-hero:hover { background: var(--brand-dark); box-shadow: 0 6px 20px rgba(37,99,235,0.4); transform: translateY(-1px); }
.btn-hero:active { transform: scale(0.95) translateY(0); }

.btn-ghost {
  color: var(--brand); font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; background: none; border: none;
  transition: color 150ms ease-out, gap 150ms ease-out;
  padding: 14px 0;
  text-decoration: none;
}
.btn-ghost:hover { color: var(--brand-dark); gap: 10px; }

.btn-ink {
  background: var(--ink); color: #fff; border-radius: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  transition: background 150ms ease-out, transform 150ms ease-out;
  cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-ink:hover { background: var(--ink-2); }
.btn-ink:active { transform: scale(0.95); }

.btn-outline {
  background: #fff; color: var(--ink); border-radius: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line);
  transition: background 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--ink-3); }
.btn-outline:active { transform: scale(0.95); }

.btn-white {
  background: #fff; color: var(--brand); border-radius: 12px;
  padding: 14px 28px; font-size: 15px; font-weight: 700;
  transition: background 150ms ease-out, transform 150ms ease-out;
  cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-white:hover { background: var(--brand-soft); }
.btn-white:active { transform: scale(0.95); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--success-soft); color: var(--success-text);
  border: 1px solid var(--success-border);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 500;
}
.badge-offline {
  background: var(--brand-soft); color: var(--brand-dark);
  border-color: var(--brand-soft-2);
}
.badge-amber {
  background: var(--amber-soft); color: var(--amber-text);
  border-color: var(--amber-border);
}
.badge-rose {
  background: var(--rose-soft); color: var(--rose-text);
  border-color: var(--rose-border);
}

/* ── HERO MOCKUP CARD (simulated app window) ── */
.mockup-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 24px rgba(15,23,42,0.08), 0 1px 4px rgba(15,23,42,0.04);
  transition: box-shadow 200ms ease-out;
}
.mockup-card:hover { box-shadow: 0 8px 40px rgba(15,23,42,0.12), 0 2px 8px rgba(15,23,42,0.06); }

.window-chrome { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.window-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-red { background: #F87171; }
.dot-amber { background: #FBBF24; }
.dot-green { background: #34D399; }

.total-flash { transition: background 200ms ease-out, color 200ms ease-out; border-radius: 6px; padding: 2px 6px; }
.total-flash.active { background: var(--success-soft-2); color: var(--success-text); }

.cursor-simulate {
  width: 8px; height: 18px; background: var(--brand);
  display: inline-block; border-radius: 1px; margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: middle; opacity: 0;
  transition: opacity 150ms ease-out;
}
.mockup-card:hover .cursor-simulate { opacity: 1; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.db-layer {
  background: var(--ink); border-radius: 12px; padding: 16px 20px;
  position: absolute; bottom: -20px; left: -24px; right: 24px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.3);
  z-index: 0;
}

/* ── TRUST / FEATURE CARDS ── */
.trust-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 28px;
  background: #fff;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.trust-card:hover { border-color: #CBD5E1; box-shadow: 0 4px 16px rgba(15,23,42,0.07); }
.trust-icon {
  transition: transform 150ms ease-out;
  display: inline-block;
}
.trust-card:hover .trust-icon { transform: translateY(-2px); }

/* ── TIMELINE ── */
.timeline-line-fill {
  height: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-sky));
  transition: height 800ms ease-out;
  border-radius: 2px;
}
.timeline-line-fill.visible { height: 3px; }
.timeline-step { opacity: 0.4; transition: opacity 600ms ease-out; }
.timeline-step.lit { opacity: 1; }
.timeline-track { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }

/* ── INVENTORY ROW ── */
.inv-row { transition: background 150ms ease-out; border-radius: 8px; }
.inv-row:hover { background: var(--amber-soft); }
.inv-status { transition: background 150ms ease-out, color 150ms ease-out; }

/* ── POS BLOCK ── */
.pos-card {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
  background: #fff;
}
.pos-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15,23,42,0.1); }

.checkout-btn {
  background: var(--line-2); color: var(--ink-3); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; font-weight: 500; cursor: pointer; border: none;
  transition: background 100ms ease-out, color 100ms ease-out, transform 100ms ease-out;
  text-align: center;
  white-space: nowrap;
}
.checkout-btn:hover { background: var(--line); color: var(--ink); transform: scale(0.97); }
.checkout-btn.active { background: var(--brand); color: #fff; transform: scale(0.97); }

.pay-pill { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: background 100ms ease-out, color 100ms ease-out; }
.pay-pill.on { background: var(--brand); color: #fff; }
.pay-pill.off { background: var(--line-2); color: var(--ink-3); }
.pay-pill.off:hover { background: var(--line); }

/* POS — Process Payment button states */
.btn-primary.is-processing {
  background: var(--ink-2);
  box-shadow: none;
  cursor: wait;
  opacity: 0.85;
}
.btn-primary.is-success {
  background: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  cursor: default;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.7s linear infinite; transform-origin: 50% 50%; }

/* POS tender info line */
.tender-info { transition: opacity 150ms ease-out; }

/* Receipt toast slide-in */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.receipt-toast { animation: toastIn 200ms ease-out; }

/* ── BRAND STUDIO ── */
.studio-control {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
  cursor: pointer; transition: border-color 150ms ease-out, background 150ms ease-out;
  background: #fff;
}
.studio-control:hover, .studio-control.active { border-color: var(--brand); background: var(--brand-soft); }
.studio-control.has-file { border-color: var(--success); background: var(--success-soft); }
.studio-control.has-file:hover { border-color: var(--success); }
.studio-control .logo-thumb { width: 100%; height: 100%; background-size: cover; background-position: center; border-radius: 6px; }

.receipt-canvas {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; font-size: 13px; transition: max-width 250ms ease-out, padding 250ms ease-out, font-size 250ms ease-out, background 250ms ease-out, border-color 250ms ease-out, box-shadow 250ms ease-out;
  box-shadow: 0 2px 12px rgba(15,23,42,0.06);
}
.receipt-canvas.brand-update .receipt-header { font-size: 18px; }

.receipt-header { transition: font-size 200ms ease-out, color 200ms ease-out; font-weight: 700; font-size: 15px; }
.receipt-total { transition: color 200ms ease-out; font-weight: 700; color: var(--ink); }

/* Brand Studio — uploaded logo in receipt */
.receipt-logo {
  display: block;
  max-height: 36px;
  max-width: 160px;
  object-fit: contain;
  transition: opacity 200ms ease-out;
}
.receipt-logo.is-loaded { animation: logoIn 220ms ease-out; }
@keyframes logoIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Brand Studio — upload error */
.upload-error {
  color: var(--rose);
  font-size: 11px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: shake 220ms ease-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-3px); }
  60%      { transform: translateX(3px); }
  80%      { transform: translateX(-1px); }
}

/* Color swatch picker */
.color-swatch {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer; transition: transform 120ms ease-out, box-shadow 120ms ease-out;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line);
  padding: 0;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px currentColor, 0 2px 6px rgba(0,0,0,0.15);
}

/* Font / Layout option buttons (shared style) */
.font-option,
.layout-option {
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  transition: border-color 100ms ease-out, background 100ms ease-out, color 100ms ease-out;
  text-align: center;
  white-space: nowrap;
}
.font-option { font-size: 13px; font-weight: 600; }
.font-option:hover,
.layout-option:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.font-option.active,
.layout-option.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* iOS-style toggle switch */
.toggle-switch {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--line);
  position: relative; cursor: pointer;
  transition: background 180ms ease-out;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.toggle-switch .toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.toggle-switch.on { background: var(--brand); }
.toggle-switch.on .toggle-knob { transform: translateX(18px); }

/* Receipt — 1-column layout override */
.receipt-canvas.layout-1col .receipt-row-2col {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.receipt-canvas.layout-1col .receipt-row-2col > div.text-right { text-align: center; }

/* Receipt — thermal print mode */
.receipt-canvas.thermal {
  max-width: 280px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11.5px;
  padding: 18px 16px;
  background: #fdfdfa;
  border: 1px dashed #cbd5e1;
  box-shadow: none;
}
.receipt-canvas.thermal .receipt-header {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.receipt-canvas.thermal .border-t,
.receipt-canvas.thermal [class*="border-t"] { border-top-style: dashed !important; }
.receipt-canvas.thermal [class*="border-dashed"] { border-style: dashed !important; }
.receipt-canvas.thermal .receipt-row-2col {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.receipt-canvas.thermal .receipt-row-2col > div.text-right { text-align: center; }

/* Sales chart — interactive bar hover + tooltip */
.chart-bar {
  position: relative;
  cursor: pointer;
  transition: filter 150ms ease-out, transform 150ms ease-out;
}
.chart-bar:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}
.chart-bars-wrap:hover .chart-bar:not(:hover) {
  opacity: 0.45;
}
.chart-tooltip {
  position: absolute;
  background: var(--ink);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-8px);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(15,23,42,0.25);
}
.chart-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--ink);
}
.chart-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-12px);
}
.chart-tooltip .tip-label {
  display: block;
  color: #94A3B8;
  font-size: 10px;
  margin-bottom: 1px;
}
.chart-tooltip .tip-value {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
}

/* Receipt — center the brand row (logo + text) in 1-col & thermal modes.
   The brand row is a flex container, so text-align on the parent doesn't reach
   its children — we need justify-content on the flex row itself, and
   text-align on the brand text div for the text within. */
.receipt-canvas.layout-1col .brand-row,
.receipt-canvas.thermal .brand-row {
  justify-content: center;
}
.receipt-canvas.layout-1col #receiptBrand,
.receipt-canvas.thermal #receiptBrand {
  text-align: center;
}
.receipt-canvas.layout-1col .receipt-logo,
.receipt-canvas.thermal .receipt-logo {
  margin: 0 auto;
}

/* Logo remove button */
#logoRemoveBtn { transition: background 120ms ease-out, color 120ms ease-out; }

/* ── SCROLL REVEALS ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease-out, transform 500ms ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── MISC ── */
.stat-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; }
.spec-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.spec-row:last-child { border-bottom: none; }

/* Stepper / breadcrumb */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-bottom: 16px; }
.crumbs a { color: var(--ink-3); transition: color 150ms ease-out; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--ink-4); }

/* Eyebrow / section tag */
.eyebrow {
  display: inline-block;
  color: var(--brand); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 12px;
}

/* Pricing card */
.price-card {
  border: 1px solid var(--line); border-radius: 20px; padding: 36px;
  background: #fff; transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
  position: relative;
}
.price-card:hover { border-color: var(--ink-4); box-shadow: 0 4px 24px rgba(15,23,42,0.06); }
.price-card.featured { border-color: var(--brand); box-shadow: 0 8px 32px rgba(37,99,235,0.18); }
.price-card.featured:hover { border-color: var(--brand); }

/* Comparison table */
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.compare-table th, .compare-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.compare-table th { color: var(--ink-3); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.compare-table td:first-child { font-weight: 500; color: var(--ink); }
.compare-table tr:last-child td { border-bottom: none; }

/* FAQ accordion (native <details>) */
details.faq { border-bottom: 1px solid var(--line-2); padding: 20px 0; }
details.faq > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: var(--ink); font-size: 16px;
  transition: color 150ms ease-out;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after {
  content: "+"; font-size: 22px; font-weight: 400;
  color: var(--ink-3); transition: transform 200ms ease-out, color 150ms ease-out;
  margin-left: 16px;
}
details.faq[open] > summary::after { transform: rotate(45deg); color: var(--brand); }
details.faq > summary:hover { color: var(--brand); }
details.faq > .answer { padding-top: 12px; color: var(--ink-3); font-size: 15px; line-height: 1.6; }

/* Marquee */
.marquee {
  display: flex; gap: 48px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 48px; flex-shrink: 0; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { color: var(--ink-3); font-size: 16px; font-weight: 500; white-space: nowrap; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Step indicator (numbered list) */
.steps { display: flex; flex-direction: column; gap: 24px; }
.step { display: flex; gap: 16px; }
.step-num {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  border: 2px solid var(--brand-soft-2);
}

/* Code / mono */
code, .mono {
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--line-2); padding: 1px 6px; border-radius: 4px;
  color: var(--ink-2);
}

/* Spinner / status dot */
.dot-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  position: relative; flex-shrink: 0;
}
.dot-pulse::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; background: var(--success); opacity: 0.4;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.4; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cursor-simulate { animation: none; opacity: 1; }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════
   i18n — Language switcher + Arabic / RTL support
   ══════════════════════════════════════════════════════════ */

/* Language switcher in the nav */
.lang-switcher { display: inline-flex; }
.lang-switcher button { color: var(--ink-3); line-height: 1; }
.lang-switcher button.is-active {
  background: var(--brand);
  color: #fff;
}
.lang-switcher button:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.lang-switcher button:last-child  { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
[dir="rtl"] .lang-switcher button:first-child { border-top-left-radius: 0; border-bottom-left-radius: 0; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
[dir="rtl"] .lang-switcher button:last-child  { border-top-right-radius: 0; border-bottom-right-radius: 0; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
[dir="rtl"] .lang-switcher button + button { border-left: 1px solid var(--line); }

/* When Arabic is active, swap to Cairo across the whole site.
   Cairo includes both Latin and Arabic glyphs in one family. */
html[lang="ar"], html[lang="ar"] body {
  font-family: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
}

/* RTL layout adjustments — most handled by flex-direction auto-flip,
   but a few specifics need explicit overrides. */
[dir="rtl"] .window-chrome { direction: rtl; }
[dir="rtl"] .timeline-step { text-align: right; }
[dir="rtl"] .crumbs { direction: rtl; flex-direction: row-reverse; }
[dir="rtl"] .marquee, [dir="rtl"] .marquee-track { direction: ltr; }
[dir="rtl"] .studio-control .flex,
[dir="rtl"] .studio-control [class*="flex"] { direction: rtl; }
[dir="rtl"] .reveal { direction: rtl; }
[dir="rtl"] .compare-table th,
[dir="rtl"] .compare-table td { text-align: right; }
[dir="rtl"] .receipt-canvas { direction: rtl; }
[dir="rtl"] .receipt-canvas .text-right { text-align: left; }
[dir="rtl"] .receipt-canvas .text-left { text-align: right; }
[dir="rtl"] .spec-row { flex-direction: row-reverse; }
[dir="rtl"] footer .grid { direction: rtl; }
[dir="rtl"] .steps { direction: rtl; }
[dir="rtl"] .steps .step { flex-direction: row-reverse; }

/* Toggle switch — physical-left knob + translateX slide both flip in RTL */
[dir="rtl"] .toggle-switch .toggle-knob { left: auto; right: 2px; }
[dir="rtl"] .toggle-switch.on .toggle-knob { transform: translateX(-18px); }

/* Timeline progress gradient — start from logical end in RTL */
[dir="rtl"] .timeline-line-fill {
  background: linear-gradient(270deg, var(--brand), var(--brand-sky));
}

/* Chart tooltip caret — anchor via logical start, not physical left */
[dir="rtl"] .chart-tooltip::after {
  left: auto; right: 50%;
  transform: translateX(50%);
}

/* DB layer (absolute-positioned shadow stack under hero mockup)
   uses physical offsets; flip in RTL so the stack anchors to the
   logical-start side instead of clipping off-canvas. */
[dir="rtl"] .db-layer {
  left: auto; right: -24px;
}

/* Mobile nav-toggle (hamburger) — in LTR it sits right; mirror in RTL */
@media (max-width: 767px) {
  [dir="rtl"] .nav-toggle { right: auto; left: 16px; }
}

/* Demo components now follow the page direction (RTL in Arabic mode).
   The Unicode bidi algorithm handles numbers/prices flowing correctly. */

/* Magnetic button effect removed — see initMagnetic removal in main.js. */

/* ══════════════════════════════════════════════════════════
   Brand gradient (echoes logo: sky apex → navy base)
   ══════════════════════════════════════════════════════════ */
.brand-gradient {
  background: linear-gradient(135deg, var(--brand-sky) 0%, var(--brand) 45%, var(--brand-navy) 100%);
}

/* ══════════════════════════════════════════════════════════
   Contact CTA cards (Call / WhatsApp / Email)
   ══════════════════════════════════════════════════════════ */
.contact-card {
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  background: #fff; text-decoration: none;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
}
.contact-card:hover {
  border-color: var(--brand); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15,23,42,0.08);
}
.contact-card .contact-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.contact-icon.icon-call  { background: var(--brand-soft); color: var(--brand); }
.contact-icon.icon-wa    { background: #DCFCE7; color: #16A34A; }
.contact-icon.icon-email { background: var(--surface); color: var(--ink-2); }

/* WhatsApp button (brand-green) */
.btn-wa {
  background: #25D366; color: #fff; border-radius: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer; text-decoration: none;
  transition: background 150ms ease-out, transform 150ms ease-out;
}
.btn-wa:hover { background: #1EBE57; }
.btn-wa:active { transform: scale(0.96); }

/* ══════════════════════════════════════════════════════════
   Contact form (Web3Forms)
   ══════════════════════════════════════════════════════════ */
.contact-form label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.contact-form textarea { resize: vertical; min-height: 96px; }
.form-status { font-size: 14px; font-weight: 500; margin-top: 4px; }
.form-status.ok  { color: var(--success-text); }
.form-status.err { color: var(--rose-text); }

/* ══════════════════════════════════════════════════════════
   Currency switcher (nav) + launch pricing
   ══════════════════════════════════════════════════════════ */
.currency-switcher {
  position: relative; display: inline-flex; align-items: center;
}
.currency-switcher select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-2);
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 7px 26px 7px 10px; cursor: pointer; line-height: 1;
  transition: border-color 150ms ease-out;
}
.currency-switcher select:hover { border-color: var(--ink-4); }
.currency-switcher::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 6px; height: 6px; pointer-events: none;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
}
[dir="rtl"] .currency-switcher select { padding: 7px 10px 7px 26px; }
[dir="rtl"] .currency-switcher::after { right: auto; left: 10px; }

/* Launch offer badge + price block */
.launch-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--amber-soft); color: var(--amber-text);
  border: 1px solid var(--amber-border);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.price-base {
  color: var(--ink-4); text-decoration: line-through;
  font-weight: 600; font-size: 1.4rem;
}
.price-launch { color: var(--ink); font-weight: 800; }
.price-sym { color: var(--ink-3); font-weight: 600; }
.price-alt { color: var(--ink-4); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Single license card (centered hero pricing) */
.license-card {
  border: 1px solid var(--brand-soft-2); border-radius: 24px;
  padding: 40px; background: #fff; position: relative;
  box-shadow: 0 8px 40px rgba(37,99,235,0.10);
}

/* Roadmap "coming soon" chip */
.badge-soon {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--line-2); color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 600;
}

@media (max-width: 767px) {
  .currency-switcher select { padding: 8px 26px 8px 10px; min-height: 40px; }
  .license-card { padding: 28px 22px; }
  .btn-wa { min-height: 44px; }
}

/* ══════════════════════════════════════════════════════════
   Promotional launch-offer pop-up (injected by main.js)
   ══════════════════════════════════════════════════════════ */
.promo-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 350ms ease, visibility 350ms ease;
}
.promo-overlay.is-open { opacity: 1; visibility: visible; }
.promo-card {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
  transform: translateY(26px) scale(0.96); opacity: 0;
  transition: transform 450ms var(--ease), opacity 450ms var(--ease);
}
.promo-overlay.is-open .promo-card { transform: translateY(0) scale(1); opacity: 1; }
.promo-head {
  position: relative; padding: 30px 28px 24px; color: #fff; overflow: hidden;
}
.promo-head::after {
  content: ""; position: absolute; top: -40%; right: -10%;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); pointer-events: none;
}
[dir="rtl"] .promo-head::after { right: auto; left: -10%; }
.promo-head .launch-badge {
  position: relative; z-index: 1;
  background: rgba(255, 255, 255, 0.22); color: #fff; border-color: rgba(255,255,255,0.35);
  margin-bottom: 14px;
}
.promo-title { position: relative; z-index: 1; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.promo-sub { position: relative; z-index: 1; margin-top: 8px; font-size: 0.95rem; color: rgba(255,255,255,0.9); }
.promo-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); color: #fff;
  display: grid; place-items: center; border: none; cursor: pointer;
  transition: background 150ms ease;
}
.promo-close:hover { background: rgba(255, 255, 255, 0.4); }
[dir="rtl"] .promo-close { right: auto; left: 14px; }
.promo-body { padding: 24px 28px 28px; text-align: center; }
.promo-price { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 4px 0 2px; }
.promo-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.promo-later {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--ink-4); font-size: 13px; font-weight: 500;
  transition: color 150ms ease;
}
.promo-later:hover { color: var(--ink-3); }
@media (max-width: 767px) {
  .promo-card { max-width: 100%; }
  .promo-close { min-height: 32px; }
}

/* ══════════════════════════════════════════════════════════
   Real app screenshots — branded window frame
   ══════════════════════════════════════════════════════════ */
.shot-figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.app-shot {
  width: 100%; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: #fff;
  box-shadow: 0 18px 50px rgba(15,23,42,0.14), 0 3px 10px rgba(15,23,42,0.05);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}
.app-shot:hover { box-shadow: 0 26px 70px rgba(15,23,42,0.18), 0 4px 14px rgba(15,23,42,0.07); transform: translateY(-2px); }
.app-shot .shot-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.app-shot .shot-label {
  margin-left: 10px; font-size: 12px; color: var(--ink-4);
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[dir="rtl"] .app-shot .shot-bar { flex-direction: row-reverse; }
[dir="rtl"] .app-shot .shot-label { margin-left: 0; margin-right: 10px; }
.app-shot img { display: block; width: 100%; height: auto; }
.shot-caption {
  margin-top: 14px; font-size: 13px; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  justify-content: center; text-align: center;
}
.shot-caption .shot-live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--success-text); font-weight: 600;
}

/* Real-life usage scenes (AI photo + real screen composited) */
.scene-card {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--ink);
  box-shadow: 0 16px 44px rgba(15,23,42,0.16), 0 3px 10px rgba(15,23,42,0.05);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}
.scene-card:hover { box-shadow: 0 24px 60px rgba(15,23,42,0.22), 0 4px 14px rgba(15,23,42,0.07); transform: translateY(-2px); }
.scene-card img { display: block; width: 100%; height: auto; }
.scene-cap {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100% - 28px);
  background: rgba(15,23,42,0.62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-size: 13px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
}
[dir="rtl"] .scene-cap { left: auto; right: 14px; }
.scene-cap .dot-pulse { background: #34D399; }
.scene-cap .dot-pulse::after { background: #34D399; }
