/* ═══════════════════════════════════════════════════════════════
   CIBC Digital Business — Design System v2
   Brand: #0E6B37 (Green) | #1C2024 (Charcoal) | #C8CDD0 (Silver)
   ═══════════════════════════════════════════════════════════════ */

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

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

:root {
  --cibc-green: #0E6B37;
  --cibc-green-dark: #0A5029;
  --cibc-green-light: #12944C;
  --cibc-charcoal: #1C2024;
  --cibc-charcoal-light: #2E3338;
  --cibc-silver: #C8CDD0;
  --cibc-silver-light: #E8EBED;
  --cibc-gold: #C5993A;
  --gray-50: #F7F8F9;
  --gray-100: #EEF0F2;
  --gray-200: #DDE0E3;
  --gray-300: #C4C9CD;
  --gray-400: #8E959B;
  --gray-500: #636B73;
  --gray-600: #474E55;
  --gray-700: #343A40;
  --gray-800: #212529;
  --gray-900: #0F1215;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --transition: 0.25s ease;
  --max-width: 1180px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', -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-green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cibc-green-dark); }

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

/* ─── Typography ─────────────────────────────────────────────── */
h1 { font-size: 2.6rem; font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; color: var(--cibc-charcoal); }
h2 { font-size: 1.9rem; font-weight: 700; line-height: 1.28; letter-spacing: -0.01em; color: var(--cibc-charcoal); margin-bottom: 16px; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.35; color: var(--gray-800); margin-bottom: 12px; }
h4 { font-size: 1.05rem; 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.15rem; line-height: 1.65; color: var(--gray-500); }

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--cibc-green);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--cibc-charcoal);
  text-decoration: none;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--cibc-green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.main-nav a:hover { color: var(--cibc-green); background: var(--gray-50); }
.main-nav a.active { color: var(--cibc-green); font-weight: 600; }
.nav-cta {
  background: var(--cibc-green) !important;
  color: var(--white) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--cibc-green-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: var(--cibc-charcoal);
  padding: 88px 0 72px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--cibc-green);
}
.hero::after {
  content: '';
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14,107,55,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { color: var(--white); margin-bottom: 20px; max-width: 680px; }
.hero .lead { color: rgba(255,255,255,0.75); max-width: 580px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 0.93rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--cibc-green); color: var(--white); }
.btn-primary:hover { background: var(--cibc-green-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--cibc-charcoal); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-50); color: var(--cibc-charcoal); transform: translateY(-1px); }
.btn-outline { border: 2px solid var(--cibc-green); color: var(--cibc-green); background: transparent; }
.btn-outline:hover { background: var(--cibc-green); color: var(--white); }
.btn-gold { background: var(--cibc-gold); color: var(--white); }
.btn-gold:hover { background: #B38832; color: var(--white); }

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

/* ─── Cards / Grid ────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.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-md);
  padding: 28px 28px 28px 32px;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--cibc-green);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-icon {
  width: 48px;
  height: 48px;
  background: var(--cibc-green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.3rem;
  color: var(--white);
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

/* ─── Stats ───────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat-number { font-size: 2.4rem; font-weight: 800; color: var(--cibc-green); margin-bottom: 6px; }
.stat-label { font-size: 0.88rem; color: var(--gray-500); font-weight: 500; }
.section-dark .stat-number { color: var(--cibc-silver-light); }
.section-dark .stat-label { color: rgba(255,255,255,0.6); }

/* ─── Feature List / Split ────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }
.split-visual {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  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: 20px 0; }
.feature-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--cibc-green);
  font-weight: 700;
}

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

/* ─── FAQ / Accordion ─────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 18px 22px;
  text-align: left;
  font-size: 0.95rem;
  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.2rem; color: var(--cibc-green); transition: transform var(--transition); }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { padding: 0 22px 18px; color: var(--gray-600); display: none; font-size: 0.93rem; }
.faq-item.open .faq-answer { display: block; }

/* ─── CTA Banner ──────────────────────────────────────────────── */
.cta-banner {
  background: var(--cibc-green);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.cta-banner h2 { color: var(--white); margin-bottom: 14px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 28px; }

/* ─── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--gray-400);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--cibc-green); }
.breadcrumb span { margin: 0 6px; color: var(--gray-300); }

/* ─── Footer ──────────────────────────────────────────────────── */
.site-footer { background: var(--cibc-charcoal); color: rgba(255,255,255,0.65); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 44px; margin-bottom: 44px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.45); max-width: 260px; }
.footer-col h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }
.footer-col a { display: block; padding: 5px 0; font-size: 0.85rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-col a:hover { color: var(--cibc-green-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.footer-links a { color: rgba(255,255,255,0.35); margin-left: 20px; }
.footer-links a:hover { color: rgba(255,255,255,0.7); }

/* ─── 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: 1.9rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 56px 0 44px; }
  .section { padding: 44px 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split-reverse { direction: ltr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cta-banner { padding: 36px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .footer-links { margin-top: 6px; }
  .footer-links a { margin: 0 10px; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--white); padding: 14px; box-shadow: var(--shadow-lg); border-top: 2px solid var(--cibc-green); }
  .main-nav.open { display: flex; }
  .mobile-toggle { display: block; }
  .hero-actions { flex-direction: column; }
}
