/* Mantra Digital: "The Mantra Field". Tokens and rules live in DESIGN.md. */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-v2.woff2") format("woff2");
  font-weight: 300 600;
  font-stretch: 100% 125%;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #030404;          /* field black */
  --surface: #0b0d0d;
  --fg: #eceeee;          /* chalk */
  --muted: #8e9494;       /* smoke */
  --soft: rgba(236, 238, 238, .78);
  --line: rgba(236, 238, 238, .12);
  --line-strong: rgba(236, 238, 238, .24);
  --plate: #f2f2f4;       /* mockup plate, sampled from Mantra's device photography */
  --shadow: rgba(0, 0, 0, .62);
  --map-filter: grayscale(1) invert(.9) contrast(.88) brightness(.92);
  --logo-filter: none;

  --gutter: max(clamp(20px, 4vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right));
  --section: clamp(96px, 12vw, 176px);
  --max: 1320px;
  --nav-h: 72px;
  --r-lg: 16px;
  --r-sm: 12px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --ease-ui: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #e7e8eb;          /* a shade under the mockup plates, so every plate reads as its own card */
  --surface: #dcdee1;
  --fg: #050607;
  --muted: #050607;       /* light theme: all text stays black */
  --soft: #050607;
  --line: rgba(5, 6, 7, .12);
  --line-strong: rgba(5, 6, 7, .24);
  --shadow: rgba(24, 30, 30, .22);
  --map-filter: grayscale(1) contrast(1.02);
  --logo-filter: invert(1);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) var(--bg);
  scroll-padding-top: var(--nav-h);
}
html:not(.motion) { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  background: transparent;
  color: var(--fg);
  caret-color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .4s var(--ease-ui), color .4s var(--ease-ui);
}
::selection { background: var(--fg); color: var(--bg); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a:hover { text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg);
  font-weight: 550; transform: translateY(-160%); transition: transform .2s var(--ease-ui);
}
.skip:focus { transform: none; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- The Mantra Field (live background, js/field.js) ---------- */
.field {
  position: fixed; left: 0; top: 0; z-index: 0; display: block;
  width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease-ui);
}
.field.is-live { opacity: 1; }
main, .footer { position: relative; z-index: 1; }

h1, h2, .display { font-stretch: 118%; font-weight: 540; letter-spacing: -.025em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.1rem + 2.9vw, 3.75rem); }
h3 { font-size: clamp(1.2rem, 1rem + .7vw, 1.55rem); font-stretch: 110%; font-weight: 540; letter-spacing: -.012em; line-height: 1.2; }
p { text-wrap: pretty; }

/* ---------- Buttons & links ---------- */
/* Primary: pulls toward the cursor (js), an ink orb grows from where the cursor came in and floods the pill,
   the label rolls to a fresh copy and the arrow flies out top-right while a new one lands. */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 9px 0 26px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-size: 1rem; font-weight: 560; font-stretch: 110%; letter-spacing: -.005em; white-space: nowrap;
  transition: scale .16s var(--ease-ui), background-color .4s var(--ease-ui), color .5s var(--ease-out), box-shadow .5s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { scale: .97; }
.btn__fill {
  position: absolute; left: var(--mx, 50%); top: var(--my, 50%); z-index: -1;
  width: 260%; aspect-ratio: 1; border-radius: 50%; background: var(--bg);
  translate: -50% -50%; scale: 0; transition: scale .6s var(--ease-out);
  pointer-events: none;
}
.btn__label { position: relative; display: block; overflow: hidden; line-height: 1.3; }
.btn__label > span { position: relative; display: block; transition: translate .55s var(--ease-out); }
.btn__label > span::after {
  content: attr(data-label); content: attr(data-label) / "";
  position: absolute; left: 0; top: 100%;
}
.btn__well {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); color: var(--fg);
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out), scale .5s var(--ease-out);
}
.btn__well svg { grid-area: 1 / 1; width: 16px; height: 16px; transition: translate .5s var(--ease-out); }
.btn__well svg + svg { translate: -190% 190%; }
.btn--sm { height: 44px; padding: 0 6px 0 18px; gap: 10px; font-size: .9375rem; }
.btn--sm .btn__well { width: 32px; height: 32px; }
.btn--sm .btn__well svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
  .btn:hover .btn__fill { scale: 1; }
  .btn:hover .btn__label > span { translate: 0 -100%; }
  .btn:hover .btn__well { background: var(--fg); color: var(--bg); scale: 1.06; }
  .btn:hover .btn__well svg:first-child { translate: 190% -190%; }
  .btn:hover .btn__well svg + svg { translate: 0 0; transition-delay: .06s; }
}

/* Text link: the underline draws from the left and the arrow slips out and back in */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 520; font-stretch: 108%;
}
.link-arrow span {
  padding-bottom: 3px;
  background:
    linear-gradient(currentColor 0 0) 0 100% / 0% 1px no-repeat,
    linear-gradient(var(--line-strong) 0 0) 0 100% / 100% 1px no-repeat;
  transition: background-size .45s var(--ease-out);
}
.link-arrow svg { width: 16px; height: 16px; }
@keyframes arrow-through { 0% { translate: 0; opacity: 1; } 40% { translate: 110% 0; opacity: 0; } 41% { translate: -110% 0; opacity: 0; } 100% { translate: 0; opacity: 1; } }
@keyframes arrow-through-diag { 0% { translate: 0; opacity: 1; } 40% { translate: 90% -90%; opacity: 0; } 41% { translate: -90% 90%; opacity: 0; } 100% { translate: 0; opacity: 1; } }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover span { background-size: 100% 1px, 100% 1px; }
  .link-arrow:hover svg { animation: arrow-through .6s var(--ease-out); }
  .link-arrow:hover svg:has(use[href="#i-arrow"]) { animation-name: arrow-through-diag; }
}

/* Outline pill (phone, email): the same cursor-born fill, the icon gives a small nudge */
.pill {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 520; font-stretch: 106%; white-space: nowrap;
  transition: border-color .3s var(--ease-ui), scale .16s var(--ease-ui), color .5s var(--ease-out);
}
.pill::before {
  content: ""; position: absolute; left: var(--mx, 50%); top: var(--my, 50%); z-index: -1;
  width: 240%; aspect-ratio: 1; border-radius: 50%; background: var(--fg);
  translate: -50% -50%; scale: 0; transition: scale .6s var(--ease-out); pointer-events: none;
}
.pill svg { width: 18px; height: 18px; }
.pill:active { scale: .97; }
@keyframes ring { 0%, 100% { rotate: 0deg; } 20% { rotate: -14deg; } 40% { rotate: 12deg; } 60% { rotate: -8deg; } 80% { rotate: 4deg; } }
@keyframes lift { 0%, 100% { translate: 0; } 45% { translate: 0 -3px; } }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { border-color: var(--fg); color: var(--bg); }
  .pill:hover::before { scale: 1; }
  .pill:hover svg { animation: ring .7s var(--ease-ui); }
  .pill:hover svg:has(use[href="#i-mail"]) { animation-name: lift; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 70; height: var(--nav-h);
  transition: transform .34s var(--ease-ui), background-color .3s var(--ease-ui), border-color .3s var(--ease-ui);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-101%); }
.nav__inner {
  height: 100%; width: min(100% - 2 * var(--gutter), 1560px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__logo { display: block; padding: 10px 0; }
.nav__logo svg { width: 104px; height: auto; aspect-ratio: 2834 / 477; color: var(--fg); }
.nav__links { display: flex; gap: clamp(20px, 2.4vw, 36px); font-size: .9375rem; font-weight: 500; font-stretch: 110%; }
.nav__links a { position: relative; padding: 6px 0; color: var(--soft); transition: color .2s var(--ease-ui); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--fg); }
  .nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
}
.nav__actions { display: flex; align-items: center; gap: 12px; }
.theme-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); transition: border-color .25s var(--ease-ui), transform .16s var(--ease-ui);
}
.theme-btn svg { grid-area: 1 / 1; width: 18px; height: 18px; transition: transform .32s var(--ease-out), opacity .2s var(--ease-ui); }
.theme-btn__moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="light"] .theme-btn__sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="light"] .theme-btn__moon { opacity: 1; transform: none; }
.theme-btn:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { border-color: var(--fg); } }

/* The menu button is the logo mark: three bars that fold into a cross */
.menu-btn { display: none; position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); }
.menu-btn span {
  position: absolute; top: 50%; left: 50%; width: 2.5px; height: 17px; margin: -8.5px 0 0 -1.25px;
  background: var(--fg); border-radius: 1px;
  transition: transform .3s var(--ease-out), opacity .2s var(--ease-ui);
}
.menu-btn span:nth-child(1) { transform: translateX(-6px); }
.menu-btn span:nth-child(3) { transform: translateX(6px); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) scaleY(1.15); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleY(.2); }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) scaleY(1.15); }

.menu {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 6vh) var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--bg); overscroll-behavior: contain;
  opacity: 0; transition: opacity .2s var(--ease-ui);
}
.menu[hidden] { display: none; }
.menu:not(.is-open) { pointer-events: none; }
.menu.is-open { opacity: 1; transition-duration: .28s; }
.menu__links { display: flex; flex-direction: column; gap: 4px; }
.menu__links a {
  display: block; padding: 6px 0;
  font-size: clamp(2.4rem, 8vw + 1rem, 4rem); font-stretch: 118%; font-weight: 540; letter-spacing: -.025em; line-height: 1.05;
  transform: translateY(24px); opacity: 0;
  transition: transform .15s var(--ease-ui), opacity .15s var(--ease-ui);
}
.menu.is-open .menu__links a { transform: none; opacity: 1; transition: transform .5s var(--ease-out), opacity .35s var(--ease-ui); }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: .05s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: .1s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: .15s; }
.menu.is-open .menu__links a:nth-child(5) { transition-delay: .2s; }
.menu__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.menu__tel { font-weight: 520; font-stretch: 108%; }

/* ---------- Intro portal (first visit): an orb of light opens into the page ---------- */
@property --portal-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.portal { display: none; }
html.intro .portal {
  --portal-r: 0px;
  display: block; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: radial-gradient(circle at 50% 50%,
    transparent var(--portal-r),
    color-mix(in srgb, var(--fg) 30%, transparent) calc(var(--portal-r) + 1.5px),
    color-mix(in srgb, var(--fg) 6%, var(--bg)) calc(var(--portal-r) + 34px),
    var(--bg) calc(var(--portal-r) + 150px));
  animation: portal-failsafe 0s 5s forwards;
}
.portal__orb {
  position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--fg) 42%, transparent) 0%, color-mix(in srgb, var(--fg) 12%, transparent) 20%, transparent 46%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--fg) 4%, transparent) 0 62%, color-mix(in srgb, var(--fg) 16%, transparent) 69%, transparent 71%);
  box-shadow: 0 0 70px 6px color-mix(in srgb, var(--fg) 7%, transparent);
  transform: scale(.2); opacity: 0;
}
@keyframes portal-failsafe { to { visibility: hidden; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; max-height: 1240px; overflow: clip; isolation: isolate; }
.hero__stage { position: absolute; inset: 0; z-index: 0; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), transparent); }
.layer { position: absolute; inset: 0; pointer-events: none; }
.dev {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  translate: -50% -50%;
}
.dev img {
  width: 100%; height: auto;
  rotate: var(--r, 12deg);
  filter: drop-shadow(0 34px 44px var(--shadow));
}

/* Desktop composition: the desktop-layout screens (tablets) lead, phones are the accents; copy sits bottom-left */
.dev--t1 { --x: 47%; --y: 29%; --w: 32vw; --r: -10deg; }
.dev--t2 { --x: 90%; --y: 72%; --w: 29vw; --r: -10deg; }
.dev--p1 { --x: 97%; --y: 46%; --w: 7.5vw; }
.dev--p2 { --x: 24%; --y: 30%; --w: 7vw; }
.dev--p3 { --x: 72%; --y: 34%; --w: 10vw; }
.dev--p4 { --x: 88%; --y: 32%; --w: 9vw; }

.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 18% 78%, color-mix(in srgb, var(--bg) 78%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 45%, transparent 72%);
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22%);
  mask-image: linear-gradient(to top, transparent 0, #000 22%);
}
.hero__copy { position: absolute; left: 0; right: 0; bottom: clamp(44px, 9vh, 104px); z-index: 2; }
.hero__title { font-size: clamp(2.5rem, .9rem + 4.1vw, 4.75rem); line-height: 1.02; letter-spacing: -.028em; font-stretch: 116%; }
.hero__title span { display: block; }
.hero__sub { margin-top: 26px; max-width: 36ch; font-size: clamp(1.02rem, .92rem + .3vw, 1.1875rem); line-height: 1.5; color: var(--soft); }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 36px; }

/* ---------- Clients marquee ---------- */
.clients { position: relative; z-index: 1; border-block: 1px solid var(--line); overflow: hidden; }
.marquee { display: flex; width: max-content; padding-block: clamp(22px, 3vw, 34px); }
.marquee__row { display: flex; flex-shrink: 0; }
.marquee__row li {
  display: flex; align-items: center; gap: .7em; padding-right: .7em; white-space: nowrap;
  font-size: clamp(1.35rem, .9rem + 1.6vw, 2.35rem); font-stretch: 120%; font-weight: 480; letter-spacing: -.02em; color: var(--muted);
}
/* separator: the three-bar mark, drawn with the logo's own proportions (6 / 10 / 6 / 10 / 6) */
.marquee__row li::after {
  content: ""; width: .36em; height: .42em; flex: none; opacity: .7;
  background: linear-gradient(90deg, currentColor 0 15.8%, transparent 15.8% 42.1%, currentColor 42.1% 57.9%, transparent 57.9% 84.2%, currentColor 84.2%);
}
html:not(.motion) .marquee { width: auto; padding-inline: var(--gutter); }
html:not(.motion) .marquee__row { flex-wrap: wrap; row-gap: 6px; }

/* ---------- About / statement ---------- */
.about { padding-block: var(--section); }
.about__text { display: grid; gap: .7em; max-width: 1180px; }
.about__text p {
  font-size: clamp(1.55rem, .9rem + 2.3vw, 3.1rem); font-stretch: 106%; font-weight: 440;
  line-height: 1.16; letter-spacing: -.02em;
}

[data-theme="light"] [data-scrub] .w { opacity: 1 !important; }

/* ---------- Work ---------- */
.work { position: relative; }
.work__pin { padding-block: calc(var(--section) * .5) var(--section); }
.work__intro { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto clamp(32px, 4vw, 56px); }
.work__intro h2 { font-size: clamp(2.4rem, 1.1rem + 4vw, 5rem); }
.work__intro p { margin-top: 18px; max-width: 34ch; color: var(--soft); }
.work__hint { display: none; }
.work__cards {
  display: flex; gap: clamp(16px, 2.4vw, 40px);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0 var(--gutter) 8px; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.work__cards::-webkit-scrollbar { display: none; }
.project { flex: 0 0 min(80vw, 440px); scroll-snap-align: start; }
.project__media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-lg);
  background: var(--plate);
}
.project__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: scale 1.2s var(--ease-out);
}
/* the next frame opens over the last one as a circle from the cursor (the site's portal), and closes back into it */
.project__b, .project__c {
  clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%));
  transition: clip-path .85s cubic-bezier(.65, 0, .2, 1), scale 1.2s var(--ease-out);
}
.project__media img.is-on { clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%)); }
[data-theme="light"] .project__media { box-shadow: 0 0 0 1px rgba(5, 6, 7, .1), 0 28px 56px -30px rgba(5, 6, 7, .4); }
.project h3 { margin-top: 20px; font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); }
.project > p { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
@media (hover: hover) and (pointer: fine) {
  .project:hover .project__media img { scale: 1.03; }
  .work__hint { display: block; color: var(--muted); font-size: .875rem; }
}
.work__end {
  flex: 0 0 min(80vw, 400px); scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px;
  padding: 32px; border-radius: var(--r-lg); border: 1px solid var(--line);
}
.work__end p { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); font-stretch: 112%; font-weight: 520; letter-spacing: -.02em; line-height: 1.15; }

/* Desktop with motion: one pinned horizontal track (intro + cards) */
html.motion .work__pin { height: 100svh; padding: 0; display: flex; align-items: center; overflow: hidden; }
html.motion .work__track { flex: none; width: max-content; display: flex; align-items: flex-end; gap: 18px; padding-inline: var(--gutter); will-change: transform; }
html.motion .work__intro { flex: 0 0 min(78vw, 340px); width: auto; margin: 0 0 3.6rem; align-self: flex-end; }
html.motion .work__cards { overflow: visible; padding: 0; scroll-snap-type: none; gap: 18px; }
html.motion .project { flex-basis: auto; width: min(76vw, calc((100svh - 250px) * .8)); }
html.motion .work__end { flex-basis: auto; width: min(76vw, calc((100svh - 250px) * .8)); aspect-ratio: 4 / 5; margin-bottom: 3.6rem; align-self: flex-start; }
@media (min-width: 600px) and (max-width: 1023px) {
  html.motion .project, html.motion .work__end { width: min(52vw, calc((100svh - 260px) * .8)); }
  html.motion .work__intro { flex-basis: min(46vw, 360px); }
}
@media (min-width: 1024px) {
  html.motion .work__track { flex: none; width: max-content; display: flex; align-items: flex-end; gap: clamp(28px, 3vw, 56px); padding-inline: var(--gutter); will-change: transform; }
  html.motion .work__intro { flex: 0 0 clamp(300px, 26vw, 420px); width: auto; margin: 0 0 calc(4.5rem); align-self: flex-end; }
  html.motion .work__cards { overflow: visible; padding: 0; scroll-snap-type: none; gap: clamp(28px, 3vw, 56px); }
  html.motion .project { flex-basis: auto; width: min(32vw, calc((100svh - 260px) * .8)); }
  html.motion .work__end { flex-basis: auto; width: min(30vw, 400px); aspect-ratio: 4 / 5; margin-bottom: 4.5rem; align-self: flex-start; }
}

/* ---------- Services: three bars ---------- */
.services { padding-block: var(--section); }
.services h2 { max-width: 14ch; }
.services__lede { margin-top: 22px; max-width: 46ch; color: var(--soft); font-size: 1.125rem; }
.bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3.4vw, 56px); margin-top: clamp(56px, 7vw, 96px); }
.bars__col { position: relative; padding-left: clamp(20px, 2.2vw, 32px); display: grid; align-content: start; gap: 34px; }
.bars__rule { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--fg); transform-origin: 50% 0; }
.bars__col h3 { font-size: clamp(1.9rem, 1.2rem + 1.8vw, 2.9rem); font-stretch: 120%; letter-spacing: -.025em; line-height: 1; margin-bottom: 6px; }
.svc h4 { font-size: 1.1875rem; font-weight: 560; font-stretch: 108%; letter-spacing: -.01em; line-height: 1.3; }
.svc p { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.58; max-width: 40ch; }

/* ---------- Process ---------- */
.process { padding-block: 0 var(--section); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); }
.process__head { grid-column: 1 / span 5; align-self: start; position: sticky; top: calc(var(--nav-h) + 40px); }
.process__head p { margin-top: 22px; color: var(--soft); max-width: 40ch; }
.steps { grid-column: 7 / span 6; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; column-gap: clamp(20px, 3vw, 40px); padding: 34px 0 38px; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num { grid-row: span 2; font-size: clamp(2.2rem, 1.4rem + 2vw, 3.4rem); font-stretch: 125%; font-weight: 300; line-height: .9; color: var(--muted); }
.step h3 { align-self: end; }
.step p { margin-top: 8px; color: var(--muted); max-width: 44ch; }

/* ---------- Studio ---------- */
.studio { padding-block: 0 var(--section); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); align-items: start; }
.studio__photo { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav-h) + 40px); perspective: 1100px; }
/* The portrait opens out of an orb as it scrolls in (the same portal as the intro), tilts toward the cursor,
   and carries a spinning studio badge and a glass name tag that float above it in 3D. */
.studio__frame { position: relative; border-radius: var(--r-lg); aspect-ratio: 824 / 1236; transform-style: preserve-3d; }
@media (min-width: 1024px) { .studio__frame { max-height: calc(100svh - var(--nav-h) - 110px); } }
.studio__lens {
  position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--surface);
  clip-path: circle(var(--lens, 100%) at 50% 40%);
}
.studio__lens img { width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.studio__glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .15), transparent 50%);
  transition: opacity .5s var(--ease-ui);
}
.studio__frame.is-tilting .studio__glare { opacity: 1; }
.studio__badge {
  position: absolute; z-index: 2; top: -52px; right: -52px; width: 132px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden; color: var(--fg); pointer-events: none;
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.studio__badge-ring { grid-area: 1 / 1; width: 100%; height: 100%; overflow: visible; }
.studio__badge-ring text { fill: currentColor; font-size: 12.5px; font-weight: 520; font-stretch: 112%; }
.studio__badge-mark { grid-area: 1 / 1; width: 22px; height: auto; aspect-ratio: 38 / 44.3; }
.studio__tag {
  position: absolute; z-index: 2; left: 18px; bottom: 18px; display: grid; gap: 1px;
  padding: 13px 18px 14px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: .875rem; line-height: 1.4; color: var(--soft);
}
.studio__tag strong { color: var(--fg); font-size: 1.0625rem; font-weight: 560; font-stretch: 112%; }
.studio__copy { grid-column: 7 / span 6; }
.studio__copy h2 { max-width: 21ch; font-size: clamp(1.9rem, 1.1rem + 2.1vw, 3.1rem); }
.studio__story { margin-top: 32px; display: grid; gap: 1.05em; max-width: 60ch; color: var(--soft); font-size: 1.0625rem; }
.timeline { margin-top: 44px; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--soft); }
.timeline span { color: var(--fg); font-weight: 560; font-stretch: 112%; }
.creds { margin-top: 56px; }
.creds h3 { font-size: .9375rem; font-weight: 500; font-stretch: 108%; color: var(--muted); letter-spacing: 0; }
.creds ul { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 28px clamp(24px, 3vw, 44px); max-width: 560px; }
.creds li { display: flex; align-items: center; min-width: 0; }
.creds img { width: auto; height: var(--h, 28px); max-width: 100%; object-fit: contain; object-position: left center; opacity: .7; filter: var(--logo-filter); transition: opacity .25s var(--ease-ui); }
@media (hover: hover) and (pointer: fine) { .creds img:hover { opacity: 1; } }

/* ---------- Reviews ---------- */
.reviews { position: relative; }
.reviews__pin { padding-block: 0 var(--section); }
.reviews h2 { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); font-stretch: 110%; font-weight: 520; letter-spacing: 0; color: var(--muted); }
.quotes { margin-top: 28px; display: grid; gap: 64px; }
.quote blockquote p {
  font-size: clamp(1.9rem, 1rem + 3vw, 4rem); font-stretch: 108%; font-weight: 460;
  line-height: 1.1; letter-spacing: -.028em; max-width: 24ch; text-wrap: balance;
}
.quote figcaption { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.quote figcaption strong { color: var(--fg); font-weight: 560; }
.reviews__foot { margin-top: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pager { display: none; gap: 10px; height: 44px; }
.pager i { position: relative; display: block; width: 6px; height: 100%; background: var(--line-strong); overflow: hidden; }
.pager i::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform-origin: 50% 0; transform: scaleY(var(--fill, 0)); }
html.motion .reviews__pin { height: 100svh; padding: 0; display: flex; flex-direction: column; justify-content: center; }
html.motion .quotes { display: grid; gap: 0; }
html.motion .quote { grid-area: 1 / 1; }
html.motion .quote:not(:first-child) { opacity: 0; visibility: hidden; }
html.motion .pager { display: flex; }

/* ---------- FAQ ---------- */
.faq { padding-block: 0 var(--section); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); }
.faq__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--nav-h) + 40px); }
.faq__head h2 { max-width: 10ch; }
.faq__head p { margin-top: 20px; color: var(--soft); }
.faq__head a { color: var(--fg); background: linear-gradient(currentColor 0 0) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; white-space: nowrap; }
.faq__list { grid-column: 6 / span 7; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 0; cursor: pointer; list-style: none;
  font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem); font-weight: 520; font-stretch: 108%; letter-spacing: -.012em; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform .3s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq__a { overflow: hidden; }
.faq__a p { padding-bottom: 28px; color: var(--soft); max-width: 60ch; }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: var(--soft); } }

/* ---------- Visit ---------- */
.visit { padding-block: 0 var(--section); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); align-items: stretch; }
.visit__info { grid-column: 1 / span 5; }
.visit address { margin-top: 28px; font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); font-stretch: 108%; line-height: 1.3; letter-spacing: -.015em; }
.visit address a { transition: color .2s var(--ease-ui); }
@media (hover: hover) and (pointer: fine) { .visit address a:hover { color: var(--soft); } }
.visit .link-arrow { margin-top: 20px; }
.status { margin-top: 44px; display: flex; align-items: center; gap: 10px; font-weight: 520; font-stretch: 108%; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; }
.status.is-open::before { background: var(--fg); border-color: var(--fg); box-shadow: 0 0 0 4px var(--line); }
.hours { margin-top: 18px; width: 100%; max-width: 420px; border-collapse: collapse; }
.hours th, .hours td { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--muted); }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--fg); font-weight: 560; }
.visit__map { grid-column: 7 / span 6; min-height: 420px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.visit__map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; filter: var(--map-filter); }

/* ---------- Footer ---------- */
.footer { position: relative; padding-top: var(--section); border-top: 1px solid var(--line); overflow: hidden; }
.footer__sign { font-size: clamp(2.4rem, 1rem + 5vw, 6rem); font-stretch: 120%; line-height: 1; letter-spacing: -.03em; max-width: 15ch; }
.footer__actions { margin-top: clamp(36px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 14px; }
.footer__grid { margin-top: clamp(72px, 9vw, 128px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer__grid h3 { font-size: .9375rem; font-weight: 500; font-stretch: 108%; color: var(--muted); letter-spacing: 0; }
.footer__grid p, .footer__grid ul { margin-top: 14px; line-height: 1.7; color: var(--soft); }
.footer__grid a { transition: color .2s var(--ease-ui); }
@media (hover: hover) and (pointer: fine) { .footer__grid a:hover { color: var(--fg); } }
.socials a { display: inline-flex; align-items: center; gap: 10px; }
.socials svg { width: 18px; height: 18px; }
.footer__mark { width: min(100% - 2 * var(--gutter), 1560px); margin: clamp(72px, 9vw, 128px) auto 0; }
.footer__mark svg { width: 100%; height: auto; aspect-ratio: 2834 / 477; color: var(--fg); }
.footer__legal {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .875rem;
}
.footer__legal a { transition: color .2s var(--ease-ui); }
@media (hover: hover) and (pointer: fine) { .footer__legal a:hover { color: var(--fg); } }

/* ---------- Theme switch transition (View Transitions) ---------- */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal .7s var(--ease-io) both; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 100%) var(--vt-y, 0%)); }
  to { clip-path: circle(var(--vt-r, 150%) at var(--vt-x, 100%) var(--vt-y, 0%)); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .nav__links { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 1023px) {
  .process, .studio, .faq, .visit { grid-template-columns: 1fr; }
  .process__head, .faq__head, .studio__photo { position: static; }
  .process__head, .steps, .studio__photo, .studio__copy, .faq__head, .faq__list, .visit__info, .visit__map { grid-column: 1 / -1; }
  .steps, .faq__list { margin-top: 44px; }
  .studio__photo { max-width: 560px; }
  .studio__copy { margin-top: 48px; }
  .visit__map { margin-top: 48px; min-height: 360px; }
  .visit__map iframe { min-height: 360px; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }

  .dev--t1 { --x: 40%; --y: 22%; --w: 50vw; }
  .dev--t2 { --x: 74%; --y: 43%; --w: 46vw; }
  .dev--p1 { display: none; }
  .dev--p2 { --x: 9%; --y: 13%; --w: 11vw; }
  .dev--p3 { --x: 86%; --y: 25%; --w: 14vw; }
  .dev--p4 { --x: 14%; --y: 42%; --w: 13vw; }
  .hero__copy { bottom: clamp(40px, 6vh, 72px); }
}
@media (max-width: 767px) {
  :root { --nav-h: 64px; }
  .nav__cta { display: none; }
  .nav__logo svg { width: 92px; }
  .bars { grid-template-columns: 1fr; gap: 56px; }

  /* devices gather in the top of the screen, copy below */
  .dev--t1 { --x: 40%; --y: 22%; --w: 60vw; }
  .dev--t2 { --x: 68%; --y: 34%; --w: 56vw; }
  .dev--p1, .dev--p2 { display: none; }
  .dev--p3 { --x: 12%; --y: 35%; --w: 20vw; }
  .dev--p4 { --x: 91%; --y: 20%; --w: 17vw; }
  .hero__shade {
    background: linear-gradient(to top, transparent 0%, color-mix(in srgb, var(--bg) 82%, transparent) 14%, color-mix(in srgb, var(--bg) 70%, transparent) 42%, transparent 60%);
    -webkit-mask-image: none; mask-image: none;
  }
  .hero__copy { bottom: max(28px, env(safe-area-inset-bottom)); }
  .hero__title { font-size: clamp(2.05rem, 1.1rem + 4.6vw, 2.9rem); }
  .hero__sub { margin-top: 18px; }
  .hero__ctas { margin-top: 26px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer__actions .pill, .footer__actions .btn { width: 100%; justify-content: space-between; }
  .footer__actions .pill { justify-content: flex-start; }
  .timeline li { grid-template-columns: 4.25rem 1fr; }
  .studio__badge { width: 104px; top: -40px; right: -8px; }
  .studio__badge-ring text { font-size: 13px; }
  .studio__badge-mark { width: 18px; }
  .quote blockquote p { font-size: clamp(1.7rem, 1rem + 3.4vw, 2.3rem); }
}
@media (max-width: 767px) and (max-height: 720px) {
  .dev--t1 { --x: 40%; --y: 21%; --w: 52vw; }
  .dev--t2 { --x: 69%; --y: 31%; --w: 48vw; }
  .dev--p3 { --x: 12%; --y: 31%; --w: 17vw; }
  .dev--p4 { --x: 91%; --y: 19%; --w: 15vw; }
}
@media (max-width: 380px) {
  .hero__title { font-size: 2rem; }
  .btn { padding-left: 20px; }
}

/* ---------- Reduced motion: content simply present ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .portal { display: none !important; }
}
