:root {
  color-scheme: light;

  --sky-start: #cbe9fd;
  --sky-mid: #dcf0fe;
  --sky-end: #eff8ff;

  --ink-heading: #142459;
  --ink-body: #1f3973;
  --accent-blue: #2563eb;
  --badge-bg: rgba(255, 255, 255, 0.78);
  --badge-border: rgba(37, 99, 235, 0.22);

  --font-display: "Sora", "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;

  accent-color: var(--accent-blue);
  scrollbar-color: #7ab3e0 #e3f2fc;
}

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

::selection {
  background-color: var(--ink-heading);
  color: #ffffff;
}

html {
  font-family: var(--font-body);
  background-color: var(--sky-mid);
  color: var(--ink-heading);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(130deg, var(--sky-start) 0%, var(--sky-mid) 48%, var(--sky-end) 100%);
  display: flex;
  align-items: center;
}

/* Backdrop */
.sky-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-accents {
  width: 100%;
  height: 100%;
  display: block;
}

/* Layout */
.scene-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  align-items: center;
  gap: clamp(2rem, 4.5vw, 3.5rem);
}

.copy-column {
  max-width: 46ch;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.35rem;
  border-radius: 999px;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--accent-blue);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink-heading);
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1rem, 1.75vw, 1.1rem);
  color: var(--ink-body);
  margin: 0 0 1.75rem;
  text-wrap: pretty;
}

/* Progress Strip */
.progress-strip {
  max-width: 340px;
}

.progress-track {
  height: 6px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-runner {
  height: 100%;
  width: 68%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
  transform-origin: left center;
}

.progress-caption {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-body);
}

/* Illustration */
.illustration-column {
  width: 100%;
}

.construction-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Purposeful Motion */
@media (prefers-reduced-motion: no-preference) {
  .copy-column {
    animation: fade-rise 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .illustration-column {
    animation: fade-rise 820ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
  }

  .sync-icon {
    animation: spin-smooth 3.2s linear infinite;
  }

  .progress-runner {
    animation: progress-enter 1.1s cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
  }

  .crane-payload {
    transform-origin: 456px 95px;
    animation: crane-sway 4.8s ease-in-out infinite alternate;
  }

  .gear-spin-cw {
    transform-box: fill-box;
    transform-origin: center;
    animation: spin-smooth 10s linear infinite;
  }

  .gear-spin-ccw {
    transform-box: fill-box;
    transform-origin: center;
    animation: spin-ccw 6.5s linear infinite;
  }

  .roller-arm {
    transform-origin: 40px 54px;
    animation: paint-stroke 1.8s ease-in-out infinite alternate;
  }

  .wrench-arm {
    transform-origin: 18px 52px;
    animation: wrench-turn 1.6s ease-in-out infinite alternate;
  }

  .worker-carry {
    animation: carry-bob 2.8s ease-in-out infinite alternate;
  }

  .drift-item {
    animation: drift-gentle 8s ease-in-out infinite alternate;
  }

  .item-2 {
    animation-duration: 10s;
    animation-delay: -2s;
  }

  .item-3 {
    animation-duration: 9s;
    animation-delay: -4s;
  }

  .item-4 {
    animation-duration: 11s;
    animation-delay: -1s;
  }

  @keyframes fade-rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

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

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

  @keyframes progress-enter {
    from {
      transform: scaleX(0.15);
      opacity: 0.7;
    }
    to {
      transform: scaleX(1);
      opacity: 1;
    }
  }

  @keyframes crane-sway {
    from {
      transform: translateY(0px) rotate(-1deg);
    }
    to {
      transform: translateY(-5px) rotate(1deg);
    }
  }

  @keyframes paint-stroke {
    from {
      transform: rotate(-6deg) translateY(3px);
    }
    to {
      transform: rotate(8deg) translateY(-5px);
    }
  }

  @keyframes wrench-turn {
    from {
      transform: rotate(-7deg);
    }
    to {
      transform: rotate(9deg);
    }
  }

  @keyframes carry-bob {
    from {
      transform: translate(656px, 336px);
    }
    to {
      transform: translate(656px, 331px);
    }
  }

  @keyframes drift-gentle {
    from {
      transform: translateY(0px);
    }
    to {
      transform: translateY(-14px);
    }
  }
}

@media (forced-colors: active) {
  .status-badge,
  .progress-track {
    border: 1px solid CanvasText;
  }
}

@media (max-width: 900px) {
  .scene-layout {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .copy-column {
    margin-inline: auto;
  }

  .progress-strip {
    margin-inline: auto;
  }
}
