/* Global Route — Premium UI Layer */
/* Blueprint standard: white bg, dark text, single accent. Dark only on hero + footer. */

/* ── NAV ── */
.header {
  background-color: white;
  border-bottom: 1px solid var(--color-neutral-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.logo-text {
  font-family: var(--font-family-heading);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--color-neutral-900);
}

.nav-menu a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-neutral-600);
  padding: 0.35rem 0;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav-menu a:hover { color: var(--color-neutral-900); }
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }
.nav-menu a.active { color: var(--color-primary); font-weight: 600; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem !important;
  background-color: var(--color-primary) !important;
  color: white !important;
  border-radius: 999px !important;
  font-size: var(--font-size-sm) !important;
  font-weight: 600 !important;
  transition: background-color var(--transition-fast), transform var(--transition-fast) !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: var(--color-primary-dark) !important;
  color: white !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* ── HERO — dark, premium, with texture ── */
.hero {
  background: linear-gradient(135deg, #0c1f4a 0%, #111827 55%, #0f172a 100%);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(234,88,12,0.15) 0%, transparent 68%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-content h1 {
  color: white;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--spacing-lg);
}

.hero-subtitle {
  color: rgba(255,255,255,0.72);
  font-family: var(--font-family-body);
  font-size: var(--font-size-lg);
  font-weight: 400;
  max-width: 520px;
}

.hero-cta { position: relative; z-index: 1; }

.hero-cta .btn-primary {
  background-color: var(--color-accent);
  border-radius: 999px;
  padding: 0.8rem 2rem;
  box-shadow: 0 4px 18px rgba(234,88,12,0.38);
  font-weight: 700;
}

.hero-cta .btn-primary:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(234,88,12,0.48);
}

.hero-cta .btn-secondary {
  background-color: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 0.8rem 2rem;
  backdrop-filter: blur(4px);
}

.hero-cta .btn-secondary:hover {
  background-color: rgba(255,255,255,0.15);
  color: white;
}

/* Hero stats — frosted tiles */
.hero-stats { position: relative; z-index: 1; }

.hero-stats .stat {
  background-color: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.hero-stats .stat-number { color: white; }
.hero-stats .stat-label  { color: rgba(255,255,255,0.6); }

/* ── PAGE HEADER — inner pages ── */
.page-header {
  background: linear-gradient(135deg, #0c1f4a 0%, #111827 100%);
  padding: 3.5rem var(--spacing-md) 3rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

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

.page-header h1 {
  color: white;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-sm);
}

.page-header-subtitle {
  color: rgba(255,255,255,0.7);
  font-family: var(--font-family-body);
  font-size: var(--font-size-lg);
  font-weight: 400;
  max-width: 600px;
  margin-bottom: 0;
}

.page-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(234,88,12,0.18);
  border: 1px solid rgba(234,88,12,0.38);
  color: #fed7aa;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
  .page-header { padding: 5rem var(--spacing-lg) 4rem; }
}

/* ── SECTIONS — white bg, dark text. Dark only on hero + footer ── */
.problem  { background-color: white; }
.approach { background-color: var(--color-neutral-50); }
.featured { background-color: white; }
.tools    { background-color: var(--color-neutral-50); }
.testimonials { background-color: white; }

/* Section eyebrow */
.section-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.problem h2,
.approach h2,
.featured h2,
.tools h2,
.testimonials h2 {
  color: var(--color-neutral-900);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

/* ── PROBLEM CARDS — white, left accent, dark text ── */
.problem-card {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-top: 3px solid var(--color-error);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.problem-card h3 {
  color: var(--color-neutral-900);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

.problem-card p { color: var(--color-neutral-600); }

/* ── APPROACH CARDS — light bg, icon box ── */
.approach-card {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.approach-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.approach-card h3 { color: var(--color-neutral-900); }
.approach-card p  { color: var(--color-neutral-600); }

.approach-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin: 0 auto var(--spacing-md);
}

/* ── FEATURED CARDS — white, top accent ── */
.featured-card {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-top-color var(--transition-fast);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-top-color: var(--color-accent);
}

.featured-card h3 { color: var(--color-neutral-900); }
.featured-card p  { color: var(--color-neutral-600); }

/* ── TOOL CARDS ── */
.tool-card {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-top: 3px solid var(--color-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ── BUTTONS — pill, premium ── */
.btn {
  border-radius: 999px;
  letter-spacing: 0.01em;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.btn-primary {
  box-shadow: 0 2px 10px rgba(37,99,235,0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(37,99,235,0.32);
}

.btn-secondary:hover { transform: translateY(-1px); }

.btn-large {
  padding: 0.85rem 2.25rem;
  font-size: var(--font-size-base);
}

/* ── PLAYBOOK CARDS — left stripe ── */
.playbook-card {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), border-left-color var(--transition-fast);
}

.playbook-card:hover {
  box-shadow: var(--shadow-lg);
  border-left-color: var(--color-accent);
}

/* ── COUNTRY CARDS ── */
.country-card {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-top: 3px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-top-color var(--transition-fast), transform var(--transition-base), box-shadow var(--transition-base);
}

.country-card:hover {
  border-top-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ── FORMS ── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--spacing-lg);
}

.form-field label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-neutral-700);
}

.form-field select,
.form-field input,
#route-form select,
#route-form input {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family-body);
  background-color: white;
  color: var(--color-neutral-900);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.form-field select,
#route-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-field select:focus,
.form-field input:focus,
#route-form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

#route-form {
  background: white;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl) var(--spacing-2xl);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

#route-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-neutral-700);
  flex: 1;
  min-width: 200px;
}

/* Filter controls */
.filter-group select,
.search-box input {
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--color-neutral-300);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-group select:focus,
.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ── CTA FINAL — dark, premium ── */
.cta-final {
  background: linear-gradient(135deg, #0c1f4a 0%, #111827 60%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.cta-final h2,
.cta-final p { position: relative; z-index: 1; }

.cta-final .btn-secondary {
  background-color: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
}

.cta-final .btn-secondary:hover {
  background-color: rgba(255,255,255,0.15);
  color: white;
}

/* ── FOOTER — premium dark ── */
.footer {
  background: linear-gradient(180deg, #0d1117 0%, #0a0f1a 100%);
  border-top: 3px solid var(--color-accent);
}

.footer-section h4 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-base);
  color: white;
  margin-bottom: var(--spacing-md);
}

.footer-section p {
  color: var(--color-neutral-400);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.footer-section ul li { margin-bottom: 0.5rem; }

.footer-section a {
  color: var(--color-neutral-400);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: inline-block;
}

.footer-section a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  color: var(--color-neutral-500);
  font-size: var(--font-size-xs);
}

/* ── BLOG HERO — dark, matches homepage ── */
.blog-hero {
  background: linear-gradient(135deg, #0c1f4a 0%, #111827 60%, #0f172a 100%) !important;
  border-bottom: none !important;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.blog-hero h1 { color: white !important; letter-spacing: -0.03em; }
.blog-hero-subtitle { color: rgba(255,255,255,0.7) !important; }

.blog-stat {
  background-color: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  box-shadow: none !important;
}

.blog-stat-number { color: white !important; }
.blog-stat-label  { color: rgba(255,255,255,0.6) !important; }

/* ── NEWSLETTER SECTION ── */
.newsletter {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #0c1f4a 100%);
}

/* ── TESTIMONIALS — quote mark ── */
.testimonial {
  border-left: none;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-md);
  padding: var(--spacing-xl);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  left: var(--spacing-lg);
  font-family: var(--font-family-heading);
  font-size: 5rem;
  color: var(--color-primary-light);
  line-height: 1;
  pointer-events: none;
}

/* ── ROUTE RESULTS ── */
.route-results article {
  background-color: white;
  border: 1px solid var(--color-neutral-200);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transition: border-left-color var(--transition-fast), box-shadow var(--transition-base);
}

.route-results article:hover {
  border-left-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
}

/* ── TABLE ── */
table {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── EVIDENCE NOTE ── */
.evidence-note {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-neutral-700);
}

/* ── COMPARE PANEL ── */
.compare-panel-inner {
  background: white;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
}

.compare-col {
  border: 1px solid var(--color-neutral-200);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.compare-col-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: var(--spacing-md);
}

.compare-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.8rem;
  margin: 0;
}

.compare-dl dt {
  color: var(--color-neutral-500);
  font-weight: 600;
}

.compare-dl dd { margin: 0; }

@media (prefers-color-scheme: dark) {
  .compare-panel-inner {
    background-color: #1a2332;
    border-color: rgba(255,255,255,0.08);
  }
  .compare-col {
    background-color: #111827;
    border-color: rgba(255,255,255,0.08);
  }
}

/* ── FOCUS VISIBLE ── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── RESPONSIVE ── */
@media (min-width: 768px) {
  #route-form { flex-wrap: nowrap; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.875rem; }

  #route-form {
    flex-direction: column;
    padding: var(--spacing-lg);
  }

  #route-form label { min-width: 100%; }
}

/* ── DARK MODE — only structural surfaces, hero/footer already dark ── */
@media (prefers-color-scheme: dark) {
  .header {
    background-color: #0d1117;
    border-bottom-color: rgba(255,255,255,0.08);
  }

  .logo-text { color: white; }
  .nav-menu a { color: rgba(255,255,255,0.65); }
  .nav-menu a:hover { color: white; }

  .problem  { background-color: #0d1117; }
  .approach { background-color: #111827; }
  .featured { background-color: #0d1117; }

  .problem-card,
  .featured-card,
  .tool-card,
  .approach-card,
  .playbook-card,
  .country-card,
  .testimonial {
    background-color: #1a2332;
    border-color: rgba(255,255,255,0.08);
  }

  .problem-card h3,
  .featured-card h3,
  .approach-card h3,
  .tool-card h3 { color: white; }

  .problem-card p,
  .featured-card p,
  .approach-card p { color: rgba(255,255,255,0.65); }

  #route-form,
  .form-field select,
  .form-field input,
  #route-form select {
    background-color: #1a2332;
    border-color: rgba(255,255,255,0.1);
    color: white;
  }

  .route-results article {
    background-color: #1a2332;
    border-color: rgba(255,255,255,0.08);
  }
}
