/* =========================================================
   AVFE Design System — avfe.ca
   Alberta Verified Financial Exchange
   ========================================================= */

/* --- Custom Properties ----------------------------------- */
:root {
  --teal:        #5B8F8F;
  --teal-dark:   #467272;
  --teal-light:  #7DB5B5;
  --teal-muted:  #A3CECE;
  --teal-bg:     #EBF4F4;
  --charcoal:    #3A4F5C;
  --charcoal-dark: #2C3E4A;
  --dark:        #1E2D38;
  --gray-900:    #2D3748;
  --gray-700:    #4A5568;
  --gray-600:    #5F6B7A;
  --gray-400:    #A0AEC0;
  --gray-300:    #CBD5E0;
  --gray-200:    #E2E8F0;
  --gray-100:    #EDF2F7;
  --silver:      #C4CDD5;
  --white:       #FFFFFF;
  --off-white:   #F7F9FB;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
  --shadow:      0 4px 14px rgba(0,0,0,.07);
  --shadow-lg:   0 10px 30px rgba(0,0,0,.09);
  --radius:      10px;
  --radius-lg:   16px;
  --transition:  .25s ease;
  --max-w:       1200px;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Reset ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; border: none; outline: none; }

/* --- Typography ------------------------------------------ */
h1, h2, h3, h4, h5 {
  color: var(--charcoal-dark);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
.overline {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* --- Layout Utilities ------------------------------------ */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section   { padding: 100px 0; }
.section--gray { background: var(--off-white); }
.section--teal { background: var(--teal-bg); }

/* Inner pages: continuous background bleed (no banded sections) */
.page-flow {
  background: linear-gradient(180deg, var(--teal-bg) 0%, var(--off-white) 300px, var(--white) 100%);
}
.page-flow .section,
.page-flow .section--gray { background: transparent; }
.page-flow .section--dark { background: var(--dark); }
.page-flow .page-header { background: transparent; padding-bottom: 60px; }
.section--dark { background: var(--dark); color: var(--gray-200); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-64 { margin-top: 64px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }
.max-w-640 { max-width: 640px; }
.max-w-720 { max-width: 720px; }

/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  font-weight: 600; font-size: .95rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn--primary {
  background: var(--teal);
  color: var(--white);
}
.btn--primary:hover { background: var(--teal-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn--outline:hover { background: var(--teal); color: var(--white); transform: translateY(-2px); }
.btn--white {
  background: var(--white);
  color: var(--teal);
}
.btn--white:hover { background: var(--off-white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--dark {
  background: var(--charcoal-dark);
  color: var(--white);
}
.btn--dark:hover { background: var(--dark); color: var(--white); transform: translateY(-2px); }
.btn--sm { padding: 10px 22px; font-size: .85rem; }
.btn--lg { padding: 18px 40px; font-size: 1.05rem; }

/* --- Navigation ------------------------------------------ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100px;
}
.nav__logo img { height: 80px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a {
  font-size: .9rem; font-weight: 500;
  color: var(--gray-700);
  position: relative;
}
.nav__links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--teal);
  transition: width var(--transition);
}
.nav__links a:hover, .nav__links a.active { color: var(--teal); }
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__cta { margin-left: 16px; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; cursor: pointer; padding: 4px;
}
.nav__toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--charcoal); border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero ------------------------------------------------ */
.hero {
  position: relative;
  padding: 180px 0 120px;
  overflow: hidden;
  background: linear-gradient(170deg, var(--off-white) 0%, var(--white) 50%, var(--teal-bg) 100%);
}
.hero__pattern {
  position: absolute; inset: 0;
  opacity: .06;
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; }
.hero h1 { margin-bottom: 20px; }
.hero p { font-size: 1.15rem; color: var(--gray-600); max-width: 560px; margin-bottom: 36px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Page Header (inner pages) --------------------------- */
.page-header {
  padding: 160px 0 80px;
  background: linear-gradient(170deg, var(--off-white) 0%, var(--teal-bg) 100%);
  position: relative;
  overflow: hidden;
}
.page-header .overline { margin-bottom: 12px; }
.page-header h1 { margin-bottom: 16px; }
.page-header p { font-size: 1.1rem; color: var(--gray-600); max-width: 600px; }

/* --- Section Header -------------------------------------- */
.section__header { margin-bottom: 56px; }
.section__header .overline { margin-bottom: 12px; }
.section__header h2 { margin-bottom: 16px; }
.section__header p { color: var(--gray-600); max-width: 580px; }
.section__header.text-center p { margin-left: auto; margin-right: auto; }

/* --- Cards ----------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all var(--transition);
}
.card:hover { border-color: var(--teal-muted); box-shadow: var(--shadow); transform: translateY(-4px); }
.card__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-bg);
  color: var(--teal);
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: .95rem; color: var(--gray-600); }
.card--dark { background: var(--dark); border-color: transparent; }
.card--dark h3, .card--dark h4 { color: var(--white); }
.card--dark p { color: var(--gray-400); }
.card--dark:hover { border-color: var(--teal); }
.card--teal { background: var(--teal); border-color: transparent; color: var(--white); }
.card--teal h3 { color: var(--white); }
.card--teal p { color: rgba(255,255,255,.85); }
.card--teal .card__icon { background: rgba(255,255,255,.2); color: var(--white); }

/* --- Stats ----------------------------------------------- */
.stats { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat__number {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
  color: var(--teal); line-height: 1;
  margin-bottom: 6px;
}
.stat__label { font-size: .9rem; color: var(--gray-600); }

/* --- Testimonials ---------------------------------------- */
.testimonial {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.testimonial__text { font-size: 1.05rem; font-style: italic; color: var(--gray-700); margin-bottom: 20px; }
.testimonial__author { font-weight: 600; color: var(--charcoal-dark); }
.testimonial__role { font-size: .85rem; color: var(--gray-600); }

/* --- CTA Banner ------------------------------------------ */
.cta-banner {
  background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--dark) 100%);
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner p { color: var(--gray-300); max-width: 520px; margin: 0 auto 32px; }
.cta-banner__pattern {
  position: absolute; inset: 0; opacity: .05;
  pointer-events: none;
}

/* --- Timeline -------------------------------------------- */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 14px; top: 0; bottom: 0;
  width: 2px; background: var(--gray-200);
}
.timeline__item { position: relative; padding-bottom: 40px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -40px; top: 4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal-bg); border: 3px solid var(--teal);
  display: flex; align-items: center; justify-content: center;
}
.timeline__dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.timeline__year { font-weight: 700; color: var(--teal); font-size: .9rem; margin-bottom: 4px; }
.timeline__title { font-weight: 600; color: var(--charcoal-dark); margin-bottom: 4px; }
.timeline__desc { font-size: .9rem; color: var(--gray-600); }

/* --- Pricing Table --------------------------------------- */
.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
  transition: all var(--transition);
}
.pricing-card:hover { border-color: var(--teal-muted); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.pricing-card--featured { border-color: var(--teal); position: relative; }
.pricing-card--featured::before {
  content: 'Recommended';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--white);
  font-size: .75rem; font-weight: 600;
  padding: 4px 18px; border-radius: 20px;
}
.pricing-card__name { font-size: 1.1rem; font-weight: 600; color: var(--gray-600); margin-bottom: 8px; }
.pricing-card__price { font-size: 2.8rem; font-weight: 700; color: var(--charcoal-dark); line-height: 1; }
.pricing-card__price span { font-size: 1rem; font-weight: 400; color: var(--gray-600); }
.pricing-card__desc { font-size: .9rem; color: var(--gray-600); margin: 12px 0 28px; }
.pricing-card__features { text-align: left; margin-bottom: 32px; }
.pricing-card__features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; color: var(--gray-700);
  padding: 8px 0;
}
.pricing-card__features li::before {
  content: '';
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--teal-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B8F8F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* --- Comparison Table ------------------------------------ */
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th, .comparison-table td {
  padding: 14px 20px; text-align: left;
  border-bottom: 1px solid var(--gray-200);
  font-size: .9rem;
}
.comparison-table th { font-weight: 600; color: var(--charcoal-dark); background: var(--off-white); }
.comparison-table td:first-child { font-weight: 500; color: var(--gray-700); }
.comparison-table .check { color: var(--teal); font-weight: 700; }

/* --- Forms ----------------------------------------------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--charcoal-dark); margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  font-size: .95rem;
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(91,143,143,.15);
}
.form-textarea { resize: vertical; min-height: 130px; }

/* --- FAQ Accordion --------------------------------------- */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  background: var(--white);
  font-size: .95rem; font-weight: 600; color: var(--charcoal-dark);
  cursor: pointer;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--off-white); }
.faq-question .arrow {
  flex-shrink: 0; width: 20px; height: 20px;
  transition: transform var(--transition);
}
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
}
.faq-answer__inner { padding: 0 22px 18px; font-size: .9rem; color: var(--gray-600); line-height: 1.7; }

/* --- Blog Card ------------------------------------------- */
.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.blog-card__image {
  height: 200px; background: var(--teal-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-muted); font-size: 3rem;
}
.blog-card__body { padding: 28px; }
.blog-card__tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--teal); background: var(--teal-bg);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 12px;
}
.blog-card__title { font-size: 1.1rem; margin-bottom: 8px; }
.blog-card__title a { color: var(--charcoal-dark); }
.blog-card__title a:hover { color: var(--teal); }
.blog-card__meta { font-size: .8rem; color: var(--gray-400); }

/* --- Job Card -------------------------------------------- */
.job-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: all var(--transition);
}
.job-card:hover { border-color: var(--teal-muted); box-shadow: var(--shadow); }
.job-card__info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.job-card__meta { font-size: .85rem; color: var(--gray-600); display: flex; gap: 20px; }
.job-card__meta span { display: flex; align-items: center; gap: 6px; }

/* --- Feature Row (alternating image + text) -------------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature-row--reverse .feature-row__visual { order: -1; }
.feature-row__visual {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.feature-row__visual svg { width: 80%; height: auto; opacity: .7; }
.feature-row__content .overline { margin-bottom: 12px; }
.feature-row__content h3 { font-size: 1.6rem; margin-bottom: 14px; }
.feature-row__content p { margin-bottom: 24px; color: var(--gray-600); }
.feature-row__content ul { margin-bottom: 28px; }
.feature-row__content li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .95rem; color: var(--gray-700); padding: 5px 0;
}
.feature-row__content li::before {
  content: ''; flex-shrink: 0; margin-top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
}

/* --- Footer ---------------------------------------------- */
.footer {
  background: var(--dark); color: var(--gray-400); padding: 72px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer__brand p { font-size: .9rem; margin-top: 16px; line-height: 1.7; max-width: 280px; }
.footer__brand img { height: 36px; filter: brightness(0) invert(1); opacity: .9; }
.footer h4 { color: var(--white); font-size: .9rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: .1em; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--gray-400); font-size: .9rem; }
.footer ul a:hover { color: var(--teal-light); }
.footer__social { display: flex; gap: 14px; margin-top: 20px; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--gray-600); display: flex;
  align-items: center; justify-content: center;
  color: var(--gray-400); font-size: .9rem;
  transition: all var(--transition);
}
.footer__social a:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.footer__bottom {
  margin-top: 56px; padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem;
}
.footer__bottom-links { display: flex; gap: 24px; }
.footer__bottom-links a { color: var(--gray-400); }
.footer__bottom-links a:hover { color: var(--teal-light); }

/* --- SVG Mountain Pattern (inline backgrounds) ----------- */
.mountain-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='none' stroke='%235B8F8F' stroke-width='1.5' d='M0 220 L120 140 L240 190 L360 100 L480 170 L600 80 L720 150 L840 60 L960 130 L1080 70 L1200 120 L1320 50 L1440 110' /%3E%3Cpath fill='none' stroke='%235B8F8F' stroke-width='1' d='M0 260 Q360 200 720 240 T1440 220' /%3E%3Cpath fill='none' stroke='%235B8F8F' stroke-width='.7' d='M0 280 Q360 250 720 270 T1440 260' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;
}

/* --- Badge / Tag ----------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: .78rem; font-weight: 600;
  background: var(--teal-bg); color: var(--teal);
}
.badge--dark { background: rgba(91,143,143,.12); color: var(--teal-light); }

/* --- Divider --------------------------------------------- */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 48px 0; }

/* --- Newsletter ------------------------------------------ */
.newsletter-form { display: flex; gap: 12px; max-width: 440px; }
.newsletter-form .form-input { flex: 1; }

/* --- Map placeholder ------------------------------------- */
.map-placeholder {
  width: 100%; height: 400px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: .9rem;
  border: 1px solid var(--gray-200);
}

/* --- Animations ------------------------------------------ */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive ------------------------------------------ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row--reverse .feature-row__visual { order: 0; }
}
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .hero { padding: 150px 0 80px; }
  .page-header { padding: 140px 0 60px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { gap: 32px; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100px; left: 0; right: 0;
    background: var(--white);
    padding: 24px; gap: 20px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
  }
  .nav__cta { margin-left: 0; }
  .cta-banner { padding: 48px 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer__bottom-links { justify-content: center; }
  .job-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .pricing-card { padding: 36px 28px; }
  .comparison-table { font-size: .82rem; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .newsletter-form { flex-direction: column; }
}
