/* ==========================================================================
   MOSH — Under Construction Experience
   Monochrome • Modern Aesthetics • Fluid Micro-Animations
   ========================================================================== */

:root {
  /* Dark Mode (Default) */
  --bg-color: #070709;
  --card-bg: rgba(18, 18, 22, 0.8);
  --text-main: #f5f5f7;
  --text-sub: #8e8e98;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.14);
  --accent-glow: rgba(255, 255, 255, 0.08);
  --pulse-color: #ffffff;
  --pulse-glow: rgba(255, 255, 255, 0.5);
  --progress-gradient: linear-gradient(90deg, transparent, #ffffff, transparent);
  --shadow-card: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.08);

  --font-heading: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* Light Mode */
  --bg-color: #f7f7f9;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text-main: #09090b;
  --text-sub: #636370;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.12);
  --accent-glow: rgba(0, 0, 0, 0.05);
  --pulse-color: #09090b;
  --pulse-glow: rgba(0, 0, 0, 0.3);
  --progress-gradient: linear-gradient(90deg, transparent, #09090b, transparent);
  --shadow-card: 0 25px 50px -15px rgba(0, 0, 0, 0.09), 0 0 1px 1px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
  padding: clamp(4rem, 9vh, 7rem) 1.5rem clamp(2rem, 5vh, 3.5rem) 1.5rem;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Ambient Animated Canvas & Grids
   -------------------------------------------------------------------------- */
.ambient-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#ambientCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  opacity: 0.5;
}

.ambient-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  filter: blur(50px);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* --------------------------------------------------------------------------
   Theme Toggle Button
   -------------------------------------------------------------------------- */
.theme-toggle {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s var(--ease-spring);
}

.theme-toggle:hover {
  transform: scale(1.08) rotate(15deg);
  border-color: var(--border-card);
}

/* --------------------------------------------------------------------------
   Main Construction Container & Card
   -------------------------------------------------------------------------- */
.construction-container {
  position: relative;
  z-index: 2;
  margin: auto;
  width: 100%;
  max-width: 540px;
  perspective: 1000px;
}

.construction-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: clamp(3.25rem, 7vw, 4.25rem) clamp(1.75rem, 5vw, 3rem) clamp(2.5rem, 5vw, 3.25rem);
  text-align: center;
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.3s ease;
  animation: cardFadeIn 1s var(--ease-spring) both;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-glow {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: radial-gradient(circle 350px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 80%);
  pointer-events: none;
}

[data-theme="light"] .card-glow {
  background: radial-gradient(circle 350px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 0, 0, 0.04), transparent 80%);
}

/* --------------------------------------------------------------------------
   Logo Wrapper & Centered Floating Animation
   -------------------------------------------------------------------------- */
.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 1.75rem auto;
  transform: translateZ(35px);
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateZ(35px) translateY(0);
  }
  50% {
    transform: translateZ(35px) translateY(-7px);
  }
}

.mosh-logo {
  width: clamp(140px, 22vw, 175px);
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
  transition: transform 0.4s var(--ease-spring);
}

.construction-card:hover .mosh-logo {
  transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   Status Badge on Dedicated Centered Row
   -------------------------------------------------------------------------- */
.status-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 1.5rem auto;
  transform: translateZ(20px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.45rem 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
}

[data-theme="light"] .status-pill {
  background: rgba(0, 0, 0, 0.03);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--pulse-color);
  box-shadow: 0 0 10px var(--pulse-glow);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--pulse-color);
  animation: radarPulse 2s infinite var(--ease-spring);
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Headings & Content
   -------------------------------------------------------------------------- */
.main-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.8vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  width: 100%;
  text-align: center;
  transform: translateZ(25px);
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-sub) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-heading {
  font-size: clamp(0.92rem, 1.3vw, 1.02rem);
  color: var(--text-sub);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 2rem auto;
  width: 100%;
  text-align: center;
  transform: translateZ(15px);
}

/* --------------------------------------------------------------------------
   Animated Progress Bar
   -------------------------------------------------------------------------- */
.progress-bar-wrapper {
  width: 100%;
  height: 3px;
  background: var(--border-subtle);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  transform: translateZ(10px);
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--progress-gradient);
  animation: progressSlide 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progressSlide {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* --------------------------------------------------------------------------
   Minimal Footer
   -------------------------------------------------------------------------- */
.minimal-footer {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  text-transform: uppercase;
  text-align: center;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Mobile Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .theme-toggle {
    top: 1.25rem;
    right: 1.25rem;
  }

  .construction-card {
    padding: 2.25rem 1.5rem;
    border-radius: 20px;
  }
}
