/* Sync System — public site. Tokens and components copied from app/index.html; rules in THEME.md.
   Dark is the default; light follows the visitor's system setting. */
@import url('./fonts/fonts.css');

:root {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --border: #2a2a2a;
  --border-hover: #3f3f3f;
  --text: #e8e8e8;
  --text-dim: #888;
  --text-muted: #666;
  --accent: #00ff88;
  --accent-dim: color-mix(in srgb, var(--accent) 8%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 20%, transparent);
  --on-accent: #04140c;
  --red: #ff4444;
  --amber: #f59e0b;
  --blue: #4db8ff;
  --purple: #a78bfa;
  --teal: #2dd4bf;
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-xl: 14px; --r-pill: 999px;
  --btn-h-sm: 26px; --btn-h: 32px; --btn-h-lg: 38px;
  --dur-fast: 120ms; --dur-base: 180ms; --dur-slow: 250ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-ui: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease),
          border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
          opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f0f0f0;
    --surface: #fafafa;
    --surface-2: #f5f5f5;
    --border: #ddd;
    --border-hover: #bbb;
    --text: #111;
    --text-dim: #636363;
    --text-muted: #8a8a8a;
    --accent: #007a3d;
    --accent-dim: color-mix(in srgb, var(--accent) 10%, transparent);
    --accent-border: color-mix(in srgb, var(--accent) 30%, transparent);
    --on-accent: #ffffff;
    --red: #cc2222;
    --amber: #a84d08;
    --blue: #0369a1;
    --purple: #7c3aed;
    --teal: #0f766e;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; transition: var(--t-ui); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--accent-border); }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; }
main { flex: 1; }

/* ── Top bar ── */
.topbar { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar .wrap { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 14px; letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 4px; }

/* ── Buttons (same system as the app) ── */
.btn {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  height: var(--btn-h); padding: 0 16px; border-radius: var(--r-md); border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; line-height: 1; cursor: pointer; text-decoration: none;
  background: transparent; color: var(--text-dim); transition: var(--t-ui);
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn-lg { height: var(--btn-h-lg); padding: 0 20px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { color: var(--text-dim); border-color: var(--border); }
.btn-secondary:hover { color: var(--text); border-color: var(--border-hover); background: color-mix(in srgb, var(--text) 4%, transparent); }
.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

/* ── Badges ── */
.badge {
  --c: var(--text-dim);
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px;
  border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c);
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1; white-space: nowrap;
}
.badge-accent { --c: var(--accent); } .badge-blue { --c: var(--blue); } .badge-amber { --c: var(--amber); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; }
.card-title { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 10px; }

/* ── Text roles ── */
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.lead { font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--text-dim); margin: 0; }
.prose { font-family: var(--sans); font-size: 14px; line-height: 1.75; color: var(--text-dim); }
.prose h2 { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); margin: 32px 0 8px; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* ── Hero ── */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 520px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, var(--accent-dim), transparent 65%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; margin: 16px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* Store-to-store visual */
.flow { display: flex; flex-direction: column; gap: 10px; }
.flow-store { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.flow-store .name { font-size: 12px; color: var(--text); }
.flow-store .domain { font-size: 11px; color: var(--text-dim); }
.flow-store .badge { margin-left: auto; }
.flow-icon { width: 32px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.flow-icon svg { width: 16px; height: 16px; }
.flow-link { display: flex; justify-content: center; color: var(--text-muted); }
.flow-link svg { width: 18px; height: 18px; animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-2px); opacity: 0.6; } 50% { transform: translateY(2px); opacity: 1; } }

/* ── Sections ── */
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 560px; margin-bottom: 28px; }
.section-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 8px 0 8px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature { transition: var(--t-ui); }
.feature:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.feature-icon { --c: var(--accent); width: 34px; height: 34px; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: 14px;
  background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); color: var(--c); }
.feature-icon svg { width: 16px; height: 16px; }
.feature h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.feature p { font-family: var(--sans); font-size: 13px; line-height: 1.6; color: var(--text-dim); margin: 0; }
.c-purple { --c: var(--purple); } .c-teal { --c: var(--teal); } .c-blue { --c: var(--blue); } .c-amber { --c: var(--amber); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.step { position: relative; }
.step-num { font-size: 22px; font-weight: 600; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.step h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.step p { font-family: var(--sans); font-size: 13px; line-height: 1.6; color: var(--text-dim); margin: 0; }

/* ── Installed page ── */
.status-page { padding: 64px 0 72px; }
.status-hero { text-align: center; margin-bottom: 28px; }
.check {
  width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent);
  animation: pop-in var(--dur-slow) var(--ease);
}
.check svg { width: 32px; height: 32px; }
.check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 420ms var(--ease) 160ms forwards; }
.check.is-info { background: color-mix(in srgb, var(--blue) 12%, transparent); border-color: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--blue); }
.check.is-info path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop-in { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade-up { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.status-hero h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 10px; }
.status-hero .lead { max-width: 520px; margin: 0 auto; }
.status-grid { display: grid; gap: 12px; animation: fade-up var(--dur-slow) var(--ease) 120ms both; }

.kv-list { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.kv-row:first-child { padding-top: 0; }
.kv-row .k { color: var(--text-dim); white-space: nowrap; }
.kv-row .v { color: var(--text); text-align: right; overflow-wrap: anywhere; }

.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.todo li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.todo li:last-child { border-bottom: none; padding-bottom: 0; }
.todo li:first-child { padding-top: 0; }
.todo .n { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; border: 1px solid var(--border); color: var(--text-dim); }
.todo .is-done .n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.todo .t { font-size: 12px; color: var(--text); }
.todo .d { font-family: var(--sans); font-size: 13px; color: var(--text-dim); line-height: 1.55; margin-top: 2px; }
.status-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ── Simple pages ── */
.page { padding: 56px 0 72px; }
.page h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 6px; }
.page .meta { font-size: 11px; color: var(--text-dim); margin: 0 0 28px; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: 11px; color: var(--text-dim); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; }
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--text); }

/* ── Small screens ── */
@media (max-width: 860px) {
  .hero { padding: 56px 0 48px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero h1 { font-size: 30px; }
  .features, .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav .btn-ghost { display: none; }
  .section { padding: 48px 0; }
  .status-hero h1, .page h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .check path { stroke-dashoffset: 0; }
}
