:root {
  --color-bg: #f5f6f8;
  --color-surface: #ffffff;
  --color-border: #e0e2e7;
  --color-text: #1a1d23;
  --color-text-muted: #667085;
  --color-primary: #0b5fff;
  --color-primary-dark: #0a4fd4;
  --color-accent: #20c4a0;
  --color-danger: #d93025;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

/* --- Nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: #fff;
}

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

.nav-mobile-only {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
  border-radius: 2px;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 95, 255, 0.15);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  padding: 12px 16px;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

/* --- Hero --- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -180px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(11, 95, 255, 0.14) 0%, rgba(11, 95, 255, 0) 70%);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -220px;
  left: -160px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(32, 196, 160, 0.12) 0%, rgba(32, 196, 160, 0) 70%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 95, 255, 0.08);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
}

.accent {
  color: var(--color-primary);
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Persona pills under hero */

.persona-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 56px;
}

.persona-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 18px 10px 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.persona-pill:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.persona-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* --- Section scaffolding --- */

section {
  padding: 88px 0;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: 17px;
  margin: 0;
}

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* --- How it works: a connected rail, not a card grid --- */

.how-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px;
  align-items: center;
}

.rail {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail li {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 44px;
}

.rail li:last-child {
  padding-bottom: 0;
}

.rail li::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 4px;
  width: 2px;
  background: var(--color-border);
}

.rail li:last-child::before {
  display: none;
}

.rail-dot {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
}

.rail h3 {
  margin: 5px 0 6px;
  font-size: 17px;
}

.rail p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
  max-width: 46ch;
}

.scan-mock-frame {
  background: var(--color-text);
  border-radius: 26px;
  padding: 10px;
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.35);
}

.scan-mock-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-mock-bar::before {
  content: '';
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.scan-mock-body {
  background: #12151b;
  border-radius: 18px;
  padding: 40px 20px;
  text-align: center;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

/*
 * Both stages occupy the same grid cell (a "stacked" grid, not absolute
 * positioning) so the container's height is always driven by whichever
 * stage's real content is tallest right now — including when the subtext
 * wraps into extra lines at narrow widths. `position: absolute` here would
 * remove both stages from layout entirely, leaving the parent sized by
 * nothing and letting content overflow the frame instead of growing it —
 * exactly what happened on mobile before this.
 */
.scan-stage {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.scan-stage-code {
  animation: stage-code 7s ease-in-out infinite;
}

.scan-stage-result {
  animation: stage-result 7s ease-in-out infinite;
}

@keyframes stage-code {
  0%, 40% {
    opacity: 1;
    transform: scale(1);
  }
  47%, 92% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes stage-result {
  0%, 40% {
    opacity: 0;
    transform: scale(0.95);
  }
  50%, 85% {
    opacity: 1;
    transform: scale(1);
  }
  93%, 100% {
    opacity: 0;
    transform: scale(0.95);
  }
}

.qr-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 8px;
  margin: 0 auto 16px;
}

.qr-svg {
  width: 100%;
  height: 100%;
  color: #e8eaed;
}

.scan-line {
  position: absolute;
  left: -4px;
  right: -4px;
  top: -10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent) 20%, var(--color-accent) 80%, transparent);
  box-shadow: 0 0 12px 2px rgba(32, 196, 160, 0.6);
  animation: scan-sweep 7s ease-in-out infinite;
}

@keyframes scan-sweep {
  0% {
    top: -10%;
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  38% {
    top: 110%;
    opacity: 1;
  }
  42% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    top: -10%;
  }
}

.scan-stage-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .scan-stage-code,
  .scan-stage-result,
  .scan-line {
    animation: none !important;
  }

  .scan-stage-code {
    display: none;
  }

  .scan-stage-result {
    position: static;
    opacity: 1;
    transform: none;
  }
}

.scan-mock-badge {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(32, 196, 160, 0.15);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 20px;
  border: 2px solid var(--color-accent);
}

.scan-mock-result {
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.scan-mock-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

/* --- For business: a tab switcher, not three identical cards --- */

.persona-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.persona-tab {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.persona-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.persona-tab.active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

.persona-panels {
  max-width: 680px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
  min-height: 220px;
}

.persona-panel {
  display: none;
}

.persona-panel.active {
  display: block;
  animation: panel-in 0.2s ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.persona-panel-lead {
  font-size: 17px;
  margin: 0 0 22px;
  color: var(--color-text);
}

.persona-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.persona-panel li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--color-text);
}

.persona-panel li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
  margin-top: 8px;
  flex-shrink: 0;
}

/* --- Enterprise: a real request/response, not an icon card --- */

.enterprise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.enterprise-copy h2 {
  font-size: clamp(28px, 3.6vw, 36px);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  font-weight: 800;
}

.enterprise-copy > p {
  color: var(--color-text-muted);
  font-size: 16px;
  margin: 0 0 28px;
}

.enterprise-copy .privacy-list {
  margin-bottom: 32px;
}

.code-mock {
  background: #12151b;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.35);
}

.code-mock-bar {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  background: #1a1e27;
}

.code-mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.code-mock-body {
  margin: 0;
  padding: 24px;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #cbd5e1;
  overflow-x: auto;
}

.code-method {
  color: var(--color-accent);
  font-weight: 700;
}

.code-path {
  color: #8ab4ff;
}

.code-key {
  color: #ffb86b;
}

.code-str {
  color: #a5e8c4;
}

.code-bool {
  color: #ff8a80;
}

.code-comment {
  color: rgba(255, 255, 255, 0.35);
}

/* --- Privacy section --- */

.privacy-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.privacy-copy h2 {
  font-size: clamp(28px, 3.6vw, 36px);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  font-weight: 800;
}

.privacy-copy p {
  color: var(--color-text-muted);
  font-size: 16px;
  margin: 0 0 28px;
}

.privacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.privacy-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-top: 2px;
}

.privacy-list strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.privacy-list span {
  color: var(--color-text-muted);
  font-size: 14px;
}

.privacy-card {
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
}

.privacy-card .mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.privacy-card .mock-row:last-child {
  border-bottom: none;
}

.privacy-card .mock-label {
  color: rgba(255, 255, 255, 0.55);
}

.privacy-card .mock-value {
  font-weight: 600;
}

.mock-value.denied {
  color: #ff8a80;
}

.mock-value.allowed {
  color: var(--color-accent);
}

/* --- CTA band --- */

.cta-band {
  background: linear-gradient(135deg, #0b5fff 0%, #0847c4 100%);
  border-radius: 20px;
  color: #fff;
  padding: 56px 40px;
  text-align: center;
  margin: 0 24px;
}

.cta-band h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  margin: 0 0 12px;
  font-weight: 800;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 28px;
  font-size: 16px;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--color-primary);
}

.cta-band .btn-primary:hover {
  background: #f0f4ff;
}

.cta-band .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.cta-band .btn-secondary:hover {
  border-color: #fff;
  color: #fff;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* --- Footer --- */

footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 8px;
  max-width: 260px;
}

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  font-size: 14px;
  color: var(--color-text);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .privacy-grid,
  .enterprise-grid {
    grid-template-columns: 1fr;
  }

  .privacy-card {
    order: -1;
  }

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

  .scan-mock {
    max-width: 360px;
    margin: 0 auto;
  }

  .persona-panels {
    padding: 28px 24px;
  }
}

@media (max-width: 720px) {
  .nav-links,
  .nav-actions .btn-secondary,
  .nav-actions .btn-primary {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px;
    gap: 8px;
  }

  .nav.open .nav-links a {
    padding: 10px 0;
    font-size: 15px;
  }

  .nav.open .nav-links .nav-mobile-only {
    display: block;
    margin-top: 6px;
  }

  .hero {
    padding: 64px 0 56px;
  }

  section {
    padding: 64px 0;
  }

  .cta-band {
    margin: 0 16px;
    padding: 40px 24px;
  }
}

/* --- Contact / merchant-enquiry dialogs --- */

.form-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 32px;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.35);
  color: var(--color-text);
}

.form-dialog::backdrop {
  background: rgba(16, 24, 40, 0.5);
}

.form-dialog h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.dialog-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--color-text);
}

.form-dialog form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* `display: flex` above otherwise outranks the UA stylesheet's `[hidden]`
   rule, so a form left flexed even after `.hidden = true` was set on it. */
.form-dialog form[hidden] {
  display: none;
}

.form-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.form-dialog input,
.form-dialog textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  resize: vertical;
}

.form-dialog input:focus,
.form-dialog textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-dialog button[type='submit'] {
  margin-top: 4px;
  width: 100%;
}

/* Off-screen, not display:none — a scraper bot that skips hidden fields
   still fills this one, which is exactly what marks it as a bot. Real
   visitors never see or tab to it (tabindex="-1" + aria-hidden on the page). */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(217, 48, 37, 0.08);
  color: var(--color-danger);
  font-size: 13px;
}

.dialog-success {
  text-align: center;
  padding: 12px 0;
}

.dialog-success p {
  margin: 0 0 16px;
}
