/* =========================================================================
   GP Canada Finance — Stylesheet
   Design system: Canadian-inspired palette (navy, maple, gold, forest, cream)
   Headings: Fraunces (serif) / Body: Inter (sans)
   ========================================================================= */

:root {
  /* Colour palette */
  --navy: #122040;
  --navy-light: #1c3160;
  --navy-dark: #0b1730;
  --maple: #9c2b3a;
  --maple-light: #b8404f;
  --gold: #c79a3d;
  --gold-light: #e0bd6c;
  --forest: #2e4636;
  --forest-light: #3f5d49;
  --cream: #faf6ee;
  --cream-dark: #f2ead9;
  --white: #ffffff;
  --charcoal: #201f1d;
  --gray-700: #4a4844;
  --gray-500: #7a776f;
  --gray-300: #d9d3c4;
  --gray-100: #efe9db;

  /* Typography */
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing / layout */
  --container-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(18, 32, 64, 0.08);
  --shadow-md: 0 8px 24px rgba(18, 32, 64, 0.10);
  --shadow-lg: 0 20px 48px rgba(18, 32, 64, 0.16);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.4vw + 1rem, 2.4rem); font-weight: 500; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
.mini-heading { font-size: 1.05rem; }

p { color: var(--gray-700); }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

section { padding-block: clamp(3.5rem, 6vw, 6rem); }

.section-heading {
  max-width: 720px;
  margin-bottom: 2.75rem;
}
.section-heading.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maple);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.lede {
  font-size: 1.1rem;
  color: var(--gray-700);
  margin-top: 0.9rem;
}

.bg-white { background: var(--white); }
.bg-cream { background: var(--cream-dark); }
.bg-navy { background: var(--navy); color: var(--gray-100); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy p { color: var(--gray-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

.btn-primary {
  background: var(--maple);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--maple-light); box-shadow: var(--shadow-md); }

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-gold:hover { background: var(--gold-light); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); }

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

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(18, 32, 64, 0.08);
  border-color: var(--gray-300);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy);
  font-weight: 600;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px var(--gold);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maple);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
  position: relative;
  padding-block: 0.3rem;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--maple);
  transition: width var(--transition);
}
.nav-links a:not(.btn):hover::after,
.nav-links a.is-active::after { width: 100%; }
.nav-links a.is-active { color: var(--maple); }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 7rem);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.hero-leaf {
  position: absolute;
  top: -60px;
  right: -80px;
  width: min(560px, 60vw);
  opacity: 0.07;
  color: var(--forest);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy p.lede { max-width: 540px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-300);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}
.trust-item svg { width: 20px; height: 20px; color: var(--maple); flex-shrink: 0; }

.hero-panel {
  position: relative;
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(140deg, var(--gold) 0%, transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-panel h2 { color: var(--gold-light); font-size: 1.15rem; margin-bottom: 1.2rem; }
.hero-stats { display: grid; gap: 1.4rem; }
.hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--white);
}
.hero-stat span { font-size: 0.85rem; color: var(--gray-300); }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 1.75rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--cream-dark);
  color: var(--maple);
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: 0.6rem; font-size: 1.15rem; }
.card p { font-size: 0.95rem; }
.card a.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  transition: gap var(--transition), color var(--transition);
}
.card a.card-link:hover { gap: 0.65rem; color: var(--maple); }

/* Service group tag colours */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.tag-navy { background: rgba(18, 32, 64, 0.08); color: var(--navy); }
.tag-maple { background: rgba(156, 43, 58, 0.1); color: var(--maple); }
.tag-forest { background: rgba(46, 70, 54, 0.1); color: var(--forest); }
.tag-gold { background: rgba(199, 154, 61, 0.16); color: #8a6a26; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.5rem; }
.cta-banner p { color: var(--gray-300); max-width: 46ch; }
.cta-banner .hero-leaf { color: var(--gold); opacity: 0.1; }

/* ---------- Values / About ---------- */
.value-card {
  text-align: left;
}
.value-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--navy) 0%, var(--forest) 100%);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  display: block;
}

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}
.split.reverse .about-photo { order: 2; }

.credential-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.credential-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}
.credential-list svg { width: 20px; height: 20px; color: var(--forest); flex-shrink: 0; margin-top: 2px; }
.credential-list strong { display: block; color: var(--navy); font-size: 0.95rem; }
.credential-list span { font-size: 0.87rem; color: var(--gray-700); }

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}
.breadcrumb a:hover { color: var(--maple); }

/* ---------- Services page groups ---------- */
.service-group { padding-block: 3rem; border-top: 1px solid var(--gray-300); }
.service-group:first-of-type { border-top: none; }
.service-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.service-group-head p { max-width: 55ch; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.form-card, .info-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}

.form-row { display: grid; gap: 1.35rem; }
.form-row.two-col { grid-template-columns: 1fr 1fr; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.45rem;
}
.field .required { color: var(--maple); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 32, 64, 0.12);
}
.field textarea { resize: vertical; min-height: 130px; }

.field-hint { font-size: 0.78rem; color: var(--gray-500); margin-top: 0.35rem; }

.form-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.success { background: rgba(46, 70, 54, 0.12); color: var(--forest); }
.form-status.error { background: rgba(156, 43, 58, 0.12); color: var(--maple); }

.info-list { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.info-list li { display: flex; gap: 1rem; }
.info-list .card-icon { width: 42px; height: 42px; margin-bottom: 0; flex-shrink: 0; }
.info-list strong { display: block; color: var(--navy); font-size: 0.95rem; margin-bottom: 0.2rem; }
.info-list span, .info-list a { font-size: 0.9rem; color: var(--gray-700); }
.info-list a:hover { color: var(--maple); }

.hours-table { width: 100%; margin-top: 0.5rem; font-size: 0.9rem; }
.hours-table tr { border-bottom: 1px dashed var(--gray-300); }
.hours-table td { padding: 0.5rem 0; }
.hours-table td:last-child { text-align: right; color: var(--navy); font-weight: 600; }

.map-wrap {
  margin-top: 1.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-300);
  aspect-ratio: 16 / 10;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: var(--gray-300);
  padding-block: 3.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
}
.footer-brand p { color: var(--gray-300); font-size: 0.9rem; margin-top: 1rem; max-width: 32ch; }
.footer-col h3 { color: var(--white); font-size: 0.95rem; margin-bottom: 1.1rem; }
.footer-col ul { display: grid; gap: 0.65rem; }
.footer-col a { font-size: 0.9rem; color: var(--gray-300); transition: color var(--transition); }
.footer-col a:hover { color: var(--gold-light); }

.social-row { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.social-row a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  transition: background var(--transition), border-color var(--transition);
}
.social-row a:hover { background: var(--maple); border-color: var(--maple); }
.social-row svg { width: 17px; height: 17px; }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--gray-300);
}
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.reveal-group .reveal:nth-child(2) { transition-delay: 90ms; }
.reveal-group .reveal:nth-child(3) { transition-delay: 180ms; }
.reveal-group .reveal:nth-child(4) { transition-delay: 270ms; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { max-width: 480px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split .about-photo { max-width: 380px; margin-inline: auto; }
  .split.reverse .about-photo { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--transition), visibility 0s linear 220ms;
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--transition), visibility 0s linear 0s;
  }
  .nav-links a:not(.btn) { font-size: 1.1rem; }
  .nav-toggle { display: block; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .service-group-head { flex-direction: column; }
}
