/* ============================================================
   AUM AI — Component styles
   ============================================================ */

/* ---------- Logo / mark ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; background: none; border: none; padding: 4px; margin: -4px; border-radius: 12px; }
.aum-mark { display: inline-grid; place-items: center; flex: none; }
.aum-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aum-mark.spin img { animation: spin 1s var(--ease) ; }
.logo-word { font-family: var(--font-logo); font-weight: 700; font-size: 23px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.logo-ai { color: var(--ink-3); font-weight: 700; }
.aum-mark img { transition: transform .55s cubic-bezier(.34,1.56,.64,1), filter .35s var(--ease); }
.logo:hover .aum-mark img { transform: rotate(-14deg) scale(1.16); filter: drop-shadow(0 5px 12px color-mix(in oklch, var(--brand-blue) 38%, transparent)); }
.logo:active .aum-mark img { transform: rotate(-6deg) scale(1.06); transition: transform .15s var(--ease); }

/* ---------- Top nav ---------- */
.topnav { position: sticky; top: 0; z-index: 100; background: color-mix(in oklch, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease), background .3s var(--ease); }
.topnav.scrolled { border-bottom-color: var(--border); background: color-mix(in oklch, var(--bg) 86%, transparent); }
.topnav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 18px; }

.nav-tabs { position: relative; display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-ind { position: absolute; top: 50%; left: 0; height: 38px; transform: translateY(-50%); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--border); opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s; z-index: 0; }
.nav-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: none; background: none; color: var(--ink-3); font-size: 15px; font-weight: 600; border-radius: 11px; transition: color .25s var(--ease); }
.nav-tab:hover { color: var(--ink-2); }
.nav-tab.on { color: var(--ink); }
.nav-badge { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2.5px 6px; border-radius: 6px; background: var(--surface-inset); color: var(--ink-3); line-height: 1; }
.nav-tab.on .nav-badge { background: color-mix(in oklch, var(--brand-yellow) 24%, var(--surface-inset)); color: color-mix(in oklch, var(--brand-ink) 70%, var(--ink)); }
.nav-badge.blue { background: color-mix(in oklch, var(--brand-blue) 16%, transparent); color: var(--accent); }

.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.connect-btn { font-size: 14.5px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); padding: 9px 16px; border-radius: 11px; box-shadow: var(--shadow-sm); transition: all .2s var(--ease); }
.connect-btn:hover { border-color: var(--ink-faint); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.connect-btn:active { transform: translateY(0); }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid transparent; background: none; color: var(--ink-3); transition: all .2s var(--ease); }
.icon-btn:hover { color: var(--ink); background: var(--surface-inset); }
.icon-btn.active { color: var(--accent); }

/* Theme toggle */
.theme-toggle { background: none; border: none; padding: 0; }
.theme-track { display: block; width: 50px; height: 28px; border-radius: 99px; background: var(--surface-inset); border: 1px solid var(--border); position: relative; transition: background .3s var(--ease); }
.theme-thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--brand-yellow); transition: transform .35s var(--ease), color .3s; }
.theme-track[data-dark="true"] { background: #1a2735; }
.theme-track[data-dark="true"] .theme-thumb { transform: translateX(22px); color: #cbd6e2; }

/* Currency toggle */
.cur-toggle { display: inline-flex; background: var(--surface-inset); border: 1px solid var(--border); border-radius: 10px; padding: 2px; }
.cur-opt { width: 30px; height: 26px; border: none; background: none; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--ink-3); transition: all .2s var(--ease); }
.cur-opt.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.hamburger { display: none; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); align-items: center; justify-content: center; }
.hamburger span, .hamburger span::before, .hamburger span::after { content: ""; display: block; width: 17px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .3s var(--ease); }
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after { position: absolute; top: 6px; }
.hamburger span[data-open="true"] { background: transparent; }
.hamburger span[data-open="true"]::before { top: 0; transform: rotate(45deg); }
.hamburger span[data-open="true"]::after { top: 0; transform: rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), padding .35s; }
.mobile-menu.open { max-height: 420px; padding: 8px 18px 18px; border-bottom: 1px solid var(--border); }
.mm-tab { display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-radius: 12px; border: none; background: none; color: var(--ink-2); font-weight: 600; font-size: 16px; text-align: left; }
.mm-tab.on { background: var(--surface-inset); color: var(--ink); }
.mm-connect { margin-top: 8px; }

@media (max-width: 880px) {
  .nav-tabs, .connect-btn:not(.mm-connect), .cur-toggle { display: none; }
  .hamburger { display: inline-flex; }
  .mobile-menu { display: flex; }
}

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; line-height: 1.4; border: 1px solid var(--border); background: var(--surface-inset); color: var(--ink-2); white-space: nowrap; }
.badge-equity { color: var(--accent); border-color: color-mix(in oklch, var(--brand-blue) 25%, transparent); background: color-mix(in oklch, var(--brand-blue) 8%, transparent); }
.badge-etf { color: var(--pos); border-color: color-mix(in oklch, var(--pos) 30%, transparent); background: var(--pos-bg); }
.badge-mf { color: #C98A00; border-color: color-mix(in oklch, var(--brand-yellow) 40%, transparent); background: color-mix(in oklch, var(--brand-yellow) 14%, transparent); }
[data-theme="dark"] .badge-mf { color: var(--brand-yellow); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--font-ui); font-weight: 600; border: 1px solid transparent; border-radius: 13px; transition: all .2s var(--ease); white-space: nowrap; }
.btn-md { padding: 13px 22px; font-size: 15.5px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 17px 30px; font-size: 17px; border-radius: 15px; }
.btn-full { width: 100%; }
.btn-solid { background: var(--solid-bg); color: var(--solid-ink); box-shadow: var(--shadow-md); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-solid:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px -6px color-mix(in oklch, var(--brand-blue) 60%, transparent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px color-mix(in oklch, var(--brand-blue) 65%, transparent); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--ink-faint); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-inset); color: var(--ink); }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ---------- Delta ---------- */
.delta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.delta.up { color: var(--pos); }
.delta.down { color: var(--neg); }
.delta-arrow { font-size: 9px; }
.delta-abs { opacity: .9; }

/* ---------- Modal ---------- */
.modal-scrim { position: fixed; inset: 0; z-index: 300; background: color-mix(in oklch, var(--brand-ink) 50%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; animation: fadeIn .25s var(--ease); }
.modal { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: popIn .35s var(--ease); max-height: 90vh; overflow: auto; }
.modal.wide { max-width: 720px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; align-items: center; gap: 9px; background: var(--solid-bg); color: var(--solid-ink); padding: 13px 20px; border-radius: 13px; box-shadow: var(--shadow-pop); font-weight: 600; font-size: 14.5px; animation: popIn .35s var(--ease); }

/* ---------- Section heading ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); }

/* ---------- Page transition ---------- */
.page { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-pad { padding: 40px 0 100px; }
