/* ==========================================================================
   Notate — shared design system
   Tokens, base, components and motion. Page-specific CSS lives in /css/pages.
   Design reference: Figma "Notate" — 1440px frames, 1152px content column.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* colour */
  --ink: #0c1a2b;
  --ink-2: #33404f;
  --muted: #4a5869;
  --muted-2: #424c59;
  --accent: #0064ff;
  --accent-hover: #0052d6;
  --accent-soft: rgba(0, 100, 255, 0.08);
  --accent-soft-2: rgba(0, 100, 255, 0.14);
  --sky: #8fb5ff;
  --navy: #0c1a2b;
  --bg: #f7f5f3;
  --bg-2: #f2f4f7;
  --header-bg: #fdf8f2;
  --panel: #ffffff;
  --line: #d5dbe3;
  --white: #ffffff;

  /* type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-ui: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;

  /* fluid scale: exact at 1440, eases down to ~1024 */
  --fs-h1: clamp(34px, 2.4vw + 23.5px, 58px);
  --fs-h2: clamp(30px, 1.6vw + 25px, 48px);
  --fs-h3: clamp(27px, 0.96vw + 26px, 40px);
  --fs-h4: clamp(25px, 0.6vw + 27px, 36px);
  --fs-lead: clamp(16px, 0.28vw + 16px, 20px);

  /* layout */
  --content: 1152px;
  --gutter: clamp(20px, 5vw, 144px);
  --header-h: 72px;

  /* radius + shadow */
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-card: 0 8px 24px rgba(12, 26, 43, 0.06);
  --shadow-card-hover: 0 22px 48px rgba(12, 26, 43, 0.12);
  --shadow-chip: 0 4px 8.3px rgba(11, 7, 29, 0.12);
  --shadow-menu: 0 24px 48px rgba(12, 26, 43, 0.14);

  /* motion — springs via linear(), fallbacks below */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.35s;
  --dur: 0.6s;
  --dur-slow: 0.9s;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* gentle spring, ~2% overshoot — layout & large surfaces */
    --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%,
      0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1);
    /* lively spring, ~8% overshoot — buttons, chips, icons */
    --spring-bouncy: linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902,
      0.962 25.4%, 1.008 28.6%, 1.057 33.8%, 1.077 38.6%, 1.074 42.4%, 1.044 50.6%, 1.013 59%,
      0.996 68.5%, 0.994 74.9%, 1.001 92.9%, 1);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: rgba(0, 100, 255, 0.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; transition: top .3s var(--ease-out); }
.skip-link:focus { top: 12px; }

/* ---------- Typography primitives ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.52px;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--sky { color: var(--sky); }
.eyebrow--ink { color: var(--ink); }
.eyebrow--sans { font-family: var(--font-display); }

.h1 { font-weight: 500; font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.03em; color: var(--ink); }
.h2 { font-weight: 500; font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.03em; color: var(--ink); }
.h3 { font-weight: 500; font-size: var(--fs-h3); line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); }
.h4 { font-weight: 500; font-size: var(--fs-h4); line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
.title-lg { font-weight: 500; font-size: 28px; line-height: 1.15; letter-spacing: -0.56px; color: var(--ink); }
.title { font-weight: 500; font-size: 24px; line-height: 1.15; letter-spacing: -0.36px; color: var(--ink); }
.title-sm { font-weight: 500; font-size: 20px; line-height: 1.3; letter-spacing: -0.2px; color: var(--ink); }
.title-xs { font-weight: 500; font-size: 18px; line-height: 1.3; letter-spacing: -0.18px; color: var(--ink); }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); }
.body-lg { font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.body { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.body-sm { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.on-dark { color: #fff; }
.on-dark-muted { color: rgba(255, 255, 255, 0.75); }

.section-heading { display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(760px, 100%); margin-inline: auto; text-align: center; }
.section-heading--wide { width: min(973px, 100%); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  --btn-bd: var(--accent);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding-inline: 22px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(var(--s, 1));
  transition:
    transform 0.55s var(--spring-bouncy),
    background-color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out);
}
.btn:active { --s: 0.97; transition-duration: 0.15s; }

/* hover = a gentle shift to a lighter tone of the same colour — no glow, no sweep, no grow */
.btn--primary { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); border-radius: var(--r-md); padding-inline: 16px; }
.btn--primary:hover { --btn-bg: #2b7dff; --btn-bd: #2b7dff; }
.btn--outline:hover { --btn-bg: rgba(0, 100, 255, 0.06); --btn-bd: #2b7dff; --btn-fg: #2b7dff; }
.btn--inverse { --btn-fg: #fff; --btn-bd: #fff; }
.btn--inverse:hover { --btn-bg: rgba(255, 255, 255, 0.12); }
.btn--ink { --btn-fg: var(--ink); --btn-bd: var(--ink); }
.btn--ink:hover { --btn-bg: rgba(12, 26, 43, 0.06); }

.btn--sm { height: 44px; padding-inline: 16px; border-radius: var(--r-md); font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.btn--lg { height: 68px; }
.btn--md { height: 54px; }

/* arrow that slides out on hover */
.btn .btn__arrow { width: 0; opacity: 0; margin-left: -8px; transition: width .45s var(--spring-bouncy), opacity .3s var(--ease-out), margin .45s var(--spring-bouncy); }
.btn:hover .btn__arrow { width: 16px; opacity: 1; margin-left: 0; }

/* ---------- Text links ---------- */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.55;
  color: var(--accent);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.5s var(--ease-out), color 0.3s;
}
.link:hover { background-size: 100% 1.5px; }
.link .arrow { display: inline-block; transition: transform 0.5s var(--spring-bouncy); }
.link:hover .arrow { transform: translateX(5px); }
.link--sky { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; background: none; transition: color .3s, text-underline-offset .4s var(--spring-bouncy); }
.link--sky:hover { color: #fff; text-underline-offset: 6px; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-chip);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  cursor: default;
  transition: transform 0.5s var(--spring-bouncy), box-shadow 0.4s var(--ease-out), color .25s, background-color .25s;
}

.chip:active { transform: scale(0.97); }

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.7s var(--spring), box-shadow 0.5s var(--ease-out);
}
.card--hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.icon-88 { width: 88px; height: 88px; border-radius: var(--r-xl); object-fit: cover; transition: transform 0.6s var(--spring-bouncy); }
.card--hover:hover .icon-88 { transform: translateY(-4px) scale(1.06); }

.media { position: relative; overflow: hidden; border-radius: var(--r-xl); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.zoom-on-hover:hover .media img { transform: scale(1.045); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  transition: background-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), transform .5s var(--ease-out);
}
.site-header.is-scrolled { background: rgba(253, 248, 242, 0.82); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); box-shadow: 0 1px 0 rgba(12, 26, 43, 0.06), 0 8px 24px rgba(12, 26, 43, 0.05); }
.site-header.menu-open { background: #fff; box-shadow: 0 1px 0 var(--line); backdrop-filter: none; }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; width: 116.2px; height: 36px; flex: none; transition: transform .6s var(--spring-bouncy); }
.brand:hover { transform: scale(1.04); }
.brand img { width: 116.2px; height: 36px; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.nav-list { position: relative; display: flex; align-items: center; gap: 22px; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.25s var(--ease-out);
}
.nav-link:hover, .nav-link[aria-expanded="true"], .nav-link[aria-current="page"] { color: var(--accent); }
.nav-link .caret { font-family: var(--font-ui); font-weight: 500; font-size: 12px; display: inline-block; transition: transform 0.5s var(--spring-bouncy); }
.nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }
/* hover pill + sliding underline indicator */
.nav-indicator {
  position: absolute;
  left: 0;
  bottom: -15px;
  height: 2px;
  width: var(--w, 0);
  transform: translateX(var(--x, 0));
  background: var(--accent);
  border-radius: 2px;
  opacity: 0;
  transition: transform 0.55s var(--spring), width 0.55s var(--spring), opacity 0.25s;
  pointer-events: none;
}
.nav-indicator.is-visible { opacity: 1; }
.nav-ctas { display: flex; align-items: center; gap: 10px; }

/* mega menu */
.mega {
  position: absolute;
  inset: var(--header-h) 0 auto 0;
  background: var(--panel);
  box-shadow: var(--shadow-menu);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scaleY(0.97);
  transition: opacity 0.25s var(--ease-out), transform 0.5s var(--spring), visibility 0s linear 0.5s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s var(--ease-out), transform 0.6s var(--spring), visibility 0s; }
.mega__body { padding: 32px 0 40px; }
.mega__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.mega__col { display: flex; flex-direction: column; gap: 4px; }
.mega__col > .eyebrow { padding: 0 0 8px 16px; }
.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  opacity: 0;
  transform: translateY(8px);
  transition: background-color 0.3s var(--ease-out), opacity .4s var(--ease-out), transform .6s var(--spring);
}
.mega.is-open .mega-item { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 40ms + 60ms); }
.mega.is-open .mega-item:hover, .mega-item:focus-visible { background: var(--bg); transition-delay: 0s; }
.mega-item__tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--accent-soft); transition: background-color .3s, transform .55s var(--spring-bouncy); }
.mega-item__tile img { width: 20px; height: 20px; }
.mega-item:hover .mega-item__tile { background: var(--accent-soft-2); transform: scale(1.08); }
.mega-item__title { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; line-height: 1.5; color: var(--ink); transition: color 0.25s; }
.mega-item__title img { width: 14px; height: 14px; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .5s var(--spring-bouncy); }
.mega-item:hover .mega-item__title { color: var(--accent); }
.mega-item:hover .mega-item__title img { opacity: 1; transform: none; }
.mega-item__desc { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.mega__foot { background: var(--bg-2); border-top: 1px solid var(--line); }
.mega__foot .container { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px; }
.mega__foot p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.mega__foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; line-height: 1.2; color: var(--accent); }
.mega__foot a img { width: 14px; height: 14px; transition: transform .5s var(--spring-bouncy); }
.mega__foot a:hover img { transform: translateX(4px); }
.scrim { position: fixed; inset: var(--header-h) 0 0 0; z-index: 90; background: rgba(12, 26, 43, 0.32); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease-out), visibility 0s linear .35s; }
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease-out); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); padding: 72px 0 48px; }
.footer-top { display: flex; gap: 48px; }
.footer-brand { flex: none; width: 300px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.footer-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.55; }
.footer-col a {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color .25s, background-size .45s var(--ease-out), padding .45s var(--spring-bouncy);
}
.footer-col a:hover { color: var(--accent); background-size: 100% 1px; padding-left: 4px; }
.footer-divider { height: 1px; background: var(--line); margin: 40px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ---------- Shared CTA band ---------- */
.cta-band { position: relative; isolation: isolate; overflow: hidden; padding: 120px 0; color: #fff; text-align: center; }
.cta-band__bg { position: absolute; inset: -8% 0; z-index: -2; background: url("../assets/img/cta-bg.webp") center / cover no-repeat; will-change: transform; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(4, 13, 43, 0.8); }
.cta-band__copy { width: min(760px, 100%); margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.cta-band__copy .h2 { color: #fff; }
.cta-band__copy .lead { color: #fff; }
.cta-band__btns { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.cta-band__btns .btn--primary { width: 165px; }

/* ---------- Motion: reveal on scroll ---------- */
[data-reveal] { opacity: 0; translate: 0 28px; transition: opacity 0.8s var(--ease-out), translate 1s var(--spring), scale 1s var(--spring); transition-delay: calc(var(--d, 0) * 1ms); }
[data-reveal="fade"] { translate: none; }
[data-reveal="scale"] { translate: none; scale: 0.94; }
[data-reveal="left"] { translate: -36px 0; }
[data-reveal="right"] { translate: 36px 0; }
[data-reveal].is-in { opacity: 1; translate: none; scale: none; }

/* split-word headline */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; transform: translateY(105%) rotate(4deg); transform-origin: 0 100%; transition: transform 1s var(--spring); transition-delay: calc(var(--wi) * 45ms + var(--d, 0) * 1ms); }
.split.is-in .w > span { transform: none; }

/* pointer spotlight for dark surfaces */
.glow { position: relative; isolation: isolate; }
.glow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(143, 181, 255, 0.26), transparent 62%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.glow:hover::after { opacity: 1; }

/* 3D tilt helper (driven by JS) */
[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform 0.8s var(--spring), box-shadow .5s var(--ease-out), opacity .8s var(--ease-out), translate 1s var(--spring), scale 1s var(--spring); transform-style: preserve-3d; }
[data-tilt].is-tilting { transition: transform 0.15s linear, box-shadow .5s var(--ease-out), opacity .8s var(--ease-out), translate 1s var(--spring), scale 1s var(--spring); }

/* back to top */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 80; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; box-shadow: 0 10px 24px rgba(12, 26, 43, .25); opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: opacity .3s var(--ease-out), transform .55s var(--spring-bouncy), background-color .25s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); transform: translateY(-4px) scale(1.06); }
.to-top svg { width: 18px; height: 18px; }

/* scroll progress */
.progress { position: fixed; left: 0; top: 0; z-index: 120; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* ---------- Responsive: laptop → tablet (shared). Phone rules are in "Phone layout" at the end. ---------- */
@media (max-width: 1180px) {
  .site-nav { gap: 20px; }
  .nav-list { gap: 18px; }
  .footer-top { flex-wrap: wrap; row-gap: 40px; }
  .footer-brand { width: 100%; }
}
@media (max-width: 900px) {
  .nav-ctas .btn--outline { display: none; }
  .mega__cols { gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  [data-reveal] { opacity: 1 !important; translate: none !important; scale: none !important; }
  .split .w > span { transform: none !important; }
}

/* ---------- Accordion (shared) ---------- */
.acc { display: flex; flex-direction: column; }
.acc-item {
  position: relative;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  transition: background-color .45s var(--ease-out), box-shadow .5s var(--ease-out), border-radius .45s var(--ease-out), border-color .3s, transform .6s var(--spring);
}
.acc-item.is-open { background: var(--panel); border-radius: var(--r-lg); border-color: transparent; box-shadow: var(--shadow-card); }
.acc-item:not(.is-open):hover { background: rgba(255, 255, 255, 0.55); border-radius: var(--r-lg); border-color: transparent; }
.acc-trigger { width: 100%; display: flex; align-items: center; gap: 16px; padding: 24px; text-align: left; transition: padding .5s var(--spring); }
.acc-item.is-open .acc-trigger { padding-left: 24px; padding-bottom: 12px; }
.acc-trigger .title { flex: 1 1 auto; transition: color .25s; }
.acc-item:not(.is-open):hover .acc-trigger .title { color: var(--accent); }
.acc-chev { flex: none; width: 20px; height: 20px; transition: transform .6s var(--spring-bouncy); }
.acc-item.is-open .acc-chev { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--spring); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 24px 24px; opacity: 0; transform: translateY(-6px); transition: opacity .3s var(--ease-out), transform .5s var(--spring); }
.acc-item.is-open .acc-panel p { opacity: 1; transform: none; transition-delay: .08s; }
/* dividers between closed rows only, like the design */
.acc-item.is-open + .acc-item { border-top: 0; }

/* ?static — deterministic render for screenshots / QA */
html.static *, html.static *::before, html.static *::after { animation: none !important; transition: none !important; }
html.static [data-reveal] { opacity: 1 !important; translate: none !important; scale: none !important; }
html.static .split .w > span { transform: none !important; }
html.static .site-header { position: relative; }

/* ---------- Header over the hero (see layout.js) ----------
   Header overlaps the page top; main is padded so the hero still starts at 72px (Figma),
   and the hero's own background image extends up behind the header. No copies, no mirroring. */
body.header-overlay .site-header { margin-bottom: calc(-1 * var(--header-h)); }
body.header-overlay main { padding-top: var(--header-h); }
.hero-under-header { overflow: visible !important; clip-path: inset(calc(-1 * var(--header-h)) 0 0 0); }
.hero-under-header > .hero-bg-under-header { top: calc(-1 * var(--header-h)) !important; }
@media (max-width: 900px) {
  body.header-overlay .site-header { margin-bottom: 0; }
  body.header-overlay main { padding-top: 0; }
  .hero-under-header { overflow: hidden !important; clip-path: none; }
  .hero-under-header > .hero-bg-under-header { top: 0 !important; }
  html body.header-overlay .site-header:not(.is-scrolled):not(.menu-open) { background: var(--header-bg); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
}

/* ---------- Breadcrumbs: every item is clickable ---------- */
nav[aria-label="Breadcrumb"] a,
nav[aria-label="Breadcrumb"] .crumb-menu {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color .25s var(--ease-out), background-size .45s var(--ease-out);
}
nav[aria-label="Breadcrumb"] a:hover,
nav[aria-label="Breadcrumb"] .crumb-menu:hover,
nav[aria-label="Breadcrumb"] .crumb-menu[aria-expanded="true"] { color: var(--accent); background-size: 100% 1px; }
nav[aria-label="Breadcrumb"] a:active,
nav[aria-label="Breadcrumb"] .crumb-menu:active { opacity: .7; }

/* ---------- Header over the hero: transparent, frosted so the menu stays readable ---------- */
body.header-overlay .site-header:not(.is-scrolled):not(.menu-open) {
  background: rgba(253, 248, 242, 0.38);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  backdrop-filter: saturate(1.5) blur(20px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   Art hero — Home + product + solution pages
   Text left, artwork right. Each page sets the artwork's bounds inside its image
   (--art-l / --art-r / --art-t / --art-b, fractions of the image) plus edge colours
   (--hl / --hr). The artwork's left edge sits on the page centre line (a constant gap
   to the copy), it scales up to 1.3× the content column but never past the right edge
   of the screen, its top sits just under the menu, and the image fades out around the
   artwork into the gradient.
   ========================================================================== */
.art-hero.art-hero {
  --cw: min(1152px, 100vw - 2 * var(--gutter));
  --span: calc(var(--art-r, .92) - var(--art-l, .46));
  --iw: min(var(--cw) * 1.3, (50vw - 28px) / var(--span));
  --ih: calc(var(--iw) / 1.5511);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: auto;
  /* tall enough for the artwork plus breathing room above and below it */
  min-height: calc(var(--header-h) + var(--ih) * (var(--art-b, .8) - var(--art-t, .14)) + 128px);
  padding: var(--header-h) 0 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, var(--hl, #f8ece6), var(--hr, #eedcdc));
}
body.art-hero-page main { padding-top: 0; }
.art-hero.art-hero > [class*="hero__bg"] {
  position: absolute;
  inset: auto;
  /* artwork's vertical centre = centre of the area under the header = centre of the text block */
  top: calc(50% + var(--header-h) / 2 - var(--ih) * (var(--art-t, .14) + var(--art-b, .8)) / 2);
  left: calc(50% + 12px - var(--iw) * var(--art-l, .46));
  width: var(--iw);
  height: auto;
  aspect-ratio: 1562 / 1007;
  z-index: -1;
  overflow: visible;
  margin: 0;
  transform: none;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 calc(var(--art-l, .46) * 100% - 18%), #000 min(calc(var(--art-r, .92) * 100% + 2%), 97%), transparent min(calc(var(--art-r, .92) * 100% + 10%), 100%)),
    linear-gradient(180deg, transparent 0, #000 calc(var(--art-t, .14) * 60%), #000 calc(var(--art-b, .8) * 100% + 2%), transparent calc(var(--art-b, .8) * 100% + 14%));
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 calc(var(--art-l, .46) * 100% - 18%), #000 min(calc(var(--art-r, .92) * 100% + 2%), 97%), transparent min(calc(var(--art-r, .92) * 100% + 10%), 100%)),
    linear-gradient(180deg, transparent 0, #000 calc(var(--art-t, .14) * 60%), #000 calc(var(--art-b, .8) * 100% + 2%), transparent calc(var(--art-b, .8) * 100% + 14%));
  mask-composite: intersect;
}
.art-hero.art-hero > [class*="hero__bg"] img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.art-hero.art-hero > .container { position: relative; z-index: 1; }
.art-hero.art-hero [class*="hero__copy"] {
  width: min(500px, var(--cw) * 0.44);
  max-width: none;
  padding: 56px 0;
  margin: 0;
}
/* tablet: copy first, artwork underneath at full width */
@media (max-width: 900px) {
  .art-hero.art-hero { min-height: 0; flex-direction: column; align-items: stretch; padding-bottom: 0; }
  .art-hero.art-hero > [class*="hero__bg"] { position: relative; top: auto; left: auto; width: 100%; order: 2; margin-top: -24px; }
  .art-hero.art-hero [class*="hero__copy"] { width: 100%; max-width: 640px; padding: 56px 0 0; }
}

/* Hero type (all pages): title 54px, supporting text 16px */
main > section:first-child .h1.h1 { font-size: clamp(34px, 2.2vw + 22px, 54px); }
main > section:first-child .lead.lead { font-size: 16px; line-height: 1.55; }

/* ==========================================================================
   Figma hero — product, solution and simple pages (Home has its own).
   Same block size as Figma: artwork area 1440×929 (simple heroes 1440×512)
   directly under the header, image full-bleed exactly as exported from Figma,
   copy on the left (centred on simple heroes). Title/subtitle sizes come from
   the shared hero type rule (54 / 16).
   ========================================================================== */
.fig-hero.fig-hero {
  --fh: 929px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: auto;
  min-height: calc(var(--header-h) + var(--fh));
  padding: var(--header-h) 0 0;
  display: flex;
  align-items: center;
  background: var(--hl, #f6ece7);
}
.fig-hero.fig-hero--simple { --fh: 512px; }
body.art-hero-page main { padding-top: 0; }
.fig-hero.fig-hero > [class*="hero__bg"] {
  position: absolute;
  inset: var(--header-h) 0 0 0;
  width: auto;
  height: auto;
  margin: 0;
  z-index: -1;
  transform: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.fig-hero.fig-hero > [class*="hero__bg"] img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 40%; filter: none; }
.fig-hero.fig-hero--simple > [class*="hero__bg"] img { object-position: center; }
.fig-hero.fig-hero > .container { position: relative; z-index: 1; width: min(var(--content), 100% - 2 * var(--gutter)); }
/* copy sits where Figma puts it: --ct from the top of the artwork area; lead 478px wide (520 on PDF editor) */
.fig-hero.fig-hero:not(.fig-hero--simple) { align-items: flex-start; }
.fig-hero.fig-hero:not(.fig-hero--simple) [class*="hero__copy"] { width: min(520px, 45%); max-width: none; padding: var(--ct, 140px) 0 64px; margin: 0; }
.fig-hero.fig-hero:not(.fig-hero--simple) [class*="hero__copy"] .lead { max-width: var(--lw, 478px); }
.fig-hero.fig-hero--simple [class*="hero__copy"] { padding: 48px 0; }
/* Tablet + phone: copy first, artwork full-width underneath (pages tune the crop) */
@media (max-width: 1023px) {
  .fig-hero.fig-hero:not(.fig-hero--simple) { min-height: 0; flex-direction: column; align-items: stretch; }
  .fig-hero.fig-hero:not(.fig-hero--simple) > [class*="hero__bg"] { position: relative; inset: auto; order: 2; aspect-ratio: 1440 / 929; }
  .fig-hero.fig-hero:not(.fig-hero--simple) [class*="hero__copy"] { width: 100%; max-width: 640px; padding: 56px 0 24px; }
}
/* ≤ 900 the header sits in the page flow (see "Header over the hero"), so no room is reserved for it */
@media (max-width: 900px) {
  .fig-hero.fig-hero { padding-top: 0; min-height: var(--fh); }
  .fig-hero.fig-hero > [class*="hero__bg"] { inset: 0; }
}

/* Product + platform heroes (.p-hero, always together with .fig-hero): copy stack, buttons, artwork fade-in */
.p-hero__bg { overflow: hidden; }
.p-hero__bg img { animation: pHeroIn 1.8s var(--ease-out) both; }
@keyframes pHeroIn { from { transform: scale(1.06); opacity: 0; filter: blur(6px); } to { transform: none; opacity: 1; filter: none; } }
.p-hero__copy { display: flex; flex-direction: column; gap: 28px; }
.p-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.p-hero__btns .btn--primary { width: 186px; }
@media (max-width: 767px) {
  .p-hero__copy { gap: 20px; }
  .p-hero__btns { flex-direction: column; }
  .p-hero__btns .btn, .p-hero__btns .btn--primary { width: 100%; height: 56px; }
}

/* Figma hero on screens wider than 1440: keep the artwork at its Figma size (1440 × 929),
   aligned with the content column, so the composition never grows into the copy.
   The extra width shows the image's own edge colours; the image edges ease into them. */
@media (min-width: 1441px) {
  .fig-hero.fig-hero:not(.fig-hero--simple) {
    background:
      linear-gradient(var(--hl), var(--hl)) top / 100% var(--header-h) no-repeat,
      linear-gradient(90deg, var(--el, var(--hl)) 0 50%, var(--er, var(--hl)) 50% 100%);
  }
  .fig-hero.fig-hero:not(.fig-hero--simple) > [class*="hero__bg"] {
    left: calc(50% - 720px); right: auto; width: 1440px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  }
}

/* Numbered step cards: the number sits on the title line, same size and colour as the title */
.step-title__num { font: inherit; color: inherit; margin-right: 0.15em; }

/* Industry video player extras (js/pages/industry.js): self-hosted file, and the note shown where a host blocks YouTube */
.ind-player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ind-player.is-blocked { display: grid; place-items: center; padding: 32px; background: linear-gradient(180deg, #14233a, var(--navy, #0c1a2b)); color: #fff; text-align: center; }
.ind-player__note { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 460px; }
.ind-player__note .title-sm { color: #fff; }
.ind-player__note .body { color: rgba(255, 255, 255, 0.72); }
.ind-player__note .btn { margin-top: 8px; }

/* ==========================================================================
   Phone & tablet layer (shared). Breakpoints: tablet ≤ 1023px, phone ≤ 767px.
   Desktop (≥ 1024px) is unchanged; every rule below is scoped to smaller screens
   or to touch input.
   ========================================================================== */

/* Smaller screens: headings never leave a single word on the last line, body copy avoids orphans,
   long words/URLs wrap instead of widening the page (desktop line breaks stay as approved) */
@media (max-width: 1023px) {
  h1, h2, h3 { text-wrap: balance; }
  p, li { text-wrap: pretty; }
  body { overflow-wrap: break-word; }
}

/* Menu button (phones): the icon alone, 44px target; the label is in aria-label */
.menu-btn, .mnav__close {
  display: none; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color .2s;
}
.menu-btn:hover, .mnav__close:hover { background: rgba(12, 26, 43, 0.06); }
.menu-btn svg, .mnav__close svg { width: 24px; height: 24px; }

/* Mobile menu (<dialog>, js/layout.js) — modelled on the Dropbox mobile menu:
   full screen; its top row sits exactly where the site header is (logo left, close icon where the menu icon was);
   the menu fades in quickly while the list slides down 24px; groups expand in place. No springs, no bounce. */
.mnav {
  --menu-ease: cubic-bezier(0.06, 0, 0, 1); /* strong ease-out, as on dropbox.com */
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; color: var(--ink); background: var(--bg); overflow: hidden;
  opacity: 0;
  transition: opacity .18s ease-out, overlay .18s allow-discrete, display .18s allow-discrete;
}
.mnav[open] { opacity: 1; transition-duration: .22s; }
@starting-style { .mnav[open] { opacity: 0; } }
.mnav::backdrop { background: transparent; }
.mnav__sheet { display: flex; flex-direction: column; height: 100%; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.mnav__head {
  position: sticky; top: 0; z-index: 1; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding: 0 var(--gutter); background: var(--header-bg); border-bottom: 1px solid var(--line);
}
.mnav__close { display: grid; }
.mnav__head .brand:focus:not(:focus-visible) { outline: none; }
.mnav__body, .mnav__ctas {
  padding-inline: var(--gutter);
  translate: 0 -24px; transition: translate .333s var(--menu-ease);
}
.mnav[open] :is(.mnav__body, .mnav__ctas) { translate: none; }
@starting-style { .mnav[open] :is(.mnav__body, .mnav__ctas) { translate: 0 -24px; } }
.mnav__body { display: flex; flex-direction: column; padding-top: 8px; }
.mnav__toggle, .mnav__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 0;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  font: inherit; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em;
  color: var(--ink); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .2s;
}
.mnav__toggle[aria-current="page"], .mnav__link[aria-current="page"], .mnav__toggle[aria-expanded="true"] { color: var(--accent); }
.mnav__chev { display: grid; place-items: center; width: 24px; height: 24px; transition: rotate .333s var(--menu-ease); }
.mnav__chev svg { width: 20px; height: 20px; }
.mnav__toggle[aria-expanded="true"] .mnav__chev { rotate: 180deg; }
/* group panel: height animates via grid rows; content fades in and slides down 16px */
.mnav__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .333s var(--menu-ease); }
.mnav__toggle[aria-expanded="true"] + .mnav__panel { grid-template-rows: 1fr; }
.mnav__panel-inner {
  min-height: 0; overflow: hidden;
  opacity: 0; translate: 0 -16px; transition: opacity .333s var(--menu-ease), translate .333s var(--menu-ease);
}
.mnav__toggle[aria-expanded="true"] + .mnav__panel .mnav__panel-inner { opacity: 1; translate: none; }
.mnav__panel-inner > ul:last-child { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mnav__panel .eyebrow { margin: 20px 0 4px; }
.mnav__panel a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 6px 0; color: var(--ink); }
.mnav__panel a:hover .mnav__item-title { color: var(--accent); }
.mnav__panel .mega-item__tile { flex: none; width: 40px; height: 40px; }
.mnav__item-title { display: block; font-size: 17px; font-weight: 500; transition: color .2s; }
.mnav__item-desc { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.mnav__ctas { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 32px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.mnav__ctas .btn { width: 100%; }
html:has(.mnav[open]) { overflow: hidden; } /* the page behind does not scroll while the menu is open */

/* Touch screens: comfortable targets (WCAG 2.5.5) */
@media (pointer: coarse) {
  .nav-link, .footer-col a { min-height: 44px; display: inline-flex; align-items: center; }
  .footer-col ul { gap: 0; }
}

/* ---------- Tablet (≤ 1023px) ---------- */
@media (max-width: 1023px) {
  .site-nav { gap: 16px; }
  .nav-list { gap: 16px; }
  .cta-band { padding: 96px 0; }
}

/* ---------- Phone (≤ 767px) ---------- */
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .site-nav, .mega { display: none; }
  .menu-btn { display: grid; }
  .brand, .brand img { width: 104px; height: 32px; }

  .section-heading { gap: 12px; }
  .btn { min-height: 48px; }

  /* Phone hero (every .fig-hero page; Home has its own in home.css): the artwork comes first, its lower
     part blurs and fades into the hero colour, then the copy.
     - composition heroes: the page sets where the composition sits in its image, as fractions of the
       image (inline on the section): --m-cx centre, --m-cw width, --m-t top, --m-b bottom, and optionally
       --m-s, the share of the screen width it fills (default 86%; capped on large phones). It is centred.
     - framed heroes (.fig-hero--simple: Pricing, Contact, Blog…): the whole band, edge to edge. */
  .fig-hero.fig-hero:not(.fig-hero--simple),
  .fig-hero.fig-hero.fig-hero--simple { min-height: 0; flex-direction: column; align-items: stretch; padding-bottom: 34px; } /* +34px under the copy */
  .fig-hero.fig-hero:not(.fig-hero--simple) > [class*="hero__bg"],
  .fig-hero.fig-hero.fig-hero--simple > [class*="hero__bg"] {
    order: -1; position: relative; inset: auto; width: 100%; margin: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
    mask-image: linear-gradient(180deg, #000 72%, transparent);
  }
  .fig-hero.fig-hero:not(.fig-hero--simple) > [class*="hero__bg"]::after,
  .fig-hero.fig-hero.fig-hero--simple > [class*="hero__bg"]::after {
    content: ""; position: absolute; inset: 0; background: none; pointer-events: none;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    -webkit-mask-image: linear-gradient(180deg, transparent 52%, #000 88%);
    mask-image: linear-gradient(180deg, transparent 52%, #000 88%);
  }
  .fig-hero.fig-hero:not(.fig-hero--simple) {
    --pw: calc(min(100vw, 560px) * var(--m-s, 0.86) / var(--m-cw, 0.5)); /* rendered image width */
    --ph: calc(var(--pw) / 1.55);                              /* rendered image height (2880 × 1858) */
  }
  .fig-hero.fig-hero:not(.fig-hero--simple) > [class*="hero__bg"] {
    aspect-ratio: auto; height: calc(var(--ph) * (var(--m-b, 0.78) - var(--m-t, 0.15)) + 56px);
  }
  .fig-hero.fig-hero:not(.fig-hero--simple) > [class*="hero__bg"] img {
    position: absolute; top: calc(24px - var(--ph) * var(--m-t, 0.15)); left: calc(50% - var(--pw) * var(--m-cx, 0.69));
    width: var(--pw); max-width: none; height: var(--ph); translate: none; object-fit: cover;
  }
  .fig-hero.fig-hero.fig-hero--simple > [class*="hero__bg"] { aspect-ratio: 2880 / 1024; height: auto; }
  .fig-hero.fig-hero.fig-hero--simple > [class*="hero__bg"] img { object-fit: cover; object-position: center; }
  .fig-hero.fig-hero:not(.fig-hero--simple) [class*="hero__copy"],
  .fig-hero.fig-hero.fig-hero--simple [class*="hero__copy"] { position: relative; margin-top: -12px; padding-top: 0; }

  /* accordions (every FAQ): questions one step smaller, 64px rows, tighter side padding */
  .acc-trigger, .acc-item.is-open .acc-trigger, .acc-item:not(.is-open):hover .acc-trigger { gap: 12px; min-height: 64px; padding: 18px 16px; }
  .acc-item.is-open .acc-trigger { padding-bottom: 8px; }
  .acc-trigger .title { font-size: 19px; line-height: 1.3; }
  .acc-panel p { padding: 0 16px 20px; font-size: 16px; }

  .cta-band { padding: 72px 0; }
  .cta-band__btns { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .cta-band__btns .btn { width: 100%; }

  .site-footer { padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); }
  .footer-top { flex-wrap: wrap; gap: 32px 24px; }
  .footer-brand { width: 100%; }
  .footer-col { flex: 1 1 calc(50% - 12px); }
  .footer-divider { margin: 32px 0 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; }

  .to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 44px; height: 44px; }
}
