/* Medusa Mobile — landing page. Colours mirror apps/mobile/src/theme/tokens.ts (dark palette first). */
:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #1a1a1c;
  --muted: #1c1c1f;
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --border: #26262a;
  --border-2: #3f3f46;
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.12);
  --danger: #f87171;
  --radius: 14px;
  --max: 1160px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.01em; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 15px; font-weight: 800; letter-spacing: -0.04em;
}
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-2); transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--text-3); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #e4e4e7; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 40px; }
.hero::before {
  content: ''; position: absolute; inset: -200px 0 auto 0; height: 700px; pointer-events: none;
  background: radial-gradient(600px 340px at 70% 30%, rgba(255, 255, 255, 0.07), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
h1 {
  margin: 20px 0 18px; font-size: clamp(40px, 6.2vw, 72px); line-height: 1.02;
  letter-spacing: -0.045em; font-weight: 750;
}
h1 .soft { color: var(--text-3); }
.lede { margin: 0 0 30px; max-width: 34em; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-notes { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--text-3); }
.hero-notes span::before { content: '✓'; margin-inline-end: 6px; color: var(--text-2); }
.hero-visual { position: relative; display: flex; justify-content: center; min-height: 640px; }

/* ---------- phone ---------- */
.phone {
  position: relative; width: 300px; flex: none; aspect-ratio: 9 / 19.5; border-radius: 46px; padding: 11px;
  background: linear-gradient(145deg, #2a2a2e, #111113);
  box-shadow: 0 0 0 1px #3a3a3f, 0 40px 80px -20px rgba(0, 0, 0, 0.8), inset 0 0 0 1px #000;
}
.screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg);
  font-size: 11px; line-height: 1.35; display: flex; flex-direction: column;
}
.island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 88px; height: 25px; border-radius: 20px; background: #000; z-index: 3; }
.status { height: 44px; flex: none; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 26px 6px; font-size: 11.5px; font-weight: 600; }
.status .sys { display: flex; gap: 5px; align-items: center; }
.bars { display: inline-flex; gap: 1.5px; align-items: flex-end; height: 9px; }
.bars i { width: 3px; background: var(--text); border-radius: 1px; }
.bars i:nth-child(1) { height: 3px; } .bars i:nth-child(2) { height: 5px; } .bars i:nth-child(3) { height: 7px; } .bars i:nth-child(4) { height: 9px; }
.batt { width: 20px; height: 10px; border: 1.5px solid var(--text-2); border-radius: 3px; position: relative; }
.batt::after { content: ''; position: absolute; inset: 1.5px; right: 5px; background: var(--text); border-radius: 1px; }
.app { flex: 1; overflow: hidden; padding: 4px 14px 0; display: flex; flex-direction: column; gap: 10px; }
.store-head { display: flex; align-items: center; justify-content: space-between; }
.store-pill { display: flex; align-items: center; gap: 8px; }
.avatar { width: 26px; height: 26px; border-radius: 7px; background: var(--muted); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.store-name { font-weight: 650; font-size: 13px; }
.store-url { color: var(--text-3); font-size: 9.5px; }
.chev { color: var(--text-3); font-size: 10px; margin-inline-start: 2px; }
.icon-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.seg { display: flex; background: var(--muted); border-radius: 9px; padding: 2px; }
.seg span { flex: 1; text-align: center; padding: 5px 0; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 10.5px; }
.seg span.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; }
.label { color: var(--text-2); font-size: 10px; font-weight: 500; }
.kpi { font-size: 25px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi-sm { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 600; color: var(--success); background: var(--success-soft); padding: 1px 6px; border-radius: 99px; }
.delta-note { color: var(--text-3); font-size: 9.5px; margin-inline-start: 4px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chart { margin-top: 8px; height: 62px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; }
.row-head b { font-size: 12px; font-weight: 650; }
.row-head a { color: var(--text-3); font-size: 10px; }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--border); }
.li:first-child { border-top: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; font-size: 11.5px; }
.li .s { color: var(--text-3); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 11.5px; text-align: end; }
.badge { display: inline-block; font-size: 8.5px; font-weight: 600; padding: 1.5px 6px; border-radius: 99px; margin-top: 2px; }
.b-ok { color: var(--success); background: var(--success-soft); }
.b-warn { color: var(--warning); background: var(--warning-soft); }
.b-info { color: var(--info); background: var(--info-soft); }
.b-mute { color: var(--text-2); background: var(--muted); }
.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 6px 22px;
  border-top: 1px solid var(--border); background: rgba(18, 18, 18, 0.94);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); font-size: 8.5px; font-weight: 500; }
.tab.on { color: var(--text); }
.tab svg { width: 18px; height: 18px; }
.screen-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.search { display: flex; align-items: center; gap: 6px; background: var(--muted); border-radius: 9px; padding: 7px 10px; color: var(--text-3); font-size: 10.5px; }
.chips { display: flex; gap: 6px; overflow: hidden; }
.chip { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-2); font-size: 10px; white-space: nowrap; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.thumb { width: 34px; height: 34px; border-radius: 8px; background: var(--muted); border: 1px solid var(--border); flex: none; position: relative; overflow: hidden; }
.thumb::after { content: ''; position: absolute; inset: 9px; border-radius: 5px; background: linear-gradient(160deg, #3f3f46, #26262a); }
.kv { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text-2); }
.kv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.kv.total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; color: var(--text); font-weight: 650; }
.action-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-bottom: 26px; }
.pbtn { height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; font-size: 11.5px; border: 1px solid var(--border-2); }
.pbtn.solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.back { display: flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 11px; }

/* lock screen */
.lock { background: radial-gradient(120% 70% at 50% 10%, #2b2b30 0%, #121214 55%, #0a0a0a 100%); }
.lock-time { text-align: center; margin-top: 26px; }
.lock-time .d { color: var(--text-2); font-size: 12px; font-weight: 500; }
.lock-time .t { font-size: 66px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; margin-top: 2px; }
.notif {
  margin: 0 10px; border-radius: 18px; padding: 10px 12px; display: flex; gap: 10px;
  background: rgba(58, 58, 64, 0.62); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.notif .ico { width: 30px; height: 30px; border-radius: 8px; background: #0a0a0a; border: 1px solid #333; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.notif .top { display: flex; justify-content: space-between; color: var(--text-2); font-size: 9.5px; }
.notif .ttl { font-weight: 650; font-size: 11.5px; margin-top: 1px; }
.notif .bd { font-size: 11px; color: #e4e4e7; }

/* floating notification over hero phone */
.float-notif {
  position: absolute; z-index: 4; top: 120px; width: 300px; inset-inline-start: calc(50% - 250px);
  border-radius: 20px; padding: 12px 14px; display: flex; gap: 12px;
  background: rgba(40, 40, 44, 0.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8);
  animation: drop 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.15) 0.5s both;
}
.float-notif .ico { width: 36px; height: 36px; border-radius: 9px; background: #0a0a0a; border: 1px solid #3a3a3f; display: grid; place-items: center; font-weight: 800; flex: none; }
.float-notif .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.float-notif .ttl { font-weight: 650; font-size: 14px; }
.float-notif .bd { font-size: 13.5px; color: #e4e4e7; }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .float-notif { animation: none; } html { scroll-behavior: auto; } }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.kicker { color: var(--text-3); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 720; margin: 12px 0 16px; }
.sub { color: var(--text-2); font-size: 18px; max-width: 36em; margin: 0; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

.strip { padding: 28px 0; border-block: 1px solid var(--border); }
.strip-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; color: var(--text-3); font-size: 14px; font-weight: 500; }
.strip-inner b { color: var(--text-2); font-weight: 600; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.flip .feature-copy { order: 2; }
.feature-visual { display: flex; justify-content: center; }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--text-2); }
.points li b { color: var(--text); font-weight: 600; }
.points svg { margin-top: 4px; color: var(--text); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.tile h3 { margin: 14px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.tile p { margin: 0; color: var(--text-2); font-size: 15px; }
.tile .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--muted); border: 1px solid var(--border); display: grid; place-items: center; }

/* pipeline */
.pipeline { margin-top: 48px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.step { position: relative; padding: 22px 18px; text-align: center; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 44px; inset-inline-end: -12px; width: 24px; height: 1px; background: var(--border-2); }
.step .n { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); display: grid; place-items: center; font-weight: 700; }
.step h4 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13.5px; color: var(--text-2); }

/* code */
.code {
  margin-top: 28px; background: #0f0f10; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; font: 13.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #d4d4d8; overflow-x: auto;
}
.code .c { color: var(--text-3); }
.code .k { color: #fafafa; font-weight: 600; }

/* FAQ */
.faq { max-width: 760px; margin: 40px auto 0; }
details { border-bottom: 1px solid var(--border); padding: 20px 0; }
summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--text-3); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin: 12px 0 0; color: var(--text-2); }

/* final CTA */
.final { text-align: center; border-top: 1px solid var(--border); background: radial-gradient(700px 320px at 50% 0%, rgba(255, 255, 255, 0.06), transparent 70%); }
.stores { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.store { position: relative; display: inline-block; opacity: 0.55; }
.store img { height: 48px; width: auto; }
.store .soon { position: absolute; top: -10px; inset-inline-end: -10px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }

footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--text-3); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--text); }
.disclaimer { margin-top: 18px; font-size: 13px; line-height: 1.6; max-width: 62em; }
.caption { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-copy { order: 0; }
  .hero { padding-top: 48px; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .cta-row, .hero-notes { justify-content: center; }
  .grid-3 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; text-align: start; padding: 14px 0; }
  .step .n { margin: 0; }
  .step:not(:last-child)::after { top: auto; bottom: -12px; inset-inline-start: 22px; inset-inline-end: auto; width: 1px; height: 24px; }
  .nav-links { display: none; }
  section { padding: 72px 0; }
  .hero-visual { min-height: 0; }
  .float-notif { inset-inline-start: 50%; transform: translateX(-50%); width: min(300px, 88vw); top: 96px; animation: none; }
}
@media (max-width: 380px) {
  .phone { width: 270px; border-radius: 42px; }
  .screen { border-radius: 32px; }
}
