/* ==========================================================================
   components.css — glass, buttons, nav, menu, cursor, page transition,
   aurora, marquee, chips, forms, CTA and footer (shared by every page)
   ========================================================================== */

/* Glass (iOS material) -------------------------------------------------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
/* Specular rim — the light catching the top edge of the glass */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--glass-hi), transparent 38%, transparent 70%, rgba(255, 255, 255, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

/* Aurora backdrop ------------------------------------------------------- */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.9;
  will-change: transform;
}
/* phones: same glow, but still — moving 80px blurs every frame drains the GPU */
html.is-touch .aurora__blob { animation: none !important; will-change: auto; filter: blur(60px); }
html.is-touch .jt-end { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 3, 26, 0.9); }
.aurora__blob--1 { inline-size: 46vmax; block-size: 46vmax; background: var(--aurora-1); inset-block-start: -18vmax; inset-inline-start: -10vmax; animation: drift 22s var(--ease) infinite alternate; }
.aurora__blob--2 { inline-size: 36vmax; block-size: 36vmax; background: var(--aurora-2); inset-block-end: -16vmax; inset-inline-end: -8vmax; animation: drift 26s var(--ease) infinite alternate-reverse; }
.aurora__blob--3 { inline-size: 28vmax; block-size: 28vmax; background: var(--aurora-3); inset-block-start: 30%; inset-inline-start: 40%; animation: drift 30s var(--ease) infinite alternate; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, 4vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, 8vh, 0) scale(0.94); }
}

/* Mesh — slowly turning gradient "footage" used inside frames and cards.
   Oversized (inset -60%) so the rotation never exposes a corner. */
.mesh {
  position: absolute;
  inset: -60%;
  background:
    radial-gradient(20% 24% at 38% 40%, var(--m1, #6a2bff) 0%, transparent 100%),
    radial-gradient(20% 24% at 63% 42%, var(--m2, #ff5fd2) 0%, transparent 100%),
    radial-gradient(26% 26% at 50% 64%, var(--m3, #2c1aa8) 0%, transparent 100%),
    var(--m0, #12052e);
  animation: meshspin 18s linear infinite;
}
@keyframes meshspin { to { transform: rotate(360deg); } }
/* a service photo in a frame that used to hold the mesh (Worthy.photo):
   fills the frame, crops around its subject, never stretches */
.mesh.ph {
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  object-fit: cover;
  object-position: var(--fx, 50%) var(--fy, 50%);
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  scale: var(--z, 1);
  background: #12052e;
  animation: none !important;
  user-select: none;
}
/* the "What you get" monitor holds one photo per deliverable and fades between them */

/* Grain — the tactile finish layer */
.grain {
  position: fixed;
  inset: -50%;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* Light mode for phones and tablets (html.is-touch, set in motion.js).
   Phones have little graphics memory: oversized spinning gradients, a
   full-screen moving grain, big moving blurs, frosted glass and hundreds of
   "will-change" layers fill it up, and the browser then kills and reloads
   the page. Same look here, but still. */
html.is-touch *, html.is-touch *::before, html.is-touch *::after { will-change: auto !important; }
html.is-touch .grain { display: none; }
/* no rubber-band bounce: it shakes pinned sections at the top and bottom */
html.is-touch, html.is-touch body { overscroll-behavior-y: none; }
/* the mesh stops turning and shrinks to its frame (gradients rescaled to match) */
html.is-touch .mesh {
  inset: 0;
  animation: none !important;
  background:
    radial-gradient(44% 53% at 23.6% 28%, var(--m1, #6a2bff) 0%, transparent 100%),
    radial-gradient(44% 53% at 78.6% 32.4%, var(--m2, #ff5fd2) 0%, transparent 100%),
    radial-gradient(57% 57% at 50% 80.8%, var(--m3, #2c1aa8) 0%, transparent 100%),
    var(--m0, #12052e);
}
/* frosted glass only where it matters (the nav bar and the menu) */
html.is-touch body *:not(.nav__bar):not(.menu) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.is-touch .glass { background: var(--glass-bg-strong); }

/* Buttons --------------------------------------------------------------- */
.btn {
  --btn-h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  block-size: var(--btn-h);
  padding-inline: var(--sp-6);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform var(--d-mid) var(--ease-out), background-color var(--d-fast), box-shadow var(--d-mid) var(--ease-out);
}
.btn__label { position: relative; display: inline-block; overflow: hidden; }
.btn__label span { display: block; transition: transform var(--d-mid) var(--ease); }
.btn__label span + span { position: absolute; inset: 0; transform: translateY(105%); }
.btn:hover .btn__label span:first-child { transform: translateY(-105%); }
.btn:hover .btn__label span + span { transform: translateY(0); }
.btn__icon {
  display: grid;
  place-items: center;
  inline-size: 26px;
  block-size: 26px;
  margin-inline-end: calc(var(--sp-3) * -1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: transform var(--d-mid) var(--ease-out);
}
.btn:hover .btn__icon { transform: rotate(-45deg); }
.btn--primary {
  color: #fff;
  background: var(--btn-solid);
  box-shadow: 0 12px 40px -10px rgba(140, 70, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { background: var(--btn-solid-hover); box-shadow: 0 18px 60px -10px rgba(190, 80, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn--glass { color: var(--fg); }
.btn--glass .btn__icon { background: var(--line-2); }
.btn--sm { --btn-h: 42px; padding-inline: var(--sp-5); }
.btn--lg { --btn-h: clamp(64px, 5vw + 30px, 96px); padding-inline: clamp(2rem, 3vw, 3.5rem); font-size: var(--fs-lead); }
.btn--lg .btn__icon { inline-size: 40px; block-size: 40px; }

/* REC button — "Book a project" as a camera record button.
   Idle: brand gradient with a record dot. Hover: it becomes a live
   viewfinder — dark glass, pulsing red dot, corners close in, timecode runs. */
.btn--rec {
  overflow: visible;
  gap: 10px;
  padding-inline: 8px var(--sp-5);
  color: #fff;
  background: var(--btn-solid);
  box-shadow: 0 12px 40px -10px rgba(140, 70, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  isolation: isolate;
  transition: background-color 0.5s, box-shadow 0.6s var(--ease-out), transform var(--d-mid) var(--ease-out), padding 0.6s var(--ease-out);
}
/* dark glass layer that fades in on hover */
.btn--rec::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #150834;
  box-shadow: inset 0 0 0 1px rgba(255, 95, 210, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.rec-btn__dot {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  inline-size: calc(var(--btn-h) - 16px);
  block-size: calc(var(--btn-h) - 16px);
  max-inline-size: 38px;
  max-block-size: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(40, 10, 90, 0.35);
  transition: background-color 0.4s, transform 0.5s var(--ease-spring);
}
.rec-btn__dot::before {
  content: "";
  inline-size: 38%;
  block-size: 38%;
  border-radius: 50%;
  background: #ff3b5c;
  transition: border-radius 0.4s var(--ease-out), transform 0.4s var(--ease-spring);
}
.rec-btn__tc {
  max-inline-size: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #ff8fa3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: max-inline-size 0.6s var(--ease-out), opacity 0.3s;
}
/* viewfinder corners sit just outside the pill and close in on hover */
.rec-btn__vf { position: absolute; inset: -9px -12px; pointer-events: none; }
.rec-btn__vf i {
  position: absolute;
  inline-size: 12px;
  block-size: 12px;
  border: 0 solid #ff5fd2;
  opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.3s;
}
.rec-btn__vf i:nth-child(1) { inset-block-start: 0; inset-inline-start: 0; border-block-start-width: 2px; border-inline-start-width: 2px; transform: translate(-10px, -10px); }
.rec-btn__vf i:nth-child(2) { inset-block-start: 0; inset-inline-end: 0; border-block-start-width: 2px; border-inline-end-width: 2px; transform: translate(10px, -10px); }
.rec-btn__vf i:nth-child(3) { inset-block-end: 0; inset-inline-start: 0; border-block-end-width: 2px; border-inline-start-width: 2px; transform: translate(-10px, 10px); }
.rec-btn__vf i:nth-child(4) { inset-block-end: 0; inset-inline-end: 0; border-block-end-width: 2px; border-inline-end-width: 2px; transform: translate(10px, 10px); }

.btn--rec:hover, .btn--rec:focus-visible, .btn--rec.is-rolling {
  box-shadow: 0 16px 50px -12px rgba(255, 59, 92, 0.55);
}
.btn--rec:hover::before, .btn--rec:focus-visible::before, .btn--rec.is-rolling::before { opacity: 1; }
.btn--rec:hover .rec-btn__dot, .btn--rec:focus-visible .rec-btn__dot, .btn--rec.is-rolling .rec-btn__dot { background: rgba(255, 59, 92, 0.16); transform: scale(0.9); }
.btn--rec:hover .rec-btn__dot::before, .btn--rec:focus-visible .rec-btn__dot::before, .btn--rec.is-rolling .rec-btn__dot::before { transform: scale(1.25); animation: rec-pulse 1s steps(2) infinite; box-shadow: 0 0 12px #ff3b5c; }
.btn--rec:hover .rec-btn__tc, .btn--rec:focus-visible .rec-btn__tc, .btn--rec.is-rolling .rec-btn__tc { max-inline-size: 4.2em; opacity: 1; }
.btn--rec:hover .rec-btn__vf i, .btn--rec:focus-visible .rec-btn__vf i, .btn--rec.is-rolling .rec-btn__vf i { opacity: 1; transform: none; }
@keyframes rec-pulse { 50% { opacity: 0.25; } }
/* pressed: the dot squares off, like stopping a take */
.btn--rec:active .rec-btn__dot::before { border-radius: 3px; transform: scale(1); }
/* shutter flash on click */
.btn--rec.is-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  animation: rec-flash 0.45s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes rec-flash { from { opacity: 0.9; } to { opacity: 0; } }
.btn--rec.btn--sm { padding-inline: 6px var(--sp-4); gap: 8px; }
.btn--rec.btn--sm .rec-btn__vf { inset: -7px -9px; }
.btn--rec.btn--sm .rec-btn__vf i { inline-size: 9px; block-size: 9px; }
.btn--rec.btn--lg { padding-inline: 10px clamp(1.6rem, 2.5vw, 2.6rem); gap: 14px; }
.btn--rec.btn--lg .rec-btn__dot { max-inline-size: 64px; max-block-size: 64px; }
.btn--rec.btn--lg .rec-btn__tc { font-size: 0.85rem; }

/* Text link with animated underline */
.link {
  position: relative;
  display: inline-block;
}
.link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -2px;
  block-size: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--d-mid) var(--ease);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Nav (floating glass pill) --------------------------------------------- */
.nav {
  position: fixed;
  inset-block-start: var(--sp-4);
  inset-inline: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  pointer-events: none;
  transition: transform var(--d-mid) var(--ease-out);
}
.nav.is-hidden { transform: translateY(-140%); }
.nav__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  inline-size: min(100%, 1080px);
  padding: 7px 7px 7px 20px;
  border-radius: var(--r-pill);
  color: var(--fg);
  transition: color var(--d-theme) var(--ease-out), background-color var(--d-theme) var(--ease-out);
}
.nav__brand { display: flex; align-items: center; gap: var(--sp-3); font-weight: 600; letter-spacing: -0.02em; }
/* Script wordmark: the PNG is a mask, the brand gradient shows through it
   and drifts slowly; on hover the gradient sweeps across */
.nav__wordmark {
  display: block;
  block-size: 38px;
  aspect-ratio: 1069 / 332;
  /* dark scenes: luminous lilac → white → pink so it reads on violet glass */
  background: linear-gradient(100deg, #d9c7ff 0%, #ffffff 25%, #ff9be3 50%, #ffffff 75%, #d9c7ff 100%);
  background-size: 220% 100%;
  -webkit-mask: url("../img/brand/wordmark.png") center / contain no-repeat;
  mask: url("../img/brand/wordmark.png") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(180, 90, 255, 0.35));
  animation: wordmark-flow 8s linear infinite;
  transition: transform var(--d-mid) var(--ease-out);
}
/* light scenes: deep brand violet → magenta */
.nav__bar[data-theme="light"] .nav__wordmark {
  background-image: linear-gradient(100deg, #5b21e6 0%, #9b3dff 25%, #ff3fb5 50%, #9b3dff 75%, #5b21e6 100%);
  filter: none;
}
.nav__brand:hover .nav__wordmark { animation-duration: 1.6s; transform: scale(1.04); }
@keyframes wordmark-flow { to { background-position: -220% 0; } }
@media (max-width: 860px) { .nav__wordmark { block-size: 30px; } }
.nav__links { position: relative; display: flex; align-items: center; gap: var(--sp-1); }
/* one glass capsule glides between links on hover (motion.js → initNavGlide) */
.nav__glide {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 18px -8px rgba(120, 60, 255, 0.6);
  opacity: 0;
  scale: 0.92;
  pointer-events: none;
  transition:
    transform 0.55s var(--ease-out),
    inline-size 0.55s var(--ease-out),
    block-size 0.55s var(--ease-out),
    opacity 0.3s,
    scale 0.45s var(--ease-spring);
}
.nav__glide.is-on { opacity: 1; scale: 1; }
.nav__glide.is-snap { transition: opacity 0.3s, scale 0.45s var(--ease-spring); }
.nav__bar[data-theme="light"] .nav__glide {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.8));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(106, 43, 255, 0.1), 0 6px 18px -8px rgba(106, 43, 255, 0.45);
}
.nav__links > li > * { position: relative; z-index: 1; }
.nav__links > li { display: flex; align-items: center; }
.nav__link {
  position: relative;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--fg-2);
  transition: color var(--d-fast), background-color var(--d-fast);
}
.nav__link:hover { color: var(--fg); }
/* no-JS / keyboard fallback when the glide capsule isn't running */
html:not(.has-glide) .nav__link:hover, .nav__link:focus-visible { background: var(--line); }
/* hover gives a faint preview of the active bar */
.nav__link:not([aria-current="page"]):hover::after { transform: scaleX(0.45); opacity: 0.55; }
/* active page: brighter label + a small glowing brand bar, no grey slab */
.nav__link[aria-current="page"] { color: var(--fg); font-weight: 600; }
.nav__link[aria-current="page"]:hover { background: transparent; }
.nav__link::after {
  content: "";
  position: absolute;
  inset-block-end: 3px;
  inset-inline-start: 50%;
  inline-size: 16px;
  block-size: 3px;
  margin-inline-start: -8px;
  border-radius: 3px;
  background: var(--grad-brand);
  box-shadow: 0 0 10px rgba(200, 90, 255, 0.9), 0 0 2px rgba(255, 120, 220, 0.9);
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s;
}
.nav__link[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }
/* the Services link has extra end padding for the chevron — keep the bar centred on the word */
.nav__link--mega::after { margin-inline-start: calc(-8px - 2px); }
.nav__actions { display: flex; align-items: center; gap: var(--sp-2); }
/* menu button: a violet disc, two lines of different length that meet in an X */
.nav__burger {
  display: none;
  position: relative;
  inline-size: 46px;
  block-size: 46px;
  border-radius: 50%;
  place-items: center;
  background: var(--btn-solid);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(106, 43, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: background-color 0.3s, transform 0.4s var(--ease-spring);
}
.nav__burger:active { transform: scale(0.94); }
.nav__burger-lines { position: relative; display: block; inline-size: 18px; block-size: 12px; }
.nav__burger-lines i { position: absolute; inset-inline-end: 0; block-size: 2px; border-radius: 2px; background: currentColor; transition: transform 0.5s var(--ease), inline-size 0.4s var(--ease), inset-block-start 0.5s var(--ease); }
.nav__burger-lines i:first-child { inset-block-start: 1px; inline-size: 18px; }
.nav__burger-lines i:last-child { inset-block-start: 9px; inline-size: 11px; }
.nav__burger[aria-expanded="true"] { background: #fff; color: var(--c-ink); }
.nav__burger[aria-expanded="true"] .nav__burger-lines i { inset-block-start: 5px; inline-size: 18px; }
.nav__burger[aria-expanded="true"] .nav__burger-lines i:first-child { transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] .nav__burger-lines i:last-child { transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav__links, .nav__actions .btn { display: none; }
  .nav__burger { display: grid; }
  .nav__bar { padding: 6px 6px 6px 16px; }
}

/* Services trigger + mega menu ----------------------------------------- */
/* typed colour props so the preview mesh can cross-fade between services */
@property --m0 { syntax: "<color>"; inherits: true; initial-value: #12052e; }
@property --m1 { syntax: "<color>"; inherits: true; initial-value: #6a2bff; }
@property --m2 { syntax: "<color>"; inherits: true; initial-value: #ff5fd2; }
@property --m3 { syntax: "<color>"; inherits: true; initial-value: #2c1aa8; }

.nav__item--mega { position: relative; display: flex; align-items: center; }
.nav__link--mega { padding-inline-end: 6px; }
.nav__chev {
  display: grid;
  place-items: center;
  inline-size: 26px;
  block-size: 26px;
  margin-inline-end: 4px;
  border-radius: 50%;
  color: var(--fg-2);
  transition: transform var(--d-mid) var(--ease-spring), background-color var(--d-fast), color var(--d-fast);
}
.nav__chev:hover { color: var(--fg); }
.nav__chev[aria-expanded="true"] { transform: rotate(180deg); color: var(--fg); background: var(--line-2); }
.nav__item--mega.is-open .nav__link--mega { color: var(--fg); }

.mega {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-start: 50%;
  inline-size: min(1180px, calc(100% - 2 * var(--gutter)));
  translate: -50% 0;
  pointer-events: auto;
  color: var(--fg);
  perspective: 1400px;
}
.mega[hidden] { display: none; }

/* the panel unfolds from the top edge like a glass curtain */
.mega__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-xl);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 40px 90px -30px rgba(20, 6, 60, 0.55);
  overflow: hidden;
  transform-origin: 50% 0;
  clip-path: inset(0 0 100% 0 round var(--r-xl));
  transform: rotateX(-14deg) translateY(-14px);
  opacity: 0;
  transition: clip-path 0.75s var(--ease), transform 0.9s var(--ease-out), opacity 0.4s;
  --mx: 50%;
  --my: 0%;
}
.mega.is-open .mega__panel { clip-path: inset(0 0 0 0 round var(--r-xl)); transform: none; opacity: 1; }
.mega.is-closing .mega__panel { transition-duration: 0.45s, 0.45s, 0.3s; }
.mega[data-theme="dark"] .mega__panel { background: rgba(22, 10, 54, 0.84); }
/* light that follows the pointer inside the panel */
.mega__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(180, 110, 255, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.mega__panel:hover::before { opacity: 1; }
/* a sheen sweeps across once as it opens */
.mega__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%);
  transform: translateX(-110%);
}
.mega.is-open .mega__panel::after { transform: translateX(110%); transition: transform 1.2s var(--ease) 0.15s; }
.mega__panel > * { position: relative; z-index: 1; }

/* grouped columns: Create / Design / Grow */
.mega__panel { grid-template-columns: minmax(0, 2.1fr) minmax(270px, 1fr); }
.mega__groups { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 6px 4px 4px; }
.mega__group { position: relative; z-index: 1; display: grid; align-content: start; gap: 2px; }
.mega__group + .mega__group { padding-inline-start: 10px; border-inline-start: 1px solid var(--line); }
.mega__label { display: flex; align-items: center; gap: 8px; padding: 6px 10px 10px; color: var(--fg-3); }
.mega__label span { display: grid; place-items: center; inline-size: 22px; block-size: 22px; border-radius: 7px; font-size: 0.58rem; color: var(--fg); background: var(--line-2); }
.mega__group ul { display: grid; gap: 2px; }

/* highlight that glides to the hovered service (positioned by JS) */
.mega__hover {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 0;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s var(--ease-out), inline-size 0.5s var(--ease-out), block-size 0.5s var(--ease-out), opacity 0.3s;
}
.mega[data-theme="light"] .mega__hover { background: rgba(106, 43, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(106, 43, 255, 0.08); }
.mega__groups.has-hover .mega__hover { opacity: 1; }

.mega__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  outline-offset: -2px;
}
.mega__icon {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 12px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 8px 20px -8px rgba(140, 70, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.6s var(--ease-spring), box-shadow 0.4s;
}
.mega__icon .ic { inline-size: 21px; block-size: 21px; overflow: visible; }
.mega__item:hover .mega__icon, .mega__item:focus-visible .mega__icon, .mega__item.is-current .mega__icon { transform: translateY(-2px) rotate(-6deg) scale(1.08); box-shadow: 0 14px 28px -10px rgba(190, 80, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.mega__text { display: grid; gap: 1px; min-inline-size: 0; }
.mega__text b { font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega__text small { color: var(--fg-3); font-size: 0.74rem; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; transition: color 0.3s; }
.mega__item:hover .mega__text small, .mega__item.is-current .mega__text small { color: var(--fg-2); }
.mega__go { color: var(--fg-2); opacity: 0; transform: translateX(-8px); transition: opacity var(--d-fast), transform var(--d-mid) var(--ease-out); }
.mega__item:hover .mega__go, .mega__item:focus-visible .mega__go, .mega__item.is-current .mega__go { opacity: 1; transform: none; }

/* live preview card */
.mega__feature {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-block-size: 300px;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  --m0: #12052e; --m1: #7b3bff; --m2: #ff4fbf; --m3: #1d2bff;
  transition: --m0 0.8s, --m1 0.8s, --m2 0.8s, --m3 0.8s;
}
.mega__feature .mesh { z-index: -2; animation-duration: 24s; }
.mega__feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 3, 26, 0.05) 0%, rgba(7, 3, 26, 0.35) 45%, rgba(7, 3, 26, 0.85) 100%); }
.mega__feature-top { display: flex; justify-content: space-between; color: rgba(255, 255, 255, 0.75); }
.mega__feature-icon {
  position: absolute;
  inset-block-start: 44px;
  inset-inline-end: 22px;
  z-index: -1;
  inline-size: 40%;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.45));
  opacity: 0.55;
}
.mega__feature-icon .ic { inline-size: 100%; block-size: auto; overflow: visible; }
.mega__feature-body { display: grid; gap: 8px; align-self: end; }
.mega__feature-body b { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; max-inline-size: 13ch; }
.mega__feature-body em { font-family: var(--f-serif); font-weight: 400; }
.mega__feature-body small { color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; line-height: 1.45; max-inline-size: 32ch; }
.mega__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-block-start: 2px; }
.mega__tags span { padding: 4px 9px; border-radius: var(--r-pill); font-size: 0.68rem; color: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); }
.mega__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.mega__fbtn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-pill); font-size: 0.8rem; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); transition: background-color 0.3s, transform 0.4s var(--ease-out); }
.mega__fbtn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.mega__fbtn--primary { color: #120a2b; background: #fff; border-color: transparent; }
.mega__fbtn--primary:hover { background: #fff; }
.mega__fbtn svg { transition: transform 0.4s var(--ease-out); }
.mega__fbtn--primary:hover svg { transform: translateX(3px); }
/* swap animation for the preview content */
.mega__feature [data-f-title], .mega__feature [data-f-text], .mega__feature [data-f-tags], .mega__feature-icon { transition: opacity 0.25s, transform 0.5s var(--ease-out), filter 0.4s; }
.mega__feature.is-swapping [data-f-title], .mega__feature.is-swapping [data-f-text], .mega__feature.is-swapping [data-f-tags] { opacity: 0; transform: translateY(10px); filter: blur(4px); }
.mega__feature.is-swapping .mega__feature-icon { opacity: 0; transform: scale(0.7) rotate(-10deg); }

.mega__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 8px 4px;
  border-block-start: 1px solid var(--line);
  color: var(--fg-2);
  font-size: var(--fs-small);
}
.mega__quick { display: flex; gap: 4px; }
.mega__quick a { padding: 7px 12px; border-radius: var(--r-pill); font-size: 0.8rem; color: var(--fg-2); transition: background-color 0.3s, color 0.3s; }
.mega__quick a:hover { color: var(--fg); background: var(--line); }
.mega__help { display: inline-flex; align-items: center; gap: var(--sp-3); }
.mega__help .rec { color: var(--fg-3); font-size: 0.62rem; }

/* staggered entrance: each piece rises out of a blur */
.mega__label, .mega__item, .mega__feature, .mega__foot { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity 0.45s var(--ease-out), transform 0.7s var(--ease-out), filter 0.5s var(--ease-out); }
.mega.is-open .mega__label, .mega.is-open .mega__item, .mega.is-open .mega__feature, .mega.is-open .mega__foot { opacity: 1; transform: none; filter: none; }
.mega.is-open .mega__item { transition-delay: var(--d, 0s); }
.mega.is-open .mega__label { transition-delay: 0.05s; }
.mega.is-open .mega__feature { transition-delay: 0.12s, 0.12s, 0.12s, 0s, 0s, 0s, 0s; }
.mega.is-open .mega__foot { transition-delay: 0.3s; }
.mega.is-closing .mega__label, .mega.is-closing .mega__item, .mega.is-closing .mega__feature, .mega.is-closing .mega__foot { transition-delay: 0s !important; transition-duration: 0.2s; }
@media (max-width: 1100px) {
  .mega__panel { grid-template-columns: 1fr; }
  .mega__feature { display: none; }
}
@media (max-width: 960px) { .mega { display: none !important; } }

/* Service icons — idle + hover motion ------------------------------------ */
.ic { display: block; overflow: visible; }
.ic * { transform-box: fill-box; }
.ic__clap { transform-origin: 0% 100%; }
.ic__heart { transform-origin: 50% 100%; }
.ic__iris { transform-origin: 50% 50%; }
.ic__flash { opacity: 0; transform-origin: 0% 100%; }
.ic__w1, .ic__w2 { transform-origin: 0% 50%; }
.ic__handle--l { transform-origin: 100% 50%; }
.ic__handle--r { transform-origin: 0% 50%; }
.ic__nib { transform-origin: 50% 100%; }

.mega__item:hover .ic__clap, .sv-quick__card:hover .ic__clap, .is-live .ic__clap { animation: ic-clap 1s var(--ease-out) infinite; }
@keyframes ic-clap { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-20deg); } 45% { transform: rotate(2deg); } }

.mega__item:hover .ic__nib, .sv-quick__card:hover .ic__nib, .is-live .ic__nib { animation: ic-nib 1.4s var(--ease) infinite; }
.mega__item:hover .ic__handle--l, .sv-quick__card:hover .ic__handle--l, .is-live .ic__handle--l { animation: ic-handle-l 1.4s var(--ease) infinite; }
.mega__item:hover .ic__handle--r, .sv-quick__card:hover .ic__handle--r, .is-live .ic__handle--r { animation: ic-handle-r 1.4s var(--ease) infinite; }
@keyframes ic-nib { 50% { transform: translateY(-1.5px) rotate(-6deg); } }
@keyframes ic-handle-l { 50% { transform: translateX(-1.5px) rotate(-14deg); } }
@keyframes ic-handle-r { 50% { transform: translateX(1.5px) rotate(14deg); } }

.mega__item:hover .ic__heart, .sv-quick__card:hover .ic__heart, .is-live .ic__heart { animation: ic-heart 1.3s var(--ease-out) infinite; }
@keyframes ic-heart { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-3px) scale(1.25); } 60% { transform: translateY(-2px) scale(0.95); } 100% { transform: translateY(0) scale(1); } }

.mega__item:hover .ic__iris, .sv-quick__card:hover .ic__iris, .is-live .ic__iris { animation: ic-iris 1.4s var(--ease) infinite; }
.mega__item:hover .ic__flash, .sv-quick__card:hover .ic__flash, .is-live .ic__flash { animation: ic-flash 1.4s steps(1) infinite; }
@keyframes ic-iris { 0%, 100% { transform: scale(1); } 40% { transform: scale(0.35); } 55% { transform: scale(0.35); } }
@keyframes ic-flash { 0%, 38% { opacity: 0; } 40%, 52% { opacity: 1; } 54%, 100% { opacity: 0; } }

.mega__item:hover .ic__w1, .sv-quick__card:hover .ic__w1, .is-live .ic__w1 { animation: ic-wave 1.2s var(--ease-out) infinite; }
.mega__item:hover .ic__w2, .sv-quick__card:hover .ic__w2, .is-live .ic__w2 { animation: ic-wave 1.2s var(--ease-out) 0.2s infinite; }
@keyframes ic-wave { 0% { opacity: 0.2; transform: translateX(-1px) scale(0.85); } 50% { opacity: 1; transform: translateX(1px) scale(1.08); } 100% { opacity: 0.2; transform: translateX(-1px) scale(0.85); } }

/* graphic design: the shapes on the artboard rearrange */
.ic__s1, .ic__s2, .ic__s3, .ic__s4, .ic__dots, .ic__bubble { transform-origin: 50% 50%; }
.mega__item:hover .ic__s1, .sv-quick__card:hover .ic__s1, .is-live .ic__s1 { animation: ic-s1 1.6s var(--ease) infinite; }
.mega__item:hover .ic__s2, .sv-quick__card:hover .ic__s2, .is-live .ic__s2 { animation: ic-s2 1.6s var(--ease) infinite; }
.mega__item:hover .ic__s3, .sv-quick__card:hover .ic__s3, .is-live .ic__s3 { animation: ic-s3 1.6s var(--ease) infinite; }
@keyframes ic-s1 { 50% { transform: translate(1.5px, 1.5px) scale(1.15); } }
@keyframes ic-s2 { 50% { transform: rotate(90deg) scale(0.85); } }
@keyframes ic-s3 { 50% { transform: translateY(-2px); } }
/* social media management: posts tick in, a reply pops up */
.mega__item:hover .ic__dots, .sv-quick__card:hover .ic__dots, .is-live .ic__dots { animation: ic-dots 1.4s steps(3) infinite; }
.mega__item:hover .ic__bubble, .sv-quick__card:hover .ic__bubble, .is-live .ic__bubble { animation: ic-bubble 1.4s var(--ease-out) infinite; }
@keyframes ic-dots { 0% { opacity: 0.3; } 50% { opacity: 1; } 100% { opacity: 0.3; } }
@keyframes ic-bubble { 0% { transform: translate(0, 2px) scale(0.7); opacity: 0.4; } 40% { transform: translate(0, -1px) scale(1.12); opacity: 1; } 100% { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .mega__panel { clip-path: none; transform: none; }
  .ic * { animation: none !important; }
}

/* Mobile menu sheet */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  /* the list sits at the bottom, but scrolls (instead of clipping its top) when Services is open */
  display: flex;
  flex-direction: column;
  padding: calc(var(--sp-9) + var(--sp-4)) var(--gutter) var(--sp-6);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #fff;
  background: rgba(10, 4, 30, 0.88);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  clip-path: inset(0 0 100% 0 round 0 0 var(--r-xl) var(--r-xl));
  visibility: hidden;
  transition: clip-path 0.9s var(--ease), visibility 0s linear 0.9s;
}
.menu.is-open { clip-path: inset(0 0 0 0 round 0); visibility: visible; transition: clip-path 0.9s var(--ease), visibility 0s; }
.menu__list { display: grid; gap: var(--sp-2); margin-block-start: auto; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  font-size: clamp(2.6rem, 12vw, 4.5rem);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.02;
}
.menu__link .t-mono { color: rgba(255, 255, 255, 0.45); }
/* Services opens in place: a panel of the crafts with their photos */
.menu__toggle { inline-size: 100%; color: inherit; text-align: start; }
.menu__plus { position: relative; flex: none; align-self: center; inline-size: 26px; block-size: 26px; margin-inline-start: auto; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); }
.menu__plus::before, .menu__plus::after { content: ""; position: absolute; inset: 50% auto auto 50%; inline-size: 11px; block-size: 1.5px; margin: -0.75px 0 0 -5.5px; background: currentColor; transition: transform 0.4s var(--ease); }
.menu__plus::after { transform: rotate(90deg); }
.menu__toggle[aria-expanded="true"] .menu__plus::after { transform: rotate(0deg); }
.menu__sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.menu__toggle[aria-expanded="true"] + .menu__sub { grid-template-rows: 1fr; }
.menu__sub-in { min-block-size: 0; overflow: hidden; }
.menu__svcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-block: var(--sp-3) var(--sp-2); }
.menu__svc { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.86rem; font-weight: 500; line-height: 1.15; }
.menu__svc img { flex: none; inline-size: 40px; block-size: 40px; border-radius: 10px; object-fit: cover; }
.menu__svc:active { background: rgba(255, 255, 255, 0.16); }
.menu__all { display: inline-flex; gap: 8px; margin-block: 4px var(--sp-3); padding: 8px 2px; color: #d9c8ff; font-weight: 500; }
.menu__foot { display: flex; justify-content: space-between; margin-block-start: var(--sp-7); color: rgba(255, 255, 255, 0.6); }

/* Cursor (desktop only) ------------------------------------------------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor .cursor {
    display: block;
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    z-index: var(--z-cursor);
    pointer-events: none;
    mix-blend-mode: difference;
  }
  .cursor__dot {
    position: absolute;
    inline-size: 8px;
    block-size: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: #fff;
  }
  .cursor__ring {
    position: absolute;
    display: grid;
    place-items: center;
    inline-size: 40px;
    block-size: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: inline-size var(--d-mid) var(--ease-out), block-size var(--d-mid) var(--ease-out), margin var(--d-mid) var(--ease-out), background-color var(--d-mid);
  }
  .cursor__label {
    font-family: var(--f-mono);
    font-size: 0.62rem;
    letter-spacing: var(--tracking-mono);
    text-transform: uppercase;
    color: #000;
    opacity: 0;
    transition: opacity var(--d-fast);
  }
  /* labelled state becomes a small glass lens */
  .cursor.is-label { mix-blend-mode: normal; }
  .cursor.is-label .cursor__dot { opacity: 0; }
  .cursor.is-label .cursor__ring {
    inline-size: 96px; block-size: 96px; margin: -48px 0 0 -48px;
    background: rgba(120, 60, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    backdrop-filter: blur(10px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 30px -8px rgba(60, 20, 160, 0.6);
  }
  .cursor.is-label .cursor__label { opacity: 1; color: #fff; }
  .cursor.is-hover .cursor__ring { inline-size: 64px; block-size: 64px; margin: -32px 0 0 -32px; }
}

/* Page transition ------------------------------------------------------- */
.pt {
  position: fixed;
  inset: 0;
  z-index: var(--z-transition);
  pointer-events: none;
  visibility: hidden;
}
.pt__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 80% at 50% 0%, #2a0f78 0%, var(--c-night) 60%);
  transform: translateY(100%);
}
.pt__panel--glass {
  background: rgba(150, 90, 255, 0.25);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}
/* The "wl" mark (assets/img/brand/mark.png as a mask) filled with the brand
   gradient, which drifts slowly across it like light over glass. The glow
   sits on the wrapper (.pt__logo / .splash__logo): a filter on the masked
   element itself would be cut away by the mask. */
.wmark {
  display: block;
  inline-size: 100%;
  aspect-ratio: 1436 / 752;
  background: linear-gradient(115deg, #7b3bff 0%, #b44dff 22%, #ff6fd0 42%, #ffd1f2 50%, #ff6fd0 58%, #b44dff 78%, #7b3bff 100%);
  background-size: 240% 100%;
  -webkit-mask: url("../img/brand/mark.png") center / contain no-repeat;
  mask: url("../img/brand/mark.png") center / contain no-repeat;
  animation: wmark-flow 3.6s linear infinite;
}
@keyframes wmark-flow { from { background-position: 100% 0; } to { background-position: -140% 0; } }
.pt__logo { display: block; inline-size: min(42vw, 260px); filter: drop-shadow(0 0 26px rgba(170, 90, 255, 0.65)) drop-shadow(0 0 6px rgba(255, 110, 210, 0.4)); opacity: 0; }
.pt__label { position: absolute; inset-block-end: var(--sp-6); color: rgba(255, 255, 255, 0.55); }
html.is-entering .pt { visibility: visible; }
html.is-entering .pt__panel { transform: none; }
html.is-entering .pt__logo { opacity: 1; }

/* Marquee --------------------------------------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--sp-6);
  padding-inline-end: var(--sp-6);
  animation: marquee var(--marquee-d, 40s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Chips ----------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  font-size: var(--fs-small);
  color: var(--fg-2);
  transition: color var(--d-fast), background-color var(--d-fast), border-color var(--d-fast);
}
.chip:hover { color: var(--fg); border-color: var(--fg-3); }
.chip.is-active,
.chip[aria-pressed="true"] { color: #fff; background: var(--btn-solid); border-color: transparent; }

/* Viewfinder corners (camera language) ---------------------------------- */
.vf { position: absolute; inset: var(--vf-inset, 16px); pointer-events: none; }
.vf i {
  position: absolute;
  inline-size: 18px;
  block-size: 18px;
  border: 0 solid currentColor;
  opacity: 0.8;
}
.vf i:nth-child(1) { inset-block-start: 0; inset-inline-start: 0; border-block-start-width: 1.5px; border-inline-start-width: 1.5px; }
.vf i:nth-child(2) { inset-block-start: 0; inset-inline-end: 0; border-block-start-width: 1.5px; border-inline-end-width: 1.5px; }
.vf i:nth-child(3) { inset-block-end: 0; inset-inline-start: 0; border-block-end-width: 1.5px; border-inline-start-width: 1.5px; }
.vf i:nth-child(4) { inset-block-end: 0; inset-inline-end: 0; border-block-end-width: 1.5px; border-inline-end-width: 1.5px; }

/* Letterbox bars + phone island (frames on home, project and services) */
.frame__letterbox { position: absolute; inset-inline: 0; block-size: 10%; background: rgba(4, 1, 14, 0.85); z-index: 1; }
.frame__letterbox--top { inset-block-start: 0; }
.frame__letterbox--bottom { inset-block-end: 0; }
.phone__island { position: absolute; inset-block-start: 14px; inset-inline-start: 50%; translate: -50% 0; inline-size: 32%; block-size: 22px; border-radius: 20px; background: #000; z-index: 3; }

.rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rec::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: #ff3b5c;
  box-shadow: 0 0 10px #ff3b5c;
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

/* CTA -------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-10);
  text-align: center;
}
.cta__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--sp-6); }
.cta__mark {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: min(120vw, 1300px);
  translate: -50% -50%;
  opacity: 0.16;
  filter: blur(2px);
  pointer-events: none;
}
.cta__title { max-width: none; margin-inline: auto; }
/* the closing buttons: a size smaller than the default large buttons */
.cta .btn--lg { --btn-h: clamp(52px, 2.5vw + 30px, 68px); padding-inline: clamp(1.4rem, 2vw, 2.2rem); font-size: 1rem; }
.cta .btn--lg .btn__icon { inline-size: 32px; block-size: 32px; }
.cta .btn--rec.btn--lg { padding-inline: 8px clamp(1.2rem, 1.8vw, 1.8rem); gap: 12px; }
.cta .btn--rec.btn--lg .rec-btn__dot { max-inline-size: 46px; max-block-size: 46px; }
.cta__title em { font-family: var(--f-serif); font-weight: 400; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
  margin-block-start: var(--sp-4);
}
.cta__note { color: var(--fg-3); }

/* Footer ---------------------------------------------------------------- */
.footer {
  position: relative;
  overflow: hidden;
  color: #f5f2ff;
  background: radial-gradient(140% 90% at 50% 120%, #3b148f 0%, #150842 45%, var(--c-night) 80%);
  padding-block: var(--sp-9) var(--sp-5);
}
/* Curtain reveal: content slides away to uncover a fixed footer */
@media (min-width: 900px) and (min-height: 640px) {
  html.has-curtain .footer {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 0;
    /* less top padding so the whole footer fits on one screen */
    padding-block-start: clamp(56px, 9vh, var(--sp-9));
  }
  html.has-curtain .page {
    position: relative;
    z-index: 1;
    background: inherit;
    overflow: clip;
    border-end-start-radius: var(--r-xl);
    border-end-end-radius: var(--r-xl);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  }
}
.page { background: transparent; }
.footer__top {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: var(--sp-7);
  padding-block-end: var(--sp-8);
  border-block-end: 1px solid rgba(255, 255, 255, 0.1);
}
.footer__lead { display: grid; gap: var(--sp-5); align-content: start; }
.footer__status { display: inline-flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.75); }
.footer__status::before {
  content: "";
  inline-size: 8px; block-size: 8px;
  border-radius: 50%;
  background: #3dff9a;
  box-shadow: 0 0 0 0 rgba(61, 255, 154, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 255, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 255, 154, 0); } }
.footer__mail { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.02em; }
.footer__reach { display: grid; gap: var(--sp-2); justify-items: start; }
.footer__phone { color: rgba(255, 255, 255, 0.75); font-size: 0.82rem; }
.footer__phone:hover { color: #fff; }
.footer__col h3 { margin-block-end: var(--sp-4); color: rgba(255, 255, 255, 0.45); font-weight: 400; }
.footer__col li + li { margin-block-start: var(--sp-2); }
.footer__col a { color: rgba(255, 255, 255, 0.85); }
.footer__col a:hover { color: #fff; }

/* Giant script mark (same artwork as the header) lit by a spotlight that
   follows the pointer. The PNG is used as a mask for both layers. */
.footer__word {
  position: relative;
  inline-size: min(100%, 1180px);
  aspect-ratio: 1069 / 332;
  margin: var(--sp-7) auto var(--sp-5);
  user-select: none;
  --fx: 50%;
  --fy: 55%;
}
.footer__word span {
  position: absolute;
  inset: 0;
  -webkit-mask: url("../img/brand/wordmark.png") center / contain no-repeat;
  mask: url("../img/brand/wordmark.png") center / contain no-repeat;
}
/* faint resting state — glassy, like the mark etched into the footer */
.footer__word-base {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(190, 160, 255, 0.05));
}
/* the lit layer: brand colours only where the spotlight falls */
.footer__word-lit {
  background: radial-gradient(circle 22vw at var(--fx) var(--fy), #ffd2f1 0%, #ff7ad9 14%, #b44dff 32%, rgba(106, 43, 255, 0.4) 50%, transparent 68%);
  filter: drop-shadow(0 0 18px rgba(200, 90, 255, 0.45));
}
@media (hover: none) {
  /* touch: a slow automatic sweep instead of the pointer spotlight */
  .footer__word-lit { animation: mark-sweep 7s var(--ease) infinite alternate; }
}
@keyframes mark-sweep { from { --fx: 10%; } to { --fx: 90%; } }
@property --fx { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --fy { syntax: "<percentage>"; inherits: true; initial-value: 55%; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  color: rgba(255, 255, 255, 0.5);
}
.footer__clock { font-variant-numeric: tabular-nums; }
.footer__powered { display: inline-flex; align-items: center; gap: 8px; }
.footer__neurax {
  font-weight: 600;
  letter-spacing: 0.28em;
  background: linear-gradient(90deg, #4fd6ff, #8a7bff 60%, #c8b6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(79, 214, 255, 0.35));
}
.footer__top-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  color: #fff;
}

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__lead { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  /* two link columns side by side keep the footer short on phones */
  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--sp-6) var(--sp-4); }
  .footer__col a { font-size: 0.92rem; }
  .footer__bottom { justify-content: center; text-align: center; }
}

/* Stat card (home numbers + project results) --------------------------- */
.stat {
  display: grid;
  gap: var(--sp-3);
  align-content: space-between;
  min-block-size: 240px;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
}
.stat__value { font-size: clamp(3rem, 2rem + 3.5vw, 6rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__value sup { font-size: 0.45em; vertical-align: top; margin-inline-start: 2px; }
.stat p { color: var(--fg-2); }
@media (max-width: 520px) { .stat { min-block-size: 0; gap: var(--sp-6); } }

/* Work grid + card (home + work page) ---------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
}
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.wcard { display: grid; gap: var(--sp-4); }
.wcard__media {
  position: relative;
  display: block;
  inline-size: 100%;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--r-lg);
  overflow: hidden;
  text-align: start;
  isolation: isolate;
  transform: translateZ(0);
}
.wcard--tall .wcard__media { aspect-ratio: 4 / 5; }
.wcard__media .mesh { transition: transform 1.2s var(--ease-out); animation-duration: 30s; }
.wcard__badge {
  position: absolute;
  z-index: 2;
  inset-block-start: var(--sp-4);
  inset-inline-start: var(--sp-4);
  padding: 7px 12px;
  border-radius: var(--r-pill);
  color: #fff;
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.3);
}
.wcard__media .vf { --vf-inset: 18px; color: rgba(255, 255, 255, 0.6); z-index: 2; opacity: 0; transform: scale(1.08); transition: opacity var(--d-mid), transform var(--d-mid) var(--ease-out); }
.wcard__media:hover .vf, .wcard__media:focus-visible .vf { opacity: 1; transform: none; }
.wcard__info { display: flex; justify-content: space-between; gap: var(--sp-4); align-items: baseline; }
.wcard__title { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.wcard__meta { color: var(--fg-3); white-space: nowrap; }

/* Forms ------------------------------------------------------------------ */
.field { display: grid; gap: var(--sp-2); }
.field__label { color: var(--fg-2); }
.field__input {
  inline-size: 100%;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--glass-bg);
  color: var(--fg);
  outline: none;
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
.field__input::placeholder { color: var(--fg-3); }
.field__input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106, 43, 255, 0.18); }
.field__input[aria-invalid="true"] { border-color: #ff4d79; }
textarea.field__input { min-block-size: 150px; resize: vertical; }
.field__error { min-block-size: 1.2em; font-size: var(--fs-small); color: #ff4d79; }
.choice-group { border: 0; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.choice-group legend { padding: 0; margin-block-end: var(--sp-3); }
.choices { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { cursor: pointer; }
.choice input:checked + span { color: #fff; background: var(--btn-solid); border-color: transparent; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
