/* Section layout. Desktop first; one mobile block (max-width: 767px) per section.
   Spacing unit --u: 1px at 1440 wide, scales with width above 1024, fixed 1px at 1024 and below.
   --col: one of the 12 grid columns. */
:root {
  --u: calc(100vw / 1440);
  --col: calc((100vw - 2 * var(--margin) - 11 * var(--gutter)) / 12);
}
@media (max-width: 1024px) {
  :root { --u: 1px; }
}

main, .footer { overflow-x: clip; }

/* ---------- Shared: mega-title lines and placeholders ---------- */
/* Each line is its own mask. inline-block keeps the line's words in one run of text. */
.line {
  display: inline-block;
  vertical-align: top;
  width: 100%;
  overflow: hidden;
  /* Extra room below the baseline so comma and descender tails are not shaved by the mask. */
  padding-block: 0.06em 0.2em;
  margin-block: -0.06em -0.2em;
  white-space: nowrap;
}
.line > span { display: block; }

.ph {
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--placeholder);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  line-height: 1;
}
/* Real photos dropped into a placeholder box fill it and crop to its shape. */
.ph > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph--16x9 { aspect-ratio: 16 / 9; }
.ph--4x5  { aspect-ratio: 4 / 5; }
.ph--3x2  { aspect-ratio: 3 / 2; }

/* ---------- Loader ---------- */
/* The splash shows the logo in the middle. When the page is ready, the background fades to reveal the hero
   while the logo flies up to its place in the top bar (js/main.js sets the transform). */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s var(--ease-out);
}
.loader::before { content: ""; position: absolute; inset: 0; background: var(--bg); transition: opacity 0.6s var(--ease-out); }
.loader.is-flying::before { opacity: 0; }
.loader.is-flying { pointer-events: none; }
.loader-logo { position: relative; display: block; height: min(58vh, 80vw); height: min(58svh, 80vw); width: auto; transition: transform 0.85s cubic-bezier(0.7, 0, 0.2, 1); will-change: transform; }
.reel[hidden] { display: none; }
.loader.is-hidden { opacity: 0; pointer-events: none; }
html:not(.js) .loader { display: none; }
/* The top-bar logo stays invisible until the flying logo has landed on it. */
html.js:not(.loader-done):not(.js-failed) .nav-logo img { opacity: 0; }
.nav-logo img { transition: opacity 0.4s var(--ease-out); }
/* If the module never runs, fade out anyway */
.loader { animation: loader-failsafe 0.6s ease 6s forwards; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
section[id], footer[id] { scroll-margin-top: var(--nav-h, 0px); }

/* ---------- Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: calc(12 * var(--u)) var(--margin);
  pointer-events: none;
}
.nav a, .nav button { pointer-events: auto; }
.nav-links { display: flex; flex-direction: column; gap: calc(2 * var(--u)); }
.nav-logo {
  position: absolute;
  left: 50%;
  top: calc(12 * var(--u));
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: calc(30 * var(--u));
  line-height: 0.9;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.nav-logo { transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s linear 0s; }
.nav.is-scrolled .nav-logo { opacity: 0; visibility: hidden; transform: translate(-50%, -24px); pointer-events: none; transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s linear 0.4s; }
html.reduced .nav-logo { transition: none; }
.nav-logo img { display: block; height: calc(76 * var(--u)); min-height: 48px; width: auto; }
.nav-contact {
  position: absolute;
  top: calc(12 * var(--u));
  right: var(--margin);
  display: inline-flex;
  align-items: center;
  font-size: calc(24 * var(--u));
  line-height: 0.82;
  transform-origin: 100% 0;
  transform: rotate(-90deg) translateY(-100%);
}
.nav-contact-icon { width: calc(38 * var(--u)); height: calc(38 * var(--u)); margin-right: calc(10 * var(--u)); flex: none; }
.nav-contact-text { display: inline-flex; flex-direction: column; }
.nav-contact-text > span:first-child { padding-left: 0.5em; }
.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 32px; height: 2px; background: currentColor; }
.menu-toggle span + span { margin-top: 8px; }

/* Collapsed: links shrink to 2px lines, expand on hover/focus */
.nav-links a { display: block; transition: font-size 0.4s var(--ease-out), color 0.4s var(--ease-out); }
/* Only on screens with a real pointer: touch tablets keep the full links, since 2px lines can't be tapped.
   Each link is a 14px-tall hit area; the visible 2px line is drawn in its middle (background-clip). */
@media (min-width: 768px) and (hover: hover) {
  .nav.is-collapsed .nav-links { gap: 0; pointer-events: auto; }
  .nav.is-collapsed .nav-links a {
    width: calc(40 * var(--u)); height: 14px; padding-block: 6px;
    font-size: 0; color: transparent; background: var(--text); background-clip: content-box; overflow: hidden;
  }
  .nav.is-collapsed .nav-links:hover a, .nav.is-collapsed .nav-links:focus-within a {
    width: auto; height: auto; padding-block: 3px; font-size: inherit; color: var(--text); background: none;
  }
}

@media (max-width: 767px) {
  .nav.is-open { background: var(--bg); min-height: 100vh; min-height: 100svh; align-items: flex-start; flex-wrap: wrap; pointer-events: auto; }
  .nav.is-open .nav-links { display: flex; order: 3; width: 100%; padding-top: 40px; gap: 12px; font-size: var(--fs-h2); line-height: 1; }
  .nav.is-open .nav-links a { font-size: inherit; }
  .nav { align-items: center; padding: 16px var(--margin); }
  .nav-links, .nav-contact { display: none; }
  .nav-logo { position: static; transform: none; }
  .nav.is-scrolled .nav-logo { transform: translateY(-24px); }
  .nav.is-scrolled.is-open .nav-logo { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .nav-logo img { height: 48px; }
  .menu-toggle { display: block; padding: 4px 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: calc(80 * var(--u));
}
.hero-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: calc(90 * var(--u));
}
.hero-title { width: 100%; text-align: center; font-weight: 400; }
.hero-sub { text-align: center; padding-inline: var(--margin); margin-top: calc(40 * var(--u)); }
.hero-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: calc(24 * var(--u)) calc(var(--margin) + var(--col));
}
.hero-bar > span:nth-child(2) { position: absolute; left: 50%; transform: translateX(-50%); }

@media (max-width: 1024px) {
  .hero-bar { padding: 16px var(--margin); }
}
@media (max-width: 767px) {
  .hero-sub { font-size: 28px; }
  .hero-bar { font-size: 12px; }
  .hero-bar > span:nth-child(2) { display: none; }
}

/* ---------- Reel ---------- */
.reel { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel-video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--placeholder); }
.reel-open {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(128 * var(--u));
  height: calc(128 * var(--u));
  margin: calc(-64 * var(--u)) 0 0 calc(-64 * var(--u));
}
.reel-open svg { display: block; width: 100%; height: 100%; }

@media (max-width: 767px) {
  .reel-open { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
}

/* ---------- About ---------- */
.about { padding-top: calc(24 * var(--u)); }
.about-top,
.about-cols {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gutter);
  width: calc(10 * var(--col) + 9 * var(--gutter));
  margin-inline: auto;
}
.about-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: calc(320 * var(--u)) 0;
}
.about-statement,
.about-stair { width: calc(5 * var(--col) + 4 * var(--gutter)); }
.about-statement { max-width: calc(430 * var(--u)); text-indent: 0.75em; font-weight: 500; }
.about-stair p { text-indent: 0.5em; }
.about-stair p + p { margin-top: 1.2em; }
.about-stair p:nth-child(2) { margin-left: calc(1.8 * var(--col)); }
.about-stair p:nth-child(3) { margin-left: calc(0.8 * var(--col)); }

/* Vibrate effect (js/vibrate.js wraps each word) */
.vib-word { display: inline-block; }
@keyframes vibe {
  0%   { transform: translate(0, 0) rotate(0); }
  20%  { transform: translate(-2px, 1px) rotate(-1.5deg); }
  40%  { transform: translate(2px, -1px) rotate(1.5deg); }
  60%  { transform: translate(-1px, -2px) rotate(-1deg); }
  80%  { transform: translate(1px, 2px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
.is-vibing .vib-word { animation: vibe 0.14s linear infinite; animation-delay: var(--vd, 0ms); }
.vib-word:hover { animation: vibe 0.14s linear infinite; }

@media (max-width: 1024px) {
  .about-top, .about-cols { width: calc(100% - 2 * var(--margin)); }
  .about-statement { max-width: 430px; }
  .about-stair { width: 100%; max-width: 450px; }
}
@media (max-width: 767px) {
  .about { padding-top: 16px; }
  .about-top { font-size: 12px; flex-wrap: wrap; }
  .about-main { min-height: 0; padding: 190px 0; }
  .about-cols { flex-direction: column; align-items: center; gap: 100px; }
  .about-statement, .about-stair { width: 100%; }
  .about-stair p:nth-child(2) { margin-left: calc(1.8 * var(--col)); }
  .about-stair p:nth-child(3) { margin-left: 0; }
}

/* ---------- Philosophy ("Brave") ---------- */
.philosophy {
  position: relative;
  padding: calc(70 * var(--u)) var(--margin) 0;
  margin-bottom: 0;
}
.phil-title-wrap { position: relative; z-index: 1; }
.phil-title-wrap--1 { width: min-content; min-width: calc(8 * var(--col) + 7 * var(--gutter)); }
.phil-title-wrap--2 {
  width: min-content; /* = longest line: each .line is nowrap and 100% wide */
  min-width: calc(7 * var(--col) + 6 * var(--gutter));
  margin-left: auto;
  margin-top: calc(100 * var(--u));
}
.phil-title { font-weight: 400; }

@media (max-width: 767px) {
  .philosophy { min-height: 0; padding-top: 0; }
  .phil-title-wrap--1, .phil-title-wrap--2 { width: 100%; min-width: 0; }
  .phil-title-wrap--2 { margin-top: 60px; text-align: right; }
  .phil-title .line { white-space: normal; }
}

/* ---------- Three phases: intro text and a carousel ---------- */
.solutions { padding-top: calc(40 * var(--u)); }
.solutions-intro { padding-inline: calc(var(--col) + var(--gutter) + var(--margin)); margin-bottom: calc(70 * var(--u)); padding-top: calc(60 * var(--u)); }
.solutions-lede { max-width: calc(420 * var(--u)); }

/* Carousel (js/slider.js). Without JS the slides sit in a native swipe strip, so all copy stays reachable. */
.slider { width: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; }
.slider.is-ready { overflow: hidden; scroll-snap-type: none; }
html.js-failed .slider { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; }
html.js-failed .slider-track { transform: none !important; touch-action: auto; }
.slider:not(.is-ready) .slider-bar, html.js-failed .slider-bar { display: none; }
.slider-track { display: flex; align-items: flex-start; width: 100%; position: relative; transition: transform 0.9s var(--ease-out); }
.slider.is-ready .slider-track { touch-action: pan-y; user-select: none; }
html.reduced .slider-track { transition: none; }
.slider:focus-visible { outline: 1px solid currentColor; outline-offset: -1px; }
.slider-prev:disabled, .slider-next:disabled { opacity: 0.3; cursor: default; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slider-bar { display: flex; align-items: center; justify-content: flex-end; margin-top: calc(60 * var(--u)); padding-inline: var(--margin); }
.slider-count { line-height: 1; }
.slider-nav { display: flex; align-items: center; gap: calc(10 * var(--u)); margin-left: calc(25 * var(--u)); }
.slider-prev, .slider-next { display: block; width: calc(22 * var(--u)); min-width: 18px; }
.slider-prev svg, .slider-next svg { display: block; width: 100%; height: auto; }

.offer {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: calc(50 * var(--u));
  align-items: start;
  padding: 0 var(--margin);
}
.offer-title {
  grid-column: 1 / span 9;
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 74px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.offer-meta { grid-column: 1 / span 6; }
.offer-tagline { font-weight: 500; margin-bottom: 0.5em; }
.offer-text { grid-column: 8 / span 5; max-width: calc(420 * var(--u)); }

@media (max-width: 1024px) {
  .solutions-intro { padding-inline: var(--margin); }
  .offer-text { max-width: 420px; }
}
@media (max-width: 767px) {
  .solutions { padding-top: 70px; }
  .solutions-intro { margin-bottom: 50px; }
  .offer { display: block; }
  .offer-title { font-size: 32px; margin-bottom: 28px; }
  .offer-meta { margin-bottom: 20px; }
  .slider-bar { justify-content: space-between; margin-top: 40px; }
}

/* ---------- Expertise: pinned scroll, five capabilities (js/caps.js adds .is-live) ---------- */
.caps { padding-top: calc(80 * var(--u)); }
.caps-head { padding-inline: calc(var(--col) + var(--gutter) + var(--margin)); margin-bottom: calc(60 * var(--u)); font-weight: 500; }
.caps-count { display: none; }
.cap { padding: 0 var(--margin); margin-bottom: 80px; }
.cap-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 6.5vw, 104px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.cap-list li { margin-bottom: 0.5em; max-width: calc(480 * var(--u)); }

.caps.is-live .caps-pin { height: 720vh; }
.caps.is-live .caps-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.caps.is-live .caps-head { position: absolute; top: calc(110 * var(--u)); left: 0; margin: 0; z-index: 2; }
.caps.is-live .caps-count { display: block; position: absolute; left: var(--margin); bottom: calc(60 * var(--u)); z-index: 2; }
.caps.is-live .cap {
  position: absolute; inset: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  column-gap: var(--gutter);
  padding: calc(230 * var(--u)) var(--margin) calc(60 * var(--u));
}
.caps.is-live .cap:not(:first-of-type) { opacity: 0; visibility: hidden; }
.caps.is-live .cap-title { grid-column: 1 / -1; grid-row: 1; margin: 0; will-change: transform; }
.caps.is-live .cap-list { grid-column: 8 / span 5; grid-row: 2; align-self: end; }
.caps.is-live .cap-list li { will-change: transform; }

@media (max-width: 1024px) {
  .caps-head { padding-inline: var(--margin); }
  .cap-list li { max-width: 420px; }
}
@media (max-width: 767px) {
  .caps { padding-top: 60px; }
  .cap-title { font-size: 34px; }
  .caps.is-live .caps-head { top: 88px; }
  .caps.is-live .cap { display: flex; flex-direction: column; gap: 28px; padding: 150px var(--margin) 70px; }
  .caps.is-live .cap-list { margin-top: auto; }
  .caps.is-live .caps-count { bottom: 28px; }
}

/* ---------- Values: pinned scroll (js/values.js adds .is-live) ---------- */
.values { position: relative; }
.values-head { max-width: calc(400 * var(--u)); }
.values-title { font-weight: 500; margin-bottom: 1em; }
.values-word, .values-copy { display: none; }
.values-static { display: flex; flex-direction: column; gap: 70px; padding: 70px var(--margin) 0; }
.values-word-static { font-family: var(--font-display); font-size: var(--fs-super-small); font-weight: 400; line-height: 0.85; letter-spacing: -0.04em; margin-bottom: 0.3em; }
.values-item p { max-width: calc(355 * var(--u)); }
.values:not(.is-live) .values-pin { padding: calc(200 * var(--u)) var(--margin) 0; }

.values.is-live { --vw-pitch: 1.3em; }
.values.is-live .values-pin { height: 420vh; }
.values.is-live .values-static { display: none; }
.values.is-live .values-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(110 * var(--u)) var(--margin) calc(50 * var(--u));
  overflow: hidden;
}
.values.is-live .values-word {
  display: flex; align-items: flex-start;
  margin-block: auto;
  font-family: var(--font-display);
  font-size: var(--fs-super);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.vw-mask { display: block; height: 0.85em; overflow: hidden; padding-block: 0.06em 0.2em; margin-block: -0.06em -0.2em; box-sizing: content-box; }
.vw-suffix { display: flex; }
.vw-stack { display: block; will-change: transform; }
.vw-cell { display: block; height: 0.85em; margin-bottom: 0.45em; line-height: 0.85; white-space: nowrap; }
.values.is-live .values-copy {
  display: grid;
  margin-left: calc(7 * (var(--col) + var(--gutter)));
  width: calc(5 * var(--col) + 4 * var(--gutter));
  max-width: calc(355 * var(--u));
}
.values-copy p { grid-area: 1 / 1; opacity: 0; }
.values-copy p:first-child { opacity: 1; }

@media (max-width: 1024px) {
  .values.is-live .values-copy { max-width: 355px; }
  .values-item p { max-width: 355px; }
}
@media (max-width: 767px) {
  .values.is-live .values-stage { padding: 88px var(--margin) 28px; }
  .values.is-live .values-word { font-size: 19vw; }
  .values.is-live .values-copy { margin-left: auto; width: 100%; max-width: 290px; }
  .values-word-static { font-size: 44px; }
}

/* ---------- Process ("Team intro") ---------- */
.process-stage { position: relative; overflow-x: clip; padding: calc(70 * var(--u)) var(--margin) 0; }
.process-row { position: relative; z-index: 1; display: flex; }
.process-row--right { justify-content: flex-end; }
.process-row--last { margin-top: calc(100 * var(--u)); }
.process-title { width: min-content; max-width: 100%; font-weight: 400; }
.process-notes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-inline: var(--margin);
  margin-top: calc(70 * var(--u));
}
.process-notes p:first-child { grid-column: 2 / span 3; grid-row: 1; }
.process-notes p:last-child { grid-column: 8 / span 3; grid-row: 2; }

@media (max-width: 767px) {
  .process-title { width: auto; }
  .process-title .line { white-space: normal; }
  .process-notes { display: flex; flex-direction: column; gap: 40px; margin-top: 120px; }
  .process-notes p { max-width: 290px; }
  .process-notes p:last-child { margin-left: auto; }
}

/* ---------- Footer / contact ---------- */
.footer { position: relative; padding: calc(220 * var(--u)) 0 calc(60 * var(--u)); }
.footer-top,
.footer-bar { margin: 0 calc(var(--col) + var(--gutter) + var(--margin)); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gutter); }
.footer-intro { flex: 0 1 calc(400 * var(--u)); }
.footer-cta { margin-bottom: calc(40 * var(--u)); font-weight: 500; }
.footer-mail a { position: relative; white-space: nowrap; }
.footer-mail a::after,
.footer-bar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}

/* Contact form */
.contact-form { flex: 0 1 calc(5 * var(--col) + 4 * var(--gutter)); }
.cf-field { display: block; margin-bottom: calc(26 * var(--u)); }
.cf-field > span { display: block; margin-bottom: 0.3em; }
.cf-field input, .cf-field textarea {
  display: block; width: 100%;
  font: inherit; letter-spacing: inherit; text-transform: uppercase; color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
  padding: 0.3em 0; outline: none;
}
.cf-field input[type="email"] { text-transform: none; }
.cf-field textarea { resize: vertical; min-height: 5em; }
.cf-field input:focus-visible, .cf-field textarea:focus-visible { box-shadow: 0 1px 0 currentColor; }
.cf-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--bg) inset; -webkit-text-fill-color: var(--text); }
.cf-submit {
  border: 1px solid currentColor; padding: 0.7em 1.5em; text-transform: uppercase;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.cf-submit:hover, .cf-submit:focus-visible { background: var(--text); color: var(--bg); }
.cf-submit:disabled { opacity: 0.5; cursor: default; }
.cf-status { margin-top: 1em; min-height: 1.2em; }
.footer-bar { display: flex; justify-content: space-between; margin-top: calc(150 * var(--u)); }

@media (max-width: 767px) {
  .footer { padding: 190px 0 30px; }
  .footer-top, .footer-bar { margin: 0 var(--margin); }
  .footer-bar { margin-top: 90px; }
  .footer-top { flex-direction: column; gap: 56px; }
  .footer-intro, .contact-form { flex: none; width: 100%; }
  .footer-cta { max-width: 300px; margin-bottom: 40px; }
  .cf-field { margin-bottom: 24px; }
    .footer-bar { font-size: 12px; flex-wrap: wrap; gap: 6px 20px; }
}

/* ---------- Reel dialog ---------- */
.reel-dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.reel-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.reel-dialog video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--placeholder); }
.reel-close {
  position: absolute; top: var(--margin); right: var(--margin); z-index: 1;
  font-family: var(--font-display); font-size: var(--fs-small); text-transform: uppercase;
  color: var(--ink); background: var(--bg); border: 1px solid var(--ink); padding: 6px 12px; cursor: pointer;
}

/* ---------- Custom cursor (only when js adds .has-cursor) ---------- */
html.has-cursor, html.has-cursor * { cursor: none; }
html.js-failed, html.js-failed * { cursor: auto; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1px solid var(--ink); border-radius: 50%; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), opacity .2s;
}
.cursor.is-on { opacity: 1; }
.cursor svg { width: 0; height: 0; transition: width .3s var(--ease-out), height .3s var(--ease-out); }
.cursor.is-plus { width: 80px; height: 80px; margin: -40px 0 0 -40px; }
.cursor.is-plus svg { width: 32px; height: 32px; }
@media (pointer: coarse) { .cursor { display: none; } }

/* Modal dialog sits in the top layer above .cursor: give the native cursor back and hide the custom one. */
html.has-cursor dialog, html.has-cursor dialog * { cursor: auto; }
html.has-cursor dialog button, html.has-cursor dialog button * { cursor: pointer; }
html:has(dialog[open]) .cursor { display: none; }
