/*
 * Archive-faithful reconstruction — motion layer.
 * Keep the original Light Company editorial, technical, and restrained visual language intact.
 * Motion should feel decisive and material: short easing, subtle lift, no ornamental drift.
 */

:root {
  --light-company-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --light-company-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --light-company-gold: #d8b566;
  --light-company-deep: #071b22;
}

html.archive-loading body {
  background: var(--light-company-deep);
}

html.archive-loading #root {
  opacity: 0;
  transform: translateY(12px);
}

html.archive-ready #root {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 520ms var(--light-company-ease-out),
    transform 620ms var(--light-company-ease-out);
}

#root a[href],
#root button,
#root [role="button"] {
  transition:
    color 180ms var(--light-company-ease-out),
    background-color 180ms var(--light-company-ease-out),
    border-color 180ms var(--light-company-ease-out),
    box-shadow 180ms var(--light-company-ease-out),
    opacity 180ms var(--light-company-ease-out),
    transform 180ms var(--light-company-ease-out);
}

#root a[href]:focus-visible,
#root button:focus-visible,
#root [role="button"]:focus-visible {
  outline: 2px solid var(--light-company-gold);
  outline-offset: 4px;
}

#root nav a[href] {
  position: relative;
}

#root nav a[href]::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--light-company-gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 220ms var(--light-company-ease-out);
}

#root nav a[href]:hover::after,
#root nav a[href]:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

#root a[href]:hover,
#root button:hover,
#root [role="button"]:hover {
  transform: translateY(-2px);
}

#root a[href]:active,
#root button:active,
#root [role="button"]:active {
  transform: scale(0.975);
  transition-duration: 120ms;
}

#root img,
#root video {
  transition:
    filter 420ms var(--light-company-ease-in-out),
    transform 620ms var(--light-company-ease-in-out);
}

#root a[href]:hover img,
#root a[href]:hover video {
  filter: brightness(1.05) saturate(1.04);
}

.route-transition {
  position: fixed;
  z-index: 2147483646;
  inset: 0;
  display: grid;
  align-items: end;
  padding: clamp(2rem, 6vw, 6rem);
  color: #f7f6f0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(216, 181, 102, 0.95) 0 2px, transparent 2px),
    var(--light-company-deep);
  clip-path: inset(0 100% 0 0);
}

.route-transition__eyebrow,
.route-transition__label {
  display: block;
  font-family: "Manrope", sans-serif;
  text-transform: uppercase;
}

.route-transition__eyebrow {
  margin-bottom: 0.75rem;
  color: var(--light-company-gold);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.route-transition__label {
  max-width: 14ch;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.route-transition--covering {
  animation: light-company-route-cover 300ms var(--light-company-ease-out) forwards;
}

.route-transition--revealing {
  clip-path: inset(0 0 0 0);
  animation: light-company-route-reveal 520ms var(--light-company-ease-out) 120ms forwards;
}

@keyframes light-company-route-cover {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes light-company-route-reveal {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(0 0 0 100%); }
}

@media (prefers-reduced-motion: reduce) {
  html.archive-loading #root,
  html.archive-ready #root,
  #root a[href],
  #root button,
  #root [role="button"],
  #root nav a[href]::after,
  #root img,
  #root video,
  .route-transition {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}
