@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
/* KasaWeb — KASA Immigration Services brand (burgundy #6C191D / red #F43131 from the original site). */
:root {
  --burgundy: #6c191d;
  --burgundy-deep: #3f0d12;
  --red: #c42424;            /* the original #F43131, darkened to pass WCAG AA on white for text and buttons */
  --champagne: #fbf6ef;
  --blush: #f8eceb;
  --ink: #1d1a1a;
  --muted: #5b5352;
  --line: #e7dcda;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(63, 13, 18, .06), 0 12px 32px rgba(63, 13, 18, .08);
  --shadow-lift: 0 2px 4px rgba(63, 13, 18, .08), 0 22px 48px rgba(63, 13, 18, .14);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font: 17px/1.65 var(--sans); color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--burgundy-deep); margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.sr-only { 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: 16px; top: -60px; z-index: 100; background: var(--burgundy); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
main:focus { outline: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(10px); }
.header-bar { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand img { width: 168px; height: auto; }
.site-menu { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links, .lang-switch { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--blush); color: var(--burgundy); }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--burgundy); color: #fff; }
.menu-toggle { display: none; margin-left: auto; align-items: center; gap: 10px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--burgundy); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
.menu-icon::before { position: absolute; top: -6px; } .menu-icon::after { position: absolute; top: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: .95rem; }
.btn-primary { background: var(--burgundy); color: #fff; box-shadow: 0 8px 22px rgba(108, 25, 29, .25); }
.btn-primary:hover { background: var(--burgundy-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: currentColor; color: var(--burgundy); background: transparent; }
.btn-ghost:hover { background: var(--blush); color: var(--burgundy); }
.btn-light { background: #fff; color: var(--burgundy); }
.btn-light:hover { color: var(--burgundy-deep); transform: translateY(-1px); }
.hero .btn-ghost { color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Hero carousel */
.hero { position: relative; min-height: clamp(440px, 70vh, max(640px, 36vw)); display: grid; overflow: hidden; background: var(--burgundy-deep); color: #fff; }
.slide { grid-area: 1 / 1; display: grid; align-items: end; }
.slide[hidden] { display: none; }
.slide-media { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(28, 5, 8, .7) 0%, rgba(28, 5, 8, 0) 38%), linear-gradient(100deg, rgba(32, 6, 9, .92) 0%, rgba(52, 11, 15, .74) 48%, rgba(52, 11, 15, .2) 100%); }
.slide-content { grid-area: 1 / 1; position: relative; z-index: 3; padding: 56px 0 96px; max-width: 880px; margin-left: max(16px, (100% - 1180px) / 2); }
.slide h1, .slide .slide-heading { color: #fff; font-size: clamp(2.4rem, 3.4vw, 2.85rem); margin-bottom: .35em; }
.slide .lead { font-size: 1.12rem; color: #f6e7e5; max-width: 60ch; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.slide h1, .slide .slide-heading { text-shadow: 0 2px 24px rgba(0, 0, 0, .3); text-wrap: balance; }
@media (prefers-reduced-motion: no-preference) { .slide.is-active .slide-content { animation: rise .8s var(--ease) both; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.eyebrow, .kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: 12px; }
.hero .eyebrow, .kicker-light { color: #ffc9c4; }
.carousel-controls { position: absolute; z-index: 4; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; gap: 12px; }
.carousel-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .2); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.carousel-btn:hover { background: rgba(255, 255, 255, .18); }
.carousel-toggle { font-size: .8rem; }
.carousel-dots { display: flex; gap: 4px; }
.dot { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.dot::after { content: ""; position: absolute; inset: 19px 8px; border-radius: 4px; background: rgba(255, 255, 255, .45); }
.dot[aria-current="true"]::after { background: #fff; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: linear-gradient(180deg, var(--champagne), #fff); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.sticky { position: sticky; top: 112px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 44px); box-shadow: var(--shadow); }
.prose { font-size: 1.05rem; }
.prose ul { padding-left: 1.2em; } .prose li { margin-bottom: .4em; } .prose li::marker { color: var(--red); }
.prose h3 { margin-top: 1.4em; }
.prose h2 + h3 { margin-top: .4em; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Page hero */
.page-hero { padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 3.5vw, 48px); background: radial-gradient(circle at 85% 0%, rgba(196, 36, 36, .12), transparent 40%), linear-gradient(180deg, var(--champagne), #fff); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 26ch; font-size: clamp(1.9rem, 3.4vw, 2.85rem); }
.page-hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 0; }

/* Services */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.service-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); color: var(--burgundy); }
.service-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.service-card-title { display: block; padding: 18px 20px 22px; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.service-detail { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.service-detail img { border-radius: 12px; aspect-ratio: 3 / 2; object-fit: cover; }
.service-detail h2 { font-size: 1.5rem; }
.feature-img { border-radius: 14px; margin: 8px 0 24px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.aside-list h2 { font-size: 1.25rem; }
.aside-list ul { list-style: none; margin: 0; padding: 0; }
.aside-list li + li { border-top: 1px solid var(--line); }
.aside-list a { display: block; padding: 10px 0; text-decoration: none; font-weight: 500; }

/* CTA band */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(32px, 5vw, 64px); border-radius: 28px; color: #fbe9e7; background: radial-gradient(circle at 90% 10%, rgba(244, 49, 49, .35), transparent 45%), linear-gradient(135deg, var(--burgundy-deep), var(--burgundy)); box-shadow: var(--shadow-lift); }
.cta-band h2 { color: #fff; }
.cta-band p { margin: 0; max-width: 58ch; }
.cta-band .btn { white-space: nowrap; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
h1, h2 { text-wrap: balance; }

/* Contact list */
.contact-list { margin: 0; display: grid; gap: 16px; }
.contact-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); }
.contact-list dd { margin: 2px 0 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.contact-list address { font-style: normal; }
.split > div > .card { margin-top: 24px; }

/* Forms */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--burgundy-deep); margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 24px; }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.req { color: var(--red); }
input, textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #cfc3c1; border-radius: 10px; background: #fff; color: var(--ink); }
.form-status:empty { display: none; }
.form-status { margin-top: 16px; font-weight: 600; color: var(--burgundy); }
.form-status.is-success { padding: 14px 18px; border-radius: 10px; background: #edf8ef; color: #1e5b2e; border-left: 4px solid #2f8a46; }
.form-status:focus { outline: none; }
.form-legend { font-size: 1.3rem; margin-bottom: 16px; }
.form-privacy { margin: 16px 0 0; font-size: .92rem; color: var(--muted); }
.prose h2 { font-size: 1.4rem; margin-top: 1.2em; }

/* Footer */
.site-footer { background: var(--burgundy-deep); color: #eddcda; padding: 64px 0 0; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1.15fr 1.5fr .9fr; gap: 36px; }
.footer-grid > * { min-width: 0; }
.footer-brand img { width: 150px; background: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.site-footer h2 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: #ffc9c4; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .contact-list dt { color: #d9bcb8; }
.footer-note { font-size: .88rem; color: #d9bcb8; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 48px; padding: 20px 0 28px; font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* Root chooser / 404 */
.root-choose { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 16px; }
.root-choose img { margin: 0 auto; width: 220px; }
.root-choose ul { list-style: none; padding: 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1080px) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .js .site-menu.is-open { display: flex; }
  .js .nav-links { flex-direction: column; }
  .site-header { position: relative; }
  .header-bar { flex-wrap: wrap; }
  .site-menu { flex-wrap: wrap; }
  .lang-switch { align-self: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1081px) { .service-grid > li:last-child:nth-child(3n+1) { grid-column: 2; } }
@media (max-width: 820px) {
  .split, .split-wide { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .service-detail { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .slide::after { background: linear-gradient(180deg, rgba(32, 6, 9, .55) 0%, rgba(32, 6, 9, .82) 100%); }
  .slide-content { padding: 40px 0 84px; }
  .slide h1, .slide .slide-heading { font-size: clamp(1.85rem, 7.4vw, 2.4rem); }
  .slide .lead { font-size: 1.05rem; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .cta-band .btn { white-space: normal; }
  .brand img { width: 140px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .carousel-controls, .site-footer { display: none; } }

/* Icons + micro-interactions */
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.contact-list dt { display: flex; align-items: center; gap: 8px; }
.contact-list dt .icon { color: var(--red); }
.site-footer .contact-list dt .icon { color: #ffc9c4; }
.link-arrow { margin-left: 6px; transition: transform .3s var(--ease); }
.text-link:hover .link-arrow { transform: translateX(4px); }
.service-card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-arrow { color: var(--red); margin-top: .2em; transition: transform .3s var(--ease); }
.service-card:hover .card-arrow { transform: translateX(4px); }
.service-card img { transition: transform .6s var(--ease); }
.service-card:hover img { transform: scale(1.04); }
.service-card { isolation: isolate; }
.service-card > img { overflow: hidden; }
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.motion .reveal.is-visible { opacity: 1; transform: none; }

/* ===== Motion + graphism system (2026-10-24) — everything off under prefers-reduced-motion ===== */
:root { --dur: 700ms; --stagger: 90ms; --gold: #c8963e; --grad-brand: linear-gradient(135deg, var(--burgundy-deep), var(--burgundy) 55%, #9e2a24); }

/* Shorter banner: crop keeps the subject and the foliage in frame */
.slide { position: relative; overflow: hidden; }
.slide:nth-of-type(1) .slide-media { object-position: 50% 38%; }
.slide:nth-of-type(2) .slide-media { object-position: 50% 62%; }
.slide:nth-of-type(3) .slide-media { object-position: 50% 88%; } /* McGill College: summit + sky and street both in frame up to a 2.78:1 banner */
@keyframes kasa-kenburns-summit { from { transform: scale(1); } to { transform: scale(1.04); } }
.slide.is-active:nth-of-type(3) .slide-media { animation-name: kasa-kenburns-summit; transform-origin: 50% 22%; } /* zoom anchored on the summit: the top never leaves the frame */
.slide:nth-of-type(3)::after { background: linear-gradient(0deg, rgba(28, 5, 8, .35) 0%, rgba(28, 5, 8, 0) 22%), linear-gradient(100deg, rgba(32, 6, 9, .86) 0%, rgba(52, 11, 15, .55) 34%, rgba(52, 11, 15, .08) 62%, rgba(52, 11, 15, 0) 100%); }
/* Vertical crops chosen so each landmark top stays in frame up to a 2.78:1 banner (p <= (top*0.5625-0.03)/0.2025) */
.slide:nth-of-type(4) .slide-media { object-position: 50% 75%; }  /* Petit-Champlain from the top of the Casse-Cou stairs: dormers, street and steps */
.slide:nth-of-type(4)::after { background: linear-gradient(0deg, rgba(28, 5, 8, .4) 0%, rgba(28, 5, 8, 0) 24%), linear-gradient(100deg, rgba(32, 6, 9, .86) 0%, rgba(52, 11, 15, .58) 34%, rgba(52, 11, 15, .1) 62%, rgba(52, 11, 15, 0) 100%); }
.slide:nth-of-type(5) .slide-media { object-position: 50% 30%; }  /* Frontenac roofs at 17.5% */
.slide:nth-of-type(6) .slide-media { object-position: 50% 20%; }  /* CN Tower tip at 13% */
.slide:nth-of-type(7) .slide-media { object-position: 50% 55%; }  /* Vancouver towers 37%, mountains 48% */
.slide:nth-of-type(8) .slide-media { object-position: 50% 0%; }   /* Peace Tower tip at 3% */
@media (max-width: 820px) {
  .slide:nth-of-type(5) .slide-media { object-position: 72% 45%; }
  .slide:nth-of-type(6) .slide-media { object-position: 66% 45%; }
  .slide:nth-of-type(7) .slide-media { object-position: 70% 55%; }
  .slide:nth-of-type(8) .slide-media { object-position: 66% 45%; }
}
.slide-image-only::after { background: linear-gradient(0deg, rgba(28, 5, 8, .55) 0%, rgba(28, 5, 8, 0) 30%); }

.hero.is-paused .slide-media, .hero.is-paused::before { animation-play-state: paused; }

/* Slow Ken Burns on the active photo (transform only: the LCP image paints immediately) */
@keyframes kasa-kenburns { from { transform: scale(1); } to { transform: scale(1.05); } }
.slide.is-active .slide-media { animation: kasa-kenburns 24s ease-out both; transform-origin: 50% 8%; } /* zoom anchored near the top: landmark tops never leave the frame */

/* Light sweep across the banner */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 224, 196, .13) 48%, transparent 60%);
  transform: translateX(-100%); animation: kasa-sweep 9s ease-in-out 1.2s infinite; }
@keyframes kasa-sweep { 0%, 15% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }

/* Page-load entrance: heading and CTA rise in a stagger (opacity never starts at 0, so LCP is not delayed) */
@keyframes kasa-rise { from { opacity: .01; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.slide.is-active .slide-content { animation: none; }
.slide.is-active .slide-content > *, .page-hero .container > * { animation: kasa-rise var(--dur) var(--ease) both; }
.slide.is-active .slide-content > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: var(--stagger); }
.slide.is-active .slide-content > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.slide.is-active .slide-content > :nth-child(4) { animation-delay: calc(var(--stagger) * 3); }

/* Page hero: brand ornament (maple-leaf watermark + gold rule) */
.page-hero { position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: max(-60px, (100% - 1180px) / 2 - 80px); top: 50%; width: clamp(180px, 26vw, 340px); aspect-ratio: 1;
  background: url("../img/leaf-1.svg") center / contain no-repeat; opacity: .07; transform: translateY(-50%) rotate(-14deg); pointer-events: none; }
.page-hero .eyebrow::after, .kicker::after { content: ""; display: inline-block; width: 28px; height: 2px; margin-left: 10px; vertical-align: middle; background: var(--gold); border-radius: 2px; }
.kicker-light::after { background: #ffc9c4; }

/* Scroll reveal harmonised with the entrance; staggered children */
.motion .reveal { transition-duration: var(--dur); }
.motion .reveal .service-grid > li { opacity: 0; transform: translateY(16px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.motion .reveal.is-visible .service-grid > li { opacity: 1; transform: none; }
.motion .reveal.is-visible .service-grid > li:nth-child(3n+2) { transition-delay: 80ms; }
.motion .reveal.is-visible .service-grid > li:nth-child(3n) { transition-delay: 160ms; }

/* Section divider: soft curve between tinted and white sections */
.section-tint { position: relative; }
.section-tint::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 40px; pointer-events: none;
  background: #fff; clip-path: ellipse(70% 100% at 50% 0%); }

/* Service cards: one real link per card, stretched over the whole card */
.service-card, .service-detail { position: relative; cursor: pointer; }
.stretched { color: inherit; text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.service-card:focus-within, .service-detail:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
.service-card .stretched:focus-visible, .service-detail .stretched:focus-visible { outline: none; }
.service-card { transform-style: preserve-3d; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.service-card:hover, .service-card:focus-within { transform: translateY(-6px) rotateX(2deg); box-shadow: var(--shadow-lift); color: var(--burgundy); }
.service-card::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(108, 25, 29, .06)); opacity: 0; transition: opacity .4s; }
.service-card:hover::before, .service-card:focus-within::before { opacity: 1; }
.service-card:hover .card-arrow, .service-card:focus-within .card-arrow, .service-detail:hover .link-arrow, .service-detail:focus-within .link-arrow { transform: translateX(5px); }
.service-card:focus-within img, .service-card:hover img { transform: scale(1.05); }
.service-card h3 { margin: 0; font-size: inherit; color: inherit; font-family: inherit; }
.service-detail { transition: transform .4s var(--ease), box-shadow .4s var(--ease); border-radius: var(--radius); }
.service-detail:hover, .service-detail:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.service-detail img { transition: transform .7s var(--ease); }
.service-detail:hover img, .service-detail:focus-within img { transform: scale(1.03); }
.service-detail h2 a { color: var(--burgundy-deep); }
.more { display: inline-flex; align-items: center; font-weight: 600; color: var(--burgundy); }

/* Micro-interactions */
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.btn:hover { box-shadow: 0 14px 30px rgba(108, 25, 29, .28); }
.btn:active { transform: translateY(0) scale(.98); }
.aside-list a { transition: color .2s, transform .3s var(--ease); }
.aside-list a:hover { transform: translateX(4px); }
.feature-img { transition: transform .8s var(--ease); }
.card.prose:hover .feature-img { transform: scale(1.015); }

/* Sticky header that tightens on scroll */
.site-header { transition: box-shadow .3s, background .3s; }
.is-scrolled .site-header { box-shadow: 0 6px 24px rgba(63, 13, 18, .08); }
/* Compact state never changes layout height (no flicker): only shadow + a transform on the logo */
.site-header .brand img { transform-origin: left center; transition: transform .3s var(--ease); }
.is-scrolled .site-header .brand img { transform: scale(.86); }

/* Animated mobile menu */
@media (max-width: 1080px) {
  .js .site-menu { display: flex; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
  .js .site-menu.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .3s var(--ease); }
  .menu-icon { transition: background .2s; }
  .menu-icon::before, .menu-icon::after { transition: transform .3s var(--ease), top .3s var(--ease); }
  .menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }
}

/* Long-read legal pages */
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 104px; font-size: .95rem; }
.toc h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink); }
.toc a:hover { border-color: var(--red); color: var(--burgundy); }
.longread h2 { scroll-margin-top: 104px; padding-top: .4em; border-top: 1px solid var(--line); }
.longread h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.longread p { max-width: 68ch; }
@media (max-width: 820px) { .legal-layout { grid-template-columns: 1fr; } .toc { position: static; } }

/* Forms: floating-feel labels, animated validation, thank-you state */
.field input, .field textarea { transition: border-color .2s, box-shadow .2s, background .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 4px rgba(108, 25, 29, .12); }
.field label { transition: color .2s; }
.field:focus-within label { color: var(--burgundy); }
.was-validated .field input:invalid, .was-validated .field textarea:invalid { border-color: #b3261e; animation: kasa-shake .35s; }
@keyframes kasa-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.form-status.is-success { animation: kasa-rise .5s var(--ease) both; }

/* Cross-page View Transitions (same-origin; unsupported browsers navigate instantly) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: kasa-header; }
::view-transition-old(root) { animation: kasa-vt-out 240ms var(--ease) both; }
::view-transition-new(root) { animation: kasa-vt-in 420ms var(--ease) both; }
@keyframes kasa-vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes kasa-vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .hero::before { display: none; }
  .motion .reveal .service-grid > li { opacity: 1; transform: none; }
  .service-card:hover, .service-card:focus-within, .service-detail:hover, .service-detail:focus-within { transform: none; }
}

/* Wind shader canvas: same box and Ken Burns as the photo, fades in after load */
.slide-gl { opacity: 0; transition: opacity 1.4s var(--ease); pointer-events: none; }
.slide-gl.is-live { opacity: 1; }
.slide:not(.is-active) .slide-gl { display: none; }
@supports (min-height: 100svh) { .hero { min-height: clamp(440px, 70svh, max(640px, 36vw)); } }
@media (max-width: 820px) { .hero { min-height: min(560px, 78svh); } }
.site-header { padding-top: env(safe-area-inset-top); }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.footer-bottom { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* ===== Booking journey ===== */
.booking-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.booking-main > h2 { margin-bottom: 24px; }
.reassure { position: sticky; top: 104px; display: grid; gap: 16px; }
.reassure-badge { margin: 0; padding: 18px 20px; border-radius: 14px; background: var(--grad-brand); color: #fbe9e7; font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; box-shadow: var(--shadow); }
.reassure .card { margin: 0; }

.wizard { padding: clamp(20px, 3vw, 40px); }
.wiz-progress { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.wiz-progress li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); position: relative; padding-bottom: 12px; }
.wiz-progress li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--line); }
.wiz-progress li[aria-current="step"]::after, .wiz-progress li.is-done::after { background: var(--burgundy); }
.wiz-progress li::after { transition: background .4s var(--ease); }
.wiz-dot { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; font-size: .85rem; background: #fff; transition: all .3s var(--ease); }
.wiz-progress li[aria-current="step"] { color: var(--burgundy-deep); font-weight: 600; }
.wiz-progress li[aria-current="step"] .wiz-dot { border-color: var(--burgundy); background: var(--burgundy); color: #fff; box-shadow: 0 0 0 5px rgba(108, 25, 29, .12); }
.wiz-progress li.is-done .wiz-dot { border-color: var(--burgundy); color: var(--burgundy); }
.wiz-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.is-wizard .wiz-step.is-current { animation: kasa-rise .5s var(--ease) both; }
.wiz-count { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--red); }
.wiz-title { font-size: 1.6rem; margin-bottom: 8px; }
.wiz-title:focus { outline: none; }
.wiz-help { color: var(--muted); margin-bottom: 20px; }
html:not(.js) .wiz-step + .wiz-step { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
html:not(.js) [data-wiz-next], html:not(.js) [data-wiz-back], html:not(.js) .wiz-progress, html:not(.js) [data-review] { display: none; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-card { display: flex; flex-direction: column; height: 100%; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .2s, transform .3s var(--ease), box-shadow .3s var(--ease); }
.choice-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.choice-other { display: grid; place-items: center; background: var(--blush); color: var(--burgundy); font-family: var(--serif); font-size: 2.2rem; }
.choice-label { padding: 10px 12px 12px; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.choice:hover .choice-card { transform: translateY(-2px); box-shadow: var(--shadow); }
.choice input:checked + .choice-card { border-color: var(--burgundy); box-shadow: 0 0 0 4px rgba(108, 25, 29, .12); }
.choice input:checked + .choice-card .choice-label { color: var(--burgundy); }
.choice input:focus-visible + .choice-card { outline: 3px solid var(--red); outline-offset: 3px; }
.was-validated .choice input:invalid + .choice-card { border-color: #b3261e; }

.pref + .pref { margin-top: 22px; }
.pref-q { font-weight: 600; margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; transition: all .2s; }
.pill input:checked + span { border-color: var(--burgundy); background: var(--burgundy); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 3px; }

.wiz-review { margin: 0; display: grid; gap: 18px; }
.review-group { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px 16px; }
.review-group h3 { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; margin: 0 0 6px; }
.review-group dt { color: var(--muted); font-size: .92rem; }
.review-group dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.btn-link { background: none; border: 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--burgundy); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; }

.cf-turnstile { margin-top: 20px; }
.cf-turnstile.wiz-waiting { position: absolute; visibility: hidden; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wiz-nav [data-wiz-next], .wiz-nav [data-wiz-submit] { margin-left: auto; }
.wiz-done { text-align: left; }
.wiz-done .form-status { font-size: 1.15rem; }
.wiz-next-text { margin-top: 12px; color: var(--muted); }
.wiz-progress.is-complete li::after { background: #2f8a46; }
.wiz-draft { display: block; margin-top: 6px; font-size: .85rem; }

/* Sticky service-page aside with the booking CTA */
.aside-sticky { position: sticky; top: 104px; display: grid; gap: 16px; }
.btn-block { width: 100%; }
.section-cta { padding-top: 0; }

/* Mobile booking bar (book + call + WhatsApp) */
.booking-bar { display: none; }
@media (max-width: 820px) {
  .booking-layout { grid-template-columns: 1fr; }
  .reassure, .aside-sticky { position: static; }
  .wiz-progress { grid-template-columns: repeat(4, 1fr); }
  .wiz-step-label { display: none; }
  .wiz-progress li[aria-current="step"] .wiz-step-label { display: inline; position: absolute; top: 40px; left: 0; white-space: nowrap; }
  .wiz-progress { margin-bottom: 44px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-group { grid-template-columns: 1fr; }
  .review-group dd { margin-bottom: 8px; }
  .booking-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(63, 13, 18, .08); backdrop-filter: blur(10px); }
  .booking-bar .btn { flex: 1; min-height: 48px; }
  .bar-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); color: var(--burgundy); }
  .bar-icon .icon { width: 22px; height: 22px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .is-wizard .wiz-step.is-current { animation: none; } }

/* Fixes from the booking e2e audit */
[hidden] { display: none !important; }
.booking-main, .booking-layout > *, .split > *, .wizard, .wiz-step { min-width: 0; }
.wiz-nav { flex-wrap: wrap; }
@media (max-width: 820px) {
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .wiz-nav .btn { flex: 1 1 auto; }
}
.toc a { min-height: 44px; display: flex; align-items: center; }

.ext-icon { width: .85em; height: .85em; margin-left: 4px; vertical-align: -.05em; opacity: .75; }

/* Inline validation + required legend */
.req-legend { margin: 0 0 18px; font-size: .9rem; color: var(--muted); }
.field-error { margin: 4px 0 0; min-height: 0; font-size: .88rem; font-weight: 600; color: #b3261e; }
.field-error:empty { display: none; }
[aria-invalid="true"] { border-color: #b3261e !important; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.opt { font-weight: 400; color: var(--muted); font-size: .88em; }

/* CICC Code s.44(1)(a): licensee line at the top of every page */
.licensee-top { margin: 0; background: var(--burgundy-deep); color: #f3dcd9; font-size: .8rem; letter-spacing: .02em; line-height: 1.4; }
.licensee-top .container { display: block; padding: 6px 0; }
.footer-bottom .licensee { margin-top: 8px; font-size: .95rem; line-height: 1.5; color: #f3e4e2; }
.updated { margin-top: 2em; font-size: .9rem; color: var(--muted); }
@media (max-width: 560px) { .licensee-top { font-size: .74rem; } }

/* 8-slide carousel: compact counter on phones instead of 8 dots */
.carousel-count { display: none; margin: 0; min-width: 52px; text-align: center; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .carousel-dots { display: none; } .carousel-count { display: block; } }

/* Links inside running text are underlined, not colour-only (WCAG 1.4.1 / Lighthouse link-in-text-block) */
p a:not(.btn), dd a, address a { text-decoration: underline; text-underline-offset: .18em; }

/* Slide 3 on phones: taller photo anchored to the bottom so the Mont Royal summit sits above the text and the street stays visible */
@media (max-width: 820px) { .slide:nth-of-type(3) img.slide-media { inset: auto 0 0 0; height: 140%; object-position: 50% 100%; } }

/* Service pages: image hero (photo + gradient for AA contrast), detail crop in the article */
.page-hero-image { position: relative; overflow: hidden; display: grid; align-items: end; min-height: clamp(380px, 56vh, 540px); padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); background: var(--burgundy-deep); border-bottom: 0; }
.page-hero-image::after { display: none; }
.page-hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; z-index: 0; }
.page-hero-image::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(28, 5, 8, .72) 0%, rgba(28, 5, 8, 0) 45%), linear-gradient(100deg, rgba(32, 6, 9, .9) 0%, rgba(52, 11, 15, .72) 45%, rgba(52, 11, 15, .2) 100%); }
.page-hero-image .container { position: relative; z-index: 2; }
.page-hero-image h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .3); }
.page-hero-image .lead { color: #f6e7e5; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.page-hero-image .eyebrow { color: #ffc9c4; }
.page-hero-image .actions { margin-top: 22px; }
.page-hero-image .page-hero-media { animation: kasa-kenburns 24s ease-out both; transform-origin: 50% 20%; }
.svc-spousal-work-permit .page-hero-media, .svc-caq .page-hero-media, .svc-visitor-record .page-hero-media, .svc-pgwp .page-hero-media { object-position: 50% 28%; }
.svc-study-permit .page-hero-media { object-position: 50% 45%; }
.feature-crop { aspect-ratio: 21 / 9; overflow: hidden; border-radius: 14px; margin: 8px 0 24px; }
.feature-crop .feature-img { width: 100%; height: 100%; margin: 0; aspect-ratio: auto; object-fit: cover; transform: scale(1.45); transform-origin: 62% 60%; }
.card.prose:hover .feature-crop .feature-img { transform: scale(1.5); }
@media (max-width: 820px) { .page-hero-image { min-height: 0; padding-top: 140px; } .page-hero-image::before { background: linear-gradient(180deg, rgba(32, 6, 9, .35) 0%, rgba(32, 6, 9, .88) 62%); } }
@media (prefers-reduced-motion: reduce) { .page-hero-image .page-hero-media { animation: none; } }

/* Official CICC insignia (only when Katty's official file is supplied): white panel = clear space >= half the acronym height */
.cicc-insignia { display: flex; align-items: center; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.cicc-insignia .ins-panel { display: inline-block; background: #fff; padding: 14px 16px; border-radius: 10px; line-height: 0; }
.cicc-insignia img { width: 160px; min-width: 132px; height: auto; display: block; }
.cicc-insignia .ins-text { margin: 0; color: #f3e4e2; font-size: .95rem; }

/* One item per line for contact blocks in running text (privacy officer) */
.contact-lines { font-style: normal; line-height: 1.8; margin: -.2em 0 1em; padding: 12px 16px; border-left: 3px solid var(--line); background: var(--champagne); border-radius: 0 10px 10px 0; }

/* Footer contact values: slightly smaller, never clipped; email breaks after @ only if it must */
.site-footer .contact-list dd { font-size: clamp(13px, .85rem, 15px); }
a.email { overflow-wrap: anywhere; word-break: normal; }
.site-footer .licensee { overflow-wrap: anywhere; }

/* #55381: a form that could not send says so, plainly */
.form-status[data-send-status]:not(:empty) { color: #8f1d1d; font-weight: 600; }
