/* Actionable Insight Engine marketing site.
   Same design language as the app and actionableinsightengine.ca: rose accent, Apple system font on Mac/iPhone
   (Inter elsewhere), dotted background, bordered cards, no shadows. Light and dark themes:
   follows the visitor's system setting, or the toggle in the header (saved as data-theme on <html>). */

/* Inter, served from this site (not Google Fonts), so visitors' browsers don't contact Google. Licence: assets/fonts/Inter-OFL.txt */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --header-h: 76px; /* floating header + its top gap */
  --r: 12px;   /* buttons, menu items, small parts */
  --r-lg: 16px; /* header bar, menus, cards, images */
  color-scheme: light;
  --bg: #fcfcfb; --dot: #e2e0dc; --surface: #ffffff; --surface-2: #f6f5f3;
  --line: #e7e5e2; --line-strong: #d6d3ce; --ink: #1b1a19; --ink-2: #44403c; --muted: #8a8580;
  --accent: #d4314f; --accent-hover: #bb2843; --accent-soft: #fdecef; --blue: #6f8fe0;
  /* Dark tokens for the footer and the Why AIE band in the dark theme (both have light versions). */
  --band: #161617; --band-card: #1f1f22; --band-line: #2e2e33; --band-ink: #eeebe7; --band-ink-2: #b9b5b0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121213; --dot: #252527; --surface: #1a1a1c; --surface-2: #212124;
    --line: #2c2c30; --line-strong: #3b3b40; --ink: #eeebe7; --ink-2: #c8c4bf; --muted: #8f8b86;
    --accent: #ed2658; --accent-hover: #d61f4e; --accent-soft: #3a2025; --blue: #8aa4f0;
    --band: #0c0c0d; --band-card: #18181a; --band-line: #2a2a2e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121213; --dot: #252527; --surface: #1a1a1c; --surface-2: #212124;
  --line: #2c2c30; --line-strong: #3b3b40; --ink: #eeebe7; --ink-2: #c8c4bf; --muted: #8f8b86;
  --accent: #ed2658; --accent-hover: #d61f4e; --accent-soft: #3a2025; --blue: #8aa4f0;
  --band: #0c0c0d; --band-card: #18181a; --band-line: #2a2a2e;
}

/* Theme-dependent images and icons */
.on-dark { display: none !important; }
.i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none !important; }
  :root:not([data-theme="light"]) .on-dark { display: block !important; }
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
:root[data-theme="dark"] .on-light { display: none !important; }
:root[data-theme="dark"] .on-dark { display: block !important; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; color: var(--ink); font: 16px/1.6 -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, .lede { text-wrap: balance; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
@media (min-width: 1100px) { .wrap { padding: 0 40px; } }
.accent { color: var(--accent); }
.nw { white-space: nowrap; }
.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 { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: var(--r); background: var(--ink); color: var(--bg); }
.skip:focus { left: 8px; }
@media (max-width: 860px) { .hide-sm { display: none !important; } }
@media (min-width: 861px) { .show-sm { display: none !important; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r); border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-line { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--ink-2); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--ink-2); }

/* Header: a floating pill bar inset from the page edges */
.top { position: sticky; top: 0; z-index: 20; padding: 12px 16px 0; }
.top-row {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  max-width: 1392px; height: 64px; margin: 0 auto; padding: 0 10px 0 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: max-width .45s cubic-bezier(.4, 0, .2, 1);
}
/* Once the page is scrolled (set by site.js), the bar narrows. */
.top.scrolled .top-row { max-width: 980px; }
@media (prefers-reduced-motion: reduce) { .top-row { transition: none; } }
.brand { justify-self: start; }
.logo { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav > a { text-decoration: none; color: var(--ink-2); }
.nav > a:hover { color: var(--ink); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.top .btn { padding: 11px 20px; }
.i-close { display: none; }
#menu-btn[aria-expanded="true"] .i-open { display: none; }
#menu-btn[aria-expanded="true"] .i-close { display: block; }

.apps { position: relative; }
.apps-menu {
  position: absolute; right: 0; top: calc(100% + 14px); min-width: 260px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
}
.apps-menu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.apps-menu a svg { color: var(--accent); }
.apps-menu a:hover { background: var(--surface-2); }

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .top { padding: 10px 12px 0; }
  .top-row { grid-template-columns: 1fr auto; height: 58px; padding: 0 8px 0 18px; }
  .logo { height: 26px; }
  .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  }
  .nav.open { display: flex; }
  .nav > a { padding: 13px 14px; border-radius: var(--r); }
  .nav > a:hover { background: var(--surface-2); }
}

/* Hero + "Ask AIE" story.
   Without JS both parts are stacked. With JS (.js on <html>) the section is tall and its stage sticks to the screen
   while site.js sets --p (0 to 1, scroll progress): the hero fades out, the ask box fades in and types, then the answer builds. */
.hero { text-align: center; padding: 104px 0 64px; }
.hero-bot { width: 120px; height: 100px; object-fit: contain; margin: 0 auto 20px; }
@media (max-width: 640px) { .hero-bot { width: 96px; height: 80px; } }
h1 { margin: 0 auto; max-width: 1200px; font-size: clamp(42px, 7.2vw, 104px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; }
.lede { margin: 22px auto 0; max-width: 900px; color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
@media (max-width: 640px) { .hero { padding: 56px 16px 24px; } }

.ask { max-width: 960px; padding-top: 24px; padding-bottom: 24px; }
.greet { text-align: center; margin-bottom: 28px; }
.greet-title { margin: 0; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.15; letter-spacing: -.025em; font-weight: 600; color: var(--ink); }
.grad { background: linear-gradient(90deg, #6f8fe0, #d4314f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.greet-sub { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
@media (max-width: 640px) { .greet { margin-bottom: 20px; } .greet-title { font-size: 23px; } .greet-sub { font-size: 13px; } .grad { white-space: nowrap; } }
.ask-box {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 10px 10px 20px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
}
.ask-plus { color: var(--muted); }
.ask-input { flex: 1; min-width: 0; margin: 0; font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: clip; direction: ltr; }
.ask-ph { color: var(--muted); }
.ask-caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -3px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ask-send { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--accent); color: #fff; flex: none; }

.chat { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.bubble { align-self: flex-end; max-width: 80%; margin: 0; padding: 12px 20px; border-radius: var(--r-lg) var(--r-lg) 4px var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; text-align: left; }
.answer-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.answer-head img { width: 34px; height: 28px; object-fit: contain; flex: none; }
.answer-head strong { display: block; font-size: 16px; }
.answer-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.answer-meta svg { color: #2f9e6a; }
.answer-tag { margin-left: auto; align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.answer-body { display: grid; gap: 20px; padding-top: 16px; }
@media (min-width: 760px) { .answer-body { grid-template-columns: 1.15fr 1fr; gap: 28px; } }
.answer h3 { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.people, .path { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.people li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.people b { display: block; font-weight: 600; line-height: 1.3; }
.people span:not(.avatar) { color: var(--muted); font-size: 13px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; flex: none; }
.path { counter-reset: step; }
.path li { counter-increment: step; display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); }
.path li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 600; color: var(--ink); flex: none; }
.cite { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; vertical-align: 2px; line-height: 1; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sources span { padding: 5px 12px 5px 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
@media (max-width: 640px) {
  .ask-input { white-space: normal; font-size: 15px; }
  .ask-box { align-items: flex-end; }
  .bubble { max-width: 92%; font-size: 14px; padding: 10px 16px; }
  .answer { padding: 16px; }
  .answer-tag, .answer-meta { display: none; }
  .people b { font-size: 13px; }
  /* Keep the scroll demo within one phone screen: show only "Who decides". */
  .js .answer-body > .answer-col + .answer-col, .js .sources { display: none; }
  .js .hero { padding: 0 16px; }
  .js .hero h1 { font-size: 40px; }
  .hero h1 br { display: none; }
  .js .hero .lede { margin-top: 16px; font-size: 15px; }
  .js .hero .cta-row { margin-top: 22px; }
  .js .hero-bot { width: 80px; height: 66px; margin-bottom: 12px; }
}

/* Dotted background behind the hero only; the rest of the page is plain. */
.story { background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 14px 14px; }
.hero h1 .light { font-weight: 300; letter-spacing: -.03em; }

/* Scroll-driven version */
/* The section slides up under the floating header so the hero is centred on the whole screen. */
.js .story { --p: 0; height: 340vh; margin-top: calc(-1 * var(--header-h)); }
.js .story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.js .story-stage > * { grid-area: 1 / 1; position: relative; }
/* Keep the hero inside the screen at in-between widths (tablets), where the grid would size it to its longest line. */
.js .story-stage > .hero { width: 100%; max-width: 100vw; padding-left: 16px; padding-right: 16px; }
/* The dotted page fades into a plain background as the hero leaves (dark in the dark theme, light in the light theme),
   and the ask demo follows the theme. */
.js .story-stage::before { content: ""; position: absolute; inset: 0; border-radius: 0 0 24px 24px; background: var(--bg); opacity: var(--dark-o, 0); pointer-events: none; }
.js .hero { padding-top: 0; padding-bottom: 0; opacity: var(--hero-o, 1); translate: 0 var(--hero-y, 0); scale: var(--hero-s, 1); pointer-events: var(--hero-pe, auto); }
.js .ask { opacity: var(--ask-o, 0); translate: 0 var(--ask-y, 40px); pointer-events: none; padding-top: 0; padding-bottom: 0; }
.js .ask-ph { display: var(--ph, inline); }
.js .ask-send { scale: var(--send-s, 1); }
.js .chat { margin-top: 0; }

/* Preview (?look=phone): the Ask AIE demo sits inside a phone shape: a dark bezel with rounded top corners and a light
   screen, cut off at the bottom with a fade. Wide screens only; on a real phone the demo stays as it is. */
@media (min-width: 700px) {
  .phone-look .ask { --bezel: #2b2a28; position: relative; isolation: isolate; width: 440px; max-width: 440px; height: min(680px, 82vh); padding: 64px 26px 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
  .phone-look .ask::before, .phone-look .ask::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
  .phone-look .ask::before { inset: 0 0 -60px; border-radius: 58px 58px 0 0; background: var(--bezel); }
  .phone-look .ask::after { inset: 12px 12px -60px; border-radius: 48px 48px 0 0; background: var(--surface); box-shadow: 0 -1px 0 rgba(255, 255, 255, .06) inset; }
  .phone-look .greet-title { font-size: 26px; }
  .phone-look .greet-sub { font-size: 13px; }
  .phone-look .ask-box { padding: 10px 10px 10px 14px; }
  .phone-look .ask-input { font-size: 14px; }
  .phone-look .bubble { max-width: 92%; font-size: 14px; padding: 10px 16px; }
  .phone-look .answer { padding: 16px; }
  .phone-look .answer-body { grid-template-columns: 1fr !important; gap: 18px; }
  .phone-look .answer-tag, .phone-look .answer-meta { display: none; }
  .phone-look .people b { font-size: 13px; }
  .phone-look .path li { font-size: 13px; }
  .phone-look .chat, .phone-look .answer, .phone-look .ask-start { min-width: 0; max-width: 100%; }
  .phone-look .bubble { white-space: normal; }
  .phone-look .sources { flex-wrap: wrap; }
  .phone-look .sources span { white-space: normal; }
  .phone-look .story-stage > .ask { justify-self: center; }
}
@media (min-width: 700px) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone-look .ask { --bezel: #3a3a40; } }
@media (min-width: 700px) { :root[data-theme="dark"] .phone-look .ask { --bezel: #3a3a40; } }
.js .bubble { opacity: var(--bubble-o, 0); translate: 0 var(--bubble-y, 12px); }
.js .answer { opacity: var(--answer-o, 0); translate: 0 var(--answer-y, 16px); }
.js .answer .step { opacity: 0; translate: 0 8px; transition: opacity .35s ease, translate .35s ease; }
.js .answer .step.on { opacity: 1; translate: 0 0; }
/* The box sits in the middle while typing, then the chat takes its place. */
.js .ask { display: grid; }
.js .ask > * { grid-area: 1 / 1; }
.js .ask-start { align-self: center; opacity: var(--box-o, 1); translate: 0 var(--box-y, 0); }
.js .chat { opacity: var(--chat-o, 0); }
@media (prefers-reduced-motion: reduce) {
  .js .story-stage::before { display: none; }
  .js .story { height: auto; margin-top: 0; }
  .js .story-stage { position: static; height: auto; display: block; padding-top: 0; overflow: visible; }
  .js .hero, .js .ask, .js .bubble, .js .answer, .js .chat, .js .ask-start { opacity: 1; translate: none; scale: none; }
  .js .ask { display: block; padding-bottom: 24px; }
  .js .chat { margin-top: 20px; }
  .js .answer .step { opacity: 1; translate: none; }
  .js .ask-ph { display: none; }
}

/* Desk showcase: image left, text right on wide screens; stacked on narrow ones. */
.showcase { display: grid; gap: 32px; align-items: center; padding-top: 96px; }
.show-media { margin: 0; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); }
.show-media img { width: 100%; height: auto; }
.show-text h2 { margin-bottom: 14px; }
.show-text p { margin: 0; color: var(--ink-2); font-size: 18px; max-width: 520px; }
@media (min-width: 900px) { .showcase { grid-template-columns: 1.15fr 1fr; gap: 56px; } }
@media (max-width: 640px) { .showcase { padding-top: 64px; } }

/* Centred statement after the Ask AIE demo */
.statement { text-align: center; padding-top: 40px; padding-bottom: 140px; }
/* A thin vertical line draws itself downward above the heading when it scrolls into view. */
.statement-line { width: 1px; height: clamp(96px, 9vw, 140px); margin: 0 auto 40px; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.js .statement-line.reveal { opacity: 1; translate: none; transform: scaleY(0); transform-origin: top; transition: transform 1.1s cubic-bezier(.4, 0, .2, 1); }
.js .statement-line.reveal.in { transform: scaleY(1); }
/* End of the home page: a drawn line that runs down into the footer's centre line. */
.end-arrow { position: relative; height: clamp(140px, 12vw, 200px); margin: 24px auto calc(-1 * var(--foot-gap, 120px)); }
@media (prefers-reduced-motion: reduce) { .js .statement-line.reveal { transform: none; transition: none; } }
.statement-title .light, .statement-title .word.light { font-weight: 300; }
.statement-title { max-width: 1100px; margin: 0 auto; font-size: clamp(36px, 5.4vw, 76px); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; text-wrap: balance; }
.statement-sub { max-width: 820px; margin: 28px auto 0; font-size: clamp(18px, 1.9vw, 24px); line-height: 1.45; color: var(--ink-2); text-wrap: balance; }
@media (max-width: 640px) { .statement { padding-top: 32px; padding-bottom: 72px; } .statement-title { font-size: 31px; } }

/* Overlapping tool logos under the statement (after the team faces on 1Med). Circles stay white so every logo reads in both themes. */
  display: grid; place-items: center; width: 52px; height: 52px; margin-left: -12px; padding: 11px;
  border: 3px solid var(--bg); border-radius: 50%; background: #fff; box-sizing: border-box;
  outline: 1px solid var(--line-strong); outline-offset: -3px;   /* thin ring so white circles show on the light page */
}

/* Scroll-lit words ([data-words]): site.js wraps each word; they wait pale and light up in turn (wide screens only). */
.word { color: color-mix(in srgb, var(--ink) 20%, transparent); transition: color .35s ease; }
.word.lit { color: var(--ink); }
.statement-sub .word.lit { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .word { transition: none; } }

/* About: pillars as tabs; the picture beside them follows the selected tab (site.js) */
.tabs { display: grid; gap: 20px; margin-top: 40px; }
.tab-list { display: grid; gap: 10px; align-content: start; }
.tab-list button {
  display: flex; gap: 16px; align-items: flex-start; width: 100%; padding: 18px; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: var(--r-lg);
  transition: background-color .2s, border-color .2s;
}
.tab-list button:hover { background: var(--surface); }
.tab-list button[aria-selected="true"] { background: var(--surface); border-color: var(--line-strong); }
.tab-copy b { display: block; font-size: 17px; font-weight: 600; }
.tab-copy span { display: block; margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.tab-list button[aria-selected="false"] .tab-copy span { color: var(--muted); }
.tab-panels { position: relative; }
.tab-video video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); background: #111; animation: tab-in .35s ease; }
.tab-panel img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); animation: tab-in .35s ease; }
@keyframes tab-in { from { opacity: 0; translate: 0 8px; } }
@media (min-width: 900px) { .tabs { grid-template-columns: 1fr 1.4fr; gap: 40px; } }
@media (max-width: 899px) { .tab-panels { order: -1; } }
@media (prefers-reduced-motion: reduce) { .tab-panel img, .tab-video video { animation: none; } }

/* Sections */
.section { padding-top: 96px; padding-bottom: 8px; }
@media (max-width: 640px) { .section { padding-top: 64px; } }
h2 { margin: 0 0 18px; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.intro { max-width: 900px; }
.intro p { margin: 0; color: var(--ink-2); font-size: 17px; }
.intro.center { margin: 0 auto; text-align: center; }
.about-line { margin-bottom: 56px; }
#about .intro { max-width: 1240px; margin-left: auto; margin-right: auto; text-align: center; }
#about .intro h2 .light { font-weight: 300; }
#about .intro p { max-width: 1180px; margin-left: auto; margin-right: auto; text-wrap: balance; }
#about .intro p strong { font-weight: 600; color: var(--ink); }
#about .intro h2 { font-size: clamp(34px, 4.6vw, 60px); }
#about .intro p { font-size: 18px; }
.kicker { margin: 0 0 18px !important; font-size: 19px !important; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); flex: none; }

/* About: bento grid (heading, photo and pillars as tiles of different sizes) */
.bento { display: grid; gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.tile p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.tile-head p { font-size: 16px; }
.tile-photo { padding: 0; width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.tile-pillar h3 { margin-top: 18px; }
.tile-pillar.t0 { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile-pillar.t0 p { color: rgba(255,255,255,.85); }
.tile-pillar.t0 .ic { background: rgba(255,255,255,.18); color: #fff; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto); }
  .tile-head { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; }
  .tile-photo { grid-column: span 2; grid-row: span 2; }
}


/* Why AIE band: dark tokens here; the light theme version is at the end of demos.css */
.band { position: relative; isolation: isolate; margin-top: 96px; padding-bottom: 96px; background-color: #121213; color: var(--band-ink); }
/* Dots fade in at the top of the band and out at the bottom, so there is no hard edge. */
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 320px, #000 calc(100% - 320px), transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 320px, #000 calc(100% - 320px), transparent);
}
.band .section { padding-top: 0; }
.band-line { margin-bottom: 56px; background: rgba(255, 255, 255, .3); }
.band-title .light, .band-title .word.light { font-weight: 300; letter-spacing: -.03em; }
.band-title { font-size: clamp(32px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -.04em; margin-bottom: 28px; }
.band-title .word { color: color-mix(in srgb, var(--band-ink) 20%, transparent); }
.band-title .word.lit { color: var(--band-ink); }
/* Typed heading ([data-type], site.js): letters appear one by one behind a caret when it scrolls into view. */
.js [data-type] .ch { visibility: hidden; }
.js [data-type] .ch.on { visibility: visible; }
.type-caret { display: inline-block; width: .06em; height: .9em; margin-left: .04em; vertical-align: -.08em; background: var(--accent); animation: caret 1s steps(1) infinite; }
.band .type-caret { background: #ed2658; }
.band .intro { max-width: 1240px; }
.band .intro p { color: var(--band-ink-2); max-width: 900px; margin-left: auto; margin-right: auto; }
.band .kicker { color: var(--band-ink); margin-left: auto !important; margin-right: auto !important; }
.band .accent { color: #ed2658; }
/* Why AIE features: bento cards; the first and last span two columns */
.f-bento { display: grid; gap: 16px; margin-top: 56px; }
.f-bento article { padding: 28px; border-radius: var(--r-lg); background: var(--band-card); border: 1px solid var(--band-line); }
.f-bento h3 { margin-top: 18px; color: var(--band-ink); }
.f-bento p { margin: 8px 0 0; font-size: 15px; color: var(--band-ink-2); }
.f-bento .b0 { background: linear-gradient(135deg, rgba(237,38,88,.22), rgba(237,38,88,.04)); }
.f-bento .b0 h3, .f-bento .b5 h3 { font-size: 24px; }
@media (min-width: 900px) {
  .f-bento { grid-template-columns: repeat(4, 1fr); }
  .f-bento .b0, .f-bento .b5 { grid-column: span 2; }
}
.band .ic { background: rgba(237, 38, 88, .14); color: #ff5a7f; }

/* Who is it for */
#for { padding-top: 0; }
.for-line { margin-bottom: 0; }

/* Who is this for, pinned: the video starts full width, shrinks to the left half as the section scrolls past (--m),
   then the text fades in on the right (--t) and the heading's words light up. pin.js adds .pin-live on wide screens;
   phones, reduced motion and no-JS get a plain stack. */
.pin { --m: 1; --t: 1; position: relative; }
.pin-inner { width: 100%; max-width: 1600px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) 16px; }
.pin-media { border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 9; background: #fcfcfa; border: 1px solid var(--line); }
/* The recordings are the app's whole screen, so they are shown whole (contain) on the app's own background colour. */
.pin-media video { display: block; width: 100%; height: 100%; object-fit: contain; }
.pin-caption { margin: 12px 4px 0; font-size: 13px; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pin-media { background: #111; } }
:root[data-theme="dark"] .pin-media { background: #111; }
.pin-text { margin-top: 32px; }
.pin-title { margin: 0; font-size: clamp(28px, 3vw, 48px); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
.pin-lead { margin: 22px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.pin-cta { margin-top: 28px; }
.pin-note { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
@media (min-width: 821px) {
  .pin-inner { padding-inline: clamp(32px, 5vw, 96px); }
  .pin.pin-live { height: 260vh; }
  .pin-live .pin-stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
  .pin-live .pin-inner { padding-block: 0; padding-top: 40px; }
  .pin-live .pin-box { position: relative; height: min(78vh, 760px); }
  /* The frame keeps the recording's 16:9 shape as it shrinks, centred on the text. */
  .pin-live .pin-media { position: absolute; top: 50%; left: 0; translate: 0 -50%; max-height: 100%; width: calc(100% * (1 - var(--m) * .48)); border-radius: calc(14px + var(--m) * 10px); }
  .pin-live .pin-caption { display: none; }
  .pin-live .pin-text { position: absolute; top: 50%; right: 0; width: 44%; margin-top: 0; opacity: var(--t); transform: translateY(calc(-50% + (1 - var(--t)) * 60px)); pointer-events: none; }
  .pin-live .pin-text.ready { pointer-events: auto; }
  .pin-live .pin-title span { color: color-mix(in srgb, var(--ink) 20%, transparent); transition: color .3s; }
  .pin-live .pin-title span.lit { color: var(--ink); }
}

/* Footer with the closing call to action (dark in both themes). Desktop: links on a rail on the left, CTA on the right. */
.foot { background: var(--foot-bg, #101114); color: var(--band-ink); border-top: 1px solid var(--band-line); font-size: 14px; margin-top: var(--foot-gap, 120px); }
.foot-grid { display: grid; }
/* Light theme: a slightly off-white footer (the page itself is #fcfcfb). */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .foot { --foot-bg: #f4f3f0; --band-ink: var(--ink); --band-ink-2: var(--ink-2); --band-line: var(--line-strong); --foot-muted: var(--muted); --foot-hover: var(--ink); } }
:root[data-theme="light"] .foot { --foot-bg: #f4f3f0; --band-ink: var(--ink); --band-ink-2: var(--ink-2); --band-line: var(--line-strong); --foot-muted: var(--muted); --foot-hover: var(--ink); }
.foot a { color: var(--band-ink-2); text-decoration: none; transition: color .2s; }
.foot a:hover { color: var(--foot-hover, #fff); }

.foot-cta { padding: 64px 24px 56px; }
.foot-logo { height: 30px; width: auto; }
.foot-cta h2 { margin: 28px 0 0; max-width: 900px; color: var(--band-ink); font-size: clamp(38px, 3.7vw, 72px); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; }
.foot-cta p { margin: 22px 0 0; color: var(--band-ink-2); font-size: 17px; line-height: 1.55; }
.foot-cta h2 .light { font-weight: 300; }
.made-in-canada { display: block; width: 150px; height: auto; margin-top: 40px; opacity: .9; }


.foot-nav { position: relative; display: flex; flex-direction: column; padding: 48px 24px 28px; border-top: 1px solid var(--band-line); }
.foot-mark img { display: block; width: 56px; height: auto; }
.foot-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; margin-top: 36px; }
.foot-col { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.foot-group { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.foot-group h3 { position: relative; margin: 0 0 4px; color: var(--band-ink); font-size: 14px; font-weight: 600; }
.foot address { font-style: normal; color: var(--foot-muted, #8f8b86); line-height: 1.6; }
/* Legal line: one line under both link columns. */
.foot-legal { position: relative; margin: 48px 0 0; color: var(--foot-muted, #8f8b86); font-size: 13px; }

@media (min-width: 960px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 560px; }
  .foot-nav { order: -1; border-top: 0; border-right: 1px solid var(--band-line); padding: 52px 40px 36px 0; }
  /* The rail: a vertical line just right of the bot; the left column's headings get a short tick off it. */
  .foot-nav::before { content: ""; position: absolute; left: 88px; top: 0; bottom: 0; width: 1px; background: var(--band-line); }
  .foot-mark { position: absolute; left: 18px; top: 44px; }
  .foot-groups { margin-top: 0; padding-left: 124px; gap: 40px; }
  .foot-legal { margin-top: auto; padding-top: 48px; padding-left: 124px; line-height: 1.9; }
  .foot-legal::before { content: ""; position: absolute; left: 88px; top: calc(48px + .95em); width: 24px; height: 1px; background: var(--band-line); }
  .foot-col:first-child .foot-group h3::before { content: ""; position: absolute; left: -36px; top: 50%; width: 24px; height: 1px; background: var(--band-line); }
  .foot-cta { padding: 52px 64px 48px; display: flex; flex-direction: column; align-items: flex-start; }
  /* Made in Canada: turned on its side at the foot of the rail column, left of the line. */
  .made-in-canada { position: absolute; left: 66px; bottom: 36px; width: 150px; margin: 0; transform-origin: 0 100%; rotate: -90deg; }
}
@media (max-width: 640px) { :root { --foot-gap: 72px; } .foot-cta h2 br { display: none; } .foot-groups { grid-template-columns: 1fr; } }

/* Scroll reveal: content is visible without JS; site.js adds .js to <html> to enable the fade-in. */
.js .reveal { opacity: 0; translate: 0 16px; transition: opacity .6s ease, translate .6s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
}
@media (max-width: 640px) { .foot-cta p br { display: none; } }
