/* ==========================================================================
   About page (/about, /fr/a-propos)
   Loaded only on this page, AFTER /css/style.css (shared styles, colours,
   motion system, page hero, photo band). Rules used on more than one page
   belong in style.css.
   Motion hooks only act under .js-motion (public/js/main.js): without
   JavaScript or with reduced motion everything shows its final state, and the
   timeline is a plain vertical list.
   ========================================================================== */

/* ---- 1. Hero + scroll cue ------------------------------------------------ */
.page-hero--about { min-height: min(78vh, 640px); padding-bottom: 6rem; }
.page-hero--about h1 { max-width: 20ch; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: var(--off-white); font-weight: 600; text-decoration: none;
}
.scroll-cue:hover { color: var(--ember); }
.scroll-cue-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(250, 247, 242, 0.55);
}
.scroll-cue-icon .icon { transform: rotate(90deg); }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.js-motion .scroll-cue-icon { animation: cue-bob 2.2s ease-in-out 1.2s infinite; }

/* ---- 2. At a glance (overlaps the hero) ---------------------------------- */
.glance { position: relative; z-index: 1; margin-top: -3.75rem; }
.glance-stats {
  list-style: none; margin: 0; padding: 0.5rem;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift);
}
.glance-stat { padding: 1.1rem 1rem; text-align: center; }
.glance-value {
  margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(2.1rem, 6vw, 2.9rem); color: var(--ember-text); font-variant-numeric: tabular-nums;
}
.glance-label { margin: 0.45rem 0 0; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
@media (min-width: 900px) {
  .glance-stats { grid-template-columns: repeat(4, 1fr); padding: 0.75rem 0; }
  .glance-stat + .glance-stat { border-left: 1px solid var(--line); }
  .glance-stat { padding: 1.4rem 1.25rem; }
}

/* ---- 3. Our story: text + sticky image stack ------------------------------ */
.story-grid { display: grid; gap: 2rem; }
.story-para { font-size: 1.08rem; }
.story-inline { margin: 1.5rem 0 1.75rem; border-radius: var(--radius-lg); overflow: hidden; }
.story-media { display: none; }
.pull-quote {
  position: relative; margin: 2.25rem 0 0; padding: 1.25rem 0 1.25rem 1.6rem;
  border-left: 4px solid var(--ember);
}
.pull-quote::before {
  content: "\201C"; position: absolute; left: 1.1rem; top: -1.4rem;
  font-family: var(--font-display); font-size: 5rem; line-height: 1; color: rgba(232, 116, 42, 0.25);
}
.pull-quote p {
  position: relative; margin: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 500; line-height: 1.35;
  font-size: clamp(1.3rem, 2.6vw, 1.65rem); color: var(--charcoal);
}
@media (min-width: 900px) {
  .story-grid { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; align-items: start; }
  .story-inline { display: none; }
  .story-media { display: block; height: 100%; }
  /* Without JavaScript: the photos simply stand in a column */
  .story-stack { display: grid; gap: 1rem; }
  .story-stack-item .photo { border-radius: var(--radius-lg); }
  /* With JavaScript (main.js adds .is-enhanced): one photo at a time, cross-fading */
  .story-stack.is-enhanced { position: sticky; top: calc(var(--header-h, 72px) + 2rem); gap: 0; }
  .story-stack.is-enhanced .story-stack-item {
    grid-area: 1 / 1; opacity: 0; transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s var(--ease-out);
  }
  .story-stack.is-enhanced .story-stack-item.is-active { opacity: 1; transform: none; }
  .story-para { transition: color 0.4s ease; }
  .story-text.is-following .story-para:not(.is-current) { color: var(--muted); }
}

/* ---- 4. Timeline ---------------------------------------------------------- */
.timeline-section .section-head { max-width: none; }
.timeline-section .lead { margin-bottom: 0; }
.tl-track { list-style: none; margin: 0; padding: 0 0 0 2.6rem; position: relative; display: grid; gap: 2rem; }
/* Vertical line (phones, and without JavaScript): draws in on scroll */
.tl-track::before {
  content: ""; position: absolute; left: 11px; top: 0.6rem; bottom: 0.6rem; width: 2px;
  background: linear-gradient(180deg, var(--ember), rgba(232, 116, 42, 0.25));
  transform-origin: top; transition: transform 1.8s var(--ease-out);
}
.js-motion .tl[data-reveal-line]:not(.is-revealed) .tl-track::before { transform: scaleY(0); }
.tl-item { position: relative; }
.tl-dot {
  position: absolute; left: calc(-2.6rem + 4px); top: 0.55rem; width: 16px; height: 16px; border-radius: 50%;
  background: var(--charcoal); border: 3px solid var(--ember);
}
.tl-item--today .tl-dot { background: var(--ember); box-shadow: 0 0 0 5px rgba(232, 116, 42, 0.25); }
.tl-year { margin: 0 0 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; color: var(--ember); }
.tl-card {
  overflow: hidden; border-radius: var(--radius-lg);
  background: rgba(250, 247, 242, 0.05); border: 1px solid var(--line-light);
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease;
}
.tl-card .photo { border-radius: 0; }
.tl-item:hover .tl-card { border-color: rgba(232, 116, 42, 0.55); }
.tl-item:hover .photo--zoom img { transform: scale(1.04); }
.tl-item--today .tl-card { border-color: rgba(232, 116, 42, 0.55); }
.tl-body { padding: 1.1rem 1.25rem 1.3rem; }
.tl-body h3 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.tl-body p { margin: 0; }
.tl-progress { display: none; }
.tl-controls { display: none; gap: 0.5rem; }
.tl-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line-light); background: transparent; color: var(--off-white); cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.tl-btn:hover:not(:disabled) { background: var(--ember); border-color: var(--ember); color: var(--charcoal); }
.tl-btn:focus-visible, .tl-track:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }
.tl-btn:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 480px) {
  .tl-track { padding-left: 2.1rem; }
  .tl-dot { left: calc(-2.1rem + 4px); }
}
/* Desktop + JavaScript: horizontal, scroll-snapped cards with a progress line */
@media (min-width: 900px) {
  .tl.is-enhanced .tl-controls, .tl-controls.is-enhanced { display: flex; }
  .tl.is-enhanced .tl-progress {
    display: block; position: relative; height: 3px; margin: 0 0 1.75rem;
    border-radius: 3px; background: var(--line-light); overflow: hidden;
  }
  .tl-progress-fill {
    position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--tl-progress, 0));
    background: linear-gradient(90deg, var(--ember), #f3a46b); transition: transform 0.25s linear;
  }
  .tl.is-enhanced .tl-track {
    display: flex; gap: 1.5rem; padding: 0 0 1.25rem; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
    scrollbar-width: thin; scrollbar-color: rgba(250, 247, 242, 0.25) transparent;
  }
  .tl.is-enhanced .tl-track::before { display: none; }
  .tl.is-enhanced .tl-item { flex: 0 0 min(360px, 42%); scroll-snap-align: start; }
  .tl.is-enhanced .tl-dot { display: none; }
  .tl.is-enhanced .tl-item:hover .tl-card { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .tl.is-enhanced .tl-track { scroll-behavior: auto; }
  .tl.is-enhanced .tl-item:hover .tl-card { transform: none; }
}

/* ---- 5. Values ------------------------------------------------------------ */
.value-card { transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease; }
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: rgba(232, 116, 42, 0.4); }
.value-card .feature-icon { transition: background-color 0.3s ease, color 0.3s ease; }
.value-card:hover .feature-icon { background: var(--ember); color: var(--charcoal); }
@media (prefers-reduced-motion: reduce) {
  .value-card:hover { transform: none; }
}

/* ---- 6. How we work with you --------------------------------------------- */
.how-split { align-items: start; }
.how-steps { list-style: none; margin: 0.5rem 0 1.75rem; padding: 0; display: grid; gap: 1rem; counter-reset: none; }
.how-step { display: flex; gap: 1rem; align-items: flex-start; }
.how-num {
  flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--charcoal); color: var(--ember); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
}
.how-step h3 { margin: 0.35rem 0 0.25rem; font-size: 1.1rem; }
.how-step p { margin: 0; color: var(--charcoal-80, var(--muted)); }
@media (min-width: 900px) {
  .how-split > .image-reveal { position: sticky; top: calc(var(--header-h, 72px) + 2rem); }
}

/* ---- 7. Team + testimonials (shown once company.json has entries) ---------- */
.team-grid, .testimonial-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.team-card .photo { border-radius: 0; }
.team-body { padding: 1rem 1.2rem 1.2rem; }
.team-body h3 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.team-role { margin: 0; color: var(--ember-text); font-weight: 600; }
.team-langs { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--muted); }
.team-photo { margin-top: 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.testimonial-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; border-top: 4px solid var(--ember); }
.testimonial-card blockquote { margin: 0 0 1rem; }
.testimonial-card blockquote p { margin: 0; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.45; }
.testimonial-who { margin: 0; font-size: 0.92rem; color: var(--muted); }
@media (min-width: 600px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .team-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- 8. Canadian roots band ------------------------------------------------ */
.photo-band--roots { min-height: clamp(340px, 50vw, 580px); }
.photo-band--roots .photo-band-line { max-width: 22ch; }
