/* ═══════════════════════════════════════════════════════════
   ZERO OS — INTERACTION POLISH (Layer 4)
   Focus states, hover transitions, keyboard navigation.
   The gap between "looks good" and "feels alive."
   ═══════════════════════════════════════════════════════════ */

/* ── 1. FOCUS-VISIBLE — Keyboard navigation gets phosphor outline ── */
:focus-visible {
  outline: 2px solid var(--phosphor, #c8ff00);
  outline-offset: 2px;
  border-radius: 0; /* No rounded corners — PHOSPHOR canon */
}

/* Remove default focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Nav tabs — phosphor border instead of outline */
.nav-tab:focus-visible {
  outline: none;
  border-color: var(--phosphor, #c8ff00);
  text-shadow: 0 0 8px rgba(200, 255, 0, 0.4);
  color: var(--phosphor, #c8ff00);
}

/* Subscribe buttons — invert on focus */
button:focus-visible,
.email-submit:focus-visible {
  outline: 2px solid var(--phosphor, #c8ff00);
  outline-offset: 2px;
  background: var(--phosphor, #c8ff00);
  color: var(--void, #000);
  text-shadow: none;
}

/* Input fields — phosphor underline glow */
input:focus-visible {
  outline: none;
  border-bottom-color: var(--phosphor, #c8ff00) !important;
  box-shadow: 0 2px 8px rgba(200, 255, 0, 0.2);
}

/* Links — subtle glow ring */
a:focus-visible {
  outline: 1px solid var(--phosphor, #c8ff00);
  outline-offset: 3px;
  text-shadow: 0 0 8px rgba(200, 255, 0, 0.4);
}


/* ── 1b. NAV UNDERLINE DRAW ── */
.nav-tab {
  position: relative;
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--phosphor, #c8ff00);
  transition: width 0.3s ease;
}

.nav-tab:hover::after,
.nav-tab.active::after {
  width: 100%;
}

/* ── 1c. BUTTON PRESS ── */
button,
.email-submit {
  transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

button:active,
.email-submit:active {
  transform: scale(0.97);
}

button:focus-visible,
.email-submit:focus-visible {
  box-shadow: 0 0 8px rgba(200, 255, 0, 0.25);
}

/* ── 1d. EXTERNAL LINK ARROW ── */
a[href^="http"]:not(.nav-tab):not(.nav-live)::after {
  content: '\2197';
  display: inline-block;
  margin-left: 2px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.8em;
}

a[href^="http"]:not(.nav-tab):not(.nav-live):hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ── 2. CARD HOVER TRANSITIONS — subtle background shift on hover ── */
.card-entry {
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-entry:hover {
  background-color: rgba(200, 255, 0, 0.02);
  transform: translateY(-2px);
  border-color: rgba(200, 255, 0, 0.3);
  box-shadow: 0 0 8px rgba(200, 255, 0, 0.15);
}

/* Feature entries on product page */
.feature-entry {
  transition: background-color 0.2s ease;
}

.feature-entry:hover {
  background-color: rgba(200, 255, 0, 0.02);
}

/* Prediction entries */
.p-entry {
  transition: background-color 0.2s ease;
}

.p-entry:hover {
  background-color: rgba(200, 255, 0, 0.02);
}

/* Output entries on intel page */
.o-entry {
  transition: background-color 0.2s ease;
}

.o-entry:hover {
  background-color: rgba(200, 255, 0, 0.02);
}

/* Agent cards */
.card-entry[data-agent]:hover {
  background-color: rgba(200, 255, 0, 0.03);
}


/* ── 3. LINK TRANSITIONS — smooth color + glow changes ── */
a {
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.nav-tab {
  transition: color 0.15s ease, text-shadow 0.15s ease, border-color 0.15s ease;
}

/* Ticker items subtle hover */
.ticker-item {
  transition: color 0.2s ease;
}


/* ── 4. STATUS BAR GLOW — signal indicator feels powered ── */
.status-bar .signal {
  transition: text-shadow 0.3s ease;
}

.footer-diamond {
  transition: text-shadow 0.3s ease;
}


/* ── 5. SECTION ENTRANCE REFINEMENT — stagger for visual rhythm ── */
/* Upgrade .al animation with slight bounce */
.al {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ── 6. SCROLL-AWARE HEADER — subtle border glow when scrolled ── */
.status-bar {
  transition: border-bottom-color 0.3s ease, box-shadow 0.3s ease;
}

.status-bar.scrolled {
  border-bottom-color: rgba(200, 255, 0, 0.15);
  box-shadow: 0 1px 8px rgba(200, 255, 0, 0.05);
}


/* ── 7. EDITION CARD — hover lift ── */
.edition-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edition-card:hover {
  border-color: rgba(200, 255, 0, 0.15);
  box-shadow: 0 0 12px rgba(200, 255, 0, 0.03);
}


/* ── 8. DIMENSION BARS — shimmer on hover ── */
.dim-bar-row {
  transition: opacity 0.2s ease;
}

.card-entry:hover .dim-bar-row {
  opacity: 1;
}

.card-entry:hover .dim-bar {
  text-shadow: 0 0 6px currentColor;
}


/* ── 9. METRICS DASHBOARD — value glow intensifies on hover ── */
.status-card {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-card:hover {
  box-shadow: inset 0 0 20px rgba(200, 255, 0, 0.02);
}

.status-card:hover .value {
  text-shadow: 0 0 14px var(--phosphor-glow, rgba(200, 255, 0, 0.4)),
               0 0 30px rgba(200, 255, 0, 0.1);
}


/* ── 10. LOADING SKELETON — phosphor pulse for async content ── */
@keyframes skeleton-pulse {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(200, 255, 0, 0.02) 0%,
    rgba(200, 255, 0, 0.06) 50%,
    rgba(200, 255, 0, 0.02) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 2s ease-in-out infinite;
  border-radius: 0;
  min-height: 1em;
}


/* ── 11. SCROLL INDICATOR for overflowing nav ── */
.nav-bar {
  position: relative;
}


/* ── ACCESSIBILITY — respect motion preferences ── */
@media (prefers-reduced-motion: reduce) {
  .al { transition: none; }
  .card-entry,
  .feature-entry,
  .p-entry,
  .o-entry,
  .edition-card,
  .status-card,
  .nav-tab,
  a,
  button,
  .email-submit {
    transition: none !important;
  }
  .nav-tab::after { transition: none !important; width: 0 !important; }
  .nav-tab.active::after { width: 100% !important; }
  a[href^="http"]::after { opacity: 1 !important; transform: none !important; transition: none !important; }
  .skeleton { animation: none; background: rgba(200, 255, 0, 0.03); }
}


/* ── MOBILE — lighter hover effects (touch devices) ── */
@media (hover: none) {
  .card-entry:hover,
  .feature-entry:hover,
  .p-entry:hover,
  .o-entry:hover,
  .edition-card:hover,
  .status-card:hover {
    background-color: transparent;
    box-shadow: none;
    border-color: inherit;
    transform: none;
  }
  .nav-tab::after { width: 0 !important; }
  .nav-tab.active::after { width: 100% !important; }
  a[href^="http"]::after { display: none; }
}
