html { scroll-behavior: smooth; }

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: #fcfcfd;
  color: #1f2937;
  overflow-y: scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Header TRANSPARENT states (NO WHITE BLUR!) ===== */
.hub-header-transparent {
  background-color: rgba(255,255,255,0) !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.hub-header-transparent .header-bg-layer {
  background-color: rgba(255,255,255,0) !important;
}
.hub-header-transparent.hub-header-scrolled {
  background-color: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04), 0 1px 3px 0 rgba(15, 23, 42, 0.06) !important;
}
.hub-header-transparent.hub-header-scrolled .header-bg-layer {
  background-color: #ffffff !important;
}

/* ===== Logo swap: white over hero (transparent header), dark otherwise ===== */
.logo-white { display: none; }
.hub-header-transparent:not(.hub-header-scrolled) .logo-white { display: block; }
.hub-header-transparent:not(.hub-header-scrolled) .logo-dark { display: none; }

/* ===== Scrolled state: dark nav text + light pills on white header ===== */
.hub-header-transparent.hub-header-scrolled .nav-tab {
  color: #1e293b !important;
}
.hub-header-transparent.hub-header-scrolled .nav-tab:hover {
  color: #0038B8 !important;
}
.hub-header-transparent.hub-header-scrolled .nav-tab.nav-underline-white::after {
  background-color: #0038B8 !important;
}
.hub-header-transparent.hub-header-scrolled .hub-header-pill {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
.hub-header-transparent.hub-header-scrolled .hub-header-pill:hover {
  background-color: #e2e8f0 !important;
}

/* details summary: no native marker */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ===== Responsive guards (do not depend on tw.css build) ===== */
@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}
@media (max-width: 767.98px) {
  .hide-mobile { display: none !important; }
}

/* ===== Nav underline utilities ===== */
.nav-underline-srb,
.nav-underline-white {
  position: relative;
}
.nav-underline-srb::after {
  content: '';
  display: block;
  height: 3px;
  width: calc(100% - 10px);
  margin: 2px auto 0 auto;
  border-radius: 3px;
  background-color: #1E40AF;
  opacity: 0.98;
}
.nav-underline-white::after {
  content: '';
  display: block;
  height: 3px;
  width: calc(100% - 10px);
  margin: 2px auto 0 auto;
  border-radius: 3px;
  background-color: #ffffff;
  opacity: 0.96;
}

/* Category card hover */
.hub-cat-card {
  transform: translateZ(0);
  will-change: transform, box-shadow;
}
.hub-cat-card:hover {
  transform: translateY(-4px);
}
/* White edge frame like reference.png category cards */
.hub-cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 17px;
  pointer-events: none;
  z-index: 5;
}

/* Search modal */
.search-modal {
  animation: searchFadeIn 0.18s ease-out both;
}
@keyframes searchFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.search-modal-panel {
  animation: searchPanelPop 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes searchPanelPop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Board card hover */
.board-card img { transform: translateZ(0); }

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

.no-underline { text-decoration: none !important; }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-stops)); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }
.bg-linear-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-linear-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }

.rounded-xs { border-radius: 2px; }

.shadow-xs { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }

.backdrop-blur-xs { backdrop-filter: blur(2px); }

.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-bounce { animation: bounce 1s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

.fill-amber-400 { fill: #fbbf24; }

.flex { display: flex; }
