/**
 * Traderie — premium SaaS layer (inner pages).
 * Homepage uses .page-home and keeps its hero layout.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-base: #09090b;
  --bg-surface: #111113;
  --bg-elevated: #18181b;
  --border-subtle: #27272a;
  --border-strong: #3f3f46;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --brand: #3b82f6;
  --brand-hover: #2563eb;
  --brand-muted: rgba(59, 130, 246, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --max-content: 1120px;
}

/* Global cleanup (including home) */
body::before {
  display: none;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
}

.cta-button {
  animation: none !important;
}

/* ——— Inner pages ——— */
body:not(.page-home) {
  background: var(--bg-base);
}

body:not(.page-home) header {
  background: rgba(9, 9, 11, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

body:not(.page-home) header.scrolled {
  box-shadow: var(--shadow-sm);
}

body:not(.page-home) nav {
  max-width: var(--max-content);
  padding: 0.875rem 1.5rem;
}

body:not(.page-home) .logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

body:not(.page-home) .logo span {
  background: none;
  -webkit-text-fill-color: var(--text-primary);
  color: var(--text-primary);
  animation: none;
}

body:not(.page-home) .nav-links {
  gap: 0.25rem;
}

body:not(.page-home) .nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

body:not(.page-home) .nav-links a::after {
  display: none;
}

body:not(.page-home) .nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

body:not(.page-home) .nav-links a.active {
  color: var(--text-primary);
  background: var(--brand-muted);
}

/* Hero — document page, not landing */
body:not(.page-home) .hero {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: left;
}

body:not(.page-home) .hero::before {
  display: none;
}

body:not(.page-home) .hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: unset;
  text-shadow: none;
  animation: none;
  margin-bottom: 0.75rem;
}

body:not(.page-home) .hero h1::after {
  display: none;
}

body:not(.page-home) .hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 42rem;
  margin: 0;
  line-height: 1.6;
  animation: none;
}

body:not(.page-home) .breadcrumbs {
  max-width: var(--max-content);
  padding: 1rem 1.5rem 0;
  font-size: 0.8125rem;
}

body:not(.page-home) .breadcrumbs a:hover {
  color: var(--text-primary);
}

body:not(.page-home) .container {
  max-width: var(--max-content);
  padding: 2rem 1.5rem 4rem;
}

body:not(.page-home) .section {
  margin-bottom: 2.5rem;
}

body:not(.page-home) .section h2 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

body:not(.page-home) .section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

body:not(.page-home) .section p,
body:not(.page-home) .article-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Cards */
body:not(.page-home) .card,
body:not(.page-home) .topic-cluster-card,
body:not(.page-home) .trust-card,
body:not(.page-home) .article-card,
body:not(.page-home) .stat-box,
body:not(.page-home) .faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: none;
  backdrop-filter: none;
}

body:not(.page-home) .card::before,
body:not(.page-home) .card::after,
body:not(.page-home) .stat-box::before {
  display: none !important;
}

body:not(.page-home) .card {
  padding: 1.25rem 1.5rem;
}

body:not(.page-home) .card:hover,
body:not(.page-home) .topic-cluster-card:hover,
body:not(.page-home) .article-card:hover,
body:not(.page-home) .stat-box:hover,
body:not(.page-home) .faq-item:hover {
  transform: none;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

body:not(.page-home) .card h3,
body:not(.page-home) .topic-cluster-card h3 {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

body:not(.page-home) .card .icon,
body:not(.page-home) .feature-icon {
  display: none;
}

body:not(.page-home) .cards-grid,
body:not(.page-home) .topic-cluster-grid,
body:not(.page-home) .trust-grid {
  gap: 1rem;
  margin: 1.5rem 0;
}

body:not(.page-home) .feature-grid .feature-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

body:not(.page-home) .feature-item:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

body:not(.page-home) .feature-item h3 {
  color: var(--text-primary);
  font-size: 0.9375rem;
}

/* Buttons */
body:not(.page-home) .cta-button,
body:not(.page-home) .btn-primary {
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  min-height: auto;
  box-shadow: none;
  letter-spacing: 0;
}

body:not(.page-home) .cta-button::before,
body:not(.page-home) .btn-primary::before {
  display: none;
}

body:not(.page-home) .cta-button:hover,
body:not(.page-home) .btn-primary:hover {
  background: var(--brand-hover);
  transform: none;
  box-shadow: none;
}

body:not(.page-home) .btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  min-height: auto;
  box-shadow: none;
  animation: none;
}

body:not(.page-home) .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
  transform: none;
  box-shadow: none;
}

/* Info / callouts */
body:not(.page-home) .info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: none;
  animation: none;
}

body:not(.page-home) .info-box::before {
  display: none !important;
}

body:not(.page-home) .info-box.success {
  border-left-color: #22c55e;
}

body:not(.page-home) .info-box.danger {
  border-left-color: #ef4444;
}

body:not(.page-home) .quote-block {
  border-left: 3px solid var(--border-strong);
  padding-left: 1.25rem;
  background: transparent;
  box-shadow: none;
}

body:not(.page-home) .quote-author {
  display: none;
}

body:not(.page-home) .highlight {
  background: var(--brand-muted);
  color: var(--text-primary);
  box-shadow: none;
  font-weight: 500;
}

body:not(.page-home) .badge {
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  animation: none;
}

body:not(.page-home) .badge:hover {
  transform: none;
  box-shadow: none;
}

/* Stats */
body:not(.page-home) .stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: unset;
  animation: none;
}

body:not(.page-home) .stat-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* FAQ */
body:not(.page-home) .faq-item {
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md);
}

body:not(.page-home) .faq-item::before {
  display: none;
}

body:not(.page-home) .faq-item:hover {
  transform: none;
}

body:not(.page-home) .faq-question {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 1rem 1.25rem;
}

body:not(.page-home) .faq-question::after {
  color: var(--text-muted);
  text-shadow: none;
  font-size: 1.25rem;
}

body:not(.page-home) .faq-item:hover .faq-question {
  color: var(--text-primary);
}

body:not(.page-home) details.faq-item summary h3 {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Tables */
body:not(.page-home) .table-container {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

body:not(.page-home) thead {
  background: var(--bg-elevated);
}

body:not(.page-home) thead::after {
  display: none;
}

body:not(.page-home) th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body:not(.page-home) tbody tr:hover {
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.02);
}

/* Timeline */
body:not(.page-home) .timeline::before {
  background: var(--border-subtle);
  box-shadow: none;
}

body:not(.page-home) .timeline-item::before {
  background: var(--brand);
  box-shadow: none;
  animation: none;
  border-color: var(--bg-base);
}

body:not(.page-home) .timeline-item {
  animation: none;
}

body:not(.page-home) .timeline-item h3 {
  color: var(--text-primary);
  font-size: 1rem;
}

/* Lists */
body:not(.page-home) .features-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  font-size: 0;
  flex-shrink: 0;
}

body:not(.page-home) .methodology-steps li::before {
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
}

/* Footer */
body:not(.page-home) footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 1.5rem;
}

body:not(.page-home) .footer-content {
  max-width: var(--max-content);
  gap: 2rem;
}

body:not(.page-home) .footer-section h4 {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

body:not(.page-home) .footer-section p,
body:not(.page-home) .footer-section a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

body:not(.page-home) .footer-section a:hover {
  color: var(--text-primary);
}

body:not(.page-home) .footer-bottom {
  max-width: var(--max-content);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

body:not(.page-home) .seo-nav {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  opacity: 1;
  padding: 1.5rem 0;
}

body:not(.page-home) .seo-nav a {
  font-size: 0.8125rem;
}

/* Editorial */
body:not(.page-home) .editorial-article .article-header {
  margin-top: 0;
}

body:not(.page-home) .article-category {
  color: var(--brand);
  font-size: 0.6875rem;
}

body:not(.page-home) .article-read-more {
  font-size: 0.8125rem;
  font-weight: 500;
}

body:not(.page-home) .editorial-hub .article-grid {
  gap: 1rem;
}

body:not(.page-home) .marquee-container {
  display: none;
}

body:not(.page-home) .icon-text-block {
  padding: 1rem 1.25rem;
  animation: none;
}

body:not(.page-home) .icon-text-block:hover {
  transform: none;
}

body:not(.page-home) .icon-text-block .icon {
  display: none;
}

body:not(.page-home) .progress-fill {
  background: var(--brand);
  box-shadow: none;
}

body:not(.page-home) .progress-fill::after {
  display: none;
}

body:not(.page-home) .cta-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
}

body:not(.page-home) .cta-group {
  justify-content: flex-start;
}

/* No scroll-reveal flicker on inner pages */
body:not(.page-home) .scroll-animate {
  opacity: 1;
  transform: none;
}

/* ——— Homepage: small tames only ——— */
body.page-home::before {
  display: none;
}

body.page-home {
  font-family: var(--font);
}

body.page-home .cta-button {
  animation: none !important;
}

body.page-home header.scrolled {
  box-shadow: 0 1px 0 var(--border-subtle);
}

@media (max-width: 768px) {
  body:not(.page-home) .nav-links.active {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
  }
}
