:root {
  --canada-red: #d42027;
  --canada-red-dark: #a81218;
  --navy: #10233f;
  --navy-soft: #183657;
  --ink: #172033;
  --muted: #65758b;
  --line: #d9e0ea;
  --light: #f4f6f9;
  --white: #ffffff;
  --teal: #0f766e;
  --gold: #b7791f;
  --shadow: 0 24px 70px rgba(16, 35, 63, .12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--canada-red);
  text-decoration: none;
}

a:hover {
  color: var(--canada-red-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 9999;
  padding: .75rem 1rem;
  color: var(--white);
  background: var(--navy);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid rgba(16, 35, 63, .08);
  transition: box-shadow .2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 14px 45px rgba(16, 35, 63, .08);
}

.topbar {
  padding: .48rem 0;
  color: rgba(255, 255, 255, .9);
  background: var(--navy);
  font-size: .9rem;
}

.topbar a,
.topbar span {
  color: rgba(255, 255, 255, .92);
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.navbar {
  padding: .9rem 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--navy);
}

.brand-logo-img {
  width: 58px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(16, 35, 63, .12));
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text strong {
  color: var(--navy);
  font-size: 1rem;
}

.brand-text small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-link {
  color: var(--navy);
  font-weight: 700;
  font-size: .91rem;
}

.nav-link.active,
.nav-link:hover {
  color: var(--canada-red);
}

.btn {
  border-radius: 8px;
  font-weight: 800;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.btn-primary-red {
  color: var(--white);
  background: var(--canada-red);
  border: 1px solid var(--canada-red);
  box-shadow: 0 14px 28px rgba(212, 32, 39, .22);
}

.btn-primary-red:hover {
  color: var(--white);
  background: var(--canada-red-dark);
  border-color: var(--canada-red-dark);
}

.btn-outline-navy {
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(16, 35, 63, .22);
}

.btn-outline-navy:hover {
  color: var(--white);
  background: var(--navy);
}

.hero {
  min-height: calc(100vh - 118px);
  display: flex;
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(9, 24, 48, .92) 0%, rgba(9, 24, 48, .76) 42%, rgba(9, 24, 48, .28) 78%),
    url("../images/hero-canada-professionals.webp") center / cover no-repeat;
}

.hero .container {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--canada-red);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffbdc0;
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.12;
  font-weight: 800;
}

.hero h1 {
  color: var(--white);
  max-width: 820px;
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 5vw, 5.25rem);
}

.hero p {
  max-width: 700px;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}

.trust-pill {
  padding: .55rem .8rem;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: .88rem;
  backdrop-filter: blur(8px);
}

.section {
  padding: 5.5rem 0;
}

.section-muted {
  background: var(--light);
}

.section-navy {
  color: var(--white);
  background: var(--navy);
}

.section-navy h2,
.section-navy h3 {
  color: var(--white);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.section-heading.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading p,
.lead-muted {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-navy .section-heading p,
.section-navy .lead-muted {
  color: rgba(255, 255, 255, .76);
}

.stats-grid,
.cards-grid,
.jobs-grid,
.values-grid,
.footer-grid,
.admin-grid {
  display: grid;
  gap: 1.25rem;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.service-card,
.value-card,
.job-card,
.info-card,
.form-shell,
.testimonial-card,
.legal-card {
  background: var(--white);
  border: 1px solid rgba(16, 35, 63, .09);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(16, 35, 63, .07);
}

.stat-card {
  padding: 1.5rem;
}

.stat-number {
  color: var(--canada-red);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
}

.stat-card p {
  margin: .6rem 0 0;
  color: var(--muted);
  font-weight: 700;
}

.cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.value-card,
.info-card {
  padding: 1.4rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.service-card:hover,
.value-card:hover,
.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.icon-box {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  place-items: center;
  color: var(--canada-red);
  background: #fff0f1;
  border-radius: 8px;
  font-size: 1.35rem;
}

.service-card h3,
.value-card h3,
.job-card h3 {
  margin-bottom: .65rem;
  font-size: 1.08rem;
}

.service-card p,
.value-card p,
.job-card p,
.info-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 2.5rem;
  align-items: center;
}

.panel-dark {
  padding: 2rem;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-dark h2,
.panel-dark h3 {
  color: var(--white);
}

.panel-dark .contact-list a,
.panel-dark .contact-list span {
  color: rgba(255, 255, 255, .86);
}

.panel-dark .contact-list i {
  color: #ffbdc0;
}

.check-list {
  display: grid;
  gap: .85rem;
  padding: 0;
  margin: 1.4rem 0 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.check-list i {
  color: var(--teal);
  font-size: 1.2rem;
}

.page-intro {
  padding: 5rem 0 3.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(16, 35, 63, .07);
}

.page-intro .container {
  max-width: 920px;
}

.page-intro h1 {
  max-width: 850px;
  font-size: clamp(2.15rem, 4vw, 4rem);
}

.page-intro p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.1rem;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  padding-left: 3.25rem;
}

.timeline-dot {
  position: absolute;
  top: .2rem;
  left: .55rem;
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  background: var(--canada-red);
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(212, 32, 39, .25);
}

.timeline-card {
  padding: 1.2rem 1.3rem;
  background: var(--white);
  border: 1px solid rgba(16, 35, 63, .09);
  border-radius: var(--radius);
}

.timeline-year {
  color: var(--canada-red);
  font-weight: 800;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-item {
  padding: 1.15rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-item span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-item strong {
  display: block;
  margin-top: .3rem;
  color: var(--navy);
}

.filter-bar {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--white);
  border: 1px solid rgba(16, 35, 63, .09);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(16, 35, 63, .06);
}

.jobs-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
}

.job-card[hidden] {
  display: none;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .85rem 0;
}

.badge-soft {
  padding: .3rem .55rem;
  color: var(--navy);
  background: #eef3f8;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.job-card .btn {
  margin-top: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.step-card {
  position: relative;
  min-height: 210px;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid rgba(16, 35, 63, .09);
  border-radius: var(--radius);
}

.step-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  background: var(--canada-red);
  border-radius: 8px;
  font-weight: 800;
}

.faq-accordion .accordion-item {
  margin-bottom: .8rem;
  border: 1px solid rgba(16, 35, 63, .1);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-accordion .accordion-button {
  color: var(--navy);
  font-weight: 800;
}

.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--canada-red);
  background: #fff5f5;
}

.testimonial-card {
  max-width: 900px;
  min-height: 350px;
  padding: 2rem;
  margin: 0 auto;
}

.testimonial-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--white);
  background: var(--navy);
  border-radius: 50%;
  font-weight: 800;
}

.stars {
  color: var(--gold);
  font-size: 1.05rem;
}

.form-shell {
  padding: 1.5rem;
}

.form-label {
  color: var(--navy);
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 48px;
  border-color: #cfd8e3;
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--canada-red);
  box-shadow: 0 0 0 .2rem rgba(212, 32, 39, .14);
}

.form-help {
  color: var(--muted);
  font-size: .88rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-progress {
  margin-top: 1rem;
}

.progress {
  height: 12px;
  border-radius: 999px;
}

.progress-bar {
  background: var(--canada-red);
}

.map-frame {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.confirmation-section {
  display: grid;
  min-height: 62vh;
  place-items: center;
  padding: 5rem 0;
  background: var(--light);
}

.confirmation-card {
  max-width: 760px;
  padding: 2.5rem;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(16, 35, 63, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.confirmation-icon {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 1.2rem;
  place-items: center;
  border-radius: 50%;
  font-size: 2rem;
}

.confirmation-icon.success {
  color: var(--teal);
  background: #e9fbf7;
}

.confirmation-icon.error {
  color: var(--canada-red);
  background: #fff0f1;
}

.legal-card {
  padding: 1.6rem;
}

.site-footer {
  padding: 4rem 0 1.5rem;
  color: rgba(255, 255, 255, .76);
  background: #0b1b31;
}

.site-footer .brand-text strong,
.site-footer h2 {
  color: var(--white);
}

.site-footer .brand-text small,
.site-footer .footer-note {
  color: rgba(255, 255, 255, .62);
}

.footer-grid {
  grid-template-columns: 1.35fr .9fr 1fr .9fr;
}

.site-footer h2 {
  margin-bottom: 1rem;
  font-size: .98rem;
}

.footer-links,
.contact-list {
  display: grid;
  gap: .55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links a,
.contact-list a {
  color: rgba(255, 255, 255, .78);
}

.footer-links a:hover,
.contact-list a:hover {
  color: var(--white);
}

.contact-list li {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}

.contact-list i {
  color: #ffbdc0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9rem;
}

@media (max-width: 1199px) {
  .navbar-nav {
    padding-top: 1rem;
    align-items: flex-start !important;
  }

  .cards-grid,
  .stats-grid,
  .jobs-grid,
  .steps,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .hero {
    min-height: 720px;
    background:
      linear-gradient(180deg, rgba(9, 24, 48, .94) 0%, rgba(9, 24, 48, .78) 58%, rgba(9, 24, 48, .46) 100%),
      url("../images/hero-canada-professionals.webp") center / cover no-repeat;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 4rem 0;
  }

  .hero .container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cards-grid,
  .stats-grid,
  .jobs-grid,
  .steps,
  .footer-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo-img {
    width: 48px;
    height: 44px;
  }

  .brand-text strong {
    font-size: .94rem;
  }

  .brand-text small {
    font-size: .7rem;
  }

  .topbar {
    font-size: .82rem;
  }

  .confirmation-card,
  .form-shell,
  .testimonial-card {
    padding: 1.25rem;
  }
}
