/* Global motion system */
:root {
  --motion-fast: 220ms;
  --motion-mid: 420ms;
  --motion-slow: 700ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.995);
  transition:
    opacity var(--motion-slow) var(--motion-ease),
    transform var(--motion-slow) var(--motion-ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Micro interactions */
a,
button,
.time-slot,
.date-circle,
.group img,
.group {
  transition-duration: var(--motion-fast);
  transition-timing-function: var(--motion-ease);
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

button:active,
a:active {
  transform: translateY(0);
}

.group {
  transition: transform var(--motion-mid) var(--motion-ease), box-shadow var(--motion-mid) var(--motion-ease);
}

.group:hover {
  transform: translateY(-4px);
}

.time-slot:hover,
.date-circle:hover {
  transform: translateY(-1px);
}

/* Stagger support */
.reveal[data-stagger] {
  transition-delay: var(--stagger-delay, 0ms);
}

/* Respect accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.is-visible,
  * {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Header nav underline animation */
header nav a {
  position: relative;
  text-decoration: none;
  border-bottom-color: transparent !important;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms var(--motion-ease), opacity 320ms var(--motion-ease);
  opacity: 0.9;
}

header nav a:hover::after,
header nav a:focus-visible::after {
  transform: scaleX(1);
}

/* Keep current-page link underlined */
header nav a[aria-current="page"]::after,
header nav a[class*="border-b"]::after {
  transform: scaleX(1);
}

/* Global dark-lux palette dominance */
body {
  background: #1b1c1c !important;
  color: #f4efe4 !important;
}

main {
  background: #1b1c1c;
}

header {
  background: rgba(27, 28, 28, 0.94) !important;
  border-color: rgba(219, 182, 94, 0.35) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

header nav a {
  color: #d8d0c3 !important;
}

header nav a:hover,
header nav a[aria-current="page"],
header nav a[class*="border-b"] {
  color: #dbb65e !important;
}

header a span,
header .text-stone-800,
header .text-stone-900 {
  color: #f4efe4 !important;
}

footer {
  background: #1b1c1c !important;
  border-top-color: rgba(219, 182, 94, 0.35) !important;
}

footer,
footer a,
footer span,
footer div {
  color: #d8d0c3 !important;
}

footer a:hover {
  color: #dbb65e !important;
}

.bg-surface,
.bg-surface-container,
.bg-surface-container-low,
.bg-surface-container-lowest,
.bg-surface-container-high,
.bg-surface-container-highest,
section.bg-surface,
section.bg-surface-container,
section.bg-surface-container-low,
section.bg-surface-container-lowest,
section.bg-surface-container-high,
section.bg-surface-container-highest,
div.bg-surface,
div.bg-surface-container,
div.bg-surface-container-low,
div.bg-surface-container-lowest,
div.bg-surface-container-high,
div.bg-surface-container-highest {
  background-color: #2f3131 !important;
}

.text-on-surface,
.text-on-background {
  color: #f4efe4 !important;
}

.text-on-surface-variant {
  color: #d8d0c3 !important;
}

.text-tertiary {
  color: #dbb65e !important;
}
