/* landing.css — Landing pages */
/* ============================================================================
   20. Landing Page
   ============================================================================ */

.landing-page { font-family: 'Inter', sans-serif; color: #333; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.landing-header {
  padding: 20px 0;
  background: #0d1520;
  position: fixed; width: 100%; top: 0; z-index: 100;
}
.landing-header .container { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: #22a559; text-decoration: none; }
.logo img { height: 40px; border-radius: 8px; }

.landing-nav { display: flex; gap: 20px; align-items: center; }
.landing-nav a { color: #9ca3af; text-decoration: none; font-weight: 500; }
.landing-nav a:hover { color: #f9fafb; }
.landing-nav a.btn-primary { color: white; }

/* Landing buttons override with TR green */
.landing-page .btn-primary         { background: #22a559; color: white; }
.landing-page .btn-primary:hover   { background: #1e9050; }
.landing-page .btn-outline         { background: transparent; border: 2px solid #22a559; color: #22a559; }
.landing-page .btn-outline:hover   { background: #22a559; color: white; }
.landing-page .btn-lg              { padding: 16px 32px; font-size: 18px; }

.hero { padding: 140px 0 100px; background: linear-gradient(135deg, #0d1520 0%, #162231 100%); text-align: center; }
.hero h1 { font-size: 48px; font-weight: 700; color: #f9fafb; margin-bottom: 20px; line-height: 1.2; }
.hero-subtitle { font-size: 20px; color: #9ca3af; max-width: 700px; margin: 0 auto 40px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }

.features      { padding: 100px 0; background: #f8fafc; }
.features h2   { text-align: center; font-size: 36px; margin-bottom: 60px; color: #1e293b; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.feature-card  { text-align: center; padding: 30px; background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; }
.feature-icon  { font-size: 48px; margin-bottom: 20px; }
.feature-card h3 { font-size: 20px; margin-bottom: 12px; color: #1e293b; }
.feature-card p  { color: #64748b; line-height: 1.6; }

.how-it-works    { padding: 100px 0; background: white; }
.how-it-works h2 { text-align: center; font-size: 36px; margin-bottom: 60px; color: #1e293b; }
.steps-grid      { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.step            { text-align: center; }
.step-number     { width: 60px; height: 60px; background: #1e3a5f; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 20px; }
.step h3         { font-size: 20px; margin-bottom: 12px; color: #1e293b; }
.step p          { color: #64748b; line-height: 1.6; }

.cta           { padding: 100px 0; background: linear-gradient(135deg, #1e3a5f 0%, #22a559 100%); text-align: center; color: white; }
.cta h2        { font-size: 36px; margin-bottom: 16px; }
.cta p         { font-size: 18px; opacity: 0.9; margin-bottom: 30px; }
.cta .btn-primary { background: white; color: #1e3a5f; }
.cta .btn-primary:hover { background: #f0f7ff; }

.landing-footer              { padding: 40px 0; background: #0d1520; color: #6b7280; }
.landing-footer .container   { display: flex; justify-content: space-between; align-items: center; }
.footer-nav                  { display: flex; gap: 24px; }
.footer-nav a                { color: #6b7280; text-decoration: none; }
.footer-nav a:hover          { color: #f9fafb; }

/* ============================================================================
   22. Error Page
   ============================================================================ */

.error-page      { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f8fafc; font-family: 'Inter', sans-serif; padding: 20px; }
.error-container { text-align: center; max-width: 500px; }
.error-code      { font-size: 120px; font-weight: 700; color: #e5e7eb; line-height: 1; margin-bottom: 16px; }
.error-actions   { display: flex; gap: 16px; justify-content: center; }
.error-stack     { margin-top: 32px; background: #1e293b; color: #f1f5f9; padding: 20px; border-radius: 8px; text-align: left; font-size: 12px; overflow-x: auto; max-height: 300px; }

/* ============================================================================
   23. Billing Page
   ============================================================================ */

.billing-page    { min-height: 100vh; background: #f8fafc; color: #1e293b; }
.billing-topbar  { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.logo-link       { display: flex; align-items: center; }
.billing-content { max-width: 1500px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.billing-title   { font-size: 32px; font-weight: 700; margin-bottom: 12px; color: #1e293b; }
.current-plan    { font-size: 14px; color: #0d9488; font-weight: 600; margin-bottom: 24px; }

.toggle-container { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 40px; }
.toggle-label     { font-size: 14px; font-weight: 500; cursor: pointer; }
.toggle-label.active { font-weight: 600; }
.toggle-switch    { width: 44px; height: 24px; background: #e2e8f0; border-radius: 12px; cursor: pointer; position: relative; transition: background 0.2s; }
.toggle-switch.annual { background: #0d9488; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: left 0.2s; }
.toggle-switch.annual::after { left: 22px; }

.pricing-container { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.plan { background: white; border: 1px solid #e2e8f0; border-radius: 16px; padding: 28px 20px; width: 220px; text-align: center; display: flex; flex-direction: column; gap: 12px; transition: box-shadow 0.2s; }
.plan:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.plan h3 { font-size: 20px; font-weight: 700; color: #1e293b; }
.plan .description { font-size: 13px; color: #64748b; }
.price-amount { font-size: 36px; font-weight: 700; color: #0d9488; }
.price-period { font-size: 13px; color: #64748b; }
.annual-equivalent { font-size: 12px; color: #94a3b8; }
.plan ul { list-style: none; padding: 0; margin: 0; text-align: left; background: #f8fafc; border-radius: 8px; }
.plan li { padding: 8px 12px; font-size: 13px; color: #475569; border-bottom: 1px solid #e2e8f0; }
.plan li:last-child { border-bottom: none; }
.plan .button { display: block; padding: 12px; background: #475569; color: white; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; margin-top: auto; transition: background 0.2s; }
.plan .button:hover { background: #334155; }
.plan-popular { border: 2px solid #0d9488; position: relative; overflow: visible; }
.plan-popular::before { content: '★ MOST POPULAR'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #0d9488; color: #fff; font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 10px; white-space: nowrap; z-index: 1; }
.plan-popular .button { background: #0d9488; }
.plan-popular .button:hover { background: #0f766e; }
.btn-free { background: #0d9488 !important; }
.btn-free:hover { background: #0f766e !important; }

/* ============================================================================
   40. TheReconciliator — Dark Landing Page (index-thereconciliator.pug)
   ============================================================================ */

/* Hide the layout's top-header on the TR landing page */
body:has(.tr-landing-page) .top-header { display: none !important; }

/* Reset page-wrapper and body constraints for the dark landing page */
body:has(.tr-landing-page),
body:has(.tr-landing-page) .page-wrapper,
body:has(.tr-landing-page) .page-wrapper > * {
  background: #090d13 !important;
}
body:has(.tr-landing-page) .page-wrapper {
  height: auto !important;
  overflow: visible !important;
  padding-top: 0 !important;
  min-height: 100vh;
}
/* Fix section title color being washed out by global h2 overrides */
body:has(.tr-landing-page) .section-title { color: var(--text-hi, #e8edf3) !important; }
body:has(.tr-landing-page) .section-sub   { color: var(--text-mid, #8a99ad) !important; }

/* Override §20 unscoped rules bleeding into tr-landing-page */
body:has(.tr-landing-page) .features     { background: #090d13 !important; }
body:has(.tr-landing-page) .how-it-works { background: #090d13 !important; }
body:has(.tr-landing-page) .features h2,
body:has(.tr-landing-page) .how-it-works h2 { color: #e8edf3 !important; }
body:has(.tr-landing-page) .cta .btn-primary { background: #22a559 !important; color: #fff !important; }
body:has(.tr-landing-page) .cta .btn-primary:hover { background: #1a7d44 !important; }

.tr-landing-page {
  --bg-base:    #090d13;
  --bg-card:    #0f1621;
  --bg-card2:   #131c2a;
  --border:     #1e2d42;
  --green:      #22a559;
  --green-dim:  #1a7d44;
  --green-glow: rgba(34,165,89,0.18);
  --text-hi:    #e8edf3;
  --text-mid:   #8a99ad;
  --text-lo:    #4a5568;
  --navy:       #1e3a5f;
  --font-head:  'Syne', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-hi);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise texture overlay */
.tr-landing-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.tr-landing-page .container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.tr-landing-page .landing-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9,13,19,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.tr-landing-page .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-hi);
  text-decoration: none;
}

.tr-landing-page .logo img { height: 48px; border-radius: 6px; }
.tr-landing-page .logo-dot { color: var(--green); }

.tr-landing-page .landing-nav { display: flex; gap: 8px; align-items: center; }
.tr-landing-page .landing-nav a {
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s;
}
.tr-landing-page .landing-nav a:hover { color: var(--text-hi); }

.tr-landing-page .btn-nav-cta {
  background: var(--green) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  transition: background 0.2s !important;
}
.tr-landing-page .btn-nav-cta:hover { background: var(--green-dim) !important; }

/* Hero */
.tr-landing-page .hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.tr-landing-page .hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(34,165,89,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.tr-landing-page .hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,45,66,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,45,66,0.4) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

.tr-landing-page .hero .container { text-align: center; max-width: 860px; margin: 0 auto; }

.tr-landing-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,165,89,0.1);
  border: 1px solid rgba(34,165,89,0.3);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.tr-landing-page .hero h1 {
  font-family: var(--font-head);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-hi);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.tr-landing-page .hero h1 span {
  background: linear-gradient(135deg, #22a559, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tr-landing-page .hero-subtitle {
  font-size: 18px;
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.tr-landing-page .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.tr-landing-page .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 var(--green-glow);
}
.tr-landing-page .btn-primary:hover {
  background: var(--green-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--green-glow);
}

.tr-landing-page .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.tr-landing-page .btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}

.tr-landing-page .hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.tr-landing-page .stat-item { text-align: center; }
.tr-landing-page .stat-value {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-hi);
}
.tr-landing-page .stat-label { font-size: 13px; color: var(--text-mid); margin-top: 4px; }
.tr-landing-page .stat-green { color: var(--green); }

/* Features */
.tr-landing-page .features { padding: 120px 0; position: relative; }

.tr-landing-page .section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.tr-landing-page .section-title {
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.tr-landing-page .section-sub {
  text-align: center;
  font-size: 16px;
  color: var(--text-mid);
  max-width: 500px;
  margin: 0 auto 64px;
  line-height: 1.6;
}

.tr-landing-page .features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.tr-landing-page .feature-card { background: var(--bg-card); padding: 36px 32px; transition: background 0.2s; }
.tr-landing-page .feature-card:hover { background: var(--bg-card2); }

.tr-landing-page .feature-icon { font-size: 28px; margin-bottom: 16px; display: block; }

.tr-landing-page .feature-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 10px;
}

.tr-landing-page .feature-card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; }

/* How It Works */
.tr-landing-page .how-it-works { padding: 120px 0; border-top: 1px solid var(--border); }

.tr-landing-page .steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 64px;
  position: relative;
}

.tr-landing-page .steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green) 20%, var(--green) 80%, transparent);
  opacity: 0.4;
}

.tr-landing-page .step { text-align: center; padding: 0 20px; }

.tr-landing-page .step-number {
  width: 56px;
  height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.tr-landing-page .step h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 10px;
}

.tr-landing-page .step p { font-size: 13px; color: var(--text-mid); line-height: 1.6; }

/* CTA */
.tr-landing-page .cta {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tr-landing-page .cta::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(34,165,89,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.tr-landing-page .cta h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--text-hi);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.tr-landing-page .cta p { font-size: 17px; color: var(--text-mid); margin-bottom: 40px; }

/* Footer */
.tr-landing-page .landing-footer { padding: 32px 0; border-top: 1px solid var(--border); }
.tr-landing-page .landing-footer .container { display: flex; justify-content: space-between; align-items: center; }
.tr-landing-page .landing-footer p { font-size: 13px; color: var(--text-lo); }
.tr-landing-page .footer-nav { display: flex; gap: 24px; }
.tr-landing-page .footer-nav a { font-size: 13px; color: var(--text-lo); text-decoration: none; transition: color 0.2s; }
.tr-landing-page .footer-nav a:hover { color: var(--text-mid); }

/* Responsive */
@media (max-width: 900px) {
  .tr-landing-page .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tr-landing-page .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .tr-landing-page .steps-grid::before { display: none; }
  .tr-landing-page .hero-stats { gap: 32px; }
}

@media (max-width: 600px) {
  .tr-landing-page .features-grid { grid-template-columns: 1fr; }
  .tr-landing-page .steps-grid { grid-template-columns: 1fr; }
  .tr-landing-page .hero-stats { flex-direction: column; gap: 24px; }
  .tr-landing-page .landing-footer .container { flex-direction: column; gap: 16px; text-align: center; }
  .tr-landing-page .landing-nav a:not(.btn-nav-cta) { display: none; }
}

