/* ═══════════════════════════════════════════════════════════════
   CIBC Business Banking — Design System
   Brand: #BB0B2A (Red) | #1A1A2E (Navy) | #FFC72C (Gold)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cibc-red: #BB0B2A;
  --cibc-red-dark: #8E0820;
  --cibc-red-light: #E8103A;
  --cibc-navy: #1A1A2E;
  --cibc-navy-light: #2D2D44;
  --cibc-gold: #FFC72C;
  --cibc-gold-light: #FFD966;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cibc-red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cibc-red-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ─── Typography ─────────────────────────────────────────────── */
h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; color: var(--cibc-navy); }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; color: var(--cibc-navy); margin-bottom: 16px; }
h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.35; color: var(--gray-800); margin-bottom: 12px; }
h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; color: var(--gray-700); margin-bottom: 8px; }
p { margin-bottom: 16px; color: var(--gray-600); }
.lead { font-size: 1.2rem; line-height: 1.65; color: var(--gray-500); }

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--cibc-red);
  text-decoration: none;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--cibc-red);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.main-nav a:hover { color: var(--cibc-red); background: var(--gray-50); }
.main-nav a.active { color: var(--cibc-red); font-weight: 600; }
.nav-cta {
  background: var(--cibc-red);
  color: var(--white) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--cibc-red-dark) !important; color: var(--white) !important; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-700);
  padding: 8px;
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--cibc-navy) 0%, #2a1a3e 50%, var(--cibc-red-dark) 100%);
  padding: 100px 0 80px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,199,44,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { color: var(--white); margin-bottom: 20px; max-width: 700px; }
.hero .lead { color: rgba(255,255,255,0.8); max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--cibc-red); color: var(--white); }
.btn-primary:hover { background: var(--cibc-red-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--cibc-navy); }
.btn-secondary:hover { background: var(--gray-100); color: var(--cibc-navy); transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--cibc-red); color: var(--cibc-red); background: transparent; }
.btn-outline:hover { background: var(--cibc-red); color: var(--white); }
.btn-gold { background: var(--cibc-gold); color: var(--cibc-navy); }
.btn-gold:hover { background: var(--cibc-gold-light); color: var(--cibc-navy); }

/* ─── Sections ────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: var(--gray-50); }
.section-dark { background: var(--cibc-navy); color: var(--white); }
.section-dark h2,
.section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.75); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 48px; }
.section-header .lead { margin-top: 12px; }

/* ─── Cards / Grid ────────────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--cibc-red), var(--cibc-red-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--white);
}
.card h3 { margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }

/* ─── Stats ───────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--cibc-red); margin-bottom: 8px; }
.stat-label { font-size: 0.9rem; color: var(--gray-500); font-weight: 500; }
.section-dark .stat-number { color: var(--cibc-gold); }
.section-dark .stat-label { color: rgba(255,255,255,0.7); }

/* ─── Feature List / Split ────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }
.split-visual {
  background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
  border-radius: var(--radius-xl);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gray-300);
  border: 1px solid var(--gray-200);
}
.feature-list { list-style: none; margin: 24px 0; }
.feature-list li {
  padding: 12px 0;
  padding-left: 32px;
  position: relative;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
}
.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--cibc-red);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ─── Comparison Table ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 32px 0; }
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.comparison-table th {
  background: var(--cibc-navy);
  color: var(--white);
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}
.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--gray-50); }
.comparison-table .check { color: var(--cibc-red); font-weight: 700; }

/* ─── FAQ / Accordion ─────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--gray-50); }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--cibc-red); transition: transform var(--transition); }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 20px; color: var(--gray-600); display: none; }
.faq-item.open .faq-answer { display: block; }

/* ─── CTA Banner ──────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--cibc-red) 0%, var(--cibc-red-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 64px;
  text-align: center;
  color: var(--white);
}
.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 32px; }

/* ─── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--gray-400);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--cibc-red); }
.breadcrumb span { margin: 0 8px; color: var(--gray-300); }

/* ─── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--cibc-navy); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.5); max-width: 280px; }
.footer-col h4 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 20px; }
.footer-col a { display: block; padding: 6px 0; font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-col a:hover { color: var(--cibc-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-links a { color: rgba(255,255,255,0.4); margin-left: 24px; }
.footer-links a:hover { color: rgba(255,255,255,0.8); }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-reverse { direction: ltr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .cta-banner { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-links { margin-top: 8px; }
  .footer-links a { margin: 0 12px; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--white); padding: 16px; box-shadow: var(--shadow-lg); border-top: 1px solid var(--gray-200); }
  .main-nav.open { display: flex; }
  .mobile-toggle { display: block; }
  .hero-actions { flex-direction: column; }
}
