/* Moneykeeper — pockora.com static site · shared styles.
   Logical properties throughout (padding-inline / margin-block / text-align:start)
   so a Hebrew/RTL version is a near-free `dir="rtl"` flip later.
   No web fonts, no third-party CSS — zero external requests by design. */

:root {
  color-scheme: light dark;

  /* Brand + neutral palette — mirrors the app (brand blue, slate ink). */
  --brand: #2563eb;
  --brand-ink: #1d4ed8;
  --bg: #ffffff;
  --surface: #f8fafc;
  --text: #0f172a;
  --text-muted: #475569; /* 7.5:1 on white — passes AA */
  --border: #e2e8f0;

  /* Type scale (14 / 17 / 20 / 28 / 40) */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.75rem;
  --fs-xl: 2.5rem;

  /* Spacing scale (4 / 8 / 12 / 16 / 24 / 32 / 48 / 64) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4rem;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 960px;
  --maxw-prose: 46rem; /* ~65ch — comfortable legal-text measure */
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #60a5fa;
    --brand-ink: #93c5fd;
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8; /* ~6:1 on the dark bg — passes AA */
    --border: #334155;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand-ink);
}

/* Visible focus for keyboard users (Pillar 8) — never `outline: none`. */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

main {
  flex: 1 0 auto;
}

/* ---- Header ---- */
.site-header {
  padding-block: var(--s-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}

.brand img {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
}

/* ---- Hero ---- */
.hero {
  padding-block: var(--s-8) var(--s-12);
  text-align: center;
}

.hero h1 {
  font-size: var(--fs-xl);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 auto var(--s-4);
  max-width: 16ch;
}

.lead {
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin: 0 auto var(--s-8);
  max-width: 44ch;
}

.fineprint {
  margin-block-start: var(--s-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ---- Store buttons ---- */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 56px; /* generous tap target (Pillar 4) */
  padding-inline: var(--s-6);
  padding-block: var(--s-2);
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid #000;
  border-radius: var(--radius-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.store-badge:hover {
  transform: translateY(-1px);
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-badge .eyebrow {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.8;
}

.store-badge .name {
  display: block;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.15;
}

/* Platform-matched badge gets the accent ring — one obvious primary (Pillar 1). */
.store-badge--primary {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 38%, transparent);
}

/* Pre-launch "coming soon" pill (replaces the store buttons via store.js).
   Deliberately a chip, not a button — it must not read as something tappable. */
.coming-soon {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding-inline: var(--s-4);
  padding-block: var(--s-3);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-ink);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-sm);
}

@media (prefers-color-scheme: dark) {
  .store-badge {
    background: #fff;
    color: #000;
    border-color: #fff;
  }
}

/* ---- Feature cards ---- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-6);
  padding-block-end: var(--s-12);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
}

.card h2 {
  font-size: var(--fs-md);
  margin: 0 0 var(--s-2);
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

/* ---- Centered card (invite / 404) ---- */
.panel {
  max-width: 34rem;
  margin-block: var(--s-12);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-8);
}

.panel h1 {
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin: 0 0 var(--s-4);
}

.note {
  margin-block-start: var(--s-6);
  padding: var(--s-4);
  border-inline-start: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ---- Prose (legal pages) ---- */
.prose {
  max-width: var(--maxw-prose);
  padding-block: var(--s-8) var(--s-16);
}

.prose h1 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--s-2);
}

.prose h2 {
  font-size: var(--fs-md);
  margin-block: var(--s-8) var(--s-3);
}

.prose p {
  margin-block: var(--s-4);
}

.muted {
  color: var(--text-muted);
}

.placeholder-note {
  margin-block: var(--s-6);
  padding: var(--s-6);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-block-start: var(--s-8);
  font-size: var(--fs-sm);
}

/* ---- Footer ---- */
.site-footer {
  flex: none;
  border-block-start: 1px solid var(--border);
  margin-block-start: var(--s-8);
  padding-block: var(--s-8);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
}

.site-footer a {
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
