/* ============================================================
   OVERDRIVE skin — Fort Rob Investing Company v3.0
   ============================================================
   Layered ON TOP of style.css (loaded after it). Everything
   visual is gated behind html[data-od="full"] / [data-od="low"]
   so switching the FX tier (or prefers-reduced-motion, which
   forces "off") restores the exact classic look with zero
   residue. Colors always come from the shared theme tokens,
   so all 8 themes render this correctly.
   ============================================================ */

/* ---------------- tier: FULL ---------------- */
html[data-od="full"] body {
  position: relative;
}

/* aurora backdrop: two slow-drifting gold/panel glows */
html[data-od="full"] body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 34% at 18% 12%,
      color-mix(in srgb, var(--gold) 9%, transparent), transparent 70%),
    radial-gradient(50% 40% at 84% 88%,
      color-mix(in srgb, var(--gold) 6%, transparent), transparent 72%);
  animation: od-aurora 26s ease-in-out infinite alternate;
}
html[data-od="full"] #layout,
html[data-od="full"] #footer {
  position: relative;
  z-index: 1;
  /* The header bar is deliberately NOT listed here (v3.0.1): it
     carries its own z-index:60 stacking plane from style.css so its
     dropdowns can never be buried by the panels below. */
}
@keyframes od-aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.06); }
}

/* glass cards + hover lift + gold edge light */
html[data-od="full"] .card {
  backdrop-filter: blur(8px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 10px 30px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease, border-color 0.25s ease;
}
html[data-od="full"] .card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gold) 38%, var(--panel-2));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 14px 36px rgba(0, 0, 0, 0.32),
    0 0 0 1px color-mix(in srgb, var(--gold) 16%, transparent);
}

/* staggered entrances: one-shot keyframes triggered by .od-in
   (added by LVOD.reveal). Unrevealed cards stay fully visible,
   so a missed reveal can never hide content. */
@keyframes od-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
html[data-od="full"] .od-in > .card,
html[data-od="full"] .card.od-in {
  animation: od-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  html[data-od] .card { animation: none !important; }
}

/* button micro-interactions */
html[data-od="full"] .action-btn,
html[data-od="full"] .range-btn,
html[data-od="full"] .tab,
html[data-od="full"] .theme-btn {
  transition:
    transform 0.15s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, background 0.2s ease,
    color 0.2s ease;
}
html[data-od="full"] .action-btn:hover,
html[data-od="full"] .theme-btn:hover,
html[data-od="full"] .tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px
    color-mix(in srgb, var(--gold) 20%, transparent);
}
html[data-od="full"] .action-btn:active,
html[data-od="full"] .range-btn:active,
html[data-od="full"] .theme-btn:active,
html[data-od="full"] .tab:active {
  transform: translateY(1px) scale(0.98);
}
html[data-od="full"] .action-btn.primary {
  box-shadow: 0 0 18px
    color-mix(in srgb, var(--gold) 28%, transparent);
}

/* topbar: thin animated gold underline */
html[data-od="full"] #topbar {
  box-shadow: 0 1px 0 0
    color-mix(in srgb, var(--gold) 22%, transparent);
}
html[data-od="full"] #topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--gold) 65%, transparent),
    transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: od-scanline 7s linear infinite;
  pointer-events: none;
}
@keyframes od-scanline {
  from { background-position: -60% 0; }
  to   { background-position: 160% 0; }
}

/* ---------------- ticker tape ---------------- */
#od-tape {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--panel-2);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: 12.5px;
  line-height: 1;
  user-select: none;
  cursor: default;
}
html:not([data-od="full"]) #od-tape { display: none; }
.od-tape-track {
  display: inline-block;
  padding: 7px 0;
  will-change: transform;
  animation: od-tape-scroll 55s linear infinite;
}
@keyframes od-tape-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
#od-tape:hover .od-tape-track { animation-play-state: paused; }
.od-tape-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  color: var(--muted, inherit);
  cursor: pointer;
}
.od-tape-item b { color: var(--text, inherit); font-weight: 600; }
.od-tape-item.od-up { color: #3fbf6f; }
.od-tape-item.od-down { color: #e05252; }
.od-dot {
  width: 4px; height: 4px;
  margin-left: 12px;
  border-radius: 50%;
  background: var(--panel-2);
  display: inline-block;
}

/* FX/SFX buttons in the "off" state render dimmed + struck */
.theme-btn.od-off {
  opacity: 0.55;
}
html[data-od="full"] .theme-btn.od-off {
  text-decoration: line-through;
}

/* ---------------- tier: LOW ----------------
   Motion engine keeps count-ups/ticks, but the expensive
   ambient layers drop out: no aurora, no blur, no scanline. */
html[data-od="low"] body::before { content: none; }
html[data-od="low"] .card { backdrop-filter: none; }
html[data-od="low"] #topbar::after { content: none; }

/* ---------------- reduced motion: hard guarantees ----------
   Even if a stale localStorage value says otherwise, the boot
   script forces data-od="off" under prefers-reduced-motion;
   these rules are belt-and-braces for any html[data-od].     */
@media (prefers-reduced-motion: reduce) {
  .od-tape-track { animation: none; }
  html[data-od] body::before,
  html[data-od] #topbar::after { content: none !important; }
  html[data-od] .card,
  html[data-od] .action-btn,
  html[data-od] .range-btn,
  html[data-od] .tab,
  html[data-od] .theme-btn {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
