/* Retailer-app landing page (multi-brand). The --primary-* tokens below are the ZTE+ blue defaults;
   site.config.js overwrites them on <html> with the active brand's palette before first paint. */

:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  --primary-rgb: 37, 99, 235;

  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  /* 700 keeps small accent text >= 4.5:1 on white for every brand palette (teal 600 is only 3.7:1). */
  --accent-text: var(--primary-700);
  --tile-bg: var(--primary-50);
  --tile-fg: var(--primary-700);
  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px -12px rgba(var(--primary-rgb), 0.35);

  --radius: 16px;
  --radius-sm: 12px;
  --ease-bounce: cubic-bezier(0.34, 1.2, 0.64, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-alt: #0f1729;
    --surface: #131c2f;
    --text: #e8edf6;
    --text-muted: #a3b0c5;
    --border: #23304a;
    --accent-text: var(--primary-400);
    --tile-bg: rgba(var(--primary-rgb), 0.14);
    --tile-fg: var(--primary-400);
    --header-bg: rgba(11, 18, 32, 0.82);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-400) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-400); border-radius: 8px; }

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

img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--primary-600);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow { max-width: 820px; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(var(--primary-rgb), 0.6);
}
.btn-primary:hover { box-shadow: 0 10px 24px -6px rgba(var(--primary-rgb), 0.7); transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary-300); color: var(--accent-text); }

.btn-white { background: #fff; color: var(--primary-700); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35); }
.btn-white:hover { transform: translateY(-1px); }

.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 16px -10px rgba(15, 23, 42, 0.25); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-tile {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 4px 12px -4px rgba(var(--primary-rgb), 0.6);
}
.brand-tile img { width: 28px; height: 28px; object-fit: contain; }
.monogram { color: #fff; font-weight: 800; font-size: 20px; line-height: 1; }

.header-nav { display: none; gap: 28px; }
.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
}
.header-nav a:hover { color: var(--accent-text); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 56px; }
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 360px at 85% 10%, rgba(var(--primary-rgb), 0.18), transparent 70%),
    radial-gradient(500px 300px at 0% 90%, rgba(var(--primary-rgb), 0.10), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-light { color: var(--primary-100); margin-bottom: 4px; }

.hero h1 { font-size: clamp(34px, 9vw, 58px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: dark) {
  .hero h1 .accent { background-image: linear-gradient(135deg, var(--primary-300), var(--primary-500)); }
}
.lead { margin-top: 18px; font-size: 17px; color: var(--text-muted); max-width: 560px; }

.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.icon-android { color: #3ddc84; width: 22px; height: 22px; }

/* Phone mockup: the real app splash screen (brand gradient + logo), no invented data */
.hero-visual { position: relative; display: flex; justify-content: center; padding: 8px 0 16px; }
.phone {
  position: relative;
  width: 236px;
  height: 480px;
  padding: 10px;
  border-radius: 40px;
  background: #0f172a;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #334155;
}
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 70px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: #0f172a;
  z-index: 2;
}
.phone-screen {
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
}
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
}
.splash-logo img { width: 132px; height: 132px; object-fit: contain; }
.splash-logo .monogram { font-size: 72px; }
.splash-name { margin-top: -28px; color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.splash-name[hidden] { display: none; }
.splash-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}
.float-chip .icon { color: var(--accent-text); width: 18px; height: 18px; }
.chip-1 { top: 70px; left: calc(50% - 175px); }
.chip-2 { bottom: 70px; right: calc(50% - 175px); animation-delay: -2.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(26px, 6vw, 38px); font-weight: 800; }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.step {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #fff;
  font-weight: 800;
  font-size: 17px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* Features */
.features { display: grid; gap: 16px; }
.feature {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-200); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--tile-bg);
  color: var(--tile-fg);
}
.feature-icon .icon { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: 15px; }

/* ---------- Download ---------- */
.download-card {
  display: grid;
  gap: 32px;
  padding: 28px 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(255, 255, 255, 0.16), transparent 70%),
    linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: var(--shadow-lg);
}
.app-id { display: flex; align-items: center; gap: 14px; }
.app-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex: none;
  overflow: hidden;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
}
.app-icon img { width: 64px; height: 64px; }
.app-icon-mono { background: linear-gradient(135deg, var(--primary-400), var(--primary-600)); color: #fff; font-weight: 800; font-size: 30px; }

/* "Installs as <app name>" - shown only when the APK's label differs from the brand. */
.install-as { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.install-as-light { color: var(--primary-100); margin-top: 14px; }
.install-as[hidden] { display: none; }
.download-card h2 { font-size: clamp(22px, 5.6vw, 32px); font-weight: 800; }
.download-lead { margin-top: 16px; color: var(--primary-100); }

.app-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}
.app-facts div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.app-facts dt { font-size: 12px; color: var(--primary-200); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.app-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 16px; white-space: nowrap; }

.download-actions { display: grid; gap: 12px; margin-top: 24px; }

.download-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-box {
  display: grid;
  place-items: center;
  width: 232px;
  height: 232px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
}
/* The QR library writes an inline width/height for its 2x bitmap; keep the box size fixed. */
.qr-box canvas { width: 200px !important; height: 200px !important; image-rendering: pixelated; }
.qr-fallback { color: #334155; font-size: 14px; text-align: center; }
.qr-caption { color: var(--primary-100); font-size: 14px; text-align: center; max-width: 240px; }

.install {
  margin-top: 28px;
  padding: 26px 22px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.install h3 { font-size: 20px; margin-bottom: 18px; }
.install-steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.install-steps li {
  counter-increment: s;
  position: relative;
  padding-left: 44px;
  color: var(--text-muted);
  font-size: 15px;
}
.install-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tile-bg);
  color: var(--tile-fg);
  font-weight: 700;
  font-size: 14px;
}
.install-steps strong { color: var(--text); }
.install-steps em { font-style: normal; font-weight: 600; color: var(--text); }
.install-note {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--tile-bg);
  color: var(--text-muted);
  font-size: 14px;
}
.install-note .icon { color: var(--tile-fg); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq details[open] { border-color: var(--primary-300); box-shadow: var(--shadow); }
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 52px 14px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease-bounce);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 18px 18px; color: var(--text-muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner { display: grid; gap: 28px; }
.footer-brand p { margin-top: 10px; color: var(--text-muted); font-size: 14px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-col a, .footer-col li { color: var(--text); text-decoration: none; font-size: 15px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-col a:hover { color: var(--accent-text); }
.todo {
  display: inline-block;
  margin: 4px 0;
  padding: 2px 8px;
  border: 1px dashed #d97706;
  border-radius: 6px;
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) { .todo { color: #fbbf24; border-color: #fbbf24; } }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  /* Divider drawn inside the content box so it lines up with the columns above. */
  background: linear-gradient(var(--border), var(--border)) top / 100% 1px no-repeat content-box;
  color: var(--text-muted);
  font-size: 14px;
}
.to-top { color: var(--text-muted); text-decoration: none; }
.to-top:hover { color: var(--accent-text); }

/* ---------- Sticky mobile download bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-bounce);
}
.mobile-bar.is-visible { transform: translateY(0); }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s var(--ease-bounce); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .steps, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-actions { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .header-nav { display: flex; }
  .hero { padding: 72px 0 88px; }
  .hero-inner { grid-template-columns: 1.15fr 1fr; gap: 48px; }
  .phone { width: 260px; height: 528px; }
  .chip-1 { left: calc(50% - 200px); }
  .chip-2 { right: calc(50% - 200px); }
  .section { padding: 96px 0; }
  .section-head { margin-bottom: 48px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .download-card { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 48px; }
  .install { padding: 32px; }
  .install-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
  .mobile-bar { display: none; }
}

@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .brand-name { font-size: 18px; }
  .btn-sm { padding: 8px 12px; }
  .chip-1 { left: 4px; }
  .chip-2 { right: 4px; }
  .app-facts div { padding: 8px 10px; }
  .app-facts dd { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
