/* Tokens, type, buttons and the persistent chrome. Page sections live in home.css. */
:root {
  --paper: #fff;
  --mist: oklch(0.962 0.008 245);
  --mist-2: oklch(0.925 0.012 245);
  --ink: oklch(0.21 0.012 255);
  --ink-2: oklch(0.46 0.012 255);
  --line: oklch(0.895 0.007 250);
  --accent: oklch(0.5 0.165 258);
  --accent-press: oklch(0.43 0.15 258);

  --f-display: "Young Serif", Georgia, "Times New Roman", serif;
  --f-text: "IBM Plex Sans", system-ui, "Segoe UI", Arial, sans-serif;

  --house: cubic-bezier(0.19, 1, 0.22, 1);   /* content arriving */
  --ui: cubic-bezier(0.23, 1, 0.32, 1);      /* interface responding */

  --t-xl: clamp(36px, 5.2vw, 78px);
  --t-l: clamp(30px, 4.2vw, 62px);
  --t-m: clamp(25px, 2.9vw, 42px);
  --t-s: clamp(21px, 2.1vw, 30px);
  --t-xs: clamp(18px, 1.6vw, 22px);

  --top-h: 68px;
  --gut: clamp(16px, 4.4vw, 72px);
  --r-l: clamp(22px, 2.8vw, 40px);
  --r-m: 20px;

  --z-stage: 1;
  --z-sticky: 20;
  --z-float: 30;
  --z-toast: 40;
}
@media (min-width: 1100px) { :root { --top-h: 76px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--f-text); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--f-display); font-weight: 400; text-wrap: balance; }
h1 { font-size: var(--t-xl); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: var(--t-l); line-height: 1.06; letter-spacing: -0.025em; }
h3 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-s); line-height: 1.16; letter-spacing: -0.012em; }
p { text-wrap: pretty; }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-block-start: -60px; inset-inline-start: 12px; z-index: var(--z-toast); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { inset-block-start: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: 0; }
::selection { background: oklch(0.86 0.06 258); }

.brandline { font-size: 16px; font-weight: 500; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: 999px; font: 500 16px/1 var(--f-text); text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ui), box-shadow 160ms var(--ui), transform 160ms var(--ui);
}
@media (max-width: 420px) { .btn { padding: 0 18px; } }
@media (max-width: 340px) { .btn { padding: 0 16px; } }
.btn--p { background: var(--accent); color: #fff; }
.btn--g { box-shadow: inset 0 0 0 1px oklch(0.21 0.012 255 / 0.28); color: var(--ink); background: var(--paper); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) {
  .btn--p:hover { background: var(--accent-press); }
  .btn--g:hover { box-shadow: inset 0 0 0 1px var(--ink); }
}

.link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-block-end: 2px;
}
.link::after { content: "→"; transition: translate 200ms var(--ui); }
@media (hover: hover) { a:hover > .link::after, .link:hover::after { translate: 4px 0; } }

/* Notice line */
.notice { position: relative; height: 36px; background: var(--mist); font-size: 14px; font-weight: 500; overflow: hidden; }
.notice__line {
  position: absolute; inset: 0; padding-inline: 12px; line-height: 36px; text-align: center;
  opacity: 0; translate: 0 8px; visibility: hidden; transition: opacity 420ms var(--ui), translate 420ms var(--ui), visibility 420ms;
  white-space: nowrap;
}
.notice__line.is-on { opacity: 1; translate: 0 0; visibility: visible; }

/* Header: one quiet line. The hero owns the top of the page. */
.top {
  position: sticky; inset-block-start: 0; z-index: var(--z-sticky); height: var(--top-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding-inline: var(--gut); background: var(--paper);
  transition: box-shadow 200ms var(--ui);
}
.top.is-stuck { box-shadow: 0 1px 0 var(--line); }
.top__logo, .drawer__logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 400 19px/1 var(--f-display); letter-spacing: -0.015em; white-space: nowrap; }
.top__logo { justify-self: center; }
.logo-mark { width: 32px; height: 13px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.4; }
.top__tools { justify-self: end; display: flex; align-items: center; gap: 2px; }
.top__btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.top__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .top__btn:hover, .top__lang:hover { background: var(--mist); } }
/* French sits in plain words at the top of every page: never behind an icon. */
.top__lang { display: grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 8px; border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none; }
.top__lang-long { display: none; }
.top__nav { display: none; }
@media (max-width: 359px) { .top__logo { font-size: 15px !important; } .top__btn { width: 34px !important; } .top__lang { min-width: 30px !important; padding-inline: 2px !important; } .notice { font-size: 13px; } }
@media (max-width: 459px) { .top { gap: 2px; grid-template-columns: auto minmax(0, 1fr) auto; } .top__logo { justify-self: start; font-size: 17px; } .top__logo .logo-mark { display: none; } .top__btn[aria-label] svg { width: 22px; height: 22px; } .top__btn { width: 40px; } .top__lang { min-width: 38px; padding-inline: 4px; } }
@media (min-width: 1100px) {
  .top { grid-template-columns: auto 1fr auto; }
  .top__burger { display: none; }
  .top__logo { justify-self: start; }
  .top__lang-long { display: inline; }
  .top__lang-short { display: none; }
  .top__nav { display: block; justify-self: center; }
  .top__nav > ul { display: flex; gap: clamp(12px, 1.5vw, 26px); font-size: 15px; font-weight: 500; }
  .top__nav a { text-decoration: none; display: block; padding-block: 8px; white-space: nowrap; }
  .top__nav > ul > li { position: relative; }
  .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 7px; border-block-end: 1.5px solid; border-inline-end: 1.5px solid; rotate: 45deg; translate: 0 -2px; }
  .sub {
    position: absolute; inset-block-start: 100%; inset-inline-start: -16px; min-width: 200px; padding: 10px 16px;
    background: var(--paper); border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px oklch(0.21 0.012 255 / 0.1);
    opacity: 0; visibility: hidden; translate: 0 6px; transition: opacity 160ms var(--ui), translate 160ms var(--ui), visibility 160ms;
  }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; translate: 0 0; }
}
/* The menu is at its widest here, and French is longer: the logo keeps its size, the words give way. */
@media (min-width: 1100px) and (max-width: 1319px) { .top__nav > ul { gap: 10px; font-size: 14px; } .top { gap: 8px; } .top__logo { font-size: 17px; } .top__logo .logo-mark { display: none; } }
html[lang="fr-CA"] .top__nav > ul { gap: clamp(8px, 1vw, 18px); font-size: 14px; }
@media (min-width: 1100px) and (max-width: 1379px) { html[lang="fr-CA"] .top__nav > ul { gap: 7px; font-size: 13.5px; } }
@media (min-width: 1100px) and (max-width: 1249px) { html[lang="fr-CA"] .top__nav > ul > li:nth-child(7) { display: none; } }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0 auto 0 0; margin: 0; width: min(88vw, 400px); max-width: none; height: 100dvh; max-height: none;
  border: 0; padding: 12px var(--gut) 32px; background: var(--paper); color: var(--ink); overflow-y: auto;
}
html:has(.drawer[open]) { overflow: hidden; }
.drawer::backdrop { background: oklch(0.21 0.012 255 / 0.28); }
.drawer[open] { animation: drawer-in 280ms var(--ui); }
@keyframes drawer-in { from { translate: -100% 0; } to { translate: 0 0; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-block-end: 8px; }
.drawer__list > li { border-block-end: 1px solid var(--line); }
.drawer__list a, .drawer__list summary { display: block; padding-block: 13px; text-decoration: none; font-size: 18px; font-weight: 500; cursor: pointer; }
.drawer__list details ul { padding-inline-start: 16px; padding-block-end: 8px; }
.drawer__list details a { font-size: 16px; font-weight: 400; padding-block: 8px; }
.drawer__lang { display: flex; flex-wrap: wrap; gap: 6px; padding-block-start: 16px; }

/* Footer */
.foot { background: var(--mist); padding: clamp(48px, 7vw, 96px) var(--gut) 0; border-radius: var(--r-l) var(--r-l) 0 0; overflow: hidden; margin-block-start: clamp(14px, 1.4vw, 20px); }
.foot__grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .foot__grid { grid-template-columns: 6fr 3fr 3fr; } }
.foot h2 { font-size: var(--t-l); margin-block-end: 18px; }
.foot h3 { font-size: var(--t-xs); margin-block-end: 10px; }
.foot li { padding-block: 4px; }
.foot nav a, .foot__contact a { text-decoration: none; }
.foot__contact a { overflow-wrap: anywhere; }
.foot__still { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
@media (hover: hover) { .foot a:hover, .foot__still:hover { text-decoration: underline; text-underline-offset: 3px; } }
.foot__legal { font-size: 14px; color: var(--ink-2); text-align: center; margin-block-start: clamp(36px, 5vw, 60px); }
/* The page ends inside the name: the edge cuts the letters in half, and real frames stand on them. */
.foot__wm { position: relative; margin: clamp(120px, 15vw, 240px) calc(var(--gut) * -1) 0; }
.foot__word { font: 400 10.4vw/1 var(--f-display); letter-spacing: -0.04em; text-align: center; white-space: nowrap; margin-block-end: -0.42em; color: var(--ink); user-select: none; }
.foot__hops { position: absolute; inset-inline: clamp(8px, 2vw, 32px); inset-block-start: 0; display: grid; grid-template-columns: repeat(7, 1fr); justify-items: center; align-items: end; transform: translateY(calc(-100% + 1.4vw)); pointer-events: none; }
.foot__hops img { width: 88%; height: auto; transform: rotate(var(--r, 0deg)); pointer-events: auto; cursor: pointer; touch-action: manipulation; user-select: none; }
@media (max-width: 699px) {
  .foot__word { font-size: 17vw; line-height: 0.92; }
  .foot__word span { display: block; }
  .foot__word { margin-block-end: -0.42em; }
  .foot__hops { grid-template-columns: repeat(4, 1fr); transform: translateY(calc(-100% + 4vw)); }
  .foot__hops img:nth-child(n + 5) { display: none; }
}

.toast { position: fixed; inset-block-end: 24px; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: calc(100vw - 32px); z-index: var(--z-toast); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 15px; pointer-events: none; }
.toast[hidden] { display: none; }

/* A mist panel that slides over the white page, so the ground change is a shape and not a fade. */
.sheet { background: var(--mist); border-radius: var(--r-l); margin-inline: clamp(0px, 1.2vw, 18px); }
.spin { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.ln { display: block; overflow: hidden; padding-block-end: 0.14em; margin-block-end: -0.14em; }
.ln > span { display: block; }
.motion .ln > span { animation: rise 1000ms var(--house) both; }
.motion .ln + .ln > span { animation-delay: 70ms; }
@keyframes rise { from { transform: translateY(108%); } }
.pcard { display: block; text-decoration: none; min-width: 0; }
.pcard figure { position: relative; aspect-ratio: 3 / 2; background: var(--mist); border-radius: 16px; overflow: hidden; margin-block-end: 10px; }
.pcard figure img { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; mix-blend-mode: multiply; transition: opacity 240ms var(--ui); }
.pcard figure img + img { opacity: 0; }
@media (hover: hover) { .pcard:hover figure img:first-child { opacity: 0; } .pcard:hover figure img + img { opacity: 1; } }
.pcard h3 { font: 500 15px/1.4 var(--f-text); letter-spacing: 0; overflow-wrap: anywhere; }
.pcard p { font-weight: 600; font-size: 15px; margin-block-start: 2px; }
/* Word masks for headings, added by film.js */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-block: 0.08em 0.16em; margin-block: -0.08em -0.16em; }
.w > span { display: inline-block; }
/* If the motion layer never starts, nothing may stay hidden. */
.reveal-all [data-r], .reveal-all [data-r] > *, .reveal-all .w > span { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }

.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--mist);
  font: 500 15px/1.2 var(--f-text); text-decoration: none; white-space: nowrap;
}
@media (hover: hover) { .chip:hover { background: var(--mist-2); } }

/* Questions that open in place */
.qa details { border-block-start: 1px solid var(--line); }
.qa details:last-of-type { border-block-end: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-block: 15px; font-weight: 500; font-size: 18px; color: var(--ink); cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font: 400 26px/1 var(--f-text); transition: rotate 200ms var(--ui); flex: none; }
.qa details[open] summary::after { rotate: 45deg; }
.qa details p { color: var(--ink-2); padding-block-end: 16px; max-width: 62ch; }

/* Tabs */
.tabs__bar { display: flex; gap: 6px; overflow-x: auto; padding-block: 4px 14px; scrollbar-width: none; }
.tabs__bar button { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--mist); font-weight: 500; font-size: 15px; transition: background-color 160ms var(--ui), color 160ms var(--ui); }
.tabs__bar button[aria-selected="true"] { background: var(--ink); color: #fff; }
.calm .tabs__panel:not(.is-on), .motion .tabs__panel:not(.is-on) { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .notice__line { transition: none; }
  .drawer[open] { animation: none; }
}
.calm .notice__line { transition: none; }
.calm .drawer[open] { animation: none; }
