/* ──────────────────────────────────────────────────────────────
   NovaStay · Design tokens
   Brand: premium, trustworthy navy × warm cream — North-American
   rentals for movers, newcomers and students.
   ────────────────────────────────────────────────────────────── */

:root {
  /* Color · light (default) */
  --ink:           #1b2330;       /* primary text · deep navy */
  --ink-2:         #404a59;       /* secondary text */
  --ink-3:         #717a88;       /* tertiary */
  --ink-4:         #a7adb8;       /* faint */
  --line:          #e8e2d6;       /* hairline */
  --line-2:        #d9d2c4;
  --paper:         #f5f0e8;       /* warm cream base */
  --paper-2:       #ece4d6;       /* beige surface · icon circles */
  --paper-3:       #e1d8c7;       /* card pressed */
  --card:          #ffffff;       /* elevated card */

  /* Brand */
  --persimmon:     #1b2330;       /* primary CTA · deep navy */
  --persimmon-2:   #2c3849;       /* hover/pressed */
  --persimmon-soft:#e7e1d3;       /* soft beige fill */
  --moss:          #21303f;       /* secondary · trust slate */
  --moss-2:        #324559;
  --moss-soft:     #e2e7ec;
  --butter:        #d9b779;       /* warm gold accent (on dark) */
  --plum:          #4c2a4d;       /* rare splash */
  --sky:           #b8cdd9;       /* soft accent */

  /* Status */
  --good:          #2f8a4f;
  --warn:          #c98a13;
  --bad:           #c0392b;

  /* Type */
  --f-display:     'Newsreader', 'Noto Serif SC', Georgia, serif;
  --f-body:        'Geist', 'Noto Sans SC', system-ui, sans-serif;
  --f-mono:        'Geist Mono', ui-monospace, monospace;

  /* Shape */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 20px;
  --r-5: 28px;
  --r-full: 999px;

  /* Density (rewritten by tweaks) */
  --density-pad: 16px;
  --density-gap: 12px;

  /* Shadow */
  --sh-1: 0 1px 2px rgba(20,28,40,0.05), 0 0 0 1px rgba(20,28,40,0.04);
  --sh-2: 0 6px 18px -8px rgba(20,28,40,0.20), 0 0 0 1px rgba(20,28,40,0.05);
  --sh-3: 0 24px 48px -16px rgba(20,28,40,0.24), 0 0 0 1px rgba(20,28,40,0.05);
}

.theme-dark {
  --ink:           #eef1f5;
  --ink-2:         #c2c8d2;
  --ink-3:         #8a909c;
  --ink-4:         #565d6a;
  --line:          #232b37;
  --line-2:        #333c4a;
  --paper:         #11151c;
  --paper-2:       #171d26;
  --paper-3:       #1f2733;
  --card:          #1b212b;

  --persimmon:     #4f6f9c;
  --persimmon-2:   #6286b5;
  --persimmon-soft:#1d2735;
  --moss:          #7d93ac;
  --moss-2:        #97abc2;
  --moss-soft:     #1a2330;
  --butter:        #d9b779;
  --plum:          #b478b6;
  --sky:           #6a8da1;

  --sh-1: 0 1px 2px rgba(0,0,0,0.4), 0 0 0 1px rgba(243,237,224,0.06);
  --sh-2: 0 6px 18px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(243,237,224,0.06);
  --sh-3: 0 24px 48px -16px rgba(0,0,0,0.75), 0 0 0 1px rgba(243,237,224,0.06);
}

/* ─── Base reset / body ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--persimmon); outline-offset: 2px; }

/* ─── Type primitives ──────────────────────────────────────── */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
  font-feature-settings: 'ss01', 'ss02';
  font-optical-sizing: auto;
}
.display.semi { font-weight: 500; }
.display.italic { font-style: italic; }
.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono { font-family: var(--f-mono); font-feature-settings: 'tnum'; }
.num { font-family: var(--f-display); font-weight: 500; font-feature-settings: 'tnum'; letter-spacing: -0.02em; }

/* ─── Common atoms ─────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-full);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag.outline { background: transparent; border-color: var(--line); }
.tag.solid { background: var(--ink); color: var(--paper); }
.tag.persimmon { background: var(--persimmon-soft); color: var(--persimmon-2); }
.tag.moss { background: var(--moss-soft); color: var(--moss); }
.tag.sm { height: 22px; padding: 0 8px; font-size: 11px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: var(--r-full);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--paper-2); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--r-full);
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform .12s, background .15s;
}
.btn:hover { background: var(--ink-2); }
.btn:active { transform: scale(0.98); }
.btn.persimmon { background: var(--persimmon); color: #fff; }
.btn.persimmon:hover { background: var(--persimmon-2); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn.block { width: 100%; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  transition: background .15s;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.card {
  background: var(--card);
  border-radius: var(--r-4);
  border: 1px solid var(--line);
  overflow: hidden;
}
.card.flat { border: 0; background: var(--paper-2); }
.card.outline { background: transparent; }

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

.avatar {
  display: inline-block;
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--paper-2) center/cover;
  border: 2px solid var(--card);
  overflow: hidden;
}

.scroll-x {
  display: flex; gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* Skeleton image placeholder gradient — when img loads, replaces */
.ph {
  background: linear-gradient(135deg, var(--paper-3), var(--paper-2));
}

/* Subtle hover lift for cards */
.lift { transition: transform .2s ease, box-shadow .2s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }

/* utility */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.stack { 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-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }

/* tighter mobile screen scrollers */
.screen {
  position: absolute; inset: 0;
  background: var(--paper);
  display: flex; flex-direction: column;
  overflow: hidden;
  color: var(--ink);
}
.screen-scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* iOS tab bar styled to brand */
.nest-tabbar {
  height: 78px;
  background: color-mix(in oklab, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding-top: 10px;
  position: relative;
}
.nest-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink-3);
  font-family: var(--f-body);
  font-size: 10px; font-weight: 500;
  cursor: pointer;
}
.nest-tab.active { color: var(--ink); }
.nest-tab .dot {
  position: absolute; top: 4px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--persimmon);
  opacity: 0; transition: opacity .2s;
}
.nest-tab.active .dot { opacity: 1; }
