/* ==========================================================================
   eBoxr.com — Custom Styles
   ========================================================================== */

/* ---- Design Tokens ---- */
:root {
  --color-bg: #0a0e27;
  --color-surface: rgba(15, 23, 42, 0.60);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-primary: #3b82f6;
  --color-accent: #06b6d4;
  --color-cta: #f97316;
  --color-cta-hover: #fb923c;
  --gradient-primary: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-cta: linear-gradient(135deg, #f97316, #f59e0b);
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --navbar-height: 72px;
}

/* ---- Base ---- */
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Skip Navigation ---- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-nav:focus {
  top: 0;
  color: #fff;
}

/* ---- Glassmorphism: Navbar (always frosted) ---- */
.glass-nav {
  background: rgba(10, 14, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.glass-nav .navbar-toggler {
  color: var(--color-text);
  font-size: 1.5rem;
}

.glass-nav .nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

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

.glass-nav .nav-link.page-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

/* ---- Glassmorphism: Dropdown ---- */
.glass-dropdown {
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.glass-dropdown .dropdown-item {
  color: var(--color-text-muted);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

.glass-dropdown .dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-text);
}

/* ---- Glassmorphism: Card ---- */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12);
}

/* ---- Gradient Text ---- */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- CTA Button ---- */
.btn-cta {
  background: var(--gradient-cta);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.btn-cta:hover {
  box-shadow: 0 4px 24px rgba(249, 115, 22, 0.4);
  transform: translateY(-2px);
  color: #fff;
}

.btn-cta:active {
  transform: translateY(0);
}

/* ---- Programmatic Focus (screen-reader only, no visible ring) ---- */
[tabindex="-1"]:focus {
  outline: none;
}

/* ---- Virtual Page System ---- */
.page {
  display: none;
  min-height: calc(100vh - var(--navbar-height));
  padding-top: var(--navbar-height);
}

.page.page-active {
  display: block;
}

.page.page-entering {
  animation: pageEnter 0.4s ease forwards;
}

.page.page-exiting {
  animation: pageExit 0.3s ease forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pageExit {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* ---- Page-Enter Animations (replaces scroll animations) ---- */
.page-enter-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-active .page-enter-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Hero Section ---- */
.hero-section {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, #0a0e27, #1e1b4b, #0f172a, #0a0e27);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Hero Orbs ---- */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--color-primary);
  top: -100px;
  left: -100px;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--color-accent);
  bottom: -50px;
  right: -50px;
  animation-delay: 2s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: var(--color-cta);
  bottom: 100px;
  left: 50%;
  animation-delay: 4s;
}

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

/* ---- Service Card ---- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ---- App Screenshot Placeholder ---- */
.app-screenshot-placeholder {
  padding: 3rem 1rem;
  opacity: 0.5;
}

/* ---- Avatar ---- */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Avatar Placeholder ---- */
.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* ---- Social Links ---- */
.social-link {
  color: var(--color-text-muted);
  font-size: 1.25rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  color: var(--color-primary);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .glass-nav .navbar-collapse {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--color-border);
  }

  :root {
    --navbar-height: 56px;
  }

  .glass-nav .nav-link.page-active::after {
    bottom: -2px;
  }
}

@media (max-width: 767.98px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .hero-orb {
    display: none;
  }

  .display-5 {
    font-size: 1.75rem;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page-enter-animate {
    opacity: 1;
    transform: none;
  }

  .page.page-entering,
  .page.page-exiting {
    animation: none;
  }

  .hero-orb {
    animation: none;
  }
}
