/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #fffef9;
}

/* ── Scroll-reveal (progressive enhancement — content visible without JS) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ── No-scroll-reveal for reduced-motion users ── */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Hero image quality ── */
#hero img {
  will-change: transform;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fffef9;
}
::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* ── Selection ── */
::selection {
  background: #059669;
  color: #fffef9;
}

/* ── Focus visible ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Nav transition helper ── */
#site-header.scrolled {
  background: rgba(255, 254, 249, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#site-header.scrolled a:not([class*="bg-"]) {
  color: #064e3b;
}
