/* ==========================================================================
   STAN'S MEDIA SERVER - MODERN LIGHT THEME DESIGN SYSTEM
   Clean, sophisticated, light-mode landing portal for self-hosted services
   ========================================================================== */

:root {
  /* Surfaces */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Borders */
  --border-subtle: #e2e8f0;
  --border-card: #e5e7eb;
  --border-hover: #cbd5e1;

  /* Typography */
  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Brand & Service Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;
  --primary-border: #bfdbfe;

  --emerald: #10b981;
  --emerald-subtle: #ecfdf5;
  --emerald-border: #a7f3d0;
  --emerald-text: #065f46;

  --jellyfin-accent: #7c3aed;
  --jellyfin-subtle: #f5f3ff;
  --jellyfin-border: #ddd6fe;

  --nextcloud-accent: #0284c7;
  --nextcloud-subtle: #f0f9ff;
  --nextcloud-border: #bae6fd;

  --status-accent: #10b981;
  --status-subtle: #ecfdf5;
  --status-border: #a7f3d0;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Transitions */
  --tr-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-smooth: 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Background Ambiance
   -------------------------------------------------------------------------- */
.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}

.glow-top-left {
  top: -120px;
  left: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 70%);
}

.glow-top-right {
  top: -100px;
  right: -80px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.07) 0%, rgba(2, 132, 199, 0.04) 50%, transparent 70%);
}

.subtle-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
}

/* --------------------------------------------------------------------------
   Layout Structure
   -------------------------------------------------------------------------- */
.page-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Header / Navbar
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--tr-base);
}

.nav-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: transform var(--tr-fast);
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-crest {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.online-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--emerald);
  border: 2px solid #ffffff;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-title);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Nav Status Badge (Uptime Kuma Link) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--emerald-subtle);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: all var(--tr-fast);
}

.status-badge:hover {
  background-color: #d1fae5;
  border-color: #6ee7b7;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  flex-shrink: 0;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.status-label {
  font-weight: 600;
}

.status-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  color: #047857;
  font-weight: 600;
}

.icon-arrow {
  opacity: 0.7;
  transition: transform var(--tr-fast);
}

.status-badge:hover .icon-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.main-layout {
  flex: 1;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  padding: 3.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.hero-block {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Services Grid
   -------------------------------------------------------------------------- */
.services-wrapper {
  width: 100%;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--tr-smooth), box-shadow var(--tr-smooth), border-color var(--tr-smooth);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

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

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

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

/* Top Accent Bar */
.card-accent-bar {
  height: 4px;
  width: 100%;
}

.bar-jellyfin {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.bar-nextcloud {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.bar-status {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.card-top {
  padding: 1.75rem 1.75rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.service-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--tr-base);
}

.service-card:hover .service-icon-box {
  transform: scale(1.06);
}

.icon-jellyfin {
  background-color: var(--jellyfin-subtle);
  color: var(--jellyfin-accent);
  border: 1px solid var(--jellyfin-border);
}

.icon-nextcloud {
  background-color: var(--nextcloud-subtle);
  color: var(--nextcloud-accent);
  border: 1px solid var(--nextcloud-border);
}

.icon-status {
  background-color: var(--status-subtle);
  color: var(--status-accent);
  border: 1px solid var(--status-border);
}

.category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.badge-jellyfin {
  background-color: var(--jellyfin-subtle);
  color: var(--jellyfin-accent);
  border: 1px solid var(--jellyfin-border);
}

.badge-nextcloud {
  background-color: var(--nextcloud-subtle);
  color: var(--nextcloud-accent);
  border: 1px solid var(--nextcloud-border);
}

.badge-status {
  background-color: var(--status-subtle);
  color: var(--status-accent);
  border: 1px solid var(--status-border);
}

.card-content {
  padding: 0.75rem 1.75rem 1.5rem;
  flex: 1;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.service-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid #f1f5f9;
  background-color: #fafbfd;
}

.btn-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--tr-fast);
  box-shadow: var(--shadow-xs);
}

.domain-tag {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  opacity: 0.85;
}

.launch-icon {
  transition: transform var(--tr-fast);
}

.btn-launch:hover .launch-icon {
  transform: translateX(3px);
}

.btn-launch-jellyfin {
  background-color: var(--jellyfin-accent);
  color: #ffffff;
}

.btn-launch-jellyfin:hover {
  background-color: #6d28d9;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transform: translateY(-1px);
}

.btn-launch-nextcloud {
  background-color: var(--nextcloud-accent);
  color: #ffffff;
}

.btn-launch-nextcloud:hover {
  background-color: #0369a1;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}

.btn-launch-status {
  background-color: var(--status-accent);
  color: #ffffff;
}

.btn-launch-status:hover {
  background-color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Info & Telemetry Banner
   -------------------------------------------------------------------------- */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--emerald) 0%, var(--primary) 100%);
}

.info-card-left {
  max-width: 580px;
}

.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #047857;
  background-color: var(--emerald-subtle);
  border: 1px solid var(--emerald-border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.65rem;
}

.heartbeat-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--emerald);
}

.info-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.info-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  font-family: var(--font-mono);
}

.text-link:hover {
  text-decoration: underline;
}

.info-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.75rem;
  flex-shrink: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-title);
  line-height: 1.2;
}

.stat-desc {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border-subtle);
}

/* Visitor Notice */
.notice-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.notice-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.notice-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-copy strong {
  color: var(--text-title);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-link {
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--tr-fast);
}

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

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--emerald);
}

.footer-sep {
  color: var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .info-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-stats {
    width: 100%;
    justify-content: space-around;
  }
}

@media (max-width: 640px) {
  .main-layout {
    padding: 2.5rem 1.25rem 3rem;
    gap: 2rem;
  }

  .hero-heading {
    font-size: 2.15rem;
  }

  .hero-subtext {
    font-size: 0.95rem;
  }

  .status-tag {
    display: none;
  }

  .info-stats {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.15rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
