/*
 * DevOps Dashboard - Landing Page Styles
 */

/* ========================================
   CSS Custom Properties (Variables)
   ======================================== */
:root {
  --color-emerald-300: #6ee7b7;
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-cyan-400: #22d3ee;
  --color-cyan-500: #06b6d4;
  --color-cyan-600: #0891b2;
  --color-amber-400: #f7b733;
  --color-amber-500: #f59e0b;
  --color-sand-50: #f7f5f2;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-500: #64748b;
  --color-slate-700: #334155;
  --color-slate-800: #1f2937;
  --color-slate-900: #0b1220;
}

/* ========================================
   Base Styles
   ======================================== */
html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.08), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(247, 183, 51, 0.12), transparent 40%),
    linear-gradient(180deg, #fdfcfb 0%, #f6f4ef 100%);
  color: var(--color-slate-900);
}

/* Skip to main content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-emerald-500);
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   Hero Section Styles
   ======================================== */
.hero-gradient {
  background: linear-gradient(135deg, #0b1220 0%, var(--color-emerald-400) 45%, var(--color-amber-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-emerald-600);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
}

.hero-orbit {
  position: absolute;
  inset: -20% 10% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px dashed rgba(16, 185, 129, 0.35);
  animation: orbitRotate 12s linear infinite;
}

@keyframes orbitRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Card Styles
   ======================================== */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-slate-200);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-feature-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--color-slate-200);
}

.demo-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--color-slate-200);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.demo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.arch-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--color-slate-200);
  text-align: center;
}

.arch-step {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--color-emerald-500), var(--color-amber-400));
  color: white;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--color-slate-200);
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-slate-800);
}

.bg-sand-50 {
  background: var(--color-sand-50);
}

/* ========================================
   FAQ Section Styles
   ======================================== */
.faq-item {
  border-radius: 0.5rem;
  overflow: hidden;
}

.faq-item summary {
  background: white;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.faq-answer {
  animation: fadeIn 0.3s ease;
}

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

/* ========================================
   Mobile Menu Styles
   ======================================== */
.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(11, 18, 32, 0.98);
  backdrop-filter: blur(12px);
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Animation Styles
   ======================================== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in {
  animation: slideIn 0.6s ease forwards;
}

/* Staggered animation for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Screenshot Carousel Styles
   ======================================== */
.screenshot-carousel {
  position: relative;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-image {
  display: none;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-image.active {
  display: block;
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.carousel-btn i {
  font-size: 1.5rem;
  color: var(--color-slate-800);
}

.carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.carousel-indicator.active {
  background: white;
  width: 1.5rem;
  border-radius: 0.25rem;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .carousel-btn {
    width: 2rem;
    height: 2rem;
  }

  .carousel-btn i {
    font-size: 1.25rem;
  }

  .carousel-prev {
    left: 0.5rem;
  }

  .carousel-next {
    right: 0.5rem;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  header,
  footer,
  .mobile-menu-btn,
  .mobile-nav {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ========================================
   Focus Styles (Accessibility)
   ======================================== */
a:focus,
button:focus,
summary:focus {
  outline: 2px solid var(--color-emerald-500);
  outline-offset: 2px;
}

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

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
  .card,
  .faq-item summary,
  .dashboard-feature-card,
  .demo-card,
  .arch-card,
  .tech-badge {
    border-width: 2px;
  }
}

/* ========================================
   Custom Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-slate-200);
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate-900);
}

/* ========================================
   Pulse Animation for Status
   ======================================== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   Gradient Text
   ======================================== */
.gradient-text {
  background: linear-gradient(135deg, var(--color-emerald-500), var(--color-cyan-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Button Styles
   ======================================== */
.btn-primary {
  background: linear-gradient(135deg, var(--color-emerald-500), var(--color-emerald-600));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-slate-600);
  color: var(--color-slate-600);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
  background: var(--color-slate-100);
}
