/* ============================================================
   Shippr — POLISH LAYER (additive, namespaced)
   Linked AFTER styles.css. Detail-only micro-interactions,
   nav behavior, scroll progress, selection + scrollbar.
   No layout / spacing / rhythm changes.
   ============================================================ */

/* ---------- 1. Scroll progress bar ---------- */
#sp-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;                 /* above .nav (z 50) */
  background: var(--text);
  pointer-events: none;
  will-change: transform;
}

/* ---------- 1b. Nav condense on scroll ---------- */
.nav {
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav { transition: border-color .3s var(--ease); }
.nav__inner { transition: height .3s var(--ease); }
.nav.is-scrolled .nav__inner { height: 58px; }

/* ---------- 2. Button micro-interactions ---------- */
/* The primary button's hover is a background swap, owned by styles.css.
   The old opacity:.82 here fought that transition and faded the button
   toward the canvas; the ::after rules targeted a pseudo that never
   existed. Both removed. */

/* Ghost button — refined border glow on hover */
.btn--ghost {
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .25s;
}
.btn--ghost:hover {
  box-shadow: var(--shadow);
}

/* ---------- 3. Eyebrow leading accent tick ---------- */
/* The eyebrow text already starts with "/". Add a small gradient tick
   before it so section labels feel crafted. No vertical-rhythm impact. */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  margin-right: 9px;
  vertical-align: -2px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 8px -1px rgba(137, 87, 229, .55);
}

/* ---------- 4. Animated underline-on-hover for text links ---------- */
.feature__link,
.nav__links a {
  position: relative;
}
.feature__link::after,
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  height: 1.5px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--text);
  transition: transform .28s var(--ease);
  pointer-events: none;
}
.feature__link:hover::after,
.nav__links a:hover::after { transform: scaleX(1); }

/* keep the arrow motion feeling consistent */
.feature__link .arrow { transition: transform .2s var(--ease); }
.feature__link:hover .arrow { transform: translateX(3px); }

/* ---------- 5. Card / surface hover consistency ---------- */
/* NOTE: .card, .tier, .agent, .terminal are 3D-tilt-managed by motion.js —
   applying a translateY hover here would override their tilt transform.
   So limit the lift to non-tilt surfaces (.metric, .b2b). */
.metric, .b2b {
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .3s var(--ease);
}
.metric:hover, .b2b:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
}

/* Footer social — subtle lift to match */
.footer__social a { transition: border-color .15s, color .15s, transform .2s var(--ease); }
.footer__social a:hover { transform: translateY(-2px); }

/* ---------- 6. Selection + custom scrollbar ---------- */
::selection {
  background: color-mix(in srgb, var(--text) 16%, transparent);
  color: var(--text);
}
::-moz-selection {
  background: color-mix(in srgb, var(--text) 16%, transparent);
  color: var(--text);
}

html {
  scrollbar-width: thin;
  scrollbar-color: #c9c4bb transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb {
  background: #cdc8bf;
  border-radius: var(--pill);
  border: 2px solid var(--ink-2);
}
::-webkit-scrollbar-thumb:hover { background: #bab5ab; }

/* ---------- 7. Reduced-motion: keep progress bar, drop the flourishes ---------- */
@media (prefers-reduced-motion: reduce) {
  #sp-progress { box-shadow: none; }          /* bar stays (functional, not motion) */
  .feature__link::after,
  .nav__links a::after,
  .card, .tier, .metric,
  .nav, .nav__inner, .footer__social a {
    transition: none;
  }
  .card:hover,
  .tier:not(.tier--win):hover,
  .metric:hover,
  .footer__social a:hover { transform: none; }
  .feature__link:hover::after,
  .nav__links a:hover::after { transform: scaleX(1); }
}
