/* ==========================================================================
   RestoOS — Component Styles
   Navbar, Buttons, Badges, Cards, Device Frames, Drawer, Toasts
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(12, 15, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background var(--transition-base), border-color var(--transition-base), height var(--transition-base);
}

.navbar.scrolled {
  background: rgba(12, 15, 20, 0.92);
  border-bottom-color: var(--border-medium);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  height: 100%;
  min-width: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  min-width: 0;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1C2433 0%, #151C28 100%);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-brass);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.brand-tagline-subtle {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

@media (max-width: 960px) {
  .nav-menu {
    display: none;
  }
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-brass);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav-back-short {
  display: none;
}

@media (max-width: 960px) {
  .nav-actions .btn-desktop-only {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand-tagline-subtle {
    display: none;
  }
  .nav-back-full {
    display: none;
  }
  .nav-back-short {
    display: inline;
  }
  .nav-actions {
    gap: var(--space-2);
  }
  .nav-actions .btn {
    padding: 0.45rem 0.75rem;
    font-size: var(--fs-xs);
  }
}

@media (max-width: 360px) {
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .brand-mark svg {
    width: 18px;
    height: 18px;
  }
  .brand-name {
    font-size: var(--fs-base);
  }
  .nav-actions .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }
  .nav-burger {
    width: 36px;
    height: 36px;
  }
}

.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.nav-burger span {
  width: 20px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

@media (max-width: 960px) {
  .nav-burger {
    display: flex;
  }
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  visibility: hidden;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-card-solid);
  border-left: 1px solid var(--border-medium);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-smooth), visibility var(--transition-smooth);
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-6);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.drawer-link {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-2) 0;
}

.drawer-link:hover {
  color: var(--accent-brass);
}

.drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.drawer-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  max-width: 100%;
  transition: all var(--transition-base);
  user-select: none;
}

@media (max-width: 480px) {
  .btn-wrap-mobile {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: var(--fs-base);
  border-radius: var(--radius-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-brass) 0%, #B89668 100%);
  color: #0F131A;
  box-shadow: 0 2px 10px rgba(200, 169, 126, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-brass-hover) 0%, #C4A374 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 169, 126, 0.35);
  color: #0A0D12;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-brass);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-line {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.btn-line:hover {
  border-color: var(--accent-brass);
  color: var(--accent-brass);
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Badges & Indicators
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 100%;
  box-sizing: border-box;
}

.badge-brass {
  background: rgba(200, 169, 126, 0.12);
  color: var(--accent-brass);
  border: 1px solid rgba(200, 169, 126, 0.25);
}

.badge-emerald {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-demo {
  background: rgba(245, 158, 11, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 0.625rem;
  font-weight: 700;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}

.card-glass:hover {
  border-color: var(--border-medium);
}

/* --------------------------------------------------------------------------
   Interactive Device Mockups (Laptop / Phone Frame)
   -------------------------------------------------------------------------- */
.device-wrapper {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.device-frame {
  background: #171D27;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(200, 169, 126, 0.08);
  overflow: hidden;
  position: relative;
}

.device-bar {
  height: 38px;
  background: #121620;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  gap: var(--space-2);
}

.device-dots {
  display: flex;
  gap: 6px;
}

.device-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.device-dot.red { background: #FF5F56; }
.device-dot.yellow { background: #FFBD2E; }
.device-dot.green { background: #27C93F; }

.device-address {
  margin-left: auto;
  margin-right: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
}

.device-screen {
  position: relative;
  background: #0C0F14;
  height: 380px;
  overflow: hidden;
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.device-screen:hover img {
  transform: scale(1.02);
}

.device-overlay-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  background: rgba(12, 15, 20, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Floating Metric Pills */
.floating-pill {
  position: absolute;
  background: rgba(19, 25, 36, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  animation: floatSlow 6s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   Toast Notification System
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-base);
  max-width: 380px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 3px solid var(--accent-emerald);
}

.toast-info {
  border-left: 3px solid var(--accent-brass);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: #090C10;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-20) 0 var(--space-10) 0;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin-top: var(--space-3);
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.footer-link:hover {
  color: var(--accent-brass);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.demo-disclaimer-box {
  background: rgba(245, 158, 11, 0.06);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: 0.75rem;
  color: #FCD34D;
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.demo-disclaimer-box span {
  min-width: 0;
  flex: 1;
}
