/* ==========================================================================
   Emerging Investors Canada
   Palette is pulled from the logo: deep maroon, crimson, coral, warm off-white.
   ========================================================================== */

:root {
  --maroon:  #4A0F20;
  --ink:     #2B0812;
  --red:     #C00A2E;
  --coral:   #E8635C;
  --cream:   #FBF7F4;
  --sand:    #F3EAE5;
  --white:   #FFFFFF;
  --body:    #5C4A50;
  --line:    rgba(74, 15, 32, 0.12);

  --measure: 62ch;
  --radius:  14px;
  --gutter:  clamp(1.25rem, 5vw, 3rem);

  --font: "Poppins", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  color: var(--maroon);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 4.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--maroon); }

:focus-visible {
  outline: 2.5px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.center { text-align: center; margin-inline: auto; }
.measure { max-width: var(--measure); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 100;
  background: var(--maroon); color: var(--white);
  padding: 0.7rem 1.1rem; border-radius: 8px;
  text-decoration: none;
}

/* --- eyebrow ------------------------------------------------------------- */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid var(--red);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(43, 8, 18, 0.14);
}
.btn:hover {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(74, 15, 32, 0.18);
}

.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.875rem; }

.btn-ghost {
  background: transparent;
  color: var(--maroon);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--white);
  border-color: var(--maroon);
  color: var(--maroon);
}

.btn-light {
  background: var(--white);
  color: var(--maroon);
  border-color: var(--white);
  font-weight: 600;
}
.btn-light:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transform: none; transition: none; }
}

/* --- header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Opaque white on purpose: the logo PNGs have a white background, so any
     tinted or translucent bar leaves a visible box around them. */
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand img {
  width: auto;
  height: 30px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text strong {
  color: var(--maroon);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-text em {
  font-style: normal;
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.site-nav a {
  color: var(--maroon);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(232, 99, 92, 0.13), transparent 60%),
    radial-gradient(90% 70% at 92% 8%, rgba(192, 10, 46, 0.09), transparent 62%);
}

.hero-inner { max-width: 58rem; }

.hero h1 { margin-bottom: 1.25rem; }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  max-width: 52ch;
  color: var(--body);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-photo {
  margin: clamp(3rem, 7vw, 5rem) auto 0;
  width: 100%;
  max-width: 1140px;
  padding-inline: var(--gutter);
}
.hero-photo img {
  width: 100%;
  /* The source frame is 4:3 with a lot of empty ceiling — crop to a band and
     bias the focal point low so the group stays centred. */
  aspect-ratio: 16 / 8;
  object-fit: cover;
  object-position: 50% 68%;
  border-radius: var(--radius);
  box-shadow: 0 18px 50px -18px rgba(43, 8, 18, 0.4);
}
@media (max-width: 640px) {
  .hero-photo img { aspect-ratio: 4 / 3; object-position: 50% 60%; }
}
.hero-photo figcaption {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}

/* --- sections ------------------------------------------------------------ */

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-alt { background: var(--sand); }

/* Stop the sticky header from covering headings when an anchor link lands. */
.section, .join, .hero { scroll-margin-top: 5rem; }

/* --- cards --------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -16px rgba(43, 8, 18, 0.3);
}
.card-num {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.975rem; }

@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transform: none; transition: none; }
}

/* --- about split --------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

.pull {
  border-left: 3px solid var(--coral);
  padding-left: 1.5rem;
  position: sticky;
  top: 6rem;
}
.pull blockquote {
  margin: 0;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  font-weight: 600;
  color: var(--maroon);
  letter-spacing: -0.015em;
}
.pull-attr {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
@media (max-width: 820px) {
  .pull { position: static; }
}

/* --- eligibility criteria ------------------------------------------------ */

.criteria {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  max-width: 62rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem 2.5rem;
}
.criteria li {
  border-top: 2px solid var(--coral);
  padding-top: 1.15rem;
}
.criteria h3 {
  font-size: 1.075rem;
  margin-bottom: 0.4rem;
}
.criteria p {
  font-size: 0.95rem;
  margin: 0;
}

/* --- join band ----------------------------------------------------------- */

.join {
  background:
    linear-gradient(135deg, var(--maroon) 0%, #6B1226 55%, var(--red) 100%);
  color: rgba(255, 255, 255, 0.86);
  padding-block: clamp(4rem, 9vw, 6.5rem);
}
.join-inner { max-width: 46rem; }
.join .eyebrow { color: var(--coral); }
.join h2 { color: var(--white); }
.join .lede { color: rgba(255, 255, 255, 0.86); }
.join .btn-light { margin-top: 2rem; word-break: break-word; }
.join .fine {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
}

/* --- 404 page ------------------------------------------------------------ */

.notfound {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 3rem var(--gutter);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(232, 99, 92, 0.13), transparent 60%),
    radial-gradient(90% 70% at 92% 8%, rgba(192, 10, 46, 0.09), transparent 62%);
}
.notfound img {
  width: 132px;
  height: auto;
  margin-bottom: 1rem;
  /* The logo PNG has a white background; multiply melts it into the tinted
     gradient behind it. Safe here because .notfound sets no filter or opacity
     that would isolate the blend. */
  mix-blend-mode: multiply;
}
.notfound h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.75rem); }
.notfound .lede { max-width: 34ch; }
.notfound .cta-row { justify-content: center; }

/* --- footer -------------------------------------------------------------- */

.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-block: 3.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
.footer-logo { width: 124px; height: auto; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
}
.footer-nav a {
  color: var(--maroon);
  font-size: 0.925rem;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }

.footer-contact {
  font-size: 0.925rem;
  margin: -0.25rem 0 0;
}
.footer-contact a {
  color: var(--red);
  font-weight: 500;
  word-break: break-word;
}

.copyright {
  font-size: 0.8rem;
  color: var(--body);
  opacity: 0.75;
}

/* --- small screens ------------------------------------------------------- */

@media (max-width: 640px) {
  .header-inner { justify-content: center; }

  .site-nav {
    width: 100%;
    justify-content: center;
    gap: 1.35rem;
  }
  /* Keep the links on one line; the hero and the join band both carry the CTA,
     so the header button is redundant at this width. */
  .site-nav a { font-size: 0.825rem; white-space: nowrap; }
  .site-nav .btn { display: none; }

  .cta-row .btn { flex: 1 1 100%; text-align: center; }

  /* balance produces very ragged lines in a narrow column */
  h1, h2, h3 { text-wrap: pretty; }
}
