/* Mai Chai: small additions to Tailwind */

html { scroll-padding-top: 5rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

:focus-visible {
  outline: 3px solid #4A6B32;
  outline-offset: 3px;
  border-radius: 6px;
}

.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: #B8D69B;
}

/* Legal dialogs */
dialog.legal {
  width: min(44rem, calc(100% - 2rem));
  max-height: min(85vh, 52rem);
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: #FBF5EC;
  color: #2A1D17;
  box-shadow: 0 30px 60px -20px rgba(42, 29, 23, 0.45);
}

dialog.legal::backdrop {
  background: rgba(42, 29, 23, 0.6);
  backdrop-filter: blur(2px);
}

dialog.legal h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

dialog.legal p,
dialog.legal li { line-height: 1.65; }

dialog.legal ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

dialog.legal a {
  color: #6F3A21;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.dialog-open { overflow: hidden; }

/* Floating cans in the hero */
@media (prefers-reduced-motion: no-preference) {
  .float-slow { animation: float 7s ease-in-out infinite; }
  .float-slow.delay { animation-delay: -3.5s; }
}

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

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

/* Hero background */
.hero-bg {
  background:
    radial-gradient(ellipse at top right, #E4EDD9 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, #F3E8D8 0%, transparent 60%);
}

[tabindex="-1"]:focus { outline: none; }
