/* Crafted studio — styles
   Dark is the default theme. Light keeps the original cream + brown.
   Change colours in the two token blocks below. */

:root {
  /* dark: neutral near-black, green accent */
  --bg: #050505;
  --bg-raise: #0a0a0a;
  --surface: #101010;
  --surface-2: #1b1b1b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #fafafa;
  --text-2: #a6a6a6;
  --text-3: #6e6e6e;
  --accent: #82f754;
  --accent-rgb: 130, 247, 84;
  --accent-ink: #050505;
  --btn-bg: #82f754;
  --btn-text: #050505;
  --frame: #101010;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --mono-filter: brightness(0) invert(1);

  --font-display: "Geist", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Mrs Saint Delafield", "Snell Roundhand", "Brush Script MT", cursive;

  --wrap: 1120px;
  --read: 900px;
  --gutter: clamp(20px, 4vw, 40px);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf4e9;
  --bg-raise: #f4ecdd;
  --surface: #ffffff;
  --surface-2: #f6efe2;
  --line: rgba(69, 36, 29, 0.1);
  --line-strong: rgba(69, 36, 29, 0.2);
  --text: #2a1712;
  --text-2: #5d4a42;
  --text-3: #93827a;
  --accent: #3fae18;
  --accent-rgb: 63, 174, 24;
  --accent-ink: #ffffff;
  --btn-bg: #45241d;
  --btn-text: #faf4e9;
  --frame: #ffffff;
  --shadow: 0 30px 60px -34px rgba(69, 36, 29, 0.35);
  --mono-filter: none;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.read { width: min(100% - 2 * var(--gutter), var(--read)); margin-inline: auto; }
.muted { color: var(--text-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────── Floating nav ───────── */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; align-items: center; gap: 4px;
  max-width: calc(100vw - 24px);
  padding: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow);
}
.nav__brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 4px; font-family: var(--font-display); font-weight: 500; font-size: 15px; white-space: nowrap; }
.nav__brand { flex: none; }
.nav__brand img, .nav__mark { flex: none; width: 32px; height: 32px; border-radius: 0; }
.nav__brand .script-fallback { font-size: 22px; }
.nav__mark { display: grid; place-items: center; background: #82f754; color: #45241d; font-family: var(--script); font-size: 20px; }
.nav__links { display: flex; align-items: center; position: relative; }
.nav__links a { position: relative; z-index: 1; padding: 7px 13px; border-radius: 999px; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color 0.25s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__pill { position: absolute; z-index: 0; top: 0; left: 0; height: 100%; width: 0; border-radius: 999px; background: var(--surface-2); opacity: 0; transition: transform 0.4s var(--ease), width 0.4s var(--ease), opacity 0.25s; }
.nav__sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; flex: none; }
.nav__back { display: flex; align-items: center; gap: 6px; padding: 7px 13px; font-size: 14px; color: var(--text-2); white-space: nowrap; border-radius: 999px; }
.nav__back:hover { color: var(--text); }

.theme-toggle { position: relative; flex: none; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: var(--text-2); transition: background-color 0.25s, color 0.25s; }
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { grid-area: 1 / 1; width: 17px; height: 17px; transition: transform 0.5s var(--ease), opacity 0.3s; }
.theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
:root[data-theme="light"] .theme-toggle .sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-family: var(--font-display); font-size: 14px; font-weight: 500; white-space: nowrap; background: var(--btn-bg); color: var(--btn-text); transition: transform 0.3s var(--ease), background-color 0.3s; }
a.btn { text-decoration: none; }
.btn__label { display: inline-block; overflow: hidden; line-height: 1.35; height: 1.35em; }
.btn__label > span { display: block; transition: transform 0.45s var(--ease); }
.btn__label > span::after { content: attr(data-t); display: block; }
.btn:hover .btn__label > span { transform: translateY(-50%); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { padding: 8px 15px; }

/* ───────── Hero ───────── */
.hero { position: relative; min-height: min(100svh, 860px); display: grid; place-items: center; padding: 130px 0 70px; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: 72px; height: 72px; border-radius: 0; margin-bottom: 34px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 400; letter-spacing: -0.035em; }
.hero__script { display: block; width: clamp(240px, 36vw, 420px); margin: 10px auto 0; transform: rotate(-3deg); }
.hero__script img { width: 100%; height: auto; }
.script-fallback { font-family: var(--script); color: #61d932; font-size: 1.5em; line-height: 1; letter-spacing: 0; }
.hero__lede { max-width: 31em; margin-top: 30px; font-size: clamp(16px, 1.5vw, 18px); color: var(--text-2); }
.hero__cta { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }

/* Hero cards: real UI from the case studies, each shown whole at its own proportions */
.float { position: absolute; z-index: 1; display: block; width: var(--fw); will-change: transform; transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--rot)); transition: rotate 0.6s var(--ease), scale 0.6s var(--ease); }
.float__in { position: relative; display: block; container-type: inline-size; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.55)); animation: bob 8s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -2.1s); }
:root[data-theme="light"] .float__in { filter: drop-shadow(0 24px 26px rgba(69, 36, 29, 0.3)); }
.float__in > img { display: block; width: 100%; height: auto; }
.float img.lay { width: calc(var(--lw) / var(--pw) * 100%); height: calc(var(--lh) / var(--ph) * 100%); max-width: none; }
.float .num b { font-size: calc(52 / var(--pw) * 100cqw); }
.float__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; align-items: start; }
.fmc { position: relative; display: block; }
.fmc > img { display: block; width: 100%; height: auto; }
.float--a { --fw: clamp(140px, 15vw, 226px); --rot: -8deg; left: 5%; top: 17%; }
.float--b { --fw: clamp(140px, 15vw, 226px); --rot: 8deg; right: 5%; top: 14%; }
.float--c { --fw: clamp(140px, 14.5vw, 220px); --rot: 6deg; left: 9%; bottom: 8%; }
.float--d { --fw: clamp(150px, 17vw, 260px); --rot: -5deg; right: 7%; bottom: 11%; }
.float:hover, .float:focus-visible { rotate: calc(var(--rot) * -1); scale: 1.06; z-index: 3; }
.float__tag { position: absolute; left: 50%; top: calc(100% + 10px); translate: -50% -6px; padding: 6px 12px; border-radius: 999px; font-family: var(--font-display); font-size: 12px; white-space: nowrap; color: var(--glass-ink); background: var(--glass-body); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--glass-rim), var(--glass-depth), var(--glass-drop); opacity: 0; pointer-events: none; transition: opacity 0.3s, translate 0.4s var(--ease); }
.float:hover .float__tag, .float:focus-visible .float__tag { opacity: 1; translate: -50% 0; }
@keyframes bob { from { translate: 0 -5px; } to { translate: 0 5px; } }
.js .float:not(.in) .fmc { opacity: 0; }
.js .float.in .fmc { animation: cardIn 0.9s var(--ease) both; animation-delay: calc(var(--i) * 110ms + 900ms); }

/* ───────── Logos ───────── */
.trusted { padding: 30px 0 70px; text-align: center; }
.trusted p { font-size: 14px; color: var(--text-3); margin-bottom: 26px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; width: max-content; gap: var(--gap, 56px); padding-right: var(--gap, 56px); animation: slide var(--dur, 40s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.trusted .marquee { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--text-2); white-space: nowrap; opacity: 0.75; }
.logo img, .logo svg { height: 30px; width: auto; }
.logo svg path { fill: #a7a6a6; }
.logo--word { opacity: 0.6; }
.logo--word img { height: 26px; filter: var(--mono-filter); }

/* ───────── Sections ───────── */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section__head { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 400; }
.section__head p { margin-top: 10px; color: var(--text-2); }

/* Selected work */
.work { display: grid; gap: clamp(40px, 6vw, 72px); width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.card { display: block; }
.card__media { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--frame); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card__media > img { transform: translate3d(var(--ix, 0px), var(--iy, 0px), 0) scale(var(--is, 1.05)); animation: drift 18s ease-in-out infinite alternate; }
a.card:hover .card__media > img { --is: 1.09; }
@keyframes drift { from { scale: 1; translate: -0.6% 0.4%; } to { scale: 1.05; translate: 0.6% -0.4%; } }
.work .card:nth-child(even) .card__media > img { animation-direction: alternate-reverse; animation-duration: 22s; }
.card__film { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none; }
.card.is-playing .card__film { opacity: 1; }
.card__film video { width: 100%; height: 100%; object-fit: cover; }
.card__film--phone { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card__film--phone video { width: auto; height: 86%; border-radius: 22px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line-strong); scale: 0.92; transition: scale 0.6s var(--ease); }
.card.is-playing .card__film--phone video { scale: 1; }
.card__view, .card__soon { z-index: 2; }
.work { perspective: 1400px; }
.card__media { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease), border-color 0.3s; }
a.card:hover .card__media { border-color: var(--line-strong); }
.card__meta h3 { transition: translate 0.4s var(--ease); }
a.card:hover .card__meta h3 { translate: 6px 0; }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 4px 0; }
.card__meta h3 { font-size: clamp(19px, 2vw, 23px); font-weight: 400; }
.card__meta span { font-size: 14px; color: var(--text-3); white-space: nowrap; }
.card__view { position: absolute; right: 16px; bottom: 16px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-family: var(--font-display); background: var(--btn-bg); color: var(--btn-text); opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.4s var(--ease); }
a.card:hover .card__view, a.card:focus-visible .card__view { opacity: 1; transform: none; }
.card__soon { position: absolute; left: 16px; top: 16px; padding: 6px 12px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--text-2); border: 1px solid var(--line); backdrop-filter: blur(8px); }

/* Reels */
.reel { padding: clamp(28px, 4vw, 44px) 0; }
.reel h2 { text-align: center; font-size: clamp(22px, 2.6vw, 28px); font-weight: 400; margin-bottom: 26px; }
.reel .marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.reel .marquee__track { --gap: 16px; }
.shot { flex: none; height: clamp(190px, 24vw, 320px); border-radius: var(--r-md); overflow: hidden; background: var(--frame); border: 1px solid var(--line); }
.shot img { height: 100%; width: auto; max-width: none; }

/* Work flow: three tilted cards with hand-drawn arrows */
.flow { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; width: min(100% - 2 * var(--gutter), 980px); margin: 56px auto 0; padding: 0; list-style: none; }
.flow__card { position: relative; display: flex; flex-direction: column; min-height: 340px; padding: 22px 24px 26px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); rotate: var(--rot, 0deg); translate: 0 var(--lift, 0px); transition: rotate 0.6s var(--ease), translate 0.6s var(--ease), border-color 0.3s, opacity 0.8s var(--ease), filter 0.8s var(--ease); overflow: hidden; }
.flow__card:nth-of-type(1) { --rot: -4deg; --lift: 10px; }
.flow__card:nth-of-type(2) { --rot: 0deg; --lift: -6px; }
.flow__card:nth-of-type(3) { --rot: 3deg; --lift: 8px; }
.flow__card:hover { --rot: 0deg; --lift: -10px; border-color: var(--line-strong); z-index: 2; }
.flow__n { font-family: var(--font-display); font-size: 22px; color: var(--text-3); font-variant-numeric: tabular-nums; transition: color 0.3s; }
.flow__card:hover .flow__n { color: var(--accent); }
.flow__card h3 { margin-top: 10px; font-size: clamp(24px, 2.6vw, 31px); font-weight: 400; letter-spacing: -0.03em; }
.flow__card p { margin-top: auto; padding-top: 40px; color: var(--text-2); font-size: 15px; }
.flow__arrow { position: absolute; width: 58px; height: 34px; color: var(--text); pointer-events: none; z-index: 3; }
.flow__arrow path { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1s var(--ease) 0.5s; }
.flow.in .flow__arrow path { stroke-dashoffset: 0; }
.flow__arrow--1 { left: calc(33.33% - 62px); top: -44px; }
.flow__arrow--2 { left: calc(66.66% - 70px); bottom: -46px; transform: scaleY(-1); }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.service { padding: 26px 28px 30px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.service svg { width: 24px; height: 24px; color: var(--accent); margin-bottom: 22px; }
.service h3 { font-size: 21px; font-weight: 400; }
.service p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

.spot { position: relative; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.16), transparent 70%); }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }
.service { transition: border-color 0.3s, translate 0.5s var(--ease); }
.service:hover { border-color: var(--line-strong); translate: 0 -4px; }
.service svg { transition: transform 0.5s var(--ease); }
.service:hover svg { transform: scale(1.15) rotate(-6deg); }

/* Stack */
.stack { display: flex; justify-content: center; align-items: center; gap: clamp(18px, 3vw, 34px); flex-wrap: wrap; }
.stack img { height: 46px; width: auto; transition: transform 0.4s var(--ease); }
.stack img:hover { transform: translateY(-6px) rotate(-4deg); }

/* Footer */
.footer { padding: clamp(60px, 9vw, 120px) 0 40px; text-align: center; }
.footer__cta { font-family: var(--font-display); font-size: clamp(28px, 4.4vw, 48px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; max-width: 16em; margin: 0 auto 28px; }
.footer__sig { width: 200px; margin: clamp(60px, 8vw, 100px) auto 22px; filter: var(--mono-filter); }
.footer__sig.script-fallback { color: var(--text); width: auto; font-size: 44px; display: block; }
.footer__row { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--text-3); }
.footer__row a:hover { color: var(--text); }

/* ───────── Projects page ───────── */
.page-head { padding: 150px 0 50px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; font-size: 13px; color: var(--text-2); border: 1px solid var(--line); background: var(--surface); margin-bottom: 26px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.page-head h1 { font-size: clamp(36px, 5.4vw, 56px); font-weight: 400; letter-spacing: -0.035em; }
.page-head p { margin: 18px auto 0; max-width: 30em; font-size: clamp(17px, 1.8vw, 21px); color: var(--text-2); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: min(100% - 2 * var(--gutter), 900px); margin-inline: auto; padding-bottom: 40px; }
.gallery > * { grid-column: 1 / -1; border-radius: var(--r-md); overflow: hidden; background: var(--frame); border: 1px solid var(--line); }
.gallery > .half { grid-column: auto; }
.gallery img, .gallery video { width: 100%; height: auto; }

/* ───────── Case study ───────── */
.case { padding: 150px 0 0; }
.case__kicker { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--text-3); margin-bottom: 14px; }
.case__kicker i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.case h1 { font-size: clamp(30px, 4.2vw, 42px); font-weight: 400; max-width: 17em; letter-spacing: -0.03em; }
.case__lede { margin-top: 18px; max-width: 46em; color: var(--text-2); }
.case__lede + .case__lede { margin-top: 12px; }
.figure { margin: 36px 0 0; border-radius: var(--r-md); overflow: hidden; background: var(--frame); border: 1px solid var(--line); }
.figure img, .figure video { width: 100%; height: auto; }
.figure--pad { padding: clamp(20px, 5vw, 56px); display: flex; justify-content: center; gap: clamp(14px, 3vw, 34px); align-items: center; }
.figure--pad img, .figure--pad video { width: auto; max-height: 560px; min-width: 0; border-radius: 14px; }
.figure--bare { background: none; border: 0; }
.figure-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.figure-row .figure { margin-top: 36px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 44px 0 0; padding: 0 0 44px; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--font-display); font-size: 16px; }
.facts dd { margin: 4px 0 0; color: var(--text-3); font-size: 15px; }
.block { padding: clamp(44px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.block__label { font-size: 14px; color: var(--text-3); margin-bottom: 8px; }
.block h2 { font-size: clamp(23px, 2.8vw, 29px); font-weight: 400; }
.block h3 { font-size: clamp(19px, 2.2vw, 22px); font-weight: 400; margin-top: 44px; }
.block p { margin-top: 14px; color: var(--text-2); max-width: 50em; }
.points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.points li { padding: 18px 20px 20px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.points b { display: block; margin-bottom: 4px; font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--text); }
.bullets { margin: 10px 0 0; padding-left: 1.2em; color: var(--text-2); }
.bullets li { padding: 2px 0; }
.bullets li::marker { color: var(--accent); }
.figure-row--3 { grid-template-columns: repeat(3, 1fr); }
.figure-row + .figure-row .figure { margin-top: 16px; }
.more__grid.more__grid--4 { grid-template-columns: repeat(4, 1fr); }
.more { padding: clamp(44px, 6vw, 72px) 0 0; }
.more h2 { font-size: 21px; font-weight: 400; margin-bottom: 22px; }
.more__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.more__grid a { display: block; font-size: 14px; color: var(--text-2); }
.more__grid a:hover { color: var(--text); }
.more__grid div { aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--frame); border: 1px solid var(--line); margin-bottom: 10px; }
.more__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.more__grid a:hover img { transform: scale(1.04); }

/* Page-load sequence: the one orchestrated moment */
.rise { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.float { animation: pop 1.1s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 120ms + 350ms); }
@keyframes pop { from { opacity: 0; scale: 0.7; } }

/* Scroll reveals (only when JS is running) */
.js [data-reveal] { opacity: 0; translate: 0 26px; filter: blur(6px); transition: opacity 0.9s var(--ease), translate 0.9s var(--ease), filter 0.9s var(--ease), rotate 0.6s var(--ease), border-color 0.3s; transition-delay: var(--rd, 0ms); }
.js [data-reveal].in { opacity: 1; translate: 0 0; filter: none; }
.js .flow__card[data-reveal] { translate: 0 60px; rotate: 0deg; }
.js .flow__card[data-reveal].in { translate: 0 var(--lift, 0px); rotate: var(--rot, 0deg); transition-delay: 0ms; }
.js .flow__card[data-reveal]:not(.done) { transition-delay: var(--rd, 0ms); }

/* Project thumbnails open up as they scroll in */
.js .work .card[data-reveal] { filter: none; }
.js .work .card[data-reveal] .card__media { clip-path: inset(14% 10% 14% 10% round 28px); transition: clip-path 1.3s var(--ease), transform 0.5s var(--ease), border-color 0.3s; }
.js .work .card[data-reveal].in .card__media { clip-path: inset(0 0 0 0 round 28px); }
.js .work .card[data-reveal] .card__meta { opacity: 0; translate: 0 14px; transition: opacity 0.8s var(--ease) 0.35s, translate 0.8s var(--ease) 0.35s; }
.js .work .card[data-reveal].in .card__meta { opacity: 1; translate: 0 0; }

/* ───────── Layered project thumbnails (built from the Figma frames, 2040 × 1259) ───────── */
.scene { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 2040 / 1259; translate: -50% 0; }
.scene img { display: block; width: 100%; height: auto; max-width: none; }
.scene > * { position: absolute; left: calc(var(--x, 0) / 2040 * 100%); top: calc(var(--y, 0) / 1259 * 100%); width: calc(var(--w, 2040) / 2040 * 100%); }
.scene__base { transform: translate3d(calc(var(--ix, 0px) * 0.3), calc(var(--iy, 0px) * 0.3), 0) scale(1.02); transition: transform 0.6s var(--ease); }

/* Sportstech Live: three phones, with the rings, score and tiles cut out of the flat frame */
@property --sw { syntax: "<angle>"; inherits: true; initial-value: 180deg; }
@property --n { syntax: "<integer>"; inherits: true; initial-value: 68; }
.scene--stl { background: #fff; container-type: size; }
.phone { transform-origin: 50% 100%; }
.phone__in { position: relative; display: block; transform: translate3d(calc(var(--ix, 0px) * var(--d, 1) + var(--hx, 0%)), calc(var(--iy, 0px) * var(--d, 1) + var(--hy, 0%)), 0) rotate(var(--hr, 0deg)) scale(var(--hs, 1)); transition: transform 0.7s var(--ease); animation: bobble 7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -2.3s); }
@keyframes bobble { from { translate: 0 -0.7%; } to { translate: 0 0.7%; } }
.js .card:not(.in) .phone { opacity: 0; }
.js .card.in .phone { animation: phoneIn 1.1s var(--ease) both; animation-delay: calc(var(--i) * 140ms + 250ms); }
@keyframes phoneIn { from { opacity: 0; transform: translateY(16%) rotate(calc((var(--i) - 1) * 5deg)) scale(0.94); } to { opacity: 1; transform: none; } }
a.card:hover .phone:nth-child(1) .phone__in { --hx: -3%; --hy: 1%; --hr: -3deg; }
a.card:hover .phone:nth-child(2) .phone__in { --hy: -3%; --hs: 1.03; }
a.card:hover .phone:nth-child(3) .phone__in { --hx: 3%; --hy: 1%; --hr: 3deg; }
.lay { position: absolute; left: calc(var(--lx) / var(--pw) * 100%); top: calc(var(--ly) / var(--ph) * 100%); width: calc(var(--lw) / var(--pw) * 100%); height: calc(var(--lh) / var(--ph) * 100%); }
.scene img.lay { width: calc(var(--lw) / var(--pw) * 100%); height: calc(var(--lh) / var(--ph) * 100%); }

/* rings and score gauge: the lit version sweeps in over an unlit copy */
.sweep img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sweep__on { -webkit-mask-image: conic-gradient(from 270deg at var(--cx) var(--cy), #000 0 var(--sw), transparent calc(var(--sw) + 3deg)); mask-image: conic-gradient(from 270deg at var(--cx) var(--cy), #000 0 var(--sw), transparent calc(var(--sw) + 3deg)); }
.js :is(.card, .float):not(.in) .sweep__on { --sw: 0deg; }
.js :is(.card, .float).in .sweep__on { animation: sweep 1.5s cubic-bezier(0.3, 0.1, 0.2, 1) both; animation-delay: calc(var(--i) * 140ms + 950ms); }
:is(a.card, a.float):hover .sweep__on { animation: sweep2 1.3s cubic-bezier(0.3, 0.1, 0.2, 1) both; }
@keyframes sweep { from { --sw: 0deg; } to { --sw: 180deg; } }
@keyframes sweep2 { from { --sw: 0deg; } to { --sw: 180deg; } }

/* stat tiles pop in */
.js :is(.card, .float):not(.in) .tile { opacity: 0; }
.js :is(.card, .float).in .tile { animation: tileIn 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both; animation-delay: calc(var(--i) * 140ms + var(--t) * 90ms + 1150ms); }
:is(a.card, a.float):hover .tile { animation: tileIn2 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both; animation-delay: calc(var(--t) * 70ms + 150ms); }
@keyframes tileIn { from { opacity: 0; scale: 0.82; translate: 0 18%; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes tileIn2 { from { opacity: 0; scale: 0.82; translate: 0 18%; } to { opacity: 1; scale: 1; translate: 0 0; } }

/* the score counts up to 68, then hands over to the real artwork underneath */
.num { display: grid; place-items: center; background: rgb(23, 23, 23); opacity: 0; counter-reset: n var(--n); }
.num b { font-family: var(--font-display); font-weight: 600; font-size: calc(52 / 2040 * 100cqw); line-height: 1; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.num b::after { content: counter(n); }
.js :is(.card, .float).in .num { animation: numShow 2.9s linear both, count 1.5s cubic-bezier(0.3, 0.1, 0.2, 1) both; animation-delay: calc(var(--i) * 140ms + 950ms); }
:is(a.card, a.float):hover .num { animation: numShow2 2.4s linear both, count2 1.3s cubic-bezier(0.3, 0.1, 0.2, 1) both; }
@keyframes numShow { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes numShow2 { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes count { from { --n: 0; } to { --n: 68; } }
@keyframes count2 { from { --n: 0; } to { --n: 68; } }

/* streak screen: flame glow, today's dot, button sheen */
.glow { border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 150, 40, 0.5), rgba(255, 120, 20, 0.18) 55%, transparent); mix-blend-mode: screen; animation: flame 2.4s ease-in-out infinite alternate; }
@keyframes flame { from { opacity: 0.25; scale: 0.85; } to { opacity: 1; scale: 1.12; } }
.ping { border-radius: 50%; box-shadow: 0 0 0 0 rgba(255, 160, 60, 0.7); animation: dot 1.9s ease-out infinite; }
@keyframes dot { to { box-shadow: 0 0 0 0.9cqw rgba(255, 160, 60, 0); } }
.shine { border-radius: 999px; overflow: hidden; }
.shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%); translate: -110% 0; animation: shine 3.6s var(--ease) infinite; }
@keyframes shine { 0%, 55% { translate: -110% 0; } 100% { translate: 110% 0; } }

/* Workout history: metric cards and their bar charts */
.mcard { transform: translate3d(calc(var(--ix, 0px) * 0.55), calc(var(--iy, 0px) * 0.55), 0); transition: transform 0.6s var(--ease); }
.mcard > img { transition: scale 0.5s var(--ease); }
.bars { position: absolute; left: calc(16 / 236 * 100%); width: calc(205 / 236 * 100%); top: calc(var(--by) / var(--h) * 100%); height: calc(var(--bh) / var(--h) * 100%); }
.bars i { position: absolute; top: 0; height: 100%; left: calc(var(--bx) / 205 * 100%); width: calc(var(--bw) / 205 * 100%); background-image: var(--img); background-repeat: no-repeat; background-size: calc(205 / var(--bw) * 100%) auto; background-position: calc(var(--bx) / (205 - var(--bw)) * 100%) 0; transform-origin: 50% 100%; }
.js .card:not(.in) .mcard { opacity: 0; }
.js .card.in .mcard { animation: cardIn 0.9s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 350ms); }
@keyframes cardIn { from { opacity: 0; translate: 0 14%; scale: 0.92; } to { opacity: 1; translate: 0 0; scale: 1; } }
.js :is(.card, .float).in .bars i { animation: barUp 0.9s cubic-bezier(0.34, 1.4, 0.64, 1) both; animation-delay: calc(var(--i) * 90ms + var(--b) * 55ms + 900ms); }
:is(a.card, a.float):hover .bars i { animation: barUp2 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) both; animation-delay: calc(var(--i) * 60ms + var(--b) * 45ms); }
@keyframes barUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes barUp2 { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Headlines reveal word by word */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.w > span { display: inline-block; }
.js .words .w > span { translate: 0 115%; transition: translate 0.9s var(--ease); transition-delay: calc(var(--wi, 0) * 55ms + var(--wd, 0ms)); }
.js .in .words .w > span, .js .words.in .w > span { translate: 0 0; }
.js .words[data-reveal] { opacity: 1; translate: none; filter: none; }

/* Stack icons pop in */
.js .stack img[data-reveal] { scale: 0.3; rotate: -25deg; filter: none; translate: 0 0; transition: opacity 0.5s var(--ease), scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s var(--ease); transition-delay: var(--rd, 0ms); }
.js .stack img[data-reveal].in { scale: 1; rotate: 0deg; }

/* "polished products" writes itself in, letter by letter, left to right */
.hero__script img { -webkit-mask-image: linear-gradient(104deg, #000 49%, transparent 51%); mask-image: linear-gradient(104deg, #000 49%, transparent 51%); -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 18.0% 0; mask-position: 18.0% 0; }
.js .hero h1:not(.in) .hero__script img { -webkit-mask-position: 81.0% 0; mask-position: 81.0% 0; }
.js .hero h1.in .hero__script img { animation: write 2.6s 0.55s both; }
@keyframes write {
  0% { -webkit-mask-position: 81.0% 0; mask-position: 81.0% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  5.5% { -webkit-mask-position: 73.81% 0; mask-position: 73.81% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  11.0% { -webkit-mask-position: 70.62% 0; mask-position: 70.62% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  16.5% { -webkit-mask-position: 67.44% 0; mask-position: 67.44% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  22.0% { -webkit-mask-position: 64.25% 0; mask-position: 64.25% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  27.5% { -webkit-mask-position: 61.06% 0; mask-position: 61.06% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  33.0% { -webkit-mask-position: 57.88% 0; mask-position: 57.88% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  38.5% { -webkit-mask-position: 54.69% 0; mask-position: 54.69% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  44.0% { -webkit-mask-position: 51.5% 0; mask-position: 51.5% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  52% { -webkit-mask-position: 51.5% 0; mask-position: 51.5% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  58.0% { -webkit-mask-position: 47.31% 0; mask-position: 47.31% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  64.0% { -webkit-mask-position: 43.12% 0; mask-position: 43.12% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  70.0% { -webkit-mask-position: 38.94% 0; mask-position: 38.94% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  76.0% { -webkit-mask-position: 34.75% 0; mask-position: 34.75% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  82.0% { -webkit-mask-position: 30.56% 0; mask-position: 30.56% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  88.0% { -webkit-mask-position: 26.38% 0; mask-position: 26.38% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  94.0% { -webkit-mask-position: 22.19% 0; mask-position: 22.19% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
  100.0% { -webkit-mask-position: 18.0% 0; mask-position: 18.0% 0; animation-timing-function: cubic-bezier(0.5, 0, 0.3, 1); }
}

/* Theme switch: circular wipe from the toggle */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: wipe 0.7s var(--ease); }
@keyframes wipe { from { clip-path: circle(0 at var(--tx, 50%) var(--ty, 0%)); } to { clip-path: circle(150vmax at var(--tx, 50%) var(--ty, 0%)); } }

/* Nav link underline dot + stack + footer links */
.footer__row a { transition: color 0.25s; }
.logo { transition: opacity 0.3s, translate 0.4s var(--ease); }
.logo:hover { opacity: 1; translate: 0 -2px; }
.shot img { transition: transform 0.8s var(--ease); }
.shot:hover img { transform: scale(1.04); }
.badge i { animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); } 100% { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); } }

/* ───────── Responsive ───────── */
@media (max-width: 760px) {
  .nav__brand > span:not(.script-fallback), .nav__links .opt { display: none; }
  .nav__brand { padding-right: 4px; }
  .nav__links a, .nav__back { padding: 7px 9px; font-size: 13px; }
  .hero { padding-top: 120px; min-height: 0; }
  .float--a { --fw: 84px; left: 4%; top: 86px; }
  .float--b { --fw: 84px; right: 4%; top: 82px; }
  .float__tag { display: none; }
  .float--c, .float--d { display: none; }
  .services { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; margin-top: 32px; }
  .flow__card, .flow__card:nth-of-type(n) { --rot: 0deg; --lift: 0px; min-height: 0; }
  .flow__card p { padding-top: 28px; }
  .flow__arrow { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .card__meta { flex-direction: column; gap: 4px; }
  .gallery > .half { grid-column: 1 / -1; }
  .figure-row { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  .more__grid.more__grid--4 { grid-template-columns: 1fr 1fr; }
  .figure--pad img, .figure--pad video { max-height: 340px; }
  .more__grid { grid-template-columns: 1fr 1fr; }
  .case, .page-head { padding-top: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; }
  .rise { transform: none; }
  .js [data-reveal] { opacity: 1; translate: none; filter: none; }
  .js .work .card[data-reveal] .card__media { clip-path: none; }
  .js .work .card[data-reveal] .card__meta { opacity: 1; translate: none; }
  .js .stack img[data-reveal] { scale: 1; rotate: 0deg; }
  .js .card .phone, .js .card .mcard, .js .tile, .js .fmc { opacity: 1; }
  .js .card .sweep__on { --sw: 180deg; }
  .flow__arrow path { stroke-dashoffset: 0; }
  .marquee { overflow-x: auto; }
}

/* ───────── Liquid glass ─────────
   Buttons, the nav and small pills are thick, glossy glass: a translucent body that blurs what is
   behind it, a bright rim on top, a darker lip underneath, a gloss band, and a highlight that
   follows the cursor. Tune the look with the --glass-* tokens. */
:root {
  --glass-body: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.04));
  --glass-rim: inset 0 1.5px 0.5px rgba(255, 255, 255, 0.55), inset 0 -1.5px 0.5px rgba(255, 255, 255, 0.16), inset 1px 0 0.5px rgba(255, 255, 255, 0.14), inset -1px 0 0.5px rgba(255, 255, 255, 0.14);
  --glass-depth: inset 0 8px 10px -9px rgba(255, 255, 255, 0.16), inset 0 -12px 16px -10px rgba(0, 0, 0, 0.6);
  --glass-drop: 0 14px 30px -12px rgba(0, 0, 0, 0.85), 0 3px 6px rgba(0, 0, 0, 0.35);
  --glass-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 34%);
  --glass-spec: rgba(255, 255, 255, 0.2);
  --glass-ink: #fafafa;
  --tint-body: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.05)), #0a0a0a;
  --tint-ink: #ffffff;
  --tint-drop: 0 0 0 1px rgba(255, 255, 255, 0.26), 0 14px 26px -12px rgba(0, 0, 0, 0.85), 0 3px 6px rgba(0, 0, 0, 0.4);
  --tint-depth: inset 0 8px 10px -9px rgba(255, 255, 255, 0.2), inset 0 -12px 14px -8px rgba(0, 0, 0, 0.7);
}
:root[data-theme="light"] {
  --glass-body: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.24) 50%, rgba(255, 255, 255, 0.36));
  --glass-rim: inset 0 1.5px 0.5px rgba(255, 255, 255, 1), inset 0 -1.5px 0.5px rgba(255, 255, 255, 0.9), inset 1px 0 0.5px rgba(255, 255, 255, 0.7), inset -1px 0 0.5px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(69, 36, 29, 0.09);
  --glass-depth: inset 0 8px 10px -9px rgba(255, 255, 255, 0.7), inset 0 -12px 16px -10px rgba(69, 36, 29, 0.18);
  --glass-drop: 0 14px 28px -14px rgba(69, 36, 29, 0.45), 0 3px 6px rgba(69, 36, 29, 0.1);
  --glass-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 34%);
  --glass-spec: rgba(255, 255, 255, 0.9);
  --glass-ink: #2a1712;
  --tint-body: linear-gradient(180deg, #55302a, #45241d 45%, #331a15);
  --tint-ink: #faf4e9;
  --tint-drop: 0 14px 26px -12px rgba(69, 36, 29, 0.6), 0 3px 6px rgba(69, 36, 29, 0.2);
  --tint-depth: inset 0 8px 10px -9px rgba(255, 220, 205, 0.3), inset 0 -12px 14px -8px rgba(0, 0, 0, 0.5);
}

.btn, .card__view, .card__soon, .badge, .theme-toggle, .nav__pill {
  position: relative; isolation: isolate; border: 0;
  background: var(--glass-body); color: var(--glass-ink);
  -webkit-backdrop-filter: blur(14px) saturate(1.7); backdrop-filter: blur(14px) saturate(1.7);
  box-shadow: var(--glass-rim), var(--glass-depth), var(--glass-drop);
}
.card__view, .card__soon { position: absolute; }
.nav__pill { position: absolute; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--glass-rim), var(--glass-depth); }
.theme-toggle { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--text-2); }
.theme-toggle:hover { background: var(--glass-body); box-shadow: var(--glass-rim), var(--glass-depth); color: var(--text); }
.badge { color: var(--text-2); }

/* gloss band across the top half, and a highlight that tracks the cursor */
.btn::before, .card__view::before, .nav::before { content: ""; position: absolute; inset: 1.5px; border-radius: inherit; background: var(--glass-gloss); pointer-events: none; z-index: 0; opacity: 0.9; }
.btn::after, .nav::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 0.35s; background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), var(--glass-spec), transparent 70%); }
.btn:hover::after, .nav:hover::after { opacity: 1; }
.nav::after { background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--glass-spec) 45%, transparent), transparent 70%); }
.btn > *, .card__view > *, .nav > * { position: relative; z-index: 1; }
.nav > .nav__links > .nav__pill { position: absolute; z-index: 0; }

/* the main call to action is the same glass, tinted */
.btn:not(.btn--ghost), .card__view { background: var(--tint-body); color: var(--tint-ink); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--glass-rim), var(--tint-depth), var(--tint-drop); text-shadow: none; }
:root[data-theme="light"] .btn:not(.btn--ghost), :root[data-theme="light"] .card__view { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35); }
:root:not([data-theme="light"]) .btn:not(.btn--ghost):hover { box-shadow: var(--glass-rim), var(--tint-depth), 0 0 0 1px rgba(var(--accent-rgb), 0.75), 0 0 20px rgba(var(--accent-rgb), 0.28), 0 14px 26px -12px rgba(0, 0, 0, 0.85); }
.btn--ghost { background: var(--glass-body); color: var(--text-2); }
.btn--ghost:hover { color: var(--glass-ink); }
.btn--ghost:hover { background: var(--glass-body); }

/* liquid feel: lifts and wobbles like a droplet on hover, squashes when pressed */
.btn { transition: translate 0.4s var(--ease), box-shadow 0.4s var(--ease), scale 0.25s var(--ease); }
.btn:hover { translate: 0 -2px; animation: jelly 0.7s both; }
.btn:active { scale: 1.05 0.9; transition-duration: 0.1s; animation: none; }
@keyframes jelly { 0% { scale: 1 1; } 28% { scale: 1.07 0.92; } 52% { scale: 0.96 1.05; } 74% { scale: 1.02 0.98; } 100% { scale: 1 1; } }

/* the floating nav is one long glass capsule */
.nav { background: var(--glass-body); border: 0; -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: var(--glass-rim), var(--glass-depth), var(--glass-drop); }
:root:not([data-theme="light"]) .nav { background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(10, 10, 10, 0.6) 50%, rgba(255, 255, 255, 0.03)); }
.nav::before { opacity: 0.6; }

/* cards pick up a glass edge so the whole page shares the material */
.flow__card, .service, .points li { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, #fff), var(--surface) 30%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -14px 20px -16px rgba(0, 0, 0, 0.5), 0 18px 34px -22px rgba(0, 0, 0, 0.7); }
:root[data-theme="light"] .flow__card, :root[data-theme="light"] .service, :root[data-theme="light"] .points li { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--surface) 92%, #45241d)); box-shadow: inset 0 1px 0 #fff, inset 0 -14px 20px -16px rgba(69, 36, 29, 0.12), 0 18px 34px -22px rgba(69, 36, 29, 0.35); }

@media (prefers-reduced-motion: reduce) { .btn, .btn:hover { animation: none !important; scale: none; translate: none; } }

/* The nav has no outline: only the blurred glass body and a soft shadow */
.nav, :root:not([data-theme="light"]) .nav { box-shadow: var(--glass-drop); }
.nav::before { display: none; }

/* ───────── Main buttons: a light travels around the edge ─────────
   Black pill, white text. A bright point with a green tail sits on the rim and circles it on hover,
   with a soft glow that follows it. Change the colours in --shine. */
@property --ang { syntax: "<angle>"; inherits: true; initial-value: 286deg; }
.btn:not(.btn--ghost) {
  --shine: conic-gradient(from var(--ang), transparent 0 66%, rgba(20, 82, 10, 0.5) 74%, #3fae18 84%, #82f754 92%, #ffffff 96.5%, #82f754 99%, transparent 100%);
  background: #050505; color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 10px 24px -12px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: none;
}
:root[data-theme="light"] .btn:not(.btn--ghost) { background: #1d0f0c; color: #faf4e9; box-shadow: 0 10px 22px -12px rgba(69, 36, 29, 0.7); text-shadow: none; }
.btn:not(.btn--ghost)::before {
  content: ""; position: absolute; inset: 0; padding: 2px; border-radius: inherit; background: var(--shine); opacity: 1; z-index: 0; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.btn:not(.btn--ghost)::after {
  content: ""; position: absolute; inset: -7px; padding: 7px; border-radius: 999px; background: var(--shine); opacity: 0.22; z-index: 0; pointer-events: none;
  filter: blur(7px); transition: opacity 0.4s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.btn:not(.btn--ghost):hover::after { opacity: 0.4; }
:root[data-theme="light"] .btn:not(.btn--ghost)::after { opacity: 0.16; }
:root[data-theme="light"] .btn:not(.btn--ghost):hover::after { opacity: 0.3; }
.btn:not(.btn--ghost) { animation: shine 3.4s linear infinite; }
.btn:not(.btn--ghost):hover, :root:not([data-theme="light"]) .btn:not(.btn--ghost):hover { animation: shine 3.4s linear infinite, jelly 0.7s both; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 10px 24px -12px rgba(0, 0, 0, 0.9); }
@keyframes shine { from { --ang: 286deg; } to { --ang: 646deg; } }
@media (prefers-reduced-motion: reduce) { .btn:not(.btn--ghost), .btn:not(.btn--ghost):hover { animation: none !important; } }

/* Logo: dark artwork in dark mode, green artwork in light mode */
.logo-light, :root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }

/* ───────── 404 ───────── */
.notfound { min-height: 78vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 140px; padding-bottom: 80px; gap: 18px; }
.notfound__code { font-family: "Geist", system-ui, sans-serif; font-size: clamp(96px, 20vw, 220px); line-height: .9; letter-spacing: -0.06em; margin: 0;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(var(--accent-rgb), .15) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 400; letter-spacing: -0.03em; margin: 0; }
.notfound__lead { color: var(--text-2); max-width: 440px; margin: 0; }
.notfound__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.notfound > * { animation: nfUp .8s cubic-bezier(.2,.7,.2,1) both; }
.notfound > :nth-child(2) { animation-delay: .08s; } .notfound > :nth-child(3) { animation-delay: .16s; } .notfound > :nth-child(4) { animation-delay: .24s; }
@keyframes nfUp { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .notfound > * { animation: none; } }

/* ───────── Film grain ───────── */
/* Fine monochrome noise fixed BEHIND all content: it textures the page background only. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 180px 180px;
  opacity: var(--grain-o); transform: translateZ(0);
}
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 2.4 -1.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-o: .12;
}
:root[data-theme="light"] {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .27  0 0 0 0 .14  0 0 0 0 .11  0 0 0 2.4 -1.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-o: .16;
}
@media print { body::before { display: none; } }

/* ───────── Nav: keep the CTA visibly inside the bar ───────── */
:root:not([data-theme="light"]) .nav { background: rgba(26, 26, 26, 0.74); }
:root[data-theme="light"] .nav { background: rgba(255, 252, 246, 0.78); }
.nav .btn:not(.btn--ghost) { box-shadow: none; }
.nav .btn:not(.btn--ghost)::after { inset: -2px; padding: 2px; filter: blur(3px); }
.nav .btn:not(.btn--ghost):hover { box-shadow: none; }
