/* =========================================================
   DERIVAL.AI - Main Stylesheet
   Brand: Fintech / AI Investment Platform
   Fonts: Montserrat (display), Nunito (body)
   ========================================================= */

/* ===== Design Tokens ===== */
:root {
  /* Brand colors */
  --c-blue-dark: #023047;     /* Deep blue - highlight */
  --c-blue: #219EBC;          /* Primary blue */
  --c-yellow: #FFB703;        /* Primary yellow */
  --c-orange: #FB8500;        /* Highlight orange */
  --c-gray: #C8C8C8;
  --c-black: #1E1E1E;
  --c-white: #FFFFFF;
  --c-green: #00B050;         /* positive */
  --c-red: #FF0000;           /* negative */

  /* Surface tokens (dark theme) */
  --bg-0: #060B14;
  --bg-1: #0B1220;
  --bg-2: #0F1A2C;
  --bg-3: #152238;
  --ink-1: #E7EEF7;
  --ink-2: #AEBCD0;
  --ink-3: #7C8AA1;

  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);

  /* Glass */
  --glass-bg: rgba(15, 26, 44, 0.55);
  --glass-bg-strong: rgba(15, 26, 44, 0.78);
  --glass-border: rgba(255,255,255,0.12);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--c-orange) 0%, var(--c-yellow) 35%, var(--c-blue) 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(251,133,0,.18), rgba(255,183,3,.14) 40%, rgba(33,158,188,.18));
  --grad-accent: linear-gradient(135deg, var(--c-yellow), var(--c-orange));
  --grad-cool: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark));

  /* Shadow */
  --shadow-1: 0 8px 24px rgba(0,0,0,.35);
  --shadow-2: 0 20px 60px rgba(0,0,0,.45);
  --shadow-glow-y: 0 0 40px rgba(255,183,3,0.25);
  --shadow-glow-b: 0 0 40px rgba(33,158,188,0.25);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Type */
  --f-display: 'Montserrat', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, sans-serif;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-spring: cubic-bezier(.16,1,.3,1);

  --container: 1280px;
  --header-h: 84px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-1);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.01em; margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; color: var(--ink-2); }

/* ===== Ambient background (animated) ===== */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ambient::before,
.ambient::after {
  content: '';
  position: absolute;
  width: 55vw; height: 55vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
  animation: float 18s ease-in-out infinite;
}
.ambient::before {
  background: radial-gradient(circle, var(--c-orange), transparent 70%);
  top: -15%; left: -15%;
}
.ambient::after {
  background: radial-gradient(circle, var(--c-blue), transparent 70%);
  bottom: -15%; right: -15%;
  animation-delay: -9s;
}
.ambient-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
}
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(3%, 4%) scale(1.05); }
}

/* Noise overlay */
.noise {
  position: fixed; inset: 0; z-index: -1;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.8'/></svg>");
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1320px;
  z-index: 100;
  transition: top .3s var(--ease);
}
.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px 18px 10px 22px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.06);
}
.logo-link {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px;
  transition: transform .3s var(--ease-spring);
}
.logo-link:hover { transform: scale(1.03); }
.logo-link img { height: 38px; width: auto; }
.logo-text {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .02em;
  color: var(--c-blue);
  font-style: italic;
}
.logo-link img + .logo-text { display: none; } /* horizontal logo already has text */

/* Nav */
.site-nav { justify-self: center; }
.site-nav ul {
  display: flex; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-item {
  position: relative;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-1);
  border-radius: var(--r-pill);
  transition: all .25s var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--c-yellow); background: rgba(255,255,255,.05); }
.nav-link .caret {
  width: 10px; height: 10px; display: inline-block;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s var(--ease);
}
.nav-item:hover .nav-link .caret { transform: rotate(225deg) translateY(1px); }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 280px;
  padding: 10px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transition: all .28s var(--ease);
}
.nav-item:hover .dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-1);
  font-weight: 600;
  font-size: 14px;
  transition: all .2s var(--ease);
}
.dropdown a .dicon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--grad-brand-soft);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--c-yellow);
}
.dropdown a:hover {
  background: linear-gradient(90deg, rgba(255,183,3,.12), rgba(33,158,188,.12));
  color: var(--c-yellow);
  transform: translateX(2px);
}
.dropdown a small {
  display: block;
  font-size: 12px; font-weight: 500;
  color: var(--ink-3);
}

/* Header right */
.header-right {
  display: flex; align-items: center; gap: 6px;
}
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-1);
  transition: all .25s var(--ease);
}
.icon-btn:hover {
  background: rgba(255,255,255,.08);
  color: var(--c-yellow);
  transform: translateY(-2px);
}
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  margin-right: 6px;
}
.lang-switch button {
  padding: 5px 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink-3);
  border-radius: var(--r-pill);
  transition: all .2s var(--ease);
}
.lang-switch button.active {
  background: var(--grad-accent);
  color: var(--c-black);
}

.menu-toggle { display: none; }

/* ===== Sidebar Dot Nav ===== */
.dot-nav {
  position: fixed;
  left: 22px; top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex; flex-direction: column; gap: 14px;
}
.dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: all .35s var(--ease-spring);
}
.dot:hover { background: rgba(255,255,255,.55); transform: scale(1.25); }
.dot.active {
  width: 10px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--c-yellow), var(--c-orange));
  box-shadow: var(--shadow-glow-y);
}
.dot-tip {
  position: absolute;
  left: 22px; top: 50%;
  transform: translateY(-50%) translateX(-8px);
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 12px; font-weight: 700;
  font-family: var(--f-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  opacity: 0; pointer-events: none;
  transition: all .25s var(--ease);
  color: var(--ink-1);
}
.dot:hover .dot-tip,
.dot.active .dot-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.dot.active .dot-tip { color: var(--c-yellow); }

/* Tooltip master menu (lapa-style) */
.dot-nav-menu {
  position: fixed;
  left: 22px; top: 50%;
  transform: translate(-20px, -50%);
  padding: 12px 16px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  z-index: 89;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; pointer-events: none;
  transition: all .3s var(--ease);
}
.dot-nav:hover + .dot-nav-menu,
.dot-nav-menu:hover {
  opacity: 1; pointer-events: auto;
  transform: translate(24px, -50%);
}
.dot-nav-menu a {
  font-family: var(--f-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color .2s var(--ease);
}
.dot-nav-menu a:hover,
.dot-nav-menu a.active { color: var(--c-yellow); }

/* ===== Contact Icons bottom-right ===== */
.contact-fab {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 95;
  display: flex; flex-direction: column; gap: 14px;
}
.fab-btn {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--c-white);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .4s var(--ease-spring), box-shadow .3s var(--ease);
  animation: bob 4s ease-in-out infinite;
}
.fab-btn:nth-child(2) { animation-delay: -2s; }
.fab-btn.telegram { background: linear-gradient(135deg, #2AABEE, #229ED9); border-color: rgba(255,255,255,.2); }
.fab-btn.zalo { background: linear-gradient(135deg, #0084FF, #0068D1); border-color: rgba(255,255,255,.2); }
.fab-btn:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: var(--shadow-2), 0 0 30px rgba(33,158,188,.45);
}
.fab-btn svg { width: 28px; height: 28px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* FAB tooltip */
.fab-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  padding: 10px;
  min-width: 220px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  opacity: 0; visibility: hidden;
  transition: all .3s var(--ease);
  animation: none;
}
.fab-btn:hover .fab-tooltip {
  opacity: 1; visibility: visible;
  transform: translateY(-50%) translateX(0);
}
.fab-tooltip h5 {
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin: 0 6px 8px;
}
.fab-tooltip a {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
  border-radius: 8px;
  transition: all .2s var(--ease);
}
.fab-tooltip a:hover {
  background: rgba(255,183,3,.1);
  color: var(--c-yellow);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  border-radius: var(--r-pill);
  transition: all .3s var(--ease-spring);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-accent);
  color: var(--c-black);
  box-shadow: 0 8px 24px rgba(255,183,3,.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 38px rgba(255,183,3,.45);
}
.btn-ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--glass-border);
  color: var(--ink-1);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-2px);
}
.btn-outline {
  border: 1px solid var(--c-yellow);
  color: var(--c-yellow);
}
.btn-outline:hover {
  background: var(--c-yellow);
  color: var(--c-black);
}
.btn .arr {
  width: 14px; height: 14px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s var(--ease);
}
.btn:hover .arr { transform: rotate(45deg) translate(3px, -3px); }

/* ===== Badge / Eyebrow ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-yellow);
  background: rgba(255,183,3,.08);
  border: 1px solid rgba(255,183,3,.25);
  border-radius: var(--r-pill);
}
.eyebrow .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-yellow);
  box-shadow: 0 0 0 0 var(--c-yellow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,183,3,.55); }
  70% { box-shadow: 0 0 0 10px rgba(255,183,3,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,183,3,0); }
}

/* ===== Section ===== */
.section {
  position: relative;
  padding: 120px 0;
}
.section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 60px;
}
.section-head h2 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 18px 0 14px;
}
.section-head p {
  font-size: 17px;
  color: var(--ink-2);
}
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 80px) 0 60px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(44px, 6.2vw, 88px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.hero h1 .big {
  display: inline-block;
  font-style: italic;
  font-family: var(--f-display);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.hero h1 .big::after {
  content:'';
  position: absolute;
  inset: auto 0 -8px;
  height: 6px;
  border-radius: 6px;
  background: var(--grad-accent);
  opacity: .5;
}
.hero-sub {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero stats pill-row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 56px;
  padding: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
}
.hero-stats .stat h3 {
  font-size: 32px;
  color: var(--c-yellow);
  font-weight: 900;
  letter-spacing: -.02em;
}
.hero-stats .stat p {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 4px 0 0;
}
.hero-stats .stat + .stat { border-left: 1px solid var(--line); padding-left: 20px; }

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 1/1.05;
}
.hero-orb {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.hero-logo-wrap {
  width: 62%; aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad-brand-soft);
  border: 1px solid var(--glass-border);
  animation: rotateSlow 32s linear infinite;
  position: relative;
}
.hero-logo-wrap::before, .hero-logo-wrap::after {
  content:'';
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.12);
}
.hero-logo-wrap::before { inset: -20px; }
.hero-logo-wrap::after { inset: -50px; border-style: solid; border-color: rgba(255,255,255,.05); }
.hero-logo-wrap img {
  width: 70%;
  animation: rotateSlow 32s linear infinite reverse;
  filter: drop-shadow(0 20px 40px rgba(33,158,188,.35));
}
@keyframes rotateSlow {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

/* Floating chips around orb */
.chip {
  position: absolute;
  padding: 10px 14px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-1);
  animation: bob 5s ease-in-out infinite;
}
.chip .dot-c { width: 8px; height: 8px; border-radius: 50%; }
.chip-tl { top: 8%; left: -2%; }
.chip-tr { top: 20%; right: -4%; animation-delay: -1.5s; }
.chip-bl { bottom: 18%; left: -6%; animation-delay: -3s; }
.chip-br { bottom: 4%; right: 2%; animation-delay: -2s; }
.chip .pos { color: var(--c-green); }
.chip .neg { color: var(--c-red); }

/* Marquee */
.marquee {
  position: relative;
  margin-top: 80px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  overflow: hidden;
}
.marquee-track {
  display: flex; gap: 60px;
  white-space: nowrap;
  animation: slide 28s linear infinite;
}
.marquee-track span {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 18px;
}
.marquee-track span::after {
  content:'';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-yellow);
}
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== SERVICES (Bento) ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 20px;
}
.bento-card {
  position: relative;
  padding: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all .4s var(--ease-spring);
  display: flex; flex-direction: column;
  cursor: pointer;
}
.bento-card::before {
  content:'';
  position: absolute; inset: 0;
  background: var(--grad-brand-soft);
  opacity: 0;
  transition: opacity .4s var(--ease);
  z-index: -1;
}
.bento-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,183,3,.35);
  box-shadow: var(--shadow-2);
}
.bento-card:hover::before { opacity: 1; }

.b-1 { grid-column: span 3; grid-row: span 2; }
.b-2 { grid-column: span 3; grid-row: span 1; }
.b-3 { grid-column: span 3; grid-row: span 1; }
.b-4 { grid-column: span 2; grid-row: span 1; }
.b-5 { grid-column: span 2; grid-row: span 1; }
.b-6 { grid-column: span 2; grid-row: span 1; }

.bento-card h3 {
  font-size: 22px; margin-bottom: 8px;
}
.bento-card .b-sub {
  font-size: 14px; color: var(--ink-3);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bento-card p { font-size: 14.5px; color: var(--ink-2); margin: 0;}
.b-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--glass-border);
  color: var(--c-yellow);
  margin-bottom: auto;
}
.bento-card .b-mini-chart {
  margin-top: auto;
  height: 60px;
  width: 100%;
}

/* ===== Performance Chart ===== */
.chart-section {
  position: relative;
}
.chart-wrap {
  position: relative;
  padding: 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
}
.chart-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 20px;
  margin-bottom: 24px;
}
.chart-title h3 { font-size: 26px; margin-bottom: 6px; }
.chart-title p { font-size: 14px; color: var(--ink-3); margin: 0; }
.chart-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.legend {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.legend button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-weight: 700; font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-2);
  transition: all .3s var(--ease);
}
.legend button .chip-c {
  width: 10px; height: 10px; border-radius: 3px;
}
.legend button.off { opacity: .35; }
.legend button:hover { color: var(--ink-1); border-color: rgba(255,255,255,.25); }

.tf-switch { display: inline-flex; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); border-radius: var(--r-pill); padding: 3px; }
.tf-switch button {
  padding: 7px 14px;
  font-family: var(--f-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .05em;
  color: var(--ink-3);
  border-radius: var(--r-pill);
  transition: all .25s var(--ease);
}
.tf-switch button.active {
  background: var(--grad-accent);
  color: var(--c-black);
}

.chart-canvas {
  position: relative;
  height: 420px;
  width: 100%;
}
.chart-canvas svg { width: 100%; height: 100%; display: block; }
.crosshair-line { stroke: rgba(255,255,255,.35); stroke-dasharray: 4 4; }

.chart-tooltip {
  position: absolute;
  min-width: 200px;
  padding: 12px 14px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s var(--ease);
  box-shadow: var(--shadow-1);
  z-index: 3;
}
.chart-tooltip .t-date {
  font-family: var(--f-display);
  font-weight: 800; font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.chart-tooltip .t-row {
  display: flex; justify-content: space-between;
  align-items: center; gap: 12px;
  padding: 3px 0;
}
.chart-tooltip .t-row .name {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-1); font-weight: 600;
}
.chart-tooltip .t-row .name .dot-c { width: 8px; height: 8px; border-radius: 50%; }
.chart-tooltip .t-row .val { font-weight: 700; color: var(--ink-1); font-variant-numeric: tabular-nums; }

/* Chart side stats */
.chart-stats {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 16px; margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.chart-stat h4 {
  font-size: 26px; font-weight: 900;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.chart-stat h4.pos { color: var(--c-green); }
.chart-stat p {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 4px 0 0;
}

/* ===== Testimonials ===== */
.testi-track {
  position: relative;
  overflow: hidden;
  padding: 20px 0;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.testi-row {
  display: flex; gap: 22px;
  animation: slide 40s linear infinite;
  width: max-content;
}
.testi-card {
  width: 380px;
  padding: 26px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  flex-shrink: 0;
  transition: all .3s var(--ease);
}
.testi-card:hover { border-color: rgba(255,183,3,.35); transform: translateY(-3px); }
.testi-stars { color: var(--c-yellow); margin-bottom: 10px; font-size: 15px; letter-spacing: 2px; }
.testi-quote {
  font-size: 15px; line-height: 1.7;
  color: var(--ink-1);
  margin-bottom: 18px;
}
.testi-who { display: flex; align-items: center; gap: 12px; }
.testi-av {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 900; color: #0B1220;
}
.testi-who h5 { font-size: 14px; font-weight: 800; margin: 0; }
.testi-who p { font-size: 12px; color: var(--ink-3); margin: 0; }

/* Pause on hover */
.testi-track:hover .testi-row { animation-play-state: paused; }

/* ===== Algorithm page sections ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split-visual {
  position: relative;
  padding: 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  aspect-ratio: 5/4;
}
.formula-card {
  position: relative;
  padding: 26px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
}
.formula-card h4 { font-size: 16px; color: var(--c-yellow); margin-bottom: 8px; font-family: var(--f-display); letter-spacing: .1em; text-transform: uppercase; }
.formula-card .formula {
  font-family: var(--f-display); font-weight: 800;
  font-size: 22px; color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.pipe {
  position: relative;
  padding-left: 28px;
}
.pipe::before {
  content:''; position: absolute;
  left: 10px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--c-yellow), var(--c-blue));
  border-radius: 2px;
}
.pipe > .step {
  position: relative;
  padding: 16px 0;
}
.pipe > .step::before {
  content:''; position: absolute;
  left: -22px; top: 22px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-yellow);
  box-shadow: 0 0 0 4px rgba(255,183,3,.18);
}
.pipe > .step h4 { font-size: 17px; margin-bottom: 4px; }
.pipe > .step p { font-size: 14px; color: var(--ink-2); margin: 0; }

/* Backtest table */
.bt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.bt-card {
  padding: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  transition: all .3s var(--ease);
}
.bt-card:hover { transform: translateY(-4px); border-color: rgba(255,183,3,.3); }
.bt-card h5 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.bt-card .val { font-size: 32px; font-weight: 900; font-family: var(--f-display); font-variant-numeric: tabular-nums; }
.bt-card .val.pos { color: var(--c-green); }
.bt-card .val.neg { color: var(--c-red); }
.bt-card .val.yel { color: var(--c-yellow); }
.bt-card p { font-size: 13px; color: var(--ink-3); margin: 6px 0 0; }

/* ===== Recommendations table ===== */
.tbl-wrap {
  padding: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow-x: auto;
}
table.rec-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.rec-tbl th {
  text-align: left;
  padding: 14px 16px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.rec-tbl td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.rec-tbl tr:last-child td { border-bottom: 0; }
.rec-tbl tr:hover td { background: rgba(255,255,255,.03); }
.tkr {
  font-family: var(--f-display);
  font-weight: 900; color: var(--c-yellow);
  letter-spacing: .04em;
}
.pos { color: var(--c-green) !important; font-weight: 700; }
.neg { color: var(--c-red) !important; font-weight: 700; }
.tag {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
}
.tag.hold { background: rgba(33,158,188,.15); color: var(--c-blue); }
.tag.buy { background: rgba(0,176,80,.15); color: var(--c-green); }
.tag.sell { background: rgba(255,0,0,.14); color: var(--c-red); }
.tag.new { background: rgba(255,183,3,.15); color: var(--c-yellow); }

/* ===== Research article grid ===== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.research-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all .35s var(--ease-spring);
  cursor: pointer;
}
.research-card:hover { transform: translateY(-6px); border-color: rgba(255,183,3,.3); }
.research-cover {
  height: 180px;
  background:
    linear-gradient(135deg, rgba(251,133,0,.3), rgba(33,158,188,.3)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 6px, transparent 6px 18px);
  position: relative;
}
.research-cover .rtype {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-yellow);
}
.research-body { padding: 22px; }
.research-body h4 {
  font-size: 18px; margin-bottom: 8px; line-height: 1.3;
}
.research-body p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 14px; }
.research-meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
  font-family: var(--f-display); font-weight: 700;
  letter-spacing: .06em;
}

/* ===== Services / Pricing ===== */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.plan {
  position: relative;
  padding: 34px 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  display: flex; flex-direction: column;
  transition: all .35s var(--ease-spring);
}
.plan:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); }
.plan.highlight {
  background: linear-gradient(180deg, rgba(255,183,3,.08), rgba(33,158,188,.06));
  border-color: rgba(255,183,3,.4);
  transform: scale(1.02);
  box-shadow: 0 30px 80px rgba(255,183,3,.18);
}
.plan.highlight:hover { transform: scale(1.02) translateY(-4px); }
.plan .pl-tag {
  position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  background: var(--grad-accent);
  color: var(--c-black);
  font-family: var(--f-display);
  font-size: 11px; font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: var(--r-pill);
}
.plan h3 { font-size: 22px; margin-bottom: 6px; }
.plan .pl-sub {
  font-size: 13px; color: var(--ink-3);
  margin: 0 0 20px;
}
.plan .price {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 42px;
  color: var(--ink-1);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.plan .price small {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  margin-left: 4px;
}
.plan .price-note { font-size: 12px; color: var(--ink-3); margin-bottom: 26px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;}
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan li {
  display: flex; gap: 10px;
  font-size: 14px;
  color: var(--ink-1);
}
.plan li::before {
  content:''; flex: none;
  width: 18px; height: 18px;
  background: var(--grad-accent);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
  border-radius: 4px;
  margin-top: 3px;
}
.plan li.off { color: var(--ink-3); text-decoration: line-through; }
.plan li.off::before { background: var(--ink-3); opacity: .4; }
.plan .btn { width: 100%; justify-content: center; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 840px; margin: 0 auto; }
.faq {
  padding: 20px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  transition: all .3s var(--ease);
  cursor: pointer;
}
.faq[open] { border-color: rgba(255,183,3,.35); }
.faq summary {
  list-style: none;
  display: flex; justify-content: space-between;
  align-items: center; gap: 20px;
  font-family: var(--f-display);
  font-weight: 700; font-size: 16px;
  color: var(--ink-1);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q-plus {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: var(--c-yellow);
  transition: transform .3s var(--ease);
}
.faq[open] summary .q-plus { transform: rotate(45deg); background: var(--c-yellow); color: var(--c-black); }
.faq-ans {
  padding-top: 14px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ===== CTA strip ===== */
.cta-strip {
  position: relative;
  padding: 70px 40px;
  margin: 40px 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,183,3,.12), rgba(251,133,0,.1), rgba(33,158,188,.14));
  border: 1px solid rgba(255,183,3,.2);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.cta-strip::before {
  content:''; position: absolute;
  inset: -40% -40% auto auto;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,183,3,.3), transparent 70%);
  filter: blur(40px);
}
.cta-strip h2 {
  font-size: clamp(30px, 4vw, 44px);
  max-width: 700px;
  margin: 0 auto 14px;
  position: relative;
}
.cta-strip p {
  max-width: 600px;
  margin: 0 auto 28px;
  color: var(--ink-2);
  position: relative;
}
.cta-strip .btn { position: relative; }

/* ===== Footer ===== */
.site-footer {
  position: relative;
  padding: 80px 0 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(2,48,71,.18));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 2fr;
  gap: 60px;
  margin-bottom: 50px;
}
.foot-brand img { height: 44px; margin-bottom: 18px; }
.foot-brand p { font-size: 14.5px; max-width: 360px; margin-bottom: 22px; color: var(--ink-2); }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  color: var(--ink-1);
  transition: all .3s var(--ease);
}
.social-row a:hover { background: var(--grad-accent); color: var(--c-black); transform: translateY(-3px); border-color: transparent; }

.foot-col h5 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-bottom: 16px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color .2s var(--ease);
}
.foot-col a:hover { color: var(--c-yellow); }
.foot-contact p { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.foot-contact a { color: var(--ink-1); }
.foot-contact a:hover { color: var(--c-yellow); }

.foot-eco {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.foot-copy {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
}

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease-spring); }
.reveal.on { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }
.reveal.d4 { transition-delay: .4s; }
.reveal.d5 { transition-delay: .5s; }

/* ===== Page Intro (non-home pages) ===== */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 80px) 0 60px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  margin: 18px 0 16px;
}
.page-hero p { max-width: 680px; margin: 0 auto; font-size: 17px; color: var(--ink-2); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 1/.8; max-width: 560px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .foot-eco-wrap { grid-column: 1 / -1; }
  .research-grid, .pricing, .bt-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .b-1, .b-2, .b-3 { grid-column: span 2; }
  .b-4, .b-5, .b-6 { grid-column: span 2; }
}

@media (max-width: 780px) {
  .site-header { top: 10px; width: calc(100% - 20px); }
  .header-bar { grid-template-columns: auto auto; padding: 8px 10px 8px 14px; }
  .site-nav, .header-right .lang-switch { display: none; }
  .menu-toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
  .menu-toggle:hover { background: rgba(255,255,255,.08); }

  .dot-nav { display: none; }

  .section { padding: 90px 0; }

  .hero { padding: calc(var(--header-h) + 40px) 0 40px; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
  .hero-stats .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .b-1, .b-2, .b-3, .b-4, .b-5, .b-6 { grid-column: span 1; grid-row: auto; min-height: 220px; }

  .chart-canvas { height: 300px; }
  .chart-stats { grid-template-columns: repeat(2, 1fr); }

  .research-grid, .pricing, .bt-grid { grid-template-columns: 1fr; }
  .plan.highlight { transform: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .foot-eco { gap: 20px; }

  .contact-fab { bottom: 14px; right: 14px; }
  .fab-btn { width: 52px; height: 52px; }
  .fab-btn svg { width: 24px; height: 24px; }
  .fab-tooltip { display: none; }

  .testi-card { width: 300px; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(6,11,20,.92);
  backdrop-filter: blur(18px);
  display: none;
  flex-direction: column;
  padding: 100px 24px 40px;
}
.mobile-menu.on { display: flex; }
.mobile-menu a {
  padding: 18px 0;
  font-family: var(--f-display);
  font-size: 24px; font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:hover { color: var(--c-yellow); }

/* Utility */
.text-center { text-align: center; }
.mt-60 { margin-top: 60px; }
.mb-30 { margin-bottom: 30px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
