/* ==========================================================================
   AI Trade Lab — MAIN SITE + BLOG LAYOUTS
   Tokens, base, header, logo, nav, buttons, footer and the shared broker CTA
   all live in theme.css — the single source of truth for all three
   properties (main site, /blog/, /markets/). Change them THERE, not here.
   ========================================================================== */

@import url('theme.css');

/* ---- Utility ---- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-dark { background: var(--bg-secondary); }

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-glow);
  color: var(--accent-soft);
  border: 1px solid rgba(228, 0, 46, 0.22);
}

.gradient-text {
  background: linear-gradient(135deg, #e4002e, #ff6974 55%, #ff3745);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Hero ---- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -30%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(228, 0, 46, 0.08) 0%, transparent 68%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -35%; left: -20%;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(255, 55, 69, 0.05) 0%, transparent 68%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; display: flex; align-items: center; gap: 64px; }
.hero-content { flex: 1; }
.hero-content .tag { margin-bottom: 22px; }
.hero-content h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero-content p {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 34px;
  line-height: 1.72;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; }
.hero-chart {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-chart img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 100%; padding-top: 20px; }
.chart-bars .bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent), var(--accent-soft));
  border-radius: 4px 4px 0 0;
  opacity: 0.75;
  transition: height 0.3s;
  min-height: 8px;
}
.chart-label {
  position: absolute; top: 18px; left: 24px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: rgba(11,10,10,0.6);
  padding: 4px 10px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

/* ---- Stats Bar ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stat-item { text-align: center; }
.stat-item h3 {
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-item p { font-size: 0.82rem; color: var(--text-muted); margin-top: 5px; }

/* ---- Section Headers ---- */
.section-header { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.section-header h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  margin-bottom: 14px;
}
.section-header p {
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(0.98rem, 1.5vw, 1.06rem);
}

/* ---- Features Grid ---- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: rgba(228, 0, 46, 0.45);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border: 1px solid rgba(228, 0, 46, 0.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 10px; letter-spacing: -0.01em; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }

/* ---- Blog Cards ---- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.blog-card:hover {
  border-color: rgba(228, 0, 46, 0.45);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.blog-card-image {
  height: 190px;
  background: var(--bg-hover);
  position: relative;
  overflow: hidden;
}
.blog-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.04); }
.blog-card-image .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(11,10,10,0.6) 100%);
  pointer-events: none;
}
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-body .tag { margin-bottom: 14px; align-self: flex-start; }
.blog-card-body h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: 10px; line-height: 1.4; letter-spacing: -0.01em; }
.blog-card-body h3 a { color: var(--text-primary); }
.blog-card-body h3 a:hover { color: var(--accent-soft); }
.blog-card-body p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.62; margin-bottom: 18px; flex: 1; }
.blog-card-meta { display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-muted); }
.blog-card-meta span { display: flex; align-items: center; gap: 5px; }

/* ---- Banner / CTA ---- */
.banner-section { padding: clamp(36px, 5vw, 56px) 0; }
.banner-ad {
  background:
    radial-gradient(circle at 85% 15%, rgba(228,0,46,0.10) 0%, transparent 55%),
    linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 4vw, 46px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.banner-content { flex: 1; position: relative; z-index: 1; }
.banner-content .tag { margin-bottom: 14px; }
.banner-content h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 750; margin-bottom: 10px; letter-spacing: -0.02em; }
.banner-content p { color: var(--text-secondary); font-size: 0.94rem; max-width: 620px; }
.banner-cta { position: relative; z-index: 1; flex-shrink: 0; text-align: center; }

/* ---- Broker grid ---- */
.axi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.axi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  transition: border-color var(--transition);
}
.axi-card:hover { border-color: rgba(228, 0, 46, 0.35); }
.axi-card .num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.28;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}
.axi-card h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: 9px; }
.axi-card p { color: var(--text-secondary); font-size: 0.89rem; line-height: 1.65; }

/* ---- Newsletter / signup box ---- */
.newsletter-box {
  background:
    radial-gradient(circle at 50% 0%, rgba(228,0,46,0.07) 0%, transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
}
.newsletter-box h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 750; margin-bottom: 12px; letter-spacing: -0.02em; }
.newsletter-box p { color: var(--text-secondary); margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
  flex: 1;
  padding: 15px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form input::placeholder { color: var(--text-muted); }

/* ---- Article (single post) ---- */
.article-header { padding-top: 130px; padding-bottom: 40px; text-align: center; }
.article-header .tag { margin-bottom: 18px; }
.article-header h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  max-width: 820px;
  margin: 0 auto 18px;
}
.article-header .meta {
  color: var(--text-muted); font-size: 0.88rem;
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
}
.article-body { max-width: 720px; margin: 0 auto; padding-bottom: 80px; }
.article-body h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.65rem);
  font-weight: 750;
  margin: 44px 0 16px;
  letter-spacing: -0.02em;
}
.article-body h3 { font-size: 1.2rem; font-weight: 650; margin: 30px 0 12px; letter-spacing: -0.01em; }
.article-body p { color: var(--text-secondary); margin-bottom: 20px; font-size: 1.02rem; line-height: 1.82; }
.article-body ul, .article-body ol { color: var(--text-secondary); margin: 0 0 24px 24px; font-size: 1.02rem; line-height: 1.82; }
.article-body li { margin-bottom: 9px; }
.article-body strong { color: var(--text-primary); }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 18px 26px;
  margin: 26px 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.article-body code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.88em;
  color: var(--accent-soft);
}
.article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}
.article-body pre code {
  background: none; border: none; padding: 0;
  color: var(--text-secondary); font-size: 0.86rem; line-height: 1.65;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.92rem; }
.article-body th, .article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.article-body th { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.article-body .info-box {
  background: var(--accent-glow);
  border: 1px solid rgba(228, 0, 46, 0.22);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 26px 0;
}
.article-body .info-box p { margin: 0; font-size: 0.95rem; }
.article-body .info-box strong { color: var(--accent); }
.article-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  text-align: center;
  margin: 48px 0;
}
.article-cta h3 { font-size: 1.3rem; margin-bottom: 10px; }
.article-cta p { color: var(--text-secondary); margin-bottom: 22px; }

/* ---- Blog listing ---- */
.blog-listing { padding-top: 130px; }
.blog-listing .section-header { text-align: left; }
.blog-listing .section-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }

/* ---- About page ---- */
.about-page { padding-top: 130px; }
.about-hero { text-align: center; margin-bottom: 64px; }
.about-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); font-weight: 800; margin-bottom: 18px; letter-spacing: -0.03em; }
.about-hero p { color: var(--text-secondary); font-size: clamp(1rem, 1.7vw, 1.1rem); max-width: 660px; margin: 0 auto; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 48px 0; }
.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.comp-card h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 18px; text-align: center; }
.comp-card ul { list-style: none; padding: 0; }
.comp-card ul li {
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.92rem;
}
.comp-card ul li:last-child { border-bottom: none; }
.comp-card ul li .check { color: var(--green); flex-shrink: 0; }
.comp-card ul li .cross { color: var(--accent); flex-shrink: 0; }
.comp-card.highlight {
  border-color: rgba(228, 0, 46, 0.5);
  background: linear-gradient(135deg, rgba(228,0,46,0.05) 0%, transparent 100%);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero .container { flex-direction: column; text-align: center; gap: 48px; }
  .hero-content p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .features-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .features-grid, .blog-grid, .axi-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 22px 20px; gap: 20px; }
  .banner-ad { flex-direction: column; text-align: center; padding: 32px 24px; }
  .banner-cta { width: 100%; }
  .banner-cta .btn-primary { width: 100%; }
  .newsletter-form { flex-direction: column; }
  .comparison-grid { grid-template-columns: 1fr; }
  .article-header { padding-top: 108px; }
  .blog-listing, .about-page { padding-top: 108px; }
  .blog-listing .section-header { text-align: center; }
  .btn-primary, .btn-secondary { width: 100%; }
  .hero-actions { flex-direction: column; width: 100%; }
}