/* ============ Talon Meridia — Global Styles ============ */

:root {
  --ink: #0a0a0a;
  --line: #e5e5e5;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

::selection {
  background: #0a0a0a;
  color: #ffffff;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Cards ---------- */
.card-lift {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(10, 10, 10, 0.25);
  border-color: #0a0a0a;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #0a0a0a;
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.8rem 1.6rem;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(10, 10, 10, 0.5);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #0a0a0a;
  font-weight: 600;
  border: 1.5px solid #0a0a0a;
  border-radius: 0.75rem;
  padding: 0.8rem 1.6rem;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.btn-outline:hover {
  background: #0a0a0a;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.75rem;
  padding: 0.8rem 1.6rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.btn-ghost-light:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Nav ---------- */
#site-nav {
  transition: box-shadow 0.3s ease;
}

#site-nav.nav-scrolled {
  box-shadow: 0 8px 24px -16px rgba(10, 10, 10, 0.35);
}

.nav-link {
  position: relative;
  color: #525252;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #0a0a0a;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #0a0a0a;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: #0a0a0a;
  font-weight: 600;
}

/* Hamburger */
#nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #0a0a0a;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

#nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.open {
  max-height: 560px;
}

/* ---------- Chart tabs ---------- */
.chart-tab {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #525252;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chart-tab:hover {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

.chart-tab.active {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}

/* ---------- Accordion ---------- */
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion-item .accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

/* ---------- Marquee brand strip ---------- */
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marquee 30s linear infinite;
}

/* ---------- Toast ---------- */
#tm-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 120%);
  z-index: 100;
  background: #0a0a0a;
  color: #ffffff;
  padding: 0.9rem 1.4rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 20px 40px -12px rgba(10, 10, 10, 0.45);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: calc(100vw - 2rem);
  text-align: center;
}

#tm-toast.show {
  transform: translate(-50%, 0);
}

/* ---------- TradingView containers ---------- */
.tv-shell {
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: #ffffff;
}

/* ---------- Inputs ---------- */
.tm-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tm-input:focus {
  outline: none;
  border-color: #0a0a0a;
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

/* ---------- Misc ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #525252;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: #0a0a0a;
  display: inline-block;
}

.check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #0a0a0a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}
