/* ============================================================
   Base — reset, typography, status bar, screen transitions
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: #060608;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
::selection { background: rgba(240,110,0,.3); }

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.eyebrow {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}

/* ---- iOS status bar -------------------------------------- */
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 30px 0;
  font-size: 15px; font-weight: 600;
  color: var(--ink); z-index: 55;
  pointer-events: none;
}
.statusbar.is-dark { color: #0d0d0d; }
.statusbar__time { letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.statusbar__right { display: flex; align-items: center; gap: 7px; }
.statusbar__right svg { display: block; }

/* ---- Screen container & transitions ---------------------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--cockpit);
  will-change: transform, opacity;
}
.screen__scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 62px 22px 30px;
}
.screen__scroll::-webkit-scrollbar { width: 0; }

/* transition states, driven by router */
.screen.enter-right { transform: translateX(26px); opacity: 0; }
.screen.enter-left  { transform: translateX(-26px); opacity: 0; }
.screen.enter-up    { transform: translateY(40px) scale(.98); opacity: 0; }
.screen.enter-fade  { opacity: 0; }
.screen.is-active {
  transform: none; opacity: 1;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.screen.exit-left  { transform: translateX(-26px); opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.screen.exit-right { transform: translateX(26px); opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.screen.exit-down  { transform: translateY(40px) scale(.98); opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.screen.exit-fade  { opacity: 0;
  transition: opacity var(--dur) var(--ease); }

/* staggered entrance for children marked .rise */
.screen.is-active .rise {
  animation: rise var(--dur-slow) var(--ease) backwards;
}
.rise { --d: 0ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

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

/* haptic pulse (visual echo of a taptic tick) */
@keyframes taptic { 0%{transform:scale(1)} 40%{transform:scale(.94)} 100%{transform:scale(1)} }
.tapped { animation: taptic 240ms var(--ease); }

/* utility */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.spacer { flex: 1; }
