/* ==========================================================================
   Design tokens
   A calm, warm base so the color bursts land. Accents are set per element
   with data-accent="coral|blue|lime|lilac|sun".
   ========================================================================== */

:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --sunken: #efece6;
  --ink: #141316;
  --ink-2: #5a5660;
  --ink-3: #8b8790;
  --line: #e3dfd7;

  --coral: #ff6b4a;
  --blue: #3d5afe;
  --lime: #c4f03c;
  --lilac: #b9a6ff;
  --sun: #ffc83d;

  --coral-soft: #ffe3da;
  --blue-soft: #dfe4ff;
  --lime-soft: #eefbc9;
  --lilac-soft: #ece6ff;
  --sun-soft: #fff1c7;

  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.4vw, 4.75rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1200px;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --accent: var(--coral);
  --accent-soft: var(--coral-soft);
}

[data-accent='coral'] { --accent: var(--coral); --accent-soft: var(--coral-soft); --on-accent: var(--ink); }
[data-accent='blue'] { --accent: var(--blue); --accent-soft: var(--blue-soft); --on-accent: #fff; }
[data-accent='lime'] { --accent: var(--lime); --accent-soft: var(--lime-soft); --on-accent: var(--ink); }
[data-accent='lilac'] { --accent: var(--lilac); --accent-soft: var(--lilac-soft); --on-accent: var(--ink); }
[data-accent='sun'] { --accent: var(--sun); --accent-soft: var(--sun-soft); --on-accent: var(--ink); }

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent, var(--ink)); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1400px; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section__title { font-size: var(--step-2); }
.eyebrow { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.02em; color: var(--ink-2); margin-bottom: 0.75rem; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.lede { font-size: var(--step-1); color: var(--ink-2); line-height: 1.5; max-width: 38ch; }
.lede + .lede { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; }

/* Placeholders: loud on purpose so nothing unfinished slips into launch. */
.todo {
  background: repeating-linear-gradient(-45deg, #fff7c2 0 6px, #fff1a0 6px 12px);
  color: #6b5400;
  border: 1px dashed #d9b300;
  border-radius: 6px;
  padding: 0 0.35em;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  font-size: max(0.75em, 0.8rem);
  letter-spacing: 0;
  line-height: 1.5;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ==========================================================================
   Header and footer
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark__sparkles { width: 1.25rem; height: 1.25rem; flex: none; overflow: visible; }
.wordmark__sparkles path { fill: url(#wm-sparkle); stroke: #e8960c; stroke-width: 1.2; stroke-linejoin: round; transform-origin: var(--o); transition: transform 0.5s var(--spring); }
.wordmark:hover .wordmark__sparkles path { transform: scale(1.25) rotate(15deg); }
.wordmark:hover .wordmark__sparkles path:nth-child(3) { transition-delay: 60ms; }
.wordmark:hover .wordmark__sparkles path:nth-child(4) { transition-delay: 120ms; }
.site-header nav ul { display: flex; align-items: center; gap: clamp(0.25rem, 1.5vw, 1rem); list-style: none; margin: 0; padding: 0; }
.site-header nav a { text-decoration: none; color: var(--ink-2); font-size: 0.95rem; padding: 0.4rem 0.5rem; border-radius: 8px; white-space: nowrap; transition: color 0.2s; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); }
.site-header nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-cta { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.9rem; white-space: nowrap; }
/* On phones the name stays; everything just gets a little tighter */
@media (max-width: 560px) {
  .wordmark { gap: 0.45rem; font-size: 0.95rem; }
  .site-header nav ul { gap: 0.1rem; }
  .site-header nav a { padding-inline: 0.35rem; font-size: 0.9rem; }
  .nav-cta { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
}
@media (max-width: 350px) {
  .wordmark { gap: 0.25rem; font-size: 0.9rem; }
  .site-header__inner { gap: 0.5rem; }
  .site-header nav a { font-size: 0.85rem; }
  .wordmark__sparkles { width: 1rem; height: 1rem; }
  .site-header nav a { padding-inline: 0.25rem; }
  .nav-cta { padding-inline: 0.5rem; }
}

.site-footer { background: var(--ink); color: var(--bg); padding-block: clamp(4rem, 9vw, 7rem) 2rem; margin-top: clamp(3rem, 6vw, 5rem); position: relative; }
.site-footer .eyebrow { color: var(--ink-3); }
.footer-cta { font-size: var(--step-4); max-width: 14ch; letter-spacing: -0.035em; }
.footer-cta .serif { color: var(--sun); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: clamp(4rem, 8vw, 6rem); font-size: var(--step--1); color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid currentColor; border-radius: 999px; padding: 0.75rem 1.3rem;
  background: transparent; text-decoration: none; font-weight: 500; font-size: 0.98rem;
  transition: transform 0.25s var(--spring), background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.site-footer .btn:not(.btn--primary):hover { background: rgba(255, 255, 255, 0.08); }
.page-head .btn--primary, .notfound .btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--todo { border-style: dashed; opacity: 0.85; }

/* Copy-email button: swaps its label for a quick "Copied!" */
.copy-email { position: relative; overflow: hidden; }
.copy-email__done { position: absolute; inset: 0; display: grid; place-items: center; transform: translateY(110%); transition: transform 0.35s var(--spring); }
.copy-email__label { display: inline-block; transition: transform 0.35s var(--spring); }
.copy-email.is-copied .copy-email__label { transform: translateY(-160%); }
.copy-email.is-copied .copy-email__done { transform: none; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, calc(100% + 2rem)); visibility: hidden;
  background: var(--ink); color: var(--bg); border: 1px solid #333; padding: 0.7rem 1.1rem; border-radius: 999px;
  font-size: 0.92rem; transition: transform 0.4s var(--spring), visibility 0s 0.4s; z-index: 60; pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform 0.4s var(--spring); }

/* ==========================================================================
   Home hero: the "tangle then tidy" signature interaction
   ========================================================================== */

.hero { position: relative; padding-block: clamp(4rem, 12vw, 9rem) clamp(2rem, 5vw, 4rem); }

/* Teammate cursors */
.cursors { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.js .cursors { display: block; }
.cursor {
  position: absolute; left: 0; top: 0; opacity: 0; will-change: transform;
  transition: transform var(--t, 1.2s) cubic-bezier(0.45, 0.05, 0.2, 1), opacity 0.5s;
}
.cursor.is-on { opacity: 1; }
.cursor svg { width: 22px; height: 22px; display: block; overflow: visible; transform-origin: 3px 2px; transition: transform 0.15s var(--ease); filter: drop-shadow(0 2px 3px rgba(20, 19, 22, 0.25)); }
.cursor path { fill: var(--accent); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.cursor span {
  position: absolute; left: 17px; top: 19px; white-space: nowrap;
  background: var(--accent); color: var(--on-accent); font-size: 0.78rem; font-weight: 600; line-height: 1;
  padding: 0.32rem 0.55rem; border-radius: 4px 10px 10px 10px; box-shadow: 0 2px 6px rgba(20, 19, 22, 0.15);
}
.cursor.is-pressing svg { transform: scale(0.8); }
@media (max-width: 600px) { .cursor svg { width: 18px; height: 18px; } .cursor span { font-size: 0.68rem; left: 14px; top: 15px; } }
.hero__title { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 1.05; max-width: 19ch; font-weight: 600; }
.hero__sub { font-size: var(--step-1); color: var(--ink-2); margin-top: 1.75rem; max-width: 46ch; }
.hero__status { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.5rem; font-size: var(--step--1); color: var(--ink-2); }
.pulse { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 0 rgba(43, 182, 115, 0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(43, 182, 115, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 182, 115, 0); } }

.tangle { outline-offset: 6px; }
.tangle__word { white-space: nowrap; }
.tangle__word span {
  display: inline-block;
  transition: transform 0.9s var(--spring), color 0.4s;
  transition-delay: calc(var(--i, 0) * 18ms);
}
/* Tangled state: the starting point, and again while hovered */
.js .tangle:not(.is-tidy) .tangle__word span,
.tangle.is-tidy:hover .tangle__word span,
.tangle.is-tidy:focus .tangle__word span {
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  color: var(--ink-2);
  transition-duration: 0.45s;
}
.tangle--static span { display: inline-block; transform: rotate(var(--r)); }

.mark {
  position: relative; white-space: nowrap; z-index: 0;
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em;
  padding-inline: 0.06em;
}
.mark::before {
  content: ''; position: absolute; z-index: -1; left: -0.05em; right: -0.05em; bottom: 0.08em; height: 0.5em;
  background: var(--accent); border-radius: 0.2em; opacity: 0.9;
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease) var(--delay, 1s);
}
.mark.is-on::before, html:not(.js) .mark::before { transform: scaleX(1); }

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease) var(--d, 0s), transform 0.7s var(--ease) var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Work cards, with a cursor-following label
   ========================================================================== */

.grid { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
.grid--cases { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--earlier { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

.card { display: block; text-decoration: none; position: relative; border-radius: var(--radius); }
.card__media { border-radius: var(--radius); overflow: hidden; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.card:hover .card__media { transform: translateY(-6px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--accent) 70%, transparent); }
.card__body { position: relative; padding: 1.1rem 2.5rem 0 0.15rem; }
.card__meta { display: flex; gap: 0.75rem; font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.35rem; }
.card__meta span + span::before { content: '·'; margin-right: 0.75rem; }
.card__title { font-size: var(--step-1); letter-spacing: -0.015em; }
.card--sm .card__title { font-size: 1.15rem; }
.card__summary { color: var(--ink-2); margin-top: 0.4rem; max-width: 50ch; }
.card--soon { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center;
  background: var(--surface); border: 1px solid var(--line); padding: clamp(0.75rem, 1.5vw, 1rem); }
.card--soon .card__media { border-radius: calc(var(--radius) - 6px); }
.card--soon:hover .card__media { transform: none; box-shadow: none; }
.card--soon .card__body { padding: 0.5rem 1rem 0.5rem 0; }
.card--soon .card__title { font-size: var(--step-2); }
@media (max-width: 760px) { .card--soon { grid-template-columns: 1fr; } .card--soon .card__body { padding: 0 0.5rem 0.75rem; } }
/* Agentic insights illustration */
.insights-art { position: relative; background: linear-gradient(160deg, var(--lilac-soft), #f6f3ff 60%, var(--surface)); }
.insights-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ia-grid line { stroke: color-mix(in srgb, var(--lilac) 35%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ia-threshold { stroke: var(--coral); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.7; }
.ia-today { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.ia-line, .ia-forecast { fill: none; stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ia-line { stroke: var(--ink); transition: stroke-dashoffset 1.4s var(--ease); }
.ia-forecast { stroke: #7c5cff; stroke-dasharray: 0.012 0.018; stroke-dashoffset: 0; clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease) 1.2s; }
.ia-area { opacity: 0; transition: opacity 0.8s var(--ease) 0.9s; }
.ia-connector { stroke: #7c5cff; stroke-width: 1.5; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 0.4s 2.2s; }
.ia-dot { fill: var(--coral); stroke: #fff; stroke-width: 3; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 0.3s 2.1s; }
.ia-ring { fill: none; stroke: var(--coral); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transform-origin: 490px 250px; transform-box: view-box; }
.ia-sparkle { fill: var(--sun); transform-box: fill-box; transform-origin: center; opacity: 0; }
.insights-art.is-in .ia-line { stroke-dashoffset: 0; }
.insights-art.is-in .ia-forecast { clip-path: inset(0 0 0 0); }
.insights-art.is-in .ia-area, .insights-art.is-in .ia-dot { opacity: 1; }
.insights-art.is-in .ia-connector { opacity: 0.8; }
.insights-art.is-in .ia-ring { animation: ia-ping 2.4s var(--ease) 2.3s infinite; }
.insights-art.is-in .ia-sparkle { animation: ia-twinkle 3s ease-in-out calc(2.4s + var(--d)) infinite; }
@keyframes ia-ping { 0% { opacity: 0.9; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(3.2); } }
@keyframes ia-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 40%, 60% { opacity: 1; transform: scale(1) rotate(45deg); } }
.ia-label { position: absolute; font-size: clamp(0.58rem, 1.1vw, 0.72rem); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.ia-label--today { left: calc(400 / 640 * 100% + 6px); bottom: 7%; }
.ia-label--threshold { left: 3%; top: calc(232 / 360 * 100% + 4px); color: var(--coral); }
.ia-chip {
  position: absolute; right: 4%; top: 12%; display: flex; gap: 0.6rem; align-items: flex-start; max-width: 60%;
  background: var(--surface); border-radius: 14px; padding: clamp(0.5rem, 1.4vw, 0.8rem) clamp(0.6rem, 1.6vw, 1rem);
  box-shadow: 0 1px 2px rgba(20, 19, 22, 0.06), 0 14px 30px -12px rgba(124, 92, 255, 0.45);
  font-size: clamp(0.66rem, 1.4vw, 0.88rem); line-height: 1.35;
  opacity: 0; transform: translateY(8px) scale(0.96); transition: opacity 0.5s var(--ease) 2.3s, transform 0.6s var(--spring) 2.3s;
}
.ia-chip strong { display: block; font-weight: 600; }
.ia-chip span span { display: block; color: var(--ink-2); }
.ia-chip__icon { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: linear-gradient(135deg, #7c5cff, var(--coral)); color: #fff; font-size: 0.9em; }
.insights-art.is-in .ia-chip { opacity: 1; transform: none; }
html:not(.js) .insights-art .ia-line { stroke-dashoffset: 0; }
html:not(.js) .insights-art :is(.ia-area, .ia-dot, .ia-chip) { opacity: 1; transform: none; }
html:not(.js) .insights-art .ia-forecast { clip-path: none; }

.soon-tag { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 0.8rem; padding: 0.3rem 0.75rem; border-radius: 999px; margin-bottom: 0.5rem; }
.soon-tag .pulse { background: var(--ink); animation: pulse-accent 2.4s infinite; --accent: rgba(20, 19, 22, 0.35); }
.card__arrow {
  position: absolute; right: 0.15rem; top: 1.1rem; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  transform: scale(0.6) rotate(-45deg); opacity: 0; transition: transform 0.45s var(--spring), opacity 0.3s;
}
.card:hover .card__arrow, .card:focus-visible .card__arrow { transform: none; opacity: 1; }


/* The playful cursor over work cards (main.js). The system pointer hides only
   while this runs, so touch, keyboard and reduced motion keep the normal one. */
.has-mate .card[data-cursor] { cursor: none; }
.mate {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  transform: translate3d(var(--cx, -200px), var(--cy, -200px), 0) translate(-5px, -4px);
}
.mate svg {
  display: block; width: 40px; height: 40px; overflow: visible; transform-origin: 5px 4px;
  transform: rotate(var(--tilt, 0deg)) scale(0); opacity: 0;
  transition: transform 0.35s var(--spring), opacity 0.15s;
  filter: drop-shadow(0 4px 8px rgba(20, 19, 22, 0.28));
}
.mate.is-on svg { transform: rotate(var(--tilt, 0deg)) scale(1); opacity: 1; }
.mate.is-on.is-pressing svg { transform: rotate(var(--tilt, 0deg)) scale(0.72, 0.62); transition-duration: 0.12s; }
.mate path { fill: var(--accent); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
/* A few sparkles pop from the tip when it lands on a card */
.mate__burst { position: absolute; left: 4px; top: 3px; }
.mate__burst i {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; opacity: 0;
  background: var(--accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.mate.is-bursting .mate__burst i { animation: mate-burst 0.6s var(--ease) forwards; }
.mate__burst i:nth-child(1) { --bx: -16px; --by: -14px; }
.mate__burst i:nth-child(2) { --bx: 4px; --by: -22px; animation-delay: 0.04s; }
.mate__burst i:nth-child(3) { --bx: -22px; --by: 4px; animation-delay: 0.08s; }
.mate__burst i:nth-child(4) { --bx: -12px; --by: -26px; animation-delay: 0.02s; width: 6px; height: 6px; }
@keyframes mate-burst {
  0% { opacity: 1; transform: translate(0, 0) scale(0.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(1.1) rotate(90deg); }
}
@media (hover: none) { .mate { display: none; } }

/* Media frames and their placeholders */
.media { margin: 0; aspect-ratio: var(--ratio, 16 / 10); background: var(--accent-soft); position: relative; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--todo {
  display: grid; place-items: center; padding: 1.5rem; text-align: center;
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--accent) 55%, transparent) 0 18%, transparent 18.5%),
    radial-gradient(circle at 18% 88%, color-mix(in srgb, var(--accent) 30%, transparent) 0 26%, transparent 26.5%),
    var(--accent-soft);
}
.media--todo figcaption {
  max-width: 30ch; font-size: 0.85rem; color: var(--ink-2); background: rgba(255, 255, 255, 0.85);
  border: 1px dashed var(--ink-3); border-radius: 10px; padding: 0.6rem 0.8rem; line-height: 1.4;
}
.todo-tag { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #6b5400; margin-bottom: 0.2rem; }

.link-arrow { text-decoration: none; font-weight: 500; color: var(--ink-2); }
.link-arrow span { display: inline-block; transition: transform 0.3s var(--spring); }
.link-arrow:hover { color: var(--ink); }
.link-arrow:hover span { transform: translateX(4px); }

/* ==========================================================================
   Case study
   ========================================================================== */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

.case__head { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.back { display: inline-flex; gap: 0.4rem; text-decoration: none; color: var(--ink-2); font-size: var(--step--1); margin-bottom: 2rem; }
.back span { transition: transform 0.3s var(--spring); }
.back:hover span { transform: translateX(-4px); }
.case__title { font-size: var(--step-4); letter-spacing: -0.035em; max-width: 18ch; }
.case__summary { font-size: var(--step-1); color: var(--ink-2); margin-top: 1.25rem; max-width: 46ch; }
.case__hero { border-radius: var(--radius); }

.skim { margin-top: clamp(2rem, 5vw, 3.5rem); }
.skim__label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--step--1); font-weight: 600; margin-bottom: 1rem; }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }
.skim__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0;
}
.skim__item { background: var(--surface); padding: 1.1rem 1.25rem; }
.skim__item dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; margin-bottom: 0.3rem; }
.skim__item dd { margin: 0; font-weight: 500; line-height: 1.45; }
.skim__highlights { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.skim__highlights li { background: var(--accent-soft); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.skim__stat { font-size: var(--step-3); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }

.case__body { display: grid; grid-template-columns: 1fr; gap: 3rem; padding-block: clamp(3rem, 7vw, 5rem); }

.prose { max-width: 680px; }
.case__body .prose { width: 100%; margin-inline: auto; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-size: var(--step-2); margin-top: 3.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: 2rem; }
.prose p, .prose li { color: #2d2b31; }
.prose a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose-media, .prose-figure { margin: 2.5rem 0; border-radius: var(--radius); }
@media (min-width: 1000px) { .prose-media, .prose-figure { margin-right: -160px; } }
.prose-figure img { border-radius: var(--radius); width: 100%; }
.prose-figure figcaption { font-size: var(--step--1); color: var(--ink-2); margin-top: 0.75rem; }
.pull {
  margin: 3rem 0; padding: 0 0 0 1.5rem; border-left: 4px solid var(--accent);
  font-family: var(--serif); font-size: var(--step-3); line-height: 1.15; letter-spacing: -0.01em;
}
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 3rem; }

.next {
  display: block; text-decoration: none; padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line);
}
.next__title { display: block; font-size: var(--step-3); font-weight: 600; letter-spacing: -0.03em; max-width: 22ch; line-height: 1.1; transition: color 0.3s; }
.next__title span { display: inline-block; transition: transform 0.4s var(--spring); }
.next:hover .next__title span { transform: translateX(8px); }
.next:hover .next__title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; text-underline-offset: 8px; }

/* ==========================================================================
   Shipped at Narmi: tiles with a short line and a small working demo
   ========================================================================== */

.shipped__head { display: grid; grid-template-columns: 1fr auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; margin-bottom: 2rem; }
@media (max-width: 860px) { .shipped__head { grid-template-columns: 1fr; } }
.shipped__intro { color: var(--ink-2); margin-top: 0.75rem; max-width: 52ch; }
.num { white-space: nowrap; }
.unit { font-size: 0.5em; letter-spacing: -0.01em; margin-left: 0.1em; }

.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr; } }
.tile--featured { grid-column: span 2; }
@media (max-width: 600px) { .tile--featured { grid-column: auto; } }

.tile {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.45s var(--spring), box-shadow 0.45s var(--ease);
}
.tile__head { display: grid; gap: 0.35rem; padding: 1.25rem 1.25rem 1.1rem; }
.tile__area { margin: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.tile__line { margin: 0; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
.tile__title { margin: 0; font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.tile--featured .tile__title { font-size: var(--step-2); }
.tile__media { margin-top: auto; border-radius: 0; --ratio: 16 / 9; }
.tile--featured .tile__media { --ratio: 16 / 7; }
@media (max-width: 600px) { .tile--featured .tile__media { --ratio: 16 / 9; } }
.tile__media img { transition: transform 0.8s var(--ease); }

@media (hover: hover) {
  .tile:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--accent) 80%, transparent); }
}

/* ==========================================================================
   About
   ========================================================================== */

.about-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 5vw, 3rem); }
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } }

/* Room between the greeting and the first line */
.about-hero .page-title + .lede { margin-top: 0.9rem; }

/* Waves twice on arrival, again on hover */
.wave { display: inline-block; transform-origin: 70% 75%; animation: wave 1.6s 0.4s ease-in-out both; }
.page-title:hover .wave { animation: wave-again 1s ease-in-out; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
@keyframes wave-again { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(16deg); } 40%, 80% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .wave { animation: none !important; } }

/* A little pile of prints that straighten up when you reach for them */
.prints { position: relative; height: clamp(360px, 46vw, 520px); }
.print {
  position: absolute; margin: 0; width: 56%; padding: 0.7rem 0.7rem 2.6rem; background: #fff; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 19, 22, 0.08), 0 18px 40px -18px rgba(20, 19, 22, 0.35);
  transition: transform 0.6s var(--spring), z-index 0s 0.2s; cursor: grab;
}
.print:nth-child(1) { left: 0; top: 8%; transform: rotate(-7deg); }
.print:nth-child(2) { left: 40%; top: 0; transform: rotate(5deg); z-index: 1; }
.print:nth-child(3) { left: 20%; top: 34%; transform: rotate(-2deg); z-index: 2; }
.print:hover, .print:focus-within { transform: rotate(0) scale(1.06) translateY(-8px); z-index: 5; transition: transform 0.6s var(--spring), z-index 0s; }
.print img, .print__todo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.print__todo { background: radial-gradient(circle at 70% 30%, var(--accent) 0 22%, transparent 22.5%), var(--accent-soft); }
.print figcaption { position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.6rem; font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.2; }
.print figcaption .todo { font-size: 0.75rem; }

.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.principle {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; position: relative; overflow: hidden; isolation: isolate;
  transition: transform 0.45s var(--spring), border-color 0.3s;
}
.principle::before {
  content: ''; position: absolute; z-index: -1; inset: auto -30% -30% auto; width: 9rem; height: 9rem; border-radius: 50%;
  background: var(--accent); transform: scale(0.12); transform-origin: center; transition: transform 0.7s var(--ease);
}
.principle:hover { transform: translateY(-4px); }
.principle:hover::before { transform: scale(1); }
.principle__num { font-family: var(--serif); font-style: italic; font-size: 2.2rem; line-height: 1; display: block; margin-bottom: 2.5rem; color: var(--ink-3); }
.principle__title { font-size: var(--step-1); margin-bottom: 0.6rem; }
.principle__body { color: var(--ink-2); }

.about-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(2rem, 6vw, 5rem); }
.about-cols .section__title { margin-bottom: 1.25rem; }
.experience, .outside { list-style: none; padding: 0; margin: 0; }
/* One set of columns shared by every row (subgrid), so roles and dates line up */
.experience { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; column-gap: 1.5rem; }
.experience li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.experience__co { font-weight: 600; }
.experience__years { color: var(--ink-3); font-size: 0.95rem; }
@media (max-width: 480px) {
  .experience { grid-template-columns: minmax(0, 1fr) max-content; }
  .experience .experience__role { grid-row: 2; color: var(--ink-2); }
}
.outside li { padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.outside li::before { content: '✦'; margin-right: 0.75rem; color: var(--coral); }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.quote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.quote blockquote { margin: 0 0 1.25rem; font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; }
.quote figcaption { color: var(--ink-2); font-size: 0.95rem; }
.quote figcaption strong { color: var(--ink); font-weight: 600; margin-right: 0.35rem; }

.notfound { min-height: 50vh; }
.notfound .lede { margin-bottom: 2rem; }

/* ==========================================================================
   Motion preferences
   ========================================================================== */

/* Approvals tile: swipeable approval cards, styled after the Narmi approval card */
.swipe-demo {
  --yes-c: #1d7a4e; --no-c: #b4281c;
  flex: 1; position: relative; min-height: 21rem; display: grid; grid-template-rows: 1fr auto; overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 35%, transparent) 0 14%, transparent 14.5%),
    var(--accent-soft);
  padding: 1.5rem 1.25rem 0.9rem;
}
.swipe-stack { position: relative; display: grid; place-items: center; }
.swipe-card {
  grid-area: 1 / 1; position: relative; width: min(100%, 20rem); color: #333;
  background: var(--surface); border: 1px solid #dcdcdc; border-radius: 6px;
  box-shadow: 0 18px 34px -20px rgba(20, 19, 22, 0.4);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform;
  transition: transform 0.45s var(--spring), opacity 0.3s;
}
.swipe-card.is-dragging { transition: none; cursor: grabbing; }
.swipe-card:not(.is-top) { pointer-events: none; }
.swipe-card__body { padding: 0.95rem 1rem 0.85rem; }
.swipe-card__title { position: relative; margin: 0; padding-right: 1.5rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.swipe-card__chev { position: absolute; right: 0.2rem; top: 0.35rem; width: 0.45rem; height: 0.45rem; border: solid #333; border-width: 2px 2px 0 0; transform: rotate(45deg); }
.swipe-card__amount { margin: 0.15rem 0 0; color: #666; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.swipe-card__meta { display: flex; justify-content: space-between; gap: 0.6rem; margin: 0.8rem 0 0; font-size: 0.78rem; }
.swipe-card__meta dt { color: #767676; }
.swipe-card__meta dd { margin: 0.1rem 0 0; color: #444; font-size: 0.85rem; white-space: nowrap; }
.swipe-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; padding: 0.75rem 1rem 0.85rem; border-top: 1px solid #e3e3e3; }
.swipe-card__btn {
  all: unset; box-sizing: border-box; position: relative; overflow: hidden; text-align: center; cursor: pointer;
  padding: 0.38rem 0.5rem; border: 1.5px solid; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
}
.swipe-card__btn span { position: relative; }
.swipe-card__btn::before { content: ''; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity 0.15s; }
.swipe-card__btn--no { color: var(--no-c); }
.swipe-card__btn--yes { color: var(--yes-c); }
/* As you drag, the matching button fills in */
.swipe-card__btn--yes::before { opacity: var(--yes, 0); }
.swipe-card__btn--no::before { opacity: var(--no, 0); }
.swipe-card__btn--yes span { color: color-mix(in srgb, #fff calc(var(--yes, 0) * 100%), var(--yes-c)); }
.swipe-card__btn--no span { color: color-mix(in srgb, #fff calc(var(--no, 0) * 100%), var(--no-c)); }
.swipe-card__btn:hover::before { opacity: 0.1; }
.swipe-card__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.swipe-hint {
  display: flex; justify-content: center; align-items: center; gap: 1.1rem; margin: 0.9rem 0 0;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
}
.swipe-hint span:first-child { color: var(--no-c); }
.swipe-hint span:last-child { color: var(--yes-c); }
.swipe-toast {
  position: absolute; left: 50%; top: 0.75rem; margin: 0; padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--ink); color: var(--bg); transform: translate(-50%, -150%); opacity: 0; transition: transform 0.4s var(--spring), opacity 0.25s; z-index: 4; white-space: nowrap;
}
.swipe-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
/* Narmi demos (Bulk ACH, ACH templates, International wires), styled after her Figma screens */
.nd {
  --n-green: #1d4a3c; --n-ink: #333; --n-sub: #707070; --n-line: #e1e1e1; --n-ok: #1d7a4e; --n-no: #b4281c;
  --n-chip: #e6eef4; --n-chip-ink: #2a5680;
  flex: 1; position: relative; min-height: 21rem; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; overflow: hidden;
  padding: clamp(1rem, 4%, 1.75rem);
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--accent) 35%, transparent) 0 13%, transparent 13.5%),
    var(--accent-soft);
}
.nd-panel {
  width: 100%; max-width: 40rem; color: var(--n-ink); font-size: 0.85rem; line-height: 1.35;
  background: var(--surface); border: 1px solid var(--n-line); border-radius: 10px;
  box-shadow: 0 18px 40px -24px rgba(20, 19, 22, 0.4); padding: 1rem 1.1rem 1.1rem;
}
.nd-title { margin: 0.1rem 0 0.7rem; font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; color: #262626; }
.nd-step { display: inline-block; margin: 0; padding: 0.1rem 0.5rem; border-radius: 999px; background: #edf0ee; font-size: 0.7rem; color: var(--n-green); }
.nd-pill { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.68rem; font-weight: 600; }
.nd-pill--ok { background: #e3f3ea; color: var(--n-ok); }
.nd-pill--no { background: #fbe5e2; color: var(--n-no); }

/* Bulk ACH */
.nd-table { border: 1px solid var(--n-line); border-radius: 8px; overflow: hidden; }
.nd-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.45rem 0.75rem; border-top: 1px solid var(--n-line); }
.nd-row--head { border-top: 0; background: #f2f3f2; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #555; }
.nd-row--head span:last-child, .nd-amt { text-align: right; }
.nd-row b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nd-row small { display: block; color: var(--n-sub); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nd-amt { font-variant-numeric: tabular-nums; }
.nd-speed {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap;
  background: var(--n-chip); color: var(--n-chip-ink); font-size: 0.74rem; font-weight: 500;
  transition: background 0.3s, color 0.3s, transform 0.4s var(--spring);
}
.nd-speed i { font-style: normal; font-size: 0.8em; }
.nd-speed--std { background: #f0f0f0; color: var(--n-sub); }
.nd-row.is-fast .nd-speed { background: var(--n-green); color: #fff; animation: nd-pop 0.5s var(--spring); }
.nd-row.is-fast { animation: nd-flash 0.9s var(--ease); }
@keyframes nd-pop { 0% { transform: scale(0.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes nd-flash { 0% { background: color-mix(in srgb, var(--accent) 35%, transparent); } 100% { background: transparent; } }
.nd-check { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.7rem; padding: 0.6rem 0.75rem; border: 1px solid var(--n-line); border-radius: 8px; cursor: pointer; font-size: 0.88rem; }
.nd-check input { position: absolute; opacity: 0; pointer-events: none; }
.nd-check__box { position: relative; flex: none; width: 1rem; height: 1rem; border: 1.5px solid #9a9a9a; border-radius: 3px; transition: background 0.2s, border-color 0.2s; }
.nd-check__box::after { content: ''; position: absolute; left: 0.28rem; top: 0.08rem; width: 0.28rem; height: 0.55rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.25s var(--spring); }
.nd-check input:checked + .nd-check__box { background: var(--n-green); border-color: var(--n-green); }
.nd-check input:checked + .nd-check__box::after { transform: rotate(45deg) scale(1); }
.nd-check input:focus-visible + .nd-check__box { outline: 2px solid var(--blue); outline-offset: 2px; }
.nd-count { padding: 0 0.4rem; border-radius: 4px; background: #eee; font-size: 0.75rem; }
.nd-total { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.7rem; padding: 0.6rem 0.75rem; border-radius: 8px; background: #f2f3f2; font-size: 0.82rem; }
.nd-total b { font-weight: 600; }
.nd-arrive { color: var(--n-sub); transition: color 0.3s; }
.nd-arrive.is-fast { color: var(--n-green); font-weight: 600; }
@media (max-width: 480px) {
  .nd-row { grid-template-columns: minmax(0, 1fr) auto; }
  .nd-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .nd-row > :nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
  .nd-row--head > :nth-child(2) { display: none; }
  .nd-row--head > :nth-child(3) { grid-row: 1; }
}

/* ACH templates */
.nd-history .nd-panel { max-width: 24rem; }
.nd-tabs { display: flex; gap: 1.1rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--n-line); font-size: 0.8rem; color: var(--n-sub); }
.nd-tabs span { padding-bottom: 0.4rem; }
.nd-tabs .is-on { color: var(--n-green); box-shadow: inset 0 -2px var(--n-green); }
.nd-versions { display: grid; gap: 0.45rem; }
.nd-ver { border: 1px solid var(--n-line); border-radius: 8px; transition: box-shadow 0.3s, border-color 0.3s; }
.nd-ver.is-open { border-color: #cfcfcf; box-shadow: 0 6px 16px -10px rgba(20, 19, 22, 0.3); }
.nd-ver__head { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.5rem 0.7rem; cursor: pointer; }
.nd-ver__head:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 8px; }
.nd-ver__dot { flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #cfcfcf; }
.nd-ver--active .nd-ver__dot { background: var(--n-ok); box-shadow: 0 0 0 0 var(--n-ok); animation: nd-ping 2.4s infinite; }
.nd-ver--rejected .nd-ver__dot { background: var(--n-no); }
@keyframes nd-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--n-ok) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.nd-ver__name { flex: 1; display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.4rem; }
.nd-ver__name b { font-weight: 600; }
.nd-ver__name small { flex-basis: 100%; color: var(--n-sub); font-size: 0.74rem; }
.nd-chev { width: 0.4rem; height: 0.4rem; border: solid #555; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform 0.35s var(--ease); }
.nd-ver.is-open .nd-chev { transform: rotate(-135deg); }
.nd-ver__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.nd-ver.is-open .nd-ver__body { grid-template-rows: 1fr; }
.nd-ver__body > div { overflow: hidden; padding: 0 0.7rem 0 1.75rem; }
.nd-ver.is-open .nd-ver__body > div { padding-bottom: 0.65rem; }
.nd-ver dl { display: flex; gap: 1.25rem; margin: 0; font-size: 0.74rem; }
.nd-ver dt { color: var(--n-sub); }
.nd-ver dd { margin: 0; }
.nd-ver__log { margin: 0.45rem 0 0; font-size: 0.78rem; }
.nd-ver__changes { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.45rem 0 0; }
.nd-ver__changes span {
  padding: 0.05rem 0.45rem; border-radius: 4px; background: var(--lime-soft); color: #3d5a00; font-size: 0.72rem; font-weight: 600;
  opacity: 0; transform: translateY(4px); transition: opacity 0.3s, transform 0.4s var(--spring);
}
.nd-ver--rejected .nd-ver__changes span { background: #fbe5e2; color: var(--n-no); }
.nd-ver.is-open .nd-ver__changes span { opacity: 1; transform: none; transition-delay: 0.25s; }
.nd-ver.is-open .nd-ver__changes span + span { transition-delay: 0.35s; }

/* International wires: the mobile screen in a phone. Sizes are in points of a
   375pt-wide screen (--u), so the screen scales with the phone. */
/* The phone runs off the bottom of the tile, so the top of the flow is what shows */
.nd-wire { min-height: 30rem; }
.nd-wire .nd-phone { position: absolute; top: clamp(1.25rem, 5%, 2.25rem); left: 50%; width: clamp(250px, 38%, 320px); translate: -50% 0; transition: translate 0.6s var(--ease); }
@media (hover: hover) { .tile:hover .nd-wire .nd-phone { translate: -50% -6px; } }
.nd-phone .device__screen { container-type: inline-size; }
.ndw {
  --u: calc(100cqw / 375);
  height: 100%; display: flex; flex-direction: column; background: #fff; color: #333;
  font-size: calc(var(--u) * 15); line-height: 1.3; text-align: left;
}
.ndw-status { display: flex; justify-content: space-between; align-items: center; height: calc(var(--u) * 46); padding: calc(var(--u) * 8) calc(var(--u) * 26) 0 calc(var(--u) * 30); font-size: calc(var(--u) * 15); }
.ndw-status__icons { display: flex; align-items: flex-end; gap: calc(var(--u) * 4); }
.ndw-status__icons i { display: block; width: calc(var(--u) * 3); height: calc(var(--u) * 10); background: #111; border-radius: 1px; box-shadow: calc(var(--u) * -4.5) calc(var(--u) * 3) 0 #111, calc(var(--u) * -9) calc(var(--u) * 5) 0 #111; margin-left: calc(var(--u) * 10); }
.ndw-status__icons i:nth-child(2) { width: calc(var(--u) * 14); height: calc(var(--u) * 10); border-radius: 50% 50% 0 0 / 100% 100% 0 0; box-shadow: none; clip-path: polygon(50% 100%, 0 0, 100% 0); }
.ndw-status__icons i:nth-child(3) { width: calc(var(--u) * 24); height: calc(var(--u) * 11); border-radius: calc(var(--u) * 3); box-shadow: none; }
.ndw-nav { position: relative; padding: calc(var(--u) * 10) 0 calc(var(--u) * 14); border-bottom: 1px solid #ddd; text-align: center; font-weight: 600; font-size: calc(var(--u) * 15); }
.ndw-back { position: absolute; left: calc(var(--u) * 22); top: 50%; width: calc(var(--u) * 9); height: calc(var(--u) * 9); border: solid #333; border-width: 0 0 2px 2px; transform: translateY(-80%) rotate(45deg); }
.ndw-body { flex: 1; display: flex; flex-direction: column; padding: calc(var(--u) * 20) calc(var(--u) * 20) calc(var(--u) * 26); }
.ndw .nd-choice { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: calc(var(--u) * 16); }
.ndw .nd-choice legend { float: left; width: 100%; padding: 0; margin-bottom: calc(var(--u) * 2); font-size: calc(var(--u) * 16.5); color: #333; }
.ndw .nd-choice label {
  display: flex; align-items: center; gap: calc(var(--u) * 10); min-height: calc(var(--u) * 46); padding: 0 calc(var(--u) * 13);
  border: 1px solid #d6d6d6; border-radius: calc(var(--u) * 4); cursor: pointer; color: #666; font-size: calc(var(--u) * 14.5); transition: background 0.25s;
}
.ndw .nd-choice label:has(input:checked) { background: #f3f4f4; }
.ndw .nd-choice input { appearance: none; flex: none; display: grid; place-items: center; width: calc(var(--u) * 20); height: calc(var(--u) * 20); margin: 0; border: 1.5px solid #666; border-radius: 50%; cursor: pointer; }
.ndw .nd-choice input::after { content: ''; width: calc(var(--u) * 13); height: calc(var(--u) * 13); border-radius: 50%; background: var(--n-green); transform: scale(0); transition: transform 0.25s var(--spring); }
.ndw .nd-choice input:checked { border-color: #222; }
.ndw .nd-choice input:checked::after { transform: scale(1); }
.ndw .nd-choice input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ndw .nd-amount__card {
  display: block; margin-top: calc(var(--u) * 32); padding: calc(var(--u) * 22) calc(var(--u) * 20) calc(var(--u) * 18);
  border: 1px solid #d6d6d6; border-radius: calc(var(--u) * 6); box-shadow: 0 2px 6px -3px rgba(0, 0, 0, 0.15); cursor: text;
}
.ndw .nd-amount__label { display: block; font-size: calc(var(--u) * 11.5); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #555; }
.ndw .nd-amount__row { display: flex; align-items: center; margin-top: calc(var(--u) * 8); color: var(--n-green); }
.ndw .nd-amount__sym, .ndw .nd-amount__input { font-size: calc(var(--u) * 42); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.ndw .nd-amount__input { all: unset; flex: 1; min-width: 0; width: 100%; font-size: calc(var(--u) * 42); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--n-green); caret-color: var(--n-green); }
.ndw .nd-cur { display: inline-flex; align-items: center; gap: calc(var(--u) * 5); font-size: calc(var(--u) * 15); color: #333; white-space: nowrap; }
.ndw .nd-cur::before {
  content: ''; width: calc(var(--u) * 21); height: calc(var(--u) * 15); border-radius: 1px;
  background: radial-gradient(circle, transparent 38%, #f7d046 39% 50%, transparent 51%) center / 100% 100% no-repeat, #1f3e9c;
}
.ndw .nd-cur[data-cur='USD']::before {
  background: linear-gradient(#3c3b6e, #3c3b6e) 0 0 / 45% 54% no-repeat, repeating-linear-gradient(#c8312f 0 calc(var(--u) * 1.15), #fff calc(var(--u) * 1.15) calc(var(--u) * 2.3));
}
.ndw .nd-est { display: flex; justify-content: space-between; align-items: center; gap: calc(var(--u) * 8); margin: calc(var(--u) * 22) 0 0; font-size: calc(var(--u) * 15); }
.ndw .nd-est > span:last-child { display: inline-flex; align-items: center; gap: calc(var(--u) * 5); color: #555; white-space: nowrap; }
.ndw-rate { margin-top: calc(var(--u) * 28); padding: calc(var(--u) * 14) calc(var(--u) * 10) calc(var(--u) * 10); border: 1px solid #d6d6d6; border-radius: calc(var(--u) * 4); }
.ndw-rate p { margin: 0; }
.ndw-rate p:first-child span:last-child { white-space: nowrap; }
.ndw-rate p:first-child { display: flex; justify-content: space-between; gap: calc(var(--u) * 6); padding: 0 calc(var(--u) * 4); font-size: calc(var(--u) * 14); }
.ndw-note { display: flex; gap: calc(var(--u) * 12); margin-top: calc(var(--u) * 14) !important; padding: calc(var(--u) * 12) calc(var(--u) * 12) calc(var(--u) * 12) calc(var(--u) * 12); border-radius: calc(var(--u) * 3); background: #e9edf0; font-size: calc(var(--u) * 13); color: #444; }
.ndw-i { flex: none; display: grid; place-items: center; width: calc(var(--u) * 15); height: calc(var(--u) * 15); border: 1.5px solid #234a6b; border-radius: 50%; color: #234a6b; font-size: calc(var(--u) * 10); font-weight: 700; font-style: normal; }
.ndw-btn { display: block; margin-top: calc(var(--u) * 22); padding: calc(var(--u) * 13) 0; border-radius: 999px; background: var(--n-green); color: #fff; text-align: center; font-size: calc(var(--u) * 16); font-weight: 500; }
.nd-wire.is-swapping :is(.nd-amount__row, .nd-est, .nd-amount__label) { animation: nd-swap 0.45s var(--ease); }
@keyframes nd-swap { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .cursors { display: none; }
}

/* ==========================================================================
   Lightbox: click or tap a case study image to see it full size
   ========================================================================== */

.prose img:not(.no-zoom), .prose-devices .device__screen img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(20, 19, 22, 0.88); overflow: auto; cursor: zoom-out;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-in 0.25s var(--ease); }
.lightbox img { display: block; max-width: min(96vw, 1600px); height: auto; margin: clamp(1rem, 4vw, 3rem) auto; border-radius: 6px; background: #fff; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); }
/* Most images fit the window; very long ones keep a readable width and scroll */
.lightbox:not(.is-tall) img { max-height: calc(100vh - 2 * clamp(1rem, 4vw, 3rem)); width: auto; }
.lightbox.is-tall img { max-width: min(96vw, 560px); }
.lightbox__close {
  position: fixed; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 1.4rem; line-height: 1;
}
.lightbox__close:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- Password page */
.gate {
  position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden;
  padding: 3rem var(--gutter, 1rem);
  background:
    radial-gradient(40rem 28rem at 12% 8%, color-mix(in srgb, var(--sun) 22%, transparent), transparent 70%),
    radial-gradient(36rem 26rem at 92% 88%, color-mix(in srgb, var(--coral) 16%, transparent), transparent 70%),
    radial-gradient(30rem 22rem at 90% 6%, color-mix(in srgb, var(--lilac) 18%, transparent), transparent 70%),
    var(--bg);
}
.gate__card { position: relative; z-index: 1; width: min(100%, 26rem); text-align: center; transition: opacity 0.4s 0.5s, transform 0.6s 0.4s var(--ease); }
.gate__mark { width: 4.5rem; height: 4.5rem; overflow: visible; margin: 0 auto 1.5rem; display: block; }
.gate__mark path { fill: url(#wm-sparkle); stroke: #e8960c; stroke-width: 1.2; stroke-linejoin: round; transform-origin: var(--o); animation: twinkle 2.8s ease-in-out infinite; }
.gate__mark path:nth-child(3) { animation-delay: 0.5s; }
.gate__mark path:nth-child(4) { animation-delay: 1s; }
@keyframes twinkle { 0%, 70%, 100% { transform: scale(1) rotate(0); } 82% { transform: scale(1.18) rotate(12deg); } }
.gate__title { font-size: var(--step-3); letter-spacing: -0.03em; line-height: 1.1; font-weight: 600; }
.gate__lede { color: var(--ink-2); margin-top: 0.75rem; }

.gate__form { display: grid; gap: 0.75rem; margin-top: 2rem; }
.gate__field { position: relative; }
.gate__field input {
  width: 100%; height: 3.4rem; padding: 0 1.4rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.1rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gate__field input::placeholder { color: var(--ink-3); -webkit-text-fill-color: var(--ink-3); }
.gate__field input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 45%, transparent); }
/* With JS, each typed character shows as a little sparkle instead of a dot */
.gate.has-stars .gate__field input { color: transparent; -webkit-text-fill-color: transparent; caret-color: transparent; }
.gate.has-stars .gate__field input:-webkit-autofill { -webkit-text-fill-color: transparent; box-shadow: inset 0 0 0 4rem var(--surface); }
.gate__stars { position: absolute; inset: 0 1.4rem; display: flex; align-items: center; gap: 0.15rem; pointer-events: none; overflow: hidden; }
.gate__star { display: inline-block; color: var(--accent); font-size: 1.15rem; line-height: 1; transform: rotate(var(--r, 0deg)); animation: star-pop 0.35s var(--spring) both; }
@keyframes star-pop { from { transform: scale(0) rotate(-90deg); } }
.gate__field:focus-within .gate__stars::after { content: ''; width: 2px; height: 1.4rem; margin-left: 0.2rem; background: var(--ink); animation: blink 1s steps(1) infinite; }
.gate__field input:placeholder-shown + .gate__stars::after { display: none; }
.gate.has-stars .gate__field input:placeholder-shown { caret-color: var(--ink); }
@keyframes blink { 50% { opacity: 0; } }

.gate__go { justify-content: center; height: 3.4rem; background: var(--ink); color: var(--bg); border-color: var(--ink); font-size: 1.05rem; }
.gate__go span { transition: transform 0.3s var(--spring); }
.gate__go:hover span { transform: translateX(4px); }
.gate.is-busy .gate__go { opacity: 0.7; }
.gate__error { min-height: 1.4em; font-size: var(--step--1); color: #c2410c; }
.gate.is-wrong .gate__field { animation: shake 0.45s; }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }

.gate__ask { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-2); }
.gate__link { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; vertical-align: baseline; }

/* Right password: the sparkles burst and the page lets you in */
.gate.is-in .gate__star { transition: transform 0.8s var(--ease), opacity 0.8s; transform: translate(var(--dx), var(--dy)) scale(1.6) rotate(180deg); opacity: 0; }
.gate.is-in .gate__mark path { animation: none; transition: transform 0.6s var(--spring); transform: scale(1.4) rotate(45deg); }
.gate.is-in .gate__card { opacity: 0; transform: translateY(-12px); }

/* The PM and engineer, waiting at the door */
.gate__cursors { position: absolute; inset: 0; pointer-events: none; }
.gate__cursor { position: absolute; left: auto; top: auto; }
.gate__cursor[data-who='pm'] { left: 20%; top: 28%; animation: drift-a 9s ease-in-out infinite alternate; }
.gate__cursor[data-who='eng'] { right: 24%; bottom: 26%; animation: drift-b 11s ease-in-out infinite alternate; }
@keyframes drift-a { 0% { transform: translate(0, 0); } 35% { transform: translate(40px, 24px); } 70% { transform: translate(-16px, 50px); } 100% { transform: translate(24px, -10px); } }
@keyframes drift-b { 0% { transform: translate(0, 0); } 40% { transform: translate(-48px, -20px); } 75% { transform: translate(10px, -46px); } 100% { transform: translate(-24px, 8px); } }
.gate.is-in .gate__cursor[data-who='pm'] { animation: none; transition: transform 0.9s var(--ease); transform: translate(30vw, 30vh); }
.gate.is-in .gate__cursor[data-who='eng'] { animation: none; transition: transform 0.9s var(--ease); transform: translate(-30vw, -24vh); }
@media (max-width: 600px) {
  .gate__cursor[data-who='pm'] { left: 6%; top: 6%; }
  .gate__cursor[data-who='eng'] { right: 22%; bottom: 6%; }
}
@media (prefers-reduced-motion: reduce) {
  .gate__mark path, .gate__cursor, .gate__star, .gate.is-wrong .gate__field { animation: none !important; }
}
