/* ─────────────────────────────────────────────────────────────
   mobl.city — public marketing site + rider account portal
   Design tokens mirror admin/css/index.css so the three clients
   (admin dashboard, Android app, this site) read as one product.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-tertiary:   #1a1a26;
  --bg-elevated:   #22222e;
  --bg-hover:      #2a2a38;

  --text-primary:   #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-tertiary:  #6a6a80;
  --text-inverse:   #0a0a0f;

  --accent-100: #e0e7ff;
  --accent-200: #c7d2fe;
  --accent-400: #818cf8;
  --accent-500: #6366f1;
  --accent-600: #4f46e5;
  --violet-500: #8b5cf6;

  --zone-1: #3b82f6;
  --zone-2: #22c55e;
  --zone-3: #f59e0b;
  --zone-4: #ef4444;

  --success: #22c55e;
  --warning: #f59e0b;
  --error:   #ef4444;

  --border:       #2a2a3a;
  --border-light: #1e1e2e;

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 32px rgba(99,102,241,0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  --maxw: 1140px;
  --header-h: 68px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent-400); text-decoration: none; transition: color .15s var(--ease-out); }
a:hover { color: var(--accent-200); }

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

.muted { color: var(--text-secondary); }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Layout helpers ────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--text-secondary); max-width: 640px; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  font-weight: 600; color: var(--accent-400); margin-bottom: 12px;
}

/* ── Header / nav ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(10,10,15,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
}
.site-header .wrap {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text-primary); }
.brand:hover { color: var(--text-primary); }
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--gradient); display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1rem;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text-secondary); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.nav-links a.active { color: var(--text-primary); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; color: var(--text-primary);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-md);
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all .18s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.btn-ghost { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative; padding: 96px 0 88px;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(99,102,241,0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 88% 30%, rgba(139,92,246,0.13) 0%, transparent 55%);
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.center .hero-actions { justify-content: center; }

/* ── Cards / grids ─────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.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(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-hover { transition: transform .2s var(--ease-out), border-color .2s var(--ease-out); }
.card-hover:hover { transform: translateY(-3px); border-color: var(--accent-600); }
.card .icon {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  background: rgba(99,102,241,0.14); display: grid; place-items: center;
  font-size: 1.4rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 0.96rem; }

/* ── Step / tutorial blocks ────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 64px; }
.step {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.step:nth-child(even) .step-visual { order: 2; }
.step-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 0.95rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.5rem; margin-bottom: 10px; }
.step p { color: var(--text-secondary); }
.step-visual {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px; min-height: 280px;
  display: grid; place-items: center;
}

/* ── Animated tutorial stage (CSS/SVG) ─────────────────────── */
.stage { width: 100%; max-width: 320px; }

/* Tap-to-pay animation: card glides to reader, pulse, check. */
.tap-scene { position: relative; height: 220px; }
.tap-reader {
  position: absolute; left: 50%; top: 24px; transform: translateX(-50%);
  width: 130px; height: 92px; border-radius: 14px;
  background: var(--bg-elevated); border: 2px solid var(--border);
  display: grid; place-items: center;
}
.tap-reader .screen {
  width: 92px; height: 54px; border-radius: 8px; background: var(--bg-primary);
  display: grid; place-items: center; color: var(--text-tertiary);
  font-size: 0.7rem; font-weight: 600;
}
.tap-pulse {
  position: absolute; left: 50%; top: 70px; width: 24px; height: 24px;
  border-radius: 50%; transform: translateX(-50%);
  border: 2px solid var(--accent-500); opacity: 0;
  animation: tapPulse 2.6s var(--ease-out) infinite;
}
.tap-card {
  position: absolute; left: 50%; bottom: 6px;
  width: 96px; height: 60px; border-radius: 10px;
  background: var(--gradient); box-shadow: var(--shadow-md);
  transform: translateX(-50%) translateY(40px);
  animation: tapCard 2.6s var(--ease-out) infinite;
}
.tap-card::after {
  content: ''; position: absolute; left: 10px; top: 12px;
  width: 26px; height: 18px; border-radius: 3px; background: rgba(255,255,255,0.35);
}
.tap-check {
  position: absolute; left: 50%; top: 44px; transform: translateX(-50%) scale(0);
  width: 30px; height: 30px; color: var(--success);
  animation: tapCheck 2.6s var(--ease-out) infinite;
}
@keyframes tapCard {
  0%, 100% { transform: translateX(-50%) translateY(40px); }
  30%, 62% { transform: translateX(-50%) translateY(2px); }
}
@keyframes tapPulse {
  0%, 24% { opacity: 0; transform: translateX(-50%) scale(0.4); }
  36%     { opacity: 0.9; }
  56%     { opacity: 0; transform: translateX(-50%) scale(3.4); }
  100%    { opacity: 0; }
}
@keyframes tapCheck {
  0%, 40%  { transform: translateX(-50%) scale(0); }
  52%, 88% { transform: translateX(-50%) scale(1); }
  100%     { transform: translateX(-50%) scale(0); }
}

/* Step-1 reader drawn after the MoblCityEnclosure terminal: a tall
   portrait enclosure with a display window up top and an RFID tap
   pad (contactless waves) at the bottom — mirroring the SCAD model
   in equipment/MoblCityEnclosure.scad. */
.tap-terminal {
  position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  width: 118px; height: 196px; border-radius: 13px;
  background: linear-gradient(158deg, #3c3c46, #26262e);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 12px;
}
.tap-terminal .tt-screen {
  width: 86px; height: 110px; border-radius: 6px;
  background: radial-gradient(120% 78% at 50% 16%,
              rgba(99,102,241,0.28), var(--bg-primary) 72%);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid; place-items: center;
}
.tap-terminal .tt-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--gradient);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1rem; line-height: 1;
}
.tap-terminal .tt-rfid {
  margin-top: auto;
  width: 66px; height: 44px; border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.20);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.6);
}
.tap-terminal .tt-waves { width: 24px; height: 24px; }

/* Fare-gate animation: paddles swing open after tap. */
.gate-scene { position: relative; height: 200px; display: grid; place-items: center; }
.gate { position: relative; width: 220px; height: 150px; }
.gate-pillar {
  position: absolute; bottom: 0; width: 46px; height: 130px;
  border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--border);
}
.gate-pillar.left  { left: 0; }
.gate-pillar.right { right: 0; }
.gate-pillar .target {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 6px; background: var(--gradient);
}
.gate-paddle {
  position: absolute; bottom: 74px; height: 12px; width: 70px;
  background: var(--accent-500); border-radius: 6px;
  transform-origin: left center;
}
.gate-paddle.left  { left: 46px; animation: gateOpenL 3s var(--ease-out) infinite; }
.gate-paddle.right { right: 46px; transform-origin: right center; animation: gateOpenR 3s var(--ease-out) infinite; }
@keyframes gateOpenL {
  0%, 30%   { transform: rotateY(0deg); background: var(--error); }
  46%, 84%  { transform: rotateY(-82deg); background: var(--success); }
  100%      { transform: rotateY(0deg); background: var(--error); }
}
@keyframes gateOpenR {
  0%, 30%   { transform: rotateY(0deg); background: var(--error); }
  46%, 84%  { transform: rotateY(82deg); background: var(--success); }
  100%      { transform: rotateY(0deg); background: var(--error); }
}

/* Recharge animation: a phone showing balance counting up. */
.phone {
  width: 168px; height: 320px; border-radius: 28px;
  background: var(--bg-elevated); border: 2px solid var(--border);
  padding: 16px 14px; position: relative;
}
.phone .notch {
  width: 56px; height: 14px; border-radius: 0 0 9px 9px;
  background: var(--bg-primary); margin: -16px auto 14px;
}
.phone-card {
  border-radius: var(--radius-md); background: var(--gradient);
  padding: 14px; color: #fff; margin-bottom: 12px;
}
.phone-card .pc-label { font-size: 0.62rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.08em; }
.phone-card .pc-balance { font-size: 1.5rem; font-weight: 800; }
.phone-row {
  height: 30px; border-radius: var(--radius-sm); background: var(--bg-tertiary);
  margin-bottom: 8px;
}
.phone-btn {
  margin-top: 10px; height: 38px; border-radius: var(--radius-md);
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 0.85rem;
  display: grid; place-items: center;
  animation: rechargeTap 3s var(--ease-out) infinite;
}
@keyframes rechargeTap {
  0%, 40%, 60%, 100% { transform: scale(1); filter: brightness(1); }
  48%                { transform: scale(0.95); filter: brightness(1.25); }
}

/* ── FAQ accordion ─────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; color: var(--text-primary);
  font-family: inherit; font-size: 1rem; font-weight: 600;
  padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px;
}
.faq-q .chev { transition: transform .2s var(--ease-out); color: var(--text-tertiary); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s var(--ease-out); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 20px 18px; color: var(--text-secondary); }

/* ── Coverage map ──────────────────────────────────────────── */
.coverage-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.map-canvas {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; min-height: 380px;
}
.city-list { display: flex; flex-direction: column; gap: 10px; }
.city-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.city-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent-500); flex: none; }
.city-item .name { font-weight: 600; }
.city-item .meta { color: var(--text-tertiary); font-size: 0.85rem; }

/* ── Forms ─────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-family: inherit; font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.85rem; color: var(--text-tertiary); }

.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 0.9rem; margin-bottom: 16px; }
.alert-error   { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.4);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.4);  color: #86efac; }
.alert-info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.4); color: #93c5fd; }
.hidden { display: none !important; }

/* ── Account portal ────────────────────────────────────────── */
.auth-shell { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 48px 24px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(139,92,246,0.06) 0%, transparent 50%); }
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px 36px; box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.auth-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 24px; }
.auth-switch { margin-top: 18px; font-size: 0.9rem; color: var(--text-secondary); text-align: center; }

.portal-bal {
  background: var(--gradient); border-radius: var(--radius-lg);
  padding: 26px; color: #fff; margin-bottom: 12px;
}
.portal-bal .pb-uid { font-size: 0.85rem; opacity: 0.85; }
.portal-bal .pb-amt { font-size: 2.2rem; font-weight: 800; }
.portal-bal .pb-meta { font-size: 0.85rem; opacity: 0.85; }

.tx-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid var(--border-light);
}
.tx-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 1rem; }
.tx-icon.credit { background: rgba(34,197,94,0.14); color: var(--success); }
.tx-icon.debit  { background: rgba(239,68,68,0.14); color: var(--error); }
.tx-row .tx-main { flex: 1; }
.tx-row .tx-title { font-weight: 600; font-size: 0.95rem; }
.tx-row .tx-sub { font-size: 0.82rem; color: var(--text-tertiary); }
.tx-amt { font-weight: 700; }
.tx-amt.credit { color: var(--success); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab {
  background: none; border: 0; cursor: pointer; font-family: inherit;
  color: var(--text-secondary); font-weight: 600; font-size: 0.95rem;
  padding: 12px 16px; border-bottom: 2px solid transparent;
}
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent-500); }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent-500);
  animation: spin .7s linear infinite; margin: 32px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hardware showcase ─────────────────────────────────────── */
.hw-card { text-align: center; }
.hw-visual {
  height: 180px; border-radius: var(--radius-md); margin-bottom: 16px;
  background: var(--bg-tertiary); display: grid; place-items: center;
  border: 1px solid var(--border);
}
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px;
}
.badge-live   { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge-design { background: rgba(245,158,11,0.15); color: var(--warning); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 48px 0 32px; margin-top: 40px;
  color: var(--text-secondary); font-size: 0.92rem;
}
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-tertiary); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--text-secondary); padding: 3px 0; }
.footer-col a:hover { color: var(--text-primary); }
.footer-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--text-tertiary); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 880px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    padding: 8px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 16px; }
  .nav-toggle { display: grid; place-items: center; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 1fr; gap: 24px; }
  .step:nth-child(even) .step-visual { order: 0; }
  .coverage-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 56px; }
  .nav-cta .btn-ghost { display: none; }
}
