/* ==========================================================================
   Co-Brothers Maintenance Page Stylesheet
   Modern Dark Technology Aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette */
  --bg-primary: #05070D;
  --bg-secondary: #0A0F1C;
  --bg-card: rgba(10, 15, 28, 0.68);
  --bg-card-hover: rgba(15, 22, 40, 0.8);
  --bg-pill: rgba(79, 140, 255, 0.08);

  --accent-primary: #4F8CFF;
  --accent-secondary: #704CFF;
  --accent-glow: rgba(79, 140, 255, 0.35);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-accent: rgba(79, 140, 255, 0.3);
  --border-accent-focus: #4F8CFF;

  --text-primary: #FFFFFF;
  --text-secondary: #8C96AA;
  --text-muted: #535E74;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #4F8CFF 0%, #704CFF 100%);
  --gradient-text: linear-gradient(135deg, #60A5FA 0%, #A78BFA 60%, #C084FC 100%);
  --gradient-btn-hover: linear-gradient(135deg, #5E97FF 0%, #7E5CFF 100%);

  /* Shadows */
  --shadow-card: 0 20px 45px -15px rgba(0, 0, 0, 0.65), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  --shadow-btn-primary: 0 8px 24px -4px rgba(79, 140, 255, 0.4);
  --shadow-btn-hover: 0 12px 30px -4px rgba(79, 140, 255, 0.6);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout & Sizing */
  --container-max-width: 1200px;
  --header-height: 88px;
  --content-max-width: 680px;

  /* Transitions */
  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   3. Ambient Background & Particles
   -------------------------------------------------------------------------- */
.ambient-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Radial Glows */
.radial-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.65;
  will-change: transform, opacity;
  animation: glow-breathe 14s ease-in-out infinite alternate;
}

.glow-blue {
  width: 600px;
  height: 600px;
  top: -100px;
  left: 10%;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.18) 0%, rgba(79, 140, 255, 0) 70%);
}

.glow-purple {
  width: 650px;
  height: 650px;
  bottom: 5%;
  right: 5%;
  background: radial-gradient(circle, rgba(112, 76, 255, 0.16) 0%, rgba(112, 76, 255, 0) 70%);
  animation-duration: 18s;
  animation-delay: -5s;
}

@keyframes glow-breathe {
  0% {
    transform: scale(0.92) translate(0, 0);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.08) translate(20px, 15px);
    opacity: 0.75;
  }
  100% {
    transform: scale(0.96) translate(-15px, -10px);
    opacity: 0.6;
  }
}

/* Subtle Grid Pattern */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 35%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 35%, transparent 90%);
}

/* Floating Particles */
.particles-container {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background-color: #FFFFFF;
  pointer-events: none;
  opacity: 0;
  animation: float-up infinite ease-in-out;
}

.p-1 { width: 3px; height: 3px; left: 15%; top: 85%; animation-duration: 16s; animation-delay: 0s; background: rgba(79, 140, 255, 0.7); }
.p-2 { width: 2px; height: 2px; left: 28%; top: 90%; animation-duration: 20s; animation-delay: 3s; background: rgba(255, 255, 255, 0.6); }
.p-3 { width: 3px; height: 3px; left: 45%; top: 75%; animation-duration: 18s; animation-delay: 1.5s; background: rgba(112, 76, 255, 0.7); }
.p-4 { width: 2px; height: 2px; left: 62%; top: 88%; animation-duration: 22s; animation-delay: 4.5s; background: rgba(79, 140, 255, 0.6); }
.p-5 { width: 4px; height: 4px; left: 78%; top: 82%; animation-duration: 17s; animation-delay: 2s; background: rgba(112, 76, 255, 0.5); filter: blur(0.5px); }
.p-6 { width: 2px; height: 2px; left: 88%; top: 92%; animation-duration: 24s; animation-delay: 5s; background: rgba(255, 255, 255, 0.5); }
.p-7 { width: 3px; height: 3px; left: 35%; top: 80%; animation-duration: 19s; animation-delay: 7s; background: rgba(79, 140, 255, 0.5); }
.p-8 { width: 2px; height: 2px; left: 70%; top: 95%; animation-duration: 21s; animation-delay: 6s; background: rgba(255, 255, 255, 0.4); }

@keyframes float-up {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  80% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-550px) scale(1.1);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   4. Layout Structure
   -------------------------------------------------------------------------- */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --------------------------------------------------------------------------
   5. Header / Branding
   -------------------------------------------------------------------------- */
.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  user-select: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--gradient-brand);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(79, 140, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   6. Main Content & Hero Section
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0 4.5rem;
}

.hero-section {
  width: 100%;
  max-width: var(--content-max-width);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.425rem 0.95rem;
  background-color: var(--bg-pill);
  border: 1px solid var(--border-accent);
  border-radius: 9999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary), 0 0 2px var(--accent-primary);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
    box-shadow: 0 0 6px var(--accent-primary);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 14px var(--accent-primary), 0 0 4px #FFFFFF;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
    box-shadow: 0 0 6px var(--accent-primary);
  }
}

.status-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  text-transform: uppercase;
}

/* Hero Typography */
.hero-heading {
  font-size: clamp(2.5rem, 5.8vw, 4.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Description */
.hero-description {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.68;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 2.75rem;
}

/* --------------------------------------------------------------------------
   7. Progress Section
   -------------------------------------------------------------------------- */
.progress-section {
  width: 100%;
  margin-bottom: 2.5rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.progress-label-right {
  color: #A3B8E0;
}

.progress-track {
  width: 100%;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.07);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  width: 70%;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 9999px;
  position: relative;
  box-shadow: 0 0 16px var(--accent-glow);
}

.progress-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: progress-shimmer-anim 3s ease-in-out infinite;
}

@keyframes progress-shimmer-anim {
  0% {
    transform: translateX(-100%);
  }
  60%, 100% {
    transform: translateX(150%);
  }
}

/* --------------------------------------------------------------------------
   8. Glassmorphism Info Card
   -------------------------------------------------------------------------- */
.info-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  margin-bottom: 2.75rem;
  transition: border-color var(--transition-normal), background var(--transition-normal);
}

.info-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--bg-card-hover);
}

.card-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-primary);
  margin-top: 0.1rem;
}

.gear-icon {
  width: 22px;
  height: 22px;
  animation: spin-slow 24s linear infinite;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-heading {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-description {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   9. CTA Buttons
   -------------------------------------------------------------------------- */
.cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.625rem;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  outline: none;
  transition: 
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  user-select: none;
  border: 1px solid transparent;
}

/* Primary Button (Contact Us) */
.btn-primary {
  background: var(--gradient-brand);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn-primary);
}

.btn-primary:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

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

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Secondary Button (Try Again) */
.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.reload-icon {
  width: 15px;
  height: 15px;
  transition: transform 0.4s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-secondary:hover .reload-icon {
  transform: rotate(45deg);
}

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

/* Secondary Button Loading State */
.btn-secondary.is-loading .reload-icon {
  animation: spin-reload 0.75s linear infinite;
}

@keyframes spin-reload {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Keyboard Focus States */
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  padding-bottom: 2.25rem;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-subtle);
  margin-bottom: 1.5rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.footer-left {
  font-weight: 400;
}

.footer-right {
  font-weight: 500;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11. Responsive Design
   -------------------------------------------------------------------------- */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
  .page-wrapper {
    padding: 0 1.75rem;
  }
  
  .main-content {
    padding: 2.75rem 0 3.5rem;
  }
}

/* Small Tablet / Large Mobile (768px and below) */
@media (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    padding-top: 1rem;
  }

  .hero-heading {
    margin-bottom: 1.25rem;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.62;
    margin-bottom: 2.25rem;
  }

  .info-card {
    padding: 1.25rem 1.35rem;
    gap: 1rem;
    margin-bottom: 2.25rem;
  }

  .card-icon-wrapper {
    width: 38px;
    height: 38px;
  }

  .card-heading {
    font-size: 1rem;
  }

  .card-description {
    font-size: 0.875rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
  .page-wrapper {
    padding: 0 1.25rem;
  }

  .main-content {
    padding: 2rem 0 3rem;
  }

  .status-pill {
    margin-bottom: 1.5rem;
    padding: 0.375rem 0.8rem;
  }

  .status-text {
    font-size: 0.625rem;
  }

  .hero-heading {
    font-size: 2.25rem;
    line-height: 1.12;
  }

  .hero-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }

  .progress-section {
    margin-bottom: 2rem;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }

  .footer-content {
    gap: 0.35rem;
    font-size: 0.75rem;
  }
}

/* Small Mobile (375px and below) */
@media (max-width: 375px) {
  .hero-heading {
    font-size: 2rem;
  }

  .brand-name {
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   12. Accessibility: 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;
  }

  .radial-glow,
  .particle,
  .gear-icon,
  .status-dot,
  .progress-shimmer {
    animation: none !important;
  }

  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none !important;
  }

  .btn-primary:hover .btn-arrow {
    transform: none !important;
  }
}
