/* MonieMatch — warm, Naija-coded, human-first */

:root {
  /* canvas */
  --canvas: #1c1813;
  --canvas-stripe: #1f1b16;

  /* warm light surface */
  --cream: #F7F1E8;
  --bone: #FFFCF5;
  --tan: #EFE5D5;
  --sand: #E8DCC4;
  --linen: #F2EADC;

  /* ink */
  --ink: #1F1A14;
  --ink-2: #5C5448;
  --ink-3: #8C8273;
  --ink-4: #B6AD9B;
  --line: rgba(31,26,20,0.08);
  --line-strong: rgba(31,26,20,0.14);

  /* accents */
  --clay: #C2553A;
  --clay-deep: #A04527;
  --clay-soft: #F2D6CC;
  --clay-tint: #FBEAE2;

  --forest: #2F5D3F;
  --forest-soft: #D4E2D7;
  --forest-tint: #E9F0E8;

  --sun: #E5A04A;
  --sun-soft: #F7E4C5;
  --sun-tint: #FBF1DE;

  --plum: #6B3F4E;
  --indigo: #2C3E63;

  /* radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-2xl: 32px;
  --r-full: 999px;

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(31,26,20,0.04), 0 2px 6px rgba(31,26,20,0.04);
  --shadow-md: 0 4px 12px rgba(31,26,20,0.06), 0 12px 32px rgba(31,26,20,0.06);
  --shadow-lg: 0 12px 28px rgba(31,26,20,0.10), 0 40px 80px rgba(31,26,20,0.10);

  /* typography */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Geist", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--canvas);
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, #2a2418 0%, transparent 70%),
    repeating-linear-gradient(135deg, var(--canvas) 0 14px, var(--canvas-stripe) 14px 15px);
}

button { font-family: inherit; }

/* ─── Demo chrome ──────────────────────────────────────── */

.stage {
  min-height: 100vh;
  padding: 28px 20px 60px;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.86);
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: -0.01em;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--clay);
  box-shadow: 0 0 0 4px rgba(194,85,58,0.18);
}
.brand small {
  font-family: var(--font-body); font-size: 11px;
  color: rgba(255,255,255,0.5); letter-spacing: 0.16em; text-transform: uppercase;
  margin-left: 8px; padding: 4px 8px; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px;
}

.app-switch {
  display: inline-flex; padding: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  position: relative;
}
.app-switch button {
  appearance: none; border: 0; background: transparent;
  color: rgba(255,255,255,0.6);
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: color 200ms;
  display: inline-flex; align-items: center; gap: 8px;
  position: relative; z-index: 1;
}
.app-switch button[data-on="1"] {
  color: var(--ink);
}
.app-switch .thumb {
  position: absolute; top: 4px; bottom: 4px;
  background: var(--bone);
  border-radius: 999px;
  transition: left 280ms cubic-bezier(0.4, 0, 0.2, 1), width 280ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.app-switch .av {
  width: 18px; height: 18px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  background: var(--clay); color: #fff;
}
.app-switch .av.fav { background: var(--forest); }

.screen-jumper {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  max-width: 720px;
}
.screen-jumper button {
  appearance: none; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.6);
  padding: 6px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em;
  cursor: pointer; transition: all 160ms;
}
.screen-jumper button:hover {
  color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.22);
}
.screen-jumper button[data-on="1"] {
  color: var(--ink); background: var(--bone); border-color: var(--bone);
}

.hint {
  color: rgba(255,255,255,0.4); font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* ─── App-level (inside phone) ─────────────────────────── */

.app {
  position: absolute; inset: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.app .scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app .scroll::-webkit-scrollbar { display: none; }

/* status spacer (under iOS island) */
.statusbar-spacer { height: 54px; flex-shrink: 0; }

/* hide ios frame's default status — we'll render our own colored versions */

.app .pad {
  padding: 0 26px;
}

/* type */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.display.it { font-style: italic; }

.h1 { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.18; letter-spacing: -0.012em; }
.h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.22; letter-spacing: -0.01em; }
.h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.3; letter-spacing: -0.005em; }

.eyebrow {
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

.naira {
  font-feature-settings: "tnum";
}

/* ─── Atoms ────────────────────────────────────────────── */

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 14.5px; font-weight: 500;
  padding: 16px 20px;
  border-radius: var(--r-full);
  transition: transform 120ms, background 160ms;
  text-decoration: none;
  letter-spacing: 0.005em;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--clay); }
.btn-clay { background: var(--clay); color: #fff; }
.btn-forest { background: var(--forest); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-soft { background: rgba(31,26,20,0.06); color: var(--ink); }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: rgba(31,26,20,0.06); color: var(--ink);
  white-space: nowrap;
}
.chip.clay { background: var(--clay-tint); color: var(--clay-deep); }
.chip.forest { background: var(--forest-tint); color: var(--forest); }
.chip.sun { background: var(--sun-tint); color: #8a5d10; }
.chip.outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); }

.card {
  background: var(--bone);
  border-radius: var(--r-xl);
  padding: 22px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-bottom-color: rgba(31,26,20,0.16);
}
.card.tan { background: var(--tan); }
.card.sand { background: var(--sand); }
.card.linen { background: var(--linen); }
.card.clay { background: var(--clay); color: #fff; border-color: rgba(255,255,255,0.12); border-bottom-color: var(--clay-deep); }
.card.forest { background: var(--forest); color: #fff; border-color: rgba(255,255,255,0.1); border-bottom-color: #1a3a25; }
.card.ink { background: var(--ink); color: var(--cream); border-color: rgba(255,255,255,0.08); border-bottom-color: #000; }

/* tab bar */
.tabbar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 10px 14px 10px;
  background: rgba(247,241,232,0.94);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.tabbar button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px;
  color: var(--ink-3);
  font-family: inherit;
}
.tabbar button[data-on="1"] { color: var(--ink); }
.tabbar button .lab { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }

/* avatar */
.av {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  font-weight: 600; color: #fff;
  flex-shrink: 0;
}

/* photo placeholder with adire stripes */
.photo {
  position: relative; overflow: hidden;
  background: var(--linen);
  border-radius: var(--r-lg);
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.photo::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(31,26,20,0.045) 14px 15px
  );
}
.photo .lab {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 10px;
  background: rgba(255,252,245,0.85);
  border-radius: 6px;
  margin: 10px;
}

/* divider */
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* progress ring */
.ring { transform: rotate(-90deg); }

/* gentle motion */
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.92; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.fadein { animation: fadein 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.fadein.d1 { animation-delay: 60ms; }
.fadein.d2 { animation-delay: 120ms; }
.fadein.d3 { animation-delay: 180ms; }
.fadein.d4 { animation-delay: 240ms; }
.fadein.d5 { animation-delay: 300ms; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.wave-bar {
  width: 3px; height: 18px;
  background: currentColor; border-radius: 999px;
  animation: wave 900ms ease-in-out infinite;
  transform-origin: center;
}

/* match meter dial */
.dial-track { stroke: var(--line-strong); }
.dial-fill { stroke: var(--clay); transition: stroke-dashoffset 1200ms cubic-bezier(0.2, 0.8, 0.2, 1); }

/* tab transition */
.screen-enter {
  animation: screen-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

/* utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; }
.gap-16 { gap: 16px; } .gap-18 { gap: 18px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.flex-1 { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.center { align-items: center; }
.full-w { width: 100%; }
