/* KAYA Forex — Premium Design System */
:root {
  --navy: #0B132B;
  --navy-soft: #1C2541;
  --gold: #D4AF37;
  --gold-deep: #C59B27;
  --gold-light: #E8D48B;
  --ice: #F8F9FA;
  --green: #10B981;
  --red: #EF4444;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(212, 175, 55, 0.25);
  --shadow: 0 20px 50px rgba(11, 19, 43, 0.08);
  --shadow-gold: 0 12px 40px rgba(212, 175, 55, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Vazirmatn", "Plus Jakarta Sans", system-ui, sans-serif;
  background: #ffffff;
  color: var(--navy);
  overflow-x: hidden;
}

::selection {
  background: rgba(212, 175, 55, 0.25);
  color: var(--navy);
}

/* Glass header */
.header-glass {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(11, 19, 43, 0.06);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.header-glass.scrolled {
  box-shadow: 0 8px 30px rgba(11, 19, 43, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

/* Logo mark */
.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
  position: relative;
  overflow: hidden;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  animation: sheen 3.5s ease-in-out infinite;
}

@keyframes sheen {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
}

/* Gold gradient button */
.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #C59B27 100%);
  color: var(--navy);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-gold);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 44px rgba(212, 175, 55, 0.4);
  filter: brightness(1.05);
}

.btn-gold:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline-navy {
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
}

.btn-outline-navy:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

/* Hero atmosphere */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(212, 175, 55, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(11, 19, 43, 0.05), transparent 50%),
    linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 100%);
}

.hero-grid {
  background-image:
    linear-gradient(rgba(11, 19, 43, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 19, 43, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
}

/* TradingView dashboard — fixed, without continuous motion */
.dashboard-float {
  animation: none;
  transform: none;
  filter: drop-shadow(0 30px 60px rgba(11, 19, 43, 0.18));
}

.logo-mark .site-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  transform: scale(1.2);
}

/* Lion intro */
body.kaya-intro-active {
  overflow: hidden;
}

body.kaya-intro-active #site-header .logo-mark {
  opacity: 0;
}

.kaya-lion-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(212, 175, 55, .2), transparent 32%),
    linear-gradient(145deg, #060b1a 0%, #0b132b 58%, #111c38 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility .45s ease;
}

.kaya-lion-intro::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 20deg, transparent, rgba(212,175,55,.07), transparent 22%);
  animation: kaya-intro-spin 8s linear infinite;
}

.kaya-lion-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.kaya-intro-lion {
  width: clamp(220px, 38vw, 430px);
  height: auto;
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 4;
  filter: drop-shadow(0 22px 45px rgba(0,0,0,.42)) drop-shadow(0 0 22px rgba(212,175,55,.22));
  transform: translate(-50%, -50%) scale(.76);
  transform-origin: center;
  animation: kaya-lion-arrive .65s cubic-bezier(.16,1,.3,1) forwards,
             kaya-lion-roar .58s .72s ease-in-out 2;
  will-change: left, top, width, transform, filter;
}

.kaya-intro-lion.is-flying {
  animation: none;
  transition: left .82s cubic-bezier(.22,1,.36,1),
              top .82s cubic-bezier(.22,1,.36,1),
              width .82s cubic-bezier(.22,1,.36,1),
              transform .82s cubic-bezier(.22,1,.36,1),
              filter .82s ease;
  transform: translate(-50%, -50%) scale(1);
  filter: drop-shadow(0 6px 14px rgba(212,175,55,.25));
}

.kaya-intro-brand {
  position: absolute;
  top: calc(50% + clamp(125px, 21vw, 238px));
  z-index: 3;
  color: #e8d48b;
  font: 800 clamp(18px, 2.2vw, 28px)/1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: .42em;
  text-indent: .42em;
  opacity: 0;
  animation: kaya-brand-in .6s .35s ease forwards;
}

.kaya-intro-glow {
  position: absolute;
  width: min(62vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.17), rgba(212,175,55,.03) 48%, transparent 70%);
  animation: kaya-glow 1.25s ease-in-out infinite alternate;
}

.kaya-roar-ring {
  position: absolute;
  width: min(34vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(232,212,139,.58);
  border-radius: 50%;
  opacity: 0;
  animation: kaya-roar-wave 1.25s .72s ease-out forwards;
}

.kaya-roar-ring--two { animation-delay: .92s; }
.kaya-roar-ring--three { animation-delay: 1.12s; }

@keyframes kaya-lion-arrive {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.55); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes kaya-lion-roar {
  0%,100% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  30% { transform: translate(calc(-50% - 4px), calc(-50% + 2px)) scale(1.035) rotate(-.7deg); }
  60% { transform: translate(calc(-50% + 5px), calc(-50% - 2px)) scale(1.02) rotate(.8deg); }
}

@keyframes kaya-roar-wave {
  0% { opacity: .72; transform: scale(.65); }
  100% { opacity: 0; transform: scale(2.25); }
}

@keyframes kaya-brand-in { to { opacity: .9; transform: translateY(8px); } }
@keyframes kaya-glow { to { transform: scale(1.12); opacity: .7; } }
@keyframes kaya-intro-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .kaya-intro-lion,
  .kaya-lion-intro::before,
  .kaya-intro-brand,
  .kaya-intro-glow,
  .kaya-roar-ring { animation: none !important; }
}

.tradingview-chart {
  height: 560px !important;
}

@media (max-width: 640px) {
  .tradingview-chart {
    height: 500px !important;
  }
}

.widget-float {
  animation: floatWidget 4.5s ease-in-out infinite;
}

.widget-float.delay {
  animation-delay: 1.2s;
}

@keyframes floatWidget {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

/* Feature cards */
.feature-card {
  background: #fff;
  border: 1px solid rgba(11, 19, 43, 0.06);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.35s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(11, 19, 43, 0.1), 0 0 0 1px rgba(212, 175, 55, 0.35);
}

.feature-card:hover::before {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.8), rgba(197, 155, 39, 0.2));
}

.icon-gold {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.05));
  color: var(--gold-deep);
  display: grid;
  place-items: center;
}

/* Ticker */
.ticker-wrap {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
  gap: 1rem;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

[dir="rtl"] .ticker-track {
  animation-name: tickerRtl;
}

@keyframes tickerRtl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  flex-shrink: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(11, 19, 43, 0.06);
  border-radius: 1rem;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-up {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.badge-down {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

/* Pricing */
.plan-card {
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(11, 19, 43, 0.08);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.plan-vip {
  background: linear-gradient(165deg, #0B132B 0%, #1C2541 100%);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 24px 60px rgba(11, 19, 43, 0.35), inset 0 1px 0 rgba(212, 175, 55, 0.2);
}

.plan-vip .price-gold {
  background: linear-gradient(135deg, #E8D48B, #D4AF37);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #D4AF37, #C59B27);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-gold);
}

/* Metrics banner */
.metrics-banner {
  background: linear-gradient(120deg, #0B132B 0%, #1C2541 55%, #0B132B 100%);
  position: relative;
  overflow: hidden;
}

.metrics-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(30deg, transparent 40%, rgba(212, 175, 55, 0.06) 50%, transparent 60%),
    radial-gradient(circle at 80% 50%, rgba(212, 175, 55, 0.12), transparent 40%);
  pointer-events: none;
}

/* CTA geometric pattern */
.cta-pattern {
  background-color: #0B132B;
  background-image:
    linear-gradient(135deg, rgba(212, 175, 55, 0.07) 25%, transparent 25%),
    linear-gradient(225deg, rgba(212, 175, 55, 0.07) 25%, transparent 25%),
    linear-gradient(45deg, rgba(212, 175, 55, 0.07) 25%, transparent 25%),
    linear-gradient(315deg, rgba(212, 175, 55, 0.07) 25%, transparent 25%);
  background-position: 20px 0, 20px 0, 0 0, 0 0;
  background-size: 40px 40px;
  background-repeat: repeat;
  position: relative;
}

.cta-pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #0B132B 85%);
  pointer-events: none;
}

/* Blog cards */
.blog-card {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(11, 19, 43, 0.06);
  background: #fff;
  transition: all 0.35s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(212, 175, 55, 0.35);
}

.blog-card .thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.blog-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 19, 43, 0.35));
}

/* FAQ accordion */
.faq-item {
  border: 1px solid rgba(11, 19, 43, 0.08);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item.open,
.faq-item:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

.faq-item.open {
  box-shadow: 0 12px 32px rgba(11, 19, 43, 0.06);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 480px;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* Device mockups */
.device-laptop {
  border-radius: 12px 12px 4px 4px;
  border: 2px solid #1C2541;
  background: #0B132B;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(11, 19, 43, 0.25);
}

.device-laptop-base {
  height: 10px;
  background: linear-gradient(180deg, #2a3555, #1C2541);
  border-radius: 0 0 10px 10px;
  margin: 0 auto;
  width: 70%;
}

.device-phone {
  width: 140px;
  border-radius: 24px;
  border: 3px solid #1C2541;
  background: #0B132B;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(11, 19, 43, 0.3);
}

/* Persona chips */
.persona-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Candlestick sparkline in ticker */
.spark {
  width: 48px;
  height: 24px;
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.open {
  max-height: 420px;
}

/* Payment icons */
.pay-icon {
  height: 28px;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

/* Chart glow */
.chart-glow {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.45));
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.section-label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

/* Path steps */
.path-step {
  position: relative;
}

.path-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  z-index: 0;
}

@media (max-width: 768px) {
  .path-step:not(:last-child)::after {
    display: none;
  }
}

/* Risk disclaimer */
.risk-bar {
  font-size: 0.7rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(11, 19, 43, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-3px);
}
