/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* App colors from StockYan */
  --primary: #009E72;
  --primary-light: #00C48C;
  --primary-dark: #007A58;
  --secondary: #7C3AED;
  --accent: #0891B2;
  --green: #00FF88;
  --green-solid: #22C55E;
  --red: #FF5A5A;
  --orange: #FF9500;
  --warning: #c98f0a;
  --info: #3B82F6;

  /* Dark theme from app */
  --bg: #000000;
  --bg-surface: #0A1220;
  --bg-card: #111a12;
  --bg-card-hover: #162218;
  --text-primary: #E6F0FF;
  --text-secondary: #9FB2C7;
  --text-muted: #6E8094;
  --border: #1B2A3C;
  --divider: #1B2A3C;
  --muted: #0D1626;

  /* Gradients */
  --gradient: linear-gradient(135deg, #009E72, #00C48C);
  --gradient-2: linear-gradient(135deg, #009E72, #00C48C, #0891B2);
  --gradient-accent: linear-gradient(135deg, #009E72, #7C3AED);

  /* Shadows */
  --shadow: 0 4px 24px rgba(0, 158, 114, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 158, 114, 0.15);
  --shadow-glow: 0 0 60px rgba(0, 158, 114, 0.2);

  /* Radius */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img,
picture,
svg,
video {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== Typography ========== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.gradient-text {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-light {
  background: linear-gradient(135deg, #00C48C, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Section Header ========== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header.light {
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 1.1rem;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0, 158, 114, 0.1);
  border: 1px solid rgba(0, 158, 114, 0.25);
  border-radius: 100px;
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

/* ========== Navigation ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
  background: transparent;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  padding: 8px 20px !important;
  background: var(--gradient) !important;
  border-radius: 100px;
  color: white !important;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}

.nav-cta:hover {
  opacity: 0.9;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--text-primary);
}

/* ========== Hero ========== */
.hero {
  padding: 88px 0 48px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(0, 158, 114, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(0, 196, 140, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(0, 158, 114, 0.1);
  border: 1px solid rgba(0, 158, 114, 0.25);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero-badge i {
  font-size: 0.8rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 520px;
  margin-top: 20px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 158, 114, 0.2);
}

.store-btn i {
  font-size: 1.8rem;
}

.store-btn .store-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1;
}

.store-btn .store-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Live version badge under the Windows button (set by script.js from the
   Firebase version.json). Hidden until populated so it takes no space. */
.store-btn .store-version {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-secondary);
  opacity: 0.85;
}
.store-btn .store-version:empty {
  display: none;
}

.store-btn.apple {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.store-btn.google {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.store-btn.windows {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.store-btn.windows i {
  color: #00a4ef;
}

.store-btn.large {
  padding: 18px 32px;
}

.store-btn.large i {
  font-size: 2.2rem;
}

.store-btn.large .store-name {
  font-size: 1.2rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-mockup {
  height: clamp(580px, 86vh, 700px);
  aspect-ratio: 290 / 620;
  background: #1a1a1a;
  border-radius: 40px;
  border: 3px solid #2a2a2a;
  padding: 8px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  position: relative;
}

/* Mask the screenshot status bar (time/battery/signal) in the app previews */
.tabs-preview .phone-screen::before,
.paper-visual .phone-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5.2%;
  background: #000;
  z-index: 5;
}

.phone-screen picture {
  width: 100%;
  height: 100%;
  display: block;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Dynamic Island */
.phone-mockup::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

.phone-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(180deg, #0A1220 0%, #000 100%);
}

.phone-placeholder img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.phone-placeholder p {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(10, 18, 32, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}

.floating-card i {
  font-size: 1.1rem;
}

.card-1 {
  top: 12%;
  left: -15%;
  animation-delay: 0s;
}

.card-1 i { color: var(--green); }

.card-2 {
  top: 42%;
  right: -12%;
  animation-delay: 1.3s;
}

.card-2 i { color: var(--orange); }

.card-3 {
  bottom: 18%;
  left: -12%;
  animation-delay: 2.6s;
}

.card-3 i { color: var(--primary-light); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ========== Features ========== */
.features {
  padding: 120px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 158, 114, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 158, 114, 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.feature-icon.green  { background: rgba(0, 158, 114, 0.12); color: #00C48C; }
.feature-icon.blue   { background: rgba(59, 130, 246, 0.12); color: #60A5FA; }
.feature-icon.purple { background: rgba(124, 58, 237, 0.12); color: #C084FC; }
.feature-icon.orange { background: rgba(255, 149, 0, 0.12); color: #FF9500; }
.feature-icon.red    { background: rgba(255, 90, 90, 0.12); color: #FF5A5A; }
.feature-icon.teal   { background: rgba(8, 145, 178, 0.12); color: #22D3EE; }
.feature-icon.indigo { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.feature-icon.pink   { background: rgba(236, 72, 153, 0.12); color: #ec4899; }

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========== Screenshots ========== */
.screenshots {
  padding: 120px 0;
  overflow: visible;
}

/* Auto-scrolling "belt": viewport clips, the track marquees infinitely.
   The track holds two identical card sets; sliding it left by 50% (one set
   width) and looping makes a seamless infinite scroll. */
.screenshots-scroll {
  overflow: hidden;
  padding: 16px 0 24px;
  /* soft fade at both edges so cards appear/vanish gracefully */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.screenshots-track {
  --set-width: 1300px; /* 5 cards (240px) + 5 gaps (20px) */
  display: flex;
  gap: 20px;
  width: max-content;
  animation: screenshotsMarquee 40s linear infinite;
}

/* pause when the user hovers so they can inspect a screen */
.screenshots-scroll:hover .screenshots-track {
  animation-play-state: paused;
}

/* one set = 5 cards (240px) + 5 gaps (20px) = 1300px. Shifting by exactly
   one set width makes set 2 land where set 1 started -> seamless loop. */
@keyframes screenshotsMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--set-width))); }
}

@media (prefers-reduced-motion: reduce) {
  .screenshots-track {
    animation: none;
  }
}

.screenshot-card {
  flex: 0 0 240px;
  height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-surface);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.screenshot-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 158, 114, 0.4);
  box-shadow: 0 12px 40px rgba(0, 158, 114, 0.15);
}

.screenshot-card picture {
  width: 100%;
  height: 100%;
  display: block;
}

.screenshot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, var(--bg-card-hover) 0%, var(--bg-surface) 100%);
}

.screenshot-placeholder i {
  font-size: 2.5rem;
  color: var(--text-muted);
}

.screenshot-placeholder p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ========== Services ========== */
.services {
  padding: 120px 0;
}

/* two-column accordion layout; groups expand in place */
.service-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
}

.service-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
}


.service-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: none;
  padding: 18px 22px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.service-group-title > i:first-child {
  font-size: 1.05rem;
  color: var(--primary-light);
  width: 22px;
  text-align: center;
}

/* caret pushed to the right, rotates when open */
.service-group-caret {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.service-group.is-open .service-group-caret {
  transform: rotate(180deg);
}

/* premium (gold) accent categories mirror the app dividers */
.service-group--premium .service-group-title > i:first-child {
  color: #e8b64c;
}

.service-group--premium.is-open {
  border-color: rgba(232, 182, 76, 0.35);
}

/* collapsible body — compact pills */
.service-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.25s ease, padding 0.4s ease;
}

.service-group.is-open .service-items {
  max-height: 1000px;
  opacity: 1;
  padding: 2px 20px 20px;
}

.service-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.service-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 158, 114, 0.4);
  color: var(--text-primary);
}

.service-item i {
  font-size: 0.8rem;
  color: var(--primary-light);
}

/* premium categories: gold pill accents to match the app */
.service-group--premium .service-item i {
  color: #e8b64c;
}

.service-group--premium .service-item:hover {
  border-color: rgba(232, 182, 76, 0.45);
}

/* ========== Premium ========== */
.premium {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #050d0a 50%, var(--bg) 100%);
  position: relative;
}

.premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 158, 114, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.premium-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.premium-card {
  padding: 32px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.premium-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 158, 114, 0.3);
  transform: translateY(-4px);
}

.premium-card:hover::before {
  opacity: 1;
}

.premium-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(124, 58, 237, 0.12);
  color: #C084FC;
  margin-bottom: 20px;
}

.premium-card h3 {
  margin-bottom: 8px;
}

.premium-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========== Stock Detail Tabs ========== */
.stock-detail {
  padding: 120px 0;
}

.tabs-switcher {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 56px;
  align-items: center;
}

/* ----- Left: tab list ----- */
.tabs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tab-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: inherit;
  cursor: pointer;
  font: inherit;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.tab-row:hover {
  background: var(--bg-surface);
}

.tab-row.is-active {
  background: var(--bg-surface);
  border-color: rgba(0, 158, 114, 0.35);
}

/* accent rail on the active row */
.tab-row.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient);
}

.tab-row-num {
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  width: 22px;
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.tab-row.is-active .tab-row-num {
  color: var(--primary-light);
}

.tab-row-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(0, 158, 114, 0.1);
  color: var(--primary-light);
  transition: background 0.25s ease, transform 0.25s ease;
}

.tab-row.is-active .tab-row-icon {
  background: var(--gradient);
  color: #fff;
  transform: scale(1.05);
}

.tab-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tab-row-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tab-row-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tab-row-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tab-row:hover .tab-row-arrow,
.tab-row.is-active .tab-row-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary-light);
}

/* ----- Right: preview panel ----- */
.tabs-preview {
  display: flex;
  justify-content: center;
}

.tabs-preview .phone-mockup {
  height: clamp(580px, 86vh, 700px);
}

/* ========== Paper Trading ========== */
.paper-trading {
  padding: 120px 0;
}

.paper-trading-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.paper-content .section-tag {
  margin-bottom: 16px;
}

.paper-content h2 {
  margin-bottom: 16px;
}

.paper-content > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.paper-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.paper-feature i {
  color: var(--primary-light);
  font-size: 1.1rem;
}

.paper-visual {
  display: flex;
  justify-content: center;
}

.paper-visual .phone-mockup {
  height: clamp(580px, 86vh, 700px);
}

/* ========== Download CTA ========== */
.download {
  padding: 120px 0;
  position: relative;
}

/* keep the section (and its popover) above the footer while the help is open */
.download:has(.win-help-toggle[aria-expanded="true"]) {
  z-index: 50;
}

.download::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 158, 114, 0.08) 0%, rgba(0, 196, 140, 0.04) 100%);
  pointer-events: none;
}

.download-container {
  position: relative;
  z-index: 1;
}

.download-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.download-content h2 {
  margin-bottom: 16px;
}

.download-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
  line-height: 1.7;
}

.download-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: nowrap;
}

.download-buttons .store-btn {
  padding: 12px 18px;
}

/* Windows "blocked app" help — info popover */
.win-download-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* lift the whole group above sibling sections while the popover is open */
.win-download-group:has(.win-help-toggle[aria-expanded="true"]) {
  z-index: 50;
}

.win-help-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.win-help-toggle:hover,
.win-help-toggle[aria-expanded="true"] {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.win-help {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 50;
  width: 360px;
  max-width: calc(100vw - 32px);
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 18px 20px;
  animation: winHelpIn 0.16s ease;
}

.win-help[hidden] {
  display: none;
}

@keyframes winHelpIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* little arrow pointing up to the icon */
.win-help::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

.win-help-title {
  font-size: 0.95rem !important;
  font-weight: 600;
  color: var(--text-primary) !important;
  margin: 0 0 8px !important;
}

.win-help p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.win-help ol {
  margin: 12px 0 4px;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.win-help ol li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.win-help ol li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.win-help code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.85em;
}

.win-help-note {
  margin-top: 14px !important;
  font-size: 0.83rem !important;
  opacity: 0.75;
}

/* ========== Footer ========== */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease;
}

.footer-social a:hover {
  color: var(--primary-light);
  background: var(--bg-card-hover);
  border-color: rgba(0, 158, 114, 0.35);
  transform: translateY(-2px);
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* stack featured above the insight grid */
  .premium-layout {
    grid-template-columns: 1fr;
  }

  .premium-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ----- Tabs: horizontal pill strip above the phone ----- */
  .tabs-switcher {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 560px;
    margin: 0 auto;
  }

  /* pill strip on top, phone below */
  .tabs-list {
    order: -1;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 12px;
    margin: 0 -4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs-list::-webkit-scrollbar {
    display: none;
  }

  .tab-row {
    flex: 0 0 auto;
    width: auto;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    scroll-snap-align: center;
  }

  /* compact pill: hide number, description and arrow */
  .tab-row-num,
  .tab-row-desc,
  .tab-row-arrow {
    display: none;
  }

  .tab-row.is-active::before {
    display: none; /* no accent rail on pills */
  }

  .tab-row-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.9rem;
  }

  .tab-row-title {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* phone sits below the pills */
  .tabs-preview .phone-mockup {
    height: clamp(520px, 70vh, 620px);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin: 20px auto 0;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-mockup {
    width: 220px;
    height: auto;
  }

  /* Tabs preview phone: size by width on mobile for predictable scaling */
  .tabs-preview .phone-mockup {
    width: min(280px, 78vw);
    height: auto;
  }

  .floating-card {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .premium-grid {
    grid-template-columns: 1fr;
  }

  /* single-column accordion on mobile */
  .service-groups {
    grid-template-columns: 1fr;
  }

  .tab-row {
    padding: 9px 14px;
    gap: 8px;
  }

  .paper-trading-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .paper-features {
    align-items: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    gap: 40px;
  }

  .screenshots-track {
    --set-width: 1100px; /* 5 cards (200px) + 5 gaps (20px) */
  }

  .screenshot-card {
    flex: 0 0 200px;
    height: 400px;
  }

  .store-btn.large {
    padding: 14px 24px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .store-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .tab-row-desc {
    font-size: 0.75rem;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .download-buttons .store-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ========== Scroll Animations ========== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
