/* ============================================
   Alec Vosika — Under Construction Page
   Premium Dark Design with Glassmorphism
   ============================================ */

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

:root {
  /* Color palette — refined dark theme */
  --color-bg: #09090b;
  --color-bg-subtle: #121214;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text-primary: #f4f4f7;
  --color-text-secondary: rgba(244, 244, 247, 0.65);
  --color-text-muted: rgba(244, 244, 247, 0.4);

  /* Accent — warm BB-8 orange */
  --color-accent: #f28518;
  --color-accent-glow: rgba(242, 133, 24, 0.25);
  --color-accent-subtle: rgba(242, 133, 24, 0.1);

  /* Gradient colors */
  --gradient-primary: linear-gradient(135deg, #f28518 0%, #d47011 50%, #b55d0a 100%);
  --gradient-bg: radial-gradient(circle at 50% 55%, rgba(242, 133, 24, 0.08) 0%, transparent 60%);
  --gradient-bg-2: radial-gradient(circle at 50% 50%, rgba(242, 133, 24, 0.03) 0%, transparent 80%);

  /* Typography */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 800ms;
}

/* --- Base Styles --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-bg), var(--gradient-bg-2);
  pointer-events: none;
  z-index: 0;
}

/* --- Particle Canvas --- */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--space-xl);
  text-align: center;
}

.hero__content {
  max-width: 640px;
  animation: fadeInUp var(--duration-slow) var(--ease-out) both;
}

/* --- Badge --- */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  border-radius: 100px;
  background: var(--color-accent-subtle);
  border: 1px solid rgba(232, 168, 73, 0.2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp var(--duration-slow) var(--ease-out) 100ms both;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

/* --- Title --- */
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  margin-bottom: var(--space-lg);
}

.hero__title-line {
  display: block;
}

.hero__title-line--1 {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--color-text-secondary);
  animation: fadeInUp var(--duration-slow) var(--ease-out) 200ms both;
}

.hero__title-line--2 {
  font-size: clamp(4rem, 12vw, 8.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp var(--duration-slow) var(--ease-out) 300ms both;
}

/* --- Subtitle --- */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto;
  animation: fadeInUp var(--duration-slow) var(--ease-out) 400ms both;
}

/* --- Divider --- */
.hero__divider {
  width: 48px;
  height: 1px;
  background: var(--gradient-primary);
  margin: var(--space-2xl) auto;
  opacity: 0.6;
  animation: fadeInUp var(--duration-slow) var(--ease-out) 500ms both;
}

/* --- Construction Animation --- */
.hero__animation {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: var(--space-xl) auto 0;
  width: 100%;
  max-width: 520px;
  animation: fadeInUp var(--duration-slow) var(--ease-out) 600ms both;
}

.construction-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: platform-float 6s ease-in-out infinite;
}

/* Character Animations */
.worker {
  animation: worker-breathe 4s ease-in-out infinite;
  transform-origin: 265px 172px;
}

.worker__head {
  animation: worker-nod 4s ease-in-out infinite;
  transform-origin: 0px 0px; /* neck pivot inside the rotated Droid group */
}

.sleep-z {
  opacity: 0;
  transform-origin: 270px 115px;
  transform-box: view-box;
  filter: drop-shadow(0 0 6px var(--color-accent-glow));
}

.z-1 {
  animation: sleep-z1 4s ease-in-out infinite;
}

.z-2 {
  animation: sleep-z2 4s ease-in-out infinite 1.33s;
}

.z-3 {
  animation: sleep-z3 4s ease-in-out infinite 2.66s;
}

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

@keyframes worker-breathe {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.02) translateY(-0.5px);
  }
}

@keyframes worker-nod {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(4deg) translateY(0.5px);
  }
}

@keyframes sleep-z1 {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  20% {
    opacity: 0.8;
  }
  70% {
    opacity: 0;
    transform: translate(12px, -24px) scale(1) rotate(-5deg);
  }
  100% {
    opacity: 0;
  }
}

@keyframes sleep-z2 {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  20% {
    opacity: 0.8;
  }
  70% {
    opacity: 0;
    transform: translate(24px, -36px) scale(1.15) rotate(5deg);
  }
  100% {
    opacity: 0;
  }
}

@keyframes sleep-z3 {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  20% {
    opacity: 0.8;
  }
  70% {
    opacity: 0;
    transform: translate(36px, -48px) scale(1.3) rotate(-10deg);
  }
  100% {
    opacity: 0;
  }
}

/* --- Footer --- */
.hero__footer {
  position: absolute;
  bottom: var(--space-xl);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  animation: fadeInUp var(--duration-slow) var(--ease-out) 700ms both;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .hero {
    padding: var(--space-lg);
  }

  .hero__badge {
    margin-bottom: var(--space-xl);
  }

  .hero__divider {
    margin: var(--space-xl) auto;
  }

  .hero__link {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }
}

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

  .hero__badge-dot {
    animation: none;
  }
}
