/* ============================================================
   TRADE REFINERY — AI Trading Performance OS
   Design System & Stylesheet
   ============================================================ */

/* --- Google Fonts --- */
/* Fonts loaded via <link rel="preconnect"> + <link rel="stylesheet"> in HTML <head> for non-blocking render. */

/* --- CSS Variables --- */
:root {
  /* Primary */
  --teal: #1DB8A4;
  --teal-light: #22D4BD;
  --teal-dim: rgba(29,184,164,0.10);
  --teal-glow: rgba(29,184,164,0.04);
  --teal-border: rgba(29,184,164,0.18);

  /* Secondary */
  --purple: #7A4AAA;
  --purple-light: #9B6BC6;
  --purple-dim: rgba(122,74,170,0.12);
  --purple-border: rgba(122,74,170,0.22);

  /* Status */
  --red: #E85454;
  --red-dim: rgba(232,84,84,0.10);
  --green: #34D399;

  /* Backgrounds */
  --bg: #06080D;
  --bg2: #0C0F18;
  --bg3: #111420;
  --bg4: #161A26;

  /* Text */
  --text: #EDE9E4;
  --text2: #9E9A94;
  --text3: #52504C;

  /* Borders */
  --border: rgba(237,233,228,0.07);
  --border-teal: rgba(29,184,164,0.18);
  --border-purple: rgba(122,74,170,0.22);

  /* Fonts */
  --fh: 'Bebas Neue', sans-serif;
  --fs: 'DM Serif Display', serif;
  --fb: 'DM Sans', sans-serif;
  --fm: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-w: 1180px;
  --gap: 24px;
  --radius: 8px;
  --radius-lg: 12px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--fb);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-light); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- Noise Overlay --- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.03;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--fh); font-weight: 400; line-height: 0.94; letter-spacing: 1px; color: var(--text); }
h1 { font-size: clamp(52px, 7.5vw, 110px); }
h2 { font-size: clamp(40px, 5.5vw, 72px); }
h3 { font-size: clamp(24px, 3vw, 32px); }
h4 { font-size: 20px; }

h1 em, h2 em, h3 em {
  font-family: var(--fs);
  font-style: italic;
  font-weight: 400;
}

.sub {
  font-family: var(--fs);
  font-style: italic;
  font-size: 22px;
  color: var(--text2);
  margin-top: 12px;
}

.label {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
  display: block;
}

.lead {
  font-size: 17px;
  color: var(--text2);
  max-width: 640px;
  line-height: 1.7;
}

.mono {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

.section {
  padding: 88px 0;
  position: relative;
}

.section-alt {
  padding: 88px 0;
  background: var(--bg2);
  position: relative;
}

.section-dark {
  padding: 88px 0;
  background: var(--bg3);
  position: relative;
}

/* Section chrome — stag accent line + label */
.stag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.stag::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--teal);
  flex-shrink: 0;
}

.stag span {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
}

.section-header {
  margin-bottom: 48px;
}

.section-header .lead {
  margin-top: 16px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
  border: none;
}

/* --- Grid System --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(6,8,13,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-brand svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-brand-text {
  font-family: var(--fh);
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-brand-text span {
  color: var(--teal);
}

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

.nav-link {
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--teal-dim);
}

.nav-link.active {
  color: var(--teal);
  background: var(--teal-dim);
}

.nav-cta {
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--teal);
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  margin-left: 8px;
  transition: background .2s;
}

.nav-cta:hover {
  background: var(--teal-light);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  color: var(--text);
  font-size: 22px;
  padding: 4px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 32px 80px;
  position: relative;
  overflow: hidden;
}

/* Grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--teal-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--teal-border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
}

/* Radial glows */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 75% 20%, rgba(29,184,164,0.06), transparent),
    radial-gradient(ellipse 40% 50% at 25% 80%, rgba(122,74,170,0.06), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero .lead {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 18px;
}

/* Eyebrow pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal-border);
  background: var(--teal-dim);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.pill-purple {
  color: var(--purple);
  border-color: var(--purple-border);
  background: var(--purple-dim);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: blink 2.2s ease-in-out infinite;
}

.pill-purple .pill-dot { background: var(--purple); }

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Hero stats bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-family: var(--fh);
  font-size: 32px;
  letter-spacing: 1px;
  color: var(--text);
}

.hero-stat-label {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 4px;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: 140px 32px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 50% 30%, rgba(29,184,164,0.05), transparent);
  pointer-events: none;
}

.page-hero h1 {
  position: relative;
  z-index: 2;
  font-size: clamp(40px, 6vw, 80px);
}

.page-hero .lead {
  position: relative;
  z-index: 2;
  margin: 16px auto 0;
}

.page-hero .pill {
  position: relative;
  z-index: 2;
}

/* --- Buttons --- */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--teal);
  padding: 14px 32px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .2s, transform .15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--teal-light);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text2);
  background: transparent;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--purple-border);
  color: var(--text);
  background: var(--purple-dim);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  background: transparent;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--teal-border);
  text-decoration: none;
  transition: background .2s, color .2s;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--teal-dim);
  color: var(--teal-light);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 11px;
}

.btn-purple {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.btn-purple:hover {
  background: var(--purple-light);
  color: #fff;
}

/* --- Cards --- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color .2s;
}

.card:hover {
  border-color: var(--teal-border);
}

.card h3 {
  margin-bottom: 12px;
  font-size: 24px;
}

.card p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.65;
}

.card .label {
  margin-bottom: 8px;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  margin-bottom: 20px;
  color: var(--teal);
  font-size: 20px;
}

.card-icon-purple {
  background: var(--purple-dim);
  border-color: var(--purple-border);
  color: var(--purple);
}

/* --- Pricing Cards --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: start;
}

.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: border-color .2s;
}

.pricing-card:hover {
  border-color: var(--teal-border);
}

.pricing-card-popular {
  border-color: var(--teal-border);
  background: linear-gradient(to bottom, var(--teal-dim), var(--bg2));
}

.pricing-card-desk {
  border-color: var(--purple-border);
  background: linear-gradient(to bottom, var(--purple-dim), var(--bg2));
}

.pricing-card-desk:hover { border-color: var(--purple-border); }

.pricing-card-institutional {
  border-color: var(--teal-border);
  background: linear-gradient(to bottom, rgba(29,184,164,0.06), var(--bg2));
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--fm);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--teal);
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-badge-purple {
  background: var(--purple);
  color: #fff;
}

.pricing-tier {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}

.pricing-price {
  font-family: var(--fh);
  font-size: 44px;
  letter-spacing: 1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-price sup {
  font-size: 20px;
  vertical-align: super;
  color: var(--text2);
}

.pricing-price sub {
  font-family: var(--fm);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text3);
  vertical-align: baseline;
}

.pricing-desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
  min-height: 40px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.pricing-features li {
  font-size: 13px;
  color: var(--text2);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 600;
  font-size: 12px;
}

.pricing-card-desk .pricing-features li::before {
  color: var(--purple);
}

.pricing-card .btn-primary,
.pricing-card .btn-ghost,
.pricing-card .btn-outline,
.pricing-card .btn-purple {
  width: 100%;
  justify-content: center;
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table thead th {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.comparison-table thead th:last-child {
  color: var(--teal);
  background: var(--teal-dim);
}

.comparison-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: middle;
}

.comparison-table tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

.comparison-table tbody td:last-child {
  color: var(--teal);
  font-weight: 500;
  background: var(--teal-glow);
}

.comparison-table .check { color: var(--green); }
.comparison-table .partial { color: var(--text3); }
.comparison-table .none { color: var(--text3); opacity: 0.5; }

/* --- Delta Callouts --- */
.delta {
  background: linear-gradient(135deg, var(--teal-dim), var(--purple-dim));
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin: 32px 0;
}

.delta-label {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.delta p {
  color: var(--text2);
  font-size: 14px;
}

.delta-purple {
  border-left-color: var(--purple);
}

.delta-purple .delta-label {
  color: var(--purple);
}

/* --- Process / Workflow --- */
.process {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 40px 0;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 0;
}

.process-item {
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  padding: 10px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
}

.process-arrow {
  font-size: 14px;
  color: var(--teal);
  padding: 0 8px;
  flex-shrink: 0;
}

/* --- Choose If / Split Sections --- */
.choose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.choose-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.choose-card h3 {
  font-size: 22px;
  margin-bottom: 16px;
}

.choose-card ul {
  padding: 0;
}

.choose-card li {
  font-size: 14px;
  color: var(--text2);
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
}

.choose-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text3);
}

.choose-card-tr {
  border-color: var(--teal-border);
}

.choose-card-tr li::before {
  color: var(--teal);
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-q {
  font-family: var(--fb);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: '+';
  font-family: var(--fm);
  font-size: 18px;
  color: var(--text3);
  transition: transform .2s;
}

.faq-item.open .faq-q::after {
  transform: rotate(45deg);
  color: var(--teal);
}

.faq-a {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding-top: 12px;
}

/* --- Stats Row --- */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--fh);
  font-size: 40px;
  letter-spacing: 1px;
  color: var(--teal);
}

.stat-label {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 4px;
}

/* --- Trust Bar --- */
.trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 32px 0;
  flex-wrap: wrap;
}

.trust-item {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.5;
}

/* --- Footer --- */
.footer {
  padding: 48px 32px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer-brand {
  font-family: var(--fh);
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
}

.footer-brand span {
  color: var(--teal);
}

.footer-sub {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text3);
  margin-top: 6px;
}

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

.footer-link {
  font-family: var(--fm);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  text-decoration: none;
  transition: color .2s;
}

.footer-link:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text3);
}

/* --- Responsive --- */
@media (max-width: 1000px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .choose-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 32px; flex-wrap: wrap; }

  .hero { min-height: auto; padding: 140px 24px 64px; }
  .hero h1 { font-size: clamp(40px, 8vw, 70px); }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .section, .section-alt, .section-dark { padding: 64px 0; }
  .container, .container-narrow { padding: 0 24px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(6,8,13,0.97);
    backdrop-filter: blur(16px);
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
    justify-content: center;
  }
  .nav-toggle { display: block; }
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }

  .hero { padding: 120px 20px 48px; }
  .section, .section-alt, .section-dark { padding: 56px 0; }
  .container, .container-narrow { padding: 0 20px; }

  .hero-stats { flex-direction: column; gap: 16px; }
  .btn-group { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost, .btn-outline { text-align: center; justify-content: center; }

  .process { flex-direction: column; gap: 8px; }
  .process-arrow { transform: rotate(90deg); }

  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .comparison-table { font-size: 12px; }
  .comparison-table thead th,
  .comparison-table tbody td { padding: 10px 12px; }

  .stats-row { flex-direction: column; gap: 24px; }
}

/* --- App Showcase --- */
.app-showcase {
  padding: 0 0 88px;
  position: relative;
}

.app-window {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  box-shadow:
    0 0 0 1px rgba(29,184,164,0.05),
    0 20px 60px rgba(0,0,0,0.4),
    0 0 120px rgba(29,184,164,0.03);
}

.app-window::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 30% 20%, rgba(29,184,164,0.04), transparent);
  pointer-events: none;
  z-index: 1;
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(6,8,13,0.6);
  border-bottom: 1px solid var(--border);
}

.app-titlebar-dots {
  display: flex;
  gap: 6px;
}

.app-titlebar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.app-titlebar-dot:nth-child(1) { background: #E85454; }
.app-titlebar-dot:nth-child(2) { background: #E8C454; }
.app-titlebar-dot:nth-child(3) { background: #34D399; }

.app-titlebar-title {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 1px;
  margin-left: 12px;
}

.app-content {
  padding: 24px;
  position: relative;
  z-index: 2;
}

/* App Window with real screenshot */
.app-window-img {
  overflow: hidden;
}

.app-window-img img {
  width: 100%;
  height: auto;
  display: block;
}

.app-window-img img + img {
  border-top: 1px solid var(--border);
}

.app-screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.app-screenshot-grid .app-window {
  margin: 0;
}

@media (max-width: 640px) {
  .app-screenshot-grid {
    grid-template-columns: 1fr;
  }
}

/* --- App KPI Row --- */
.app-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.app-kpi {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.app-kpi-label {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}

.app-kpi-value {
  font-family: var(--fh);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--green);
  line-height: 1;
}

.app-kpi-value.text-teal { color: var(--teal); }
.app-kpi-value.text-text { color: var(--text); }

.app-kpi-meta {
  font-family: var(--fm);
  font-size: 9px;
  color: var(--text3);
  margin-top: 4px;
  letter-spacing: 1px;
}

/* --- App Equity Curve --- */
.app-equity-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.app-equity {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.app-equity-title {
  font-family: var(--fb);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
}

.app-equity svg {
  width: 100%;
  height: 120px;
  display: block;
}

/* --- App Evaluation Panel --- */
.app-eval {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.app-eval-title {
  font-family: var(--fb);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.app-eval-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.app-eval-row:last-child { border-bottom: none; }

.app-eval-row span:first-child { color: var(--text2); }
.app-eval-row span:last-child { color: var(--text); font-weight: 500; font-family: var(--fm); font-size: 11px; }

/* --- App AI Cards --- */
.app-ai-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.app-ai-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.app-ai-card h5 {
  font-family: var(--fb);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.app-ai-card .app-ai-metric {
  font-family: var(--fm);
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.app-ai-card p {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

/* --- App Improvement Bar --- */
.app-improve {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-improve-label {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}

.app-improve-bar {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.app-improve-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  transition: width 1s ease;
}

.app-improve-values {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

.app-improve-before {
  font-family: var(--fm);
  font-size: 12px;
  color: var(--text3);
}

.app-improve-after {
  font-family: var(--fh);
  font-size: 22px;
  color: var(--teal);
  line-height: 1;
}

/* --- App Sidebar Mini --- */
.app-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  min-height: 380px;
}

.app-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 16px 0;
}

.app-sidebar-brand {
  font-family: var(--fh);
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--text);
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.app-sidebar-brand span { color: var(--teal); }

.app-sidebar-item {
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 8px 16px;
  display: block;
  transition: color .2s, background .2s;
}

.app-sidebar-item.active {
  color: var(--text);
  background: var(--teal-dim);
  border-left: 2px solid var(--teal);
}

.app-main {
  padding: 24px;
}

/* --- App Calendar Grid --- */
.app-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.app-cal-header {
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  text-align: center;
  padding: 6px 0;
}

.app-cal-day {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px;
  min-height: 52px;
  position: relative;
}

.app-cal-date {
  font-family: var(--fm);
  font-size: 9px;
  color: var(--text3);
  text-align: right;
}

.app-cal-pnl {
  font-family: var(--fm);
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
}

.app-cal-pnl.positive { color: var(--green); }
.app-cal-pnl.negative { color: var(--red); }

.app-cal-day.winning {
  background: rgba(52,211,153,0.06);
  border-color: rgba(52,211,153,0.15);
}

.app-cal-day.losing {
  background: rgba(232,84,84,0.06);
  border-color: rgba(232,84,84,0.15);
}

/* --- Showcase Caption --- */
.showcase-caption {
  text-align: center;
  margin-top: 20px;
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}

/* --- Responsive for showcases --- */
@media (max-width: 900px) {
  .app-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .app-ai-row { grid-template-columns: 1fr; }
  .app-equity-row { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-improve { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (max-width: 640px) {
  .app-kpi-row { grid-template-columns: 1fr 1fr; }
  .app-content { padding: 16px; }
  .app-kpi-value { font-size: 22px; }
  .app-calendar { grid-template-columns: repeat(4, 1fr); }
  .app-cal-header:nth-child(n+5) { display: none; }
  .app-cal-day:nth-child(7n+5),
  .app-cal-day:nth-child(7n+6),
  .app-cal-day:nth-child(7n+7) { display: none; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-teal { color: var(--teal); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--text3); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-640 { max-width: 640px; }
.max-w-480 { max-width: 480px; }
