/* === ui.css === */
/* =========================================================
   === SHARED UI BUILDING BLOCKS (FINAL)
   ========================================================= */

/* === Cards (shared) === */
.card{
  position: relative;
  border-radius: 22px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  padding: clamp(18px, 3vw, 34px);
}

/* === Badges (shared) === */
.badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(7,19,15,0.72);
  background: rgba(0,90,187,0.04);
  border: 1px solid rgba(0,90,187,0.10);
}

/* === Reveal animation (utility) === */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
  will-change: opacity, transform;
}
.reveal.is-in{
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce){
  .reveal{
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* === Nav active state (current section) === */
.nav a.is-active{
  background: rgba(0, 90, 187, 0.12);
  color: rgba(7,19,15,0.95);
}

/* Optional: slightly stronger when header is scrolled */
.header.is-scrolled .nav a.is-active{
  background: rgba(0, 90, 187, 0.16);
}

/* =========================================================
   === SCROLL DOWN ARROW (FINAL: JS CONTROLS VISIBILITY)
   ========================================================= */

.scroll-down{
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 60;

  width: 54px;
  height: 54px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);

  color: var(--primary);
  text-decoration: none;

  opacity: 1;
  pointer-events: auto;

  transition: opacity .25s ease, transform .25s ease, background .25s ease, box-shadow .25s ease;
  animation: scroll-bob 1.6s infinite ease-in-out;
}

.scroll-down:hover,
.scroll-down:focus-visible{
  background: rgba(255,255,255,0.95);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
  transform: translateX(-50%) translateY(-2px);
  outline: none;
}

/* Hidden state (JS toggles this class) */
.scroll-down.is-hidden{
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(10px) !important;
  animation: none !important;
}

@keyframes scroll-bob{
  0%,100%{ transform: translateX(-50%) translateY(0); }
  50%{ transform: translateX(-50%) translateY(6px); }
}

@media (prefers-reduced-motion: reduce){
  .scroll-down{ animation: none; }
}
