/* ==========================================
   OMNI X BY STERLING — INVESTMENT OPTIONS HUB (/invest)
   Builds on main.css (filter pills, reveal) and light-mode.css (palette).
   ========================================== */

/* Per-product accent: --acc for dark mode glow/icon, --acc-ink for text on light. */
.ih-card[data-accent="cyan"]    { --acc: 34, 211, 238;  --acc-ink: 14, 116, 144; }
.ih-card[data-accent="purple"]  { --acc: 192, 132, 252; --acc-ink: 126, 34, 206; }
.ih-card[data-accent="indigo"]  { --acc: 129, 140, 248; --acc-ink: 67, 56, 202; }
.ih-card[data-accent="amber"]   { --acc: 251, 191, 36;  --acc-ink: 180, 83, 9; }
.ih-card[data-accent="sky"]     { --acc: 56, 189, 248;  --acc-ink: 3, 105, 161; }
.ih-card[data-accent="blue"]    { --acc: 96, 165, 250;  --acc-ink: 29, 78, 216; }
.ih-card[data-accent="rose"]    { --acc: 251, 113, 133; --acc-ink: 190, 18, 60; }
.ih-card[data-accent="emerald"] { --acc: 52, 211, 153;  --acc-ink: 4, 120, 87; }
.ih-card[data-accent="teal"]    { --acc: 45, 212, 191;  --acc-ink: 15, 118, 110; }
.ih-card[data-accent="lime"]    { --acc: 163, 230, 53;  --acc-ink: 77, 124, 15; }
.ih-card[data-accent="orange"]  { --acc: 251, 146, 60;  --acc-ink: 194, 65, 12; }

/* ---------- Intro ---------- */
.ih-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 12.5px;
  color: rgba(161, 161, 170, 0.9);
}
.ih-breadcrumb a { color: inherit; transition: color 0.2s ease; }
.ih-breadcrumb a:hover { color: #ffffff; }
.ih-breadcrumb [aria-current="page"] { color: #e4e4e7; }

.ih-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}
.ih-lede {
  margin: 0;
  max-width: 640px;
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.65;
}

.ih-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  flex-shrink: 0;
}
.ih-stats > div { padding: 16px 20px; }
.ih-stats > div + div { border-left: 1px solid rgba(255, 255, 255, 0.07); }
.ih-stats dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(161, 161, 170, 0.9);
  white-space: nowrap;
}
.ih-stats dd {
  margin: 6px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}
@media (max-width: 479px) {
  .ih-stats > div { padding: 14px 12px; }
  .ih-stats dt { font-size: 9.5px; letter-spacing: 0.06em; white-space: normal; line-height: 1.3; }
  .ih-stats dd { font-size: 17px; }
}

/* ---------- Filters & goals ---------- */
.ih-controls { display: flex; flex-direction: column; gap: 18px; }
.ih-goals { display: flex; flex-direction: column; gap: 10px; }
.ih-goals-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(161, 161, 170, 0.9);
}
.ih-goal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ih-goal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 11px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(212, 212, 216, 0.9);
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.ih-goal .iconify { font-size: 15px; color: #60a5fa; }
.ih-goal:hover { color: #ffffff; border-color: rgba(96, 165, 250, 0.45); transform: translateY(-1px); }
.ih-goal[aria-pressed="true"] {
  color: #ffffff;
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.14);
}
.ih-goal[aria-pressed="true"] .iconify { color: #34d399; }

/* While a goal is active the category pill steps back. */
.ih-controls.is-goal .inst-filter-pill { opacity: 0 !important; }

.ih-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  margin: 0;
  font-size: 13px;
  color: rgba(161, 161, 170, 0.95);
}
.ih-clear {
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(37, 99, 235, 0.12);
}
.ih-clear:hover { background: rgba(37, 99, 235, 0.22); }

/* ---------- Product grid ---------- */
.ih-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) { .ih-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .ih-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

.ih-card {
  --acc: 96, 165, 250;
  --acc-ink: 29, 78, 216;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  border-radius: 24px;
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(var(--acc), 0.09) 0%, transparent 62%),
    rgba(9, 13, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 50px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  scroll-margin-top: 120px;
  transition:
    border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}
/* Accent beam along the top edge on hover */
.ih-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(var(--acc), 0.9), transparent);
  box-shadow: 0 0 14px rgba(var(--acc), 0.7);
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.ih-card:hover {
  border-color: rgba(var(--acc), 0.32);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 30px 60px -30px rgba(var(--acc), 0.35);
}
.ih-card:hover::after { opacity: 1; transform: scaleX(1); }

/* Brief highlight when a card is reached from a goal or link */
.ih-card.is-spotlit {
  border-color: rgba(var(--acc), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--acc), 0.35), 0 30px 60px -30px rgba(var(--acc), 0.45);
}

.ih-card.is-hidden { display: none; }
.ih-card.is-entering { opacity: 0; transform: translateY(10px); }

.ih-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.ih-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 25px;
  color: rgb(var(--acc));
  background: rgba(var(--acc), 0.1);
  border: 1px solid rgba(var(--acc), 0.22);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ih-card:hover .ih-card-icon { transform: translateY(-2px) scale(1.06); }
.ih-card-cat {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(161, 161, 170, 0.9);
  text-align: right;
}
.ih-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: clamp(19px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #ffffff;
}
.ih-card-note {
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.ih-card-tagline {
  margin: 0 0 10px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(228, 228, 231, 0.95);
}
.ih-card-body {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(161, 161, 170, 0.95);
}
.ih-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 20px;
  padding: 0;
  list-style: none;
}
.ih-card-chips li {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(212, 212, 216, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ih-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding-top: 16px;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.9);
  transition: color 0.3s ease;
}
.ih-card-cta .iconify { font-size: 16px; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.ih-card:hover .ih-card-cta,
.ih-card-cta:focus-visible { color: #ffffff; }
.ih-card:hover .ih-card-cta .iconify { transform: translate(2.5px, -2.5px); color: rgb(var(--acc)); }

/* Help card */
.ih-help {
  justify-content: center;
  gap: 4px;
  background:
    radial-gradient(100% 80% at 100% 0%, rgba(37, 99, 235, 0.2) 0%, transparent 65%),
    rgba(9, 13, 22, 0.72);
  border-style: dashed;
  border-color: rgba(96, 165, 250, 0.28);
}
.ih-help .ih-card-icon { margin-bottom: 18px; }
.ih-help-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }

/* Buttons */
.ih-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ih-btn:hover { transform: translateY(-1px); }
.ih-btn-primary {
  color: #ffffff;
  background: linear-gradient(165deg, #05109b 5%, #0733f3 42%, #0409a2 62%, #1021d6 100%);
  box-shadow: inset 0 1px 2px #839fff40, 0 12px 28px -10px #092bd380;
}
.ih-btn-primary:hover { filter: brightness(1.15); }
.ih-btn-ghost {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ih-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.ih-btn-lg { padding: 13px 26px; font-size: 15px; }

/* Closing CTA band */
.ih-cta {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(37, 99, 235, 0.28) 0%, transparent 60%),
    radial-gradient(50% 90% at 0% 100%, rgba(230, 57, 70, 0.12) 0%, transparent 60%),
    rgba(9, 13, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}
@media (min-width: 900px) {
  .ih-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}
.ih-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  .ih-card, .ih-card::after, .ih-card-icon, .ih-goal, .ih-btn { transition: none !important; }
  .ih-card:hover, .ih-goal:hover, .ih-btn:hover { transform: none; }
}

/* ==========================================
   LIGHT MODE
   ========================================== */
html.light .ih-breadcrumb { color: #64748b; }
html.light .ih-breadcrumb a:hover { color: #0f172a; }
html.light .ih-breadcrumb [aria-current="page"] { color: #0f172a; }

html.light .ih-stats {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.3);
}
html.light .ih-stats > div + div { border-color: rgba(15, 23, 42, 0.08); }
html.light .ih-stats dt { color: #64748b; }
html.light .ih-stats dd { color: #0f172a; }

html.light .ih-goals-label { color: #64748b; }
html.light .ih-goal { color: #334155; background: rgba(255, 255, 255, 0.8); border-color: rgba(15, 23, 42, 0.18); }
html.light .ih-goal .iconify { color: #2563eb; }
html.light .ih-goal:hover { color: #0f172a; border-color: rgba(37, 99, 235, 0.45); }
html.light .ih-goal[aria-pressed="true"] { color: #065f46; background: rgba(16, 185, 129, 0.1); border-color: rgba(5, 150, 105, 0.5); }
html.light .ih-goal[aria-pressed="true"] .iconify { color: #059669; }
html.light .ih-status { color: #475569; }
html.light .ih-clear { color: #1d4ed8; background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.3); }

html.light .ih-card {
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(var(--acc), 0.1) 0%, transparent 62%),
    #ffffff;
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 1) inset, 0 20px 44px -30px rgba(15, 23, 42, 0.35);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html.light .ih-card::after { box-shadow: none; }
html.light .ih-card:hover {
  border-color: rgba(var(--acc-ink), 0.35);
  box-shadow: 0 26px 50px -28px rgba(var(--acc-ink), 0.4);
}
html.light .ih-card.is-spotlit {
  border-color: rgba(var(--acc-ink), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--acc-ink), 0.3), 0 26px 50px -28px rgba(var(--acc-ink), 0.45);
}
html.light .ih-card-icon {
  color: rgb(var(--acc-ink));
  background: rgba(var(--acc), 0.14);
  border-color: rgba(var(--acc-ink), 0.18);
}
html.light .ih-card-cat { color: #64748b; }
html.light .ih-card-title { color: #0f172a; }
html.light .ih-card-note { color: #047857; background: rgba(16, 185, 129, 0.1); border-color: rgba(5, 150, 105, 0.3); }
html.light .ih-card-tagline { color: #1e293b; }
html.light .ih-card-body { color: #475569; }
html.light .ih-card-chips li { color: #334155; background: #f1f5f9; border-color: rgba(15, 23, 42, 0.07); }
html.light .ih-card-cta { color: #334155; border-color: rgba(15, 23, 42, 0.08); }
html.light .ih-card:hover .ih-card-cta { color: #0f172a; }
html.light .ih-card:hover .ih-card-cta .iconify { color: rgb(var(--acc-ink)); }

html.light .ih-help {
  background: radial-gradient(100% 80% at 100% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 65%), #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
}
html.light .ih-btn-ghost { color: #0f172a; background: #ffffff; border-color: rgba(15, 23, 42, 0.15); }
html.light .ih-btn-ghost:hover { background: #f1f5f9; }

html.light .ih-cta {
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(37, 99, 235, 0.1) 0%, transparent 60%),
    radial-gradient(50% 90% at 0% 100%, rgba(230, 57, 70, 0.05) 0%, transparent 60%),
    #ffffff;
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 24px 54px -30px rgba(15, 23, 42, 0.35);
}
