/* =========================================================================
   BAR TALK — Electric Midnight Design System
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,800;0,9..144,900;1,9..144,400&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Core palette — Electric Midnight */
  --ink: #0a0608;            /* near-black, with the slightest red-purple */
  --ink-2: #14090d;          /* card backgrounds */
  --ink-3: #1f1117;          /* elevated surfaces */
  --ink-4: #2a1620;          /* borders/dividers */
  --bone: #f4ebd9;           /* primary text on dark — warm off-white */
  --bone-dim: rgba(244, 235, 217, 0.65);
  --bone-faint: rgba(244, 235, 217, 0.35);

  /* Accents */
  --amber: #ffb627;          /* electric amber — primary brand */
  --amber-deep: #d48806;
  --magenta: #ff2d75;        /* hot magenta — energy/activity */
  --oxblood: #6a0d2c;        /* deep red — rich accents */
  --emerald: #00d68f;        /* success/check-in confirmation */

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Geist', -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  /* Phone frame */
  --phone-w: 390px;
  --phone-h: 844px;
  --phone-radius: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #050304;
  color: var(--bone);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  min-height: 100vh;
}

/* Ambient page background — subtle radial glow */
body {
  background:
    radial-gradient(ellipse 1200px 800px at 50% -10%, rgba(255, 182, 39, 0.08), transparent 70%),
    radial-gradient(ellipse 800px 600px at 80% 100%, rgba(255, 45, 117, 0.06), transparent 70%),
    radial-gradient(ellipse 600px 400px at 10% 60%, rgba(106, 13, 44, 0.15), transparent 70%),
    #050304;
  background-attachment: fixed;
}

/* =========================================================================
   PHONE FRAME — wraps every "page" to feel like a device
   ========================================================================= */

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 64px;
  gap: 32px;
}

.stage-header {
  text-align: center;
  max-width: 720px;
}

.stage-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.stage-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--bone);
  margin-bottom: 12px;
}

.stage-title em {
  font-style: italic;
  color: var(--amber);
  font-weight: 400;
}

.stage-subtitle {
  font-size: 15px;
  color: var(--bone-dim);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--ink);
  border-radius: var(--phone-radius);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 12px #1a0e14,
    0 0 0 13px #2a1f25,
    0 40px 80px -20px rgba(255, 45, 117, 0.25),
    0 60px 120px -30px rgba(255, 182, 39, 0.15),
    0 25px 50px -12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

/* Notch / Dynamic Island */
.phone::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 32px;
  background: #000;
  border-radius: 100px;
  z-index: 100;
}

/* Status bar */
.statusbar {
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 28px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bone);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.statusbar .right { display: flex; gap: 6px; align-items: center; font-size: 12px; }

/* Main scrollable region */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen::-webkit-scrollbar { display: none; }
.screen { -ms-overflow-style: none; scrollbar-width: none; }

/* =========================================================================
   BOTTOM TAB BAR
   ========================================================================= */

.tabbar {
  flex-shrink: 0;
  height: 88px;
  background: rgba(10, 6, 8, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255, 182, 39, 0.12);
  display: flex;
  align-items: flex-start;
  padding: 12px 8px 28px;
  position: relative;
  z-index: 10;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--bone-faint);
  transition: color 0.2s;
  cursor: pointer;
  padding: 6px 4px;
}

.tab svg { width: 24px; height: 24px; stroke-width: 1.8; }
.tab span { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }

.tab.active { color: var(--amber); }
.tab.active svg { filter: drop-shadow(0 0 8px rgba(255, 182, 39, 0.5)); }

.tab:hover:not(.active) { color: var(--bone-dim); }

/* =========================================================================
   COMMON COMPONENTS
   ========================================================================= */

.app-header {
  padding: 8px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--amber), #ffd97d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(244, 235, 217, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 235, 217, 0.08);
  cursor: pointer;
}

.icon-btn svg { width: 18px; height: 18px; stroke: var(--bone); stroke-width: 1.8; fill: none; }

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pill-amber { background: rgba(255, 182, 39, 0.12); color: var(--amber); border: 1px solid rgba(255, 182, 39, 0.25); }
.pill-magenta { background: rgba(255, 45, 117, 0.12); color: var(--magenta); border: 1px solid rgba(255, 45, 117, 0.25); }
.pill-bone { background: rgba(244, 235, 217, 0.08); color: var(--bone-dim); border: 1px solid rgba(244, 235, 217, 0.12); }
.pill-emerald { background: rgba(0, 214, 143, 0.12); color: var(--emerald); border: 1px solid rgba(0, 214, 143, 0.25); }

/* Live dot */
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 0 rgba(255, 45, 117, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 117, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 45, 117, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 117, 0); }
}

/* Cards */
.card {
  background: var(--ink-2);
  border: 1px solid rgba(244, 235, 217, 0.06);
  border-radius: 20px;
  overflow: hidden;
}

/* Buttons */
.btn-primary {
  background: var(--amber);
  color: var(--ink);
  border: none;
  border-radius: 100px;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 8px 24px -8px rgba(255, 182, 39, 0.5);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px -8px rgba(255, 182, 39, 0.7); }

.btn-secondary {
  background: rgba(244, 235, 217, 0.08);
  color: var(--bone);
  border: 1px solid rgba(244, 235, 217, 0.12);
  border-radius: 100px;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

/* Section headers within screens */
.section-head {
  padding: 24px 24px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.section-title em { font-style: italic; color: var(--amber); font-weight: 500; }

.section-link {
  font-size: 12px;
  color: var(--bone-dim);
  text-decoration: none;
  font-weight: 500;
}

/* Caption note (under phone) */
.caption {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bone-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

/* =========================================================================
   SHARED ICONS — used across pages
   ========================================================================= */

.signal-icon, .battery-icon { display: inline-block; }

/* =========================================================================
   NAV BETWEEN PAGES (shown above phone for desktop demo)
   ========================================================================= */

.demo-nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(244, 235, 217, 0.04);
  border: 1px solid rgba(244, 235, 217, 0.08);
  border-radius: 100px;
  flex-wrap: wrap;
  justify-content: center;
}

.demo-nav a {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--bone-dim);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: all 0.2s;
}

.demo-nav a:hover { color: var(--bone); background: rgba(244, 235, 217, 0.06); }
.demo-nav a.current { background: var(--amber); color: var(--ink); }
