@import './tokens.css';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
html, body { height: 100%; }
body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background:
    radial-gradient(1100px 560px at 18% -8%, #F1E4CD 0%, transparent 52%),
    radial-gradient(900px 650px at 108% 8%,  #EAD9BE 0%, transparent 48%),
    #E4DACA;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* ===== DEVICE SHELL ===== */
.device {
  width: 100%;
  height: auto;
}
.phone {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--bg);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

/* ===== DESKTOP: phone mockup frame ===== */
@media (min-width: 600px) {
  body {
    padding: 48px 0;
    min-height: 100vh;
    height: auto;
  }

  .device {
    width: 393px;
    height: 852px;
    border-radius: 56px;
    background: #16110e;
    padding: 16px 14px;
    box-shadow:
      0 50px 120px rgba(0,0,0,.5),
      0 0 0 1.5px rgba(255,255,255,.08),
      inset 0 1px 0 rgba(255,255,255,.12),
      inset 0 0 0 1px rgba(255,255,255,.04);
    position: relative;
    flex-shrink: 0;
  }

  /* Volume buttons (left side) */
  .device::before {
    content: '';
    position: absolute;
    left: -3.5px;
    top: 116px;
    width: 3.5px;
    height: 36px;
    background: #0d0a08;
    border-radius: 2px 0 0 2px;
    box-shadow: 0 52px 0 #0d0a08, 0 100px 0 #0d0a08;
  }

  /* Power button (right side) */
  .device::after {
    content: '';
    position: absolute;
    right: -3.5px;
    top: 158px;
    width: 3.5px;
    height: 72px;
    background: #0d0a08;
    border-radius: 0 2px 2px 0;
  }

  .phone {
    width: 100%;
    height: 100%;
    border-radius: 44px;
    overflow: hidden;
    box-shadow:
      0 0 0 1px rgba(0,0,0,.15),
      inset 0 0 0 1px rgba(255,255,255,.06);
  }
}
/* ===== STATUS BAR ===== */
.statusbar {
  height: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: max(env(safe-area-inset-top), 14px) 26px 6px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  z-index: 60;
  color: var(--ink);
  position: relative;
}
.statusbar .dots { display: flex; align-items: center; gap: 5px; }
.statusbar svg { display: block; }
.notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 30px;
  background: #1c1813;
  border-radius: 18px;
  z-index: 61;
}

/* ===== STAGE & SCREENS ===== */
.stage { position: relative; flex: 1; overflow: hidden; }
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.screen.active {
  display: flex;
  animation: slideIn .34s cubic-bezier(.22,.9,.32,1);
}
.screen.back.active { animation: slideBack .34s cubic-bezier(.22,.9,.32,1); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes slideBack {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: none; }
}

/* ===== LAYOUT PRIMITIVES ===== */
.body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 22px 26px;
  -webkit-overflow-scrolling: touch;
}
.body::-webkit-scrollbar { width: 0; }
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 12px;
}
.topbar .ttl { font-size: 16px; font-weight: 600; }
.spacer { flex: 1; }
.hide { display: none !important; }
