/* JJ portfolio — styles
   Values come from the "Portfolio redesign" FigCraft file (v3, dark and white sets).
   Dark is the default; the light theme is at the end of this file.
   Desktop is designed at 1440px, mobile at 390px; the layout switches at 900px. */

/* Open Sans, hosted with the site (SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face {
  font-family: "Open Sans"; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-math-italic.woff2") format("woff2");
  unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-209F, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Open Sans"; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-symbols-italic.woff2") format("woff2");
  unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF;
}
@font-face {
  font-family: "Open Sans"; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-math.woff2") format("woff2");
  unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-209F, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-symbols.woff2") format("woff2");
  unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF;
}
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #111111;
  --panel: #1a1a1a;
  --device: #1c1c1c;
  --device-line: #3a3a3a;
  --heading: #f5f5f5;
  --body: #b3b3b3;
  --muted: #8c8c8c;
  --placeholder: #7c7c7c;
  --rule: #262626;
  --rule-strong: #333333;
  --divider: #4d4d4d;
  --accent: #f8752b;
  --accent-text: #f8752b;
  --on-accent: #111111;
  --phone: #111111;
  --label: #ffffff;
  --field-line: #6b6b6b;
  color-scheme: dark;

  --gutter: clamp(40px, 8.333vw, 120px);
  --edge: max(var(--gutter), calc((100% - 1200px) / 2));
  --ease: 150ms ease-out;
  --nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Links and scrolling stop below the pinned nav */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
/* <picture> only offers image formats, so the <img> keeps its place in the layout */
picture:not(.hero__photo) { display: contents; }
source { display: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  padding: 10px 16px; background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* Shared type ---------------------------------------------------------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.stack-flow > * + * { margin-top: 1.6em; }

.link {
  font-size: 15px; font-weight: 600; color: var(--heading);
  transition: color var(--ease);
}
.link:hover { text-decoration: underline; }
.link--lg { font-size: 16px; }
.link--soft { color: var(--body); }
.link--soft:hover { color: var(--heading); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}
.btn:hover { background: var(--heading); color: var(--bg); }

/* Nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 28px var(--edge);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.nav__brand { display: flex; align-items: center; gap: 16px; margin-right: auto; }
.nav__logo { font-size: 20px; font-weight: 700; color: var(--heading); }
.nav__divider { width: 1px; height: 16px; background: var(--divider); }
.nav__descriptor { font-size: 14px; color: var(--muted); }
.nav__links { display: flex; align-items: center; gap: 40px; }
.nav__link { font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--body); transition: color var(--ease); }
.nav__link:hover { color: var(--heading); text-decoration: underline; }
.nav__link[aria-current] { color: var(--heading); }
.nav__link--marked {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
/* Burger: 40px target, pulled in so it doesn't change the nav height */
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: -10px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--heading); cursor: pointer;
}
.nav__toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav__close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__burger { display: none; }
.nav__toggle[aria-expanded="true"] .nav__close { display: block; }

/* Theme toggle: 40px target, pulled in so it doesn't change the nav height.
   Shows the mode you'd switch to. Hidden without JavaScript, where it can't work. */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: -10px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--body); cursor: pointer; transition: color var(--ease);
}
.theme-toggle:hover { color: var(--heading); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__sun { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }
html:not([data-theme]) .theme-toggle { display: none; }

/* Footer --------------------------------------------------------------- */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--edge);
  border-top: 1px solid var(--rule);
  font-size: 14px; color: var(--muted);
}

.footer__link { text-decoration: underline; }
.footer__link:hover { color: var(--heading); }

/* Home hero ------------------------------------------------------------ */
.hero {
  position: relative; display: flex; flex-direction: column; gap: 40px;
  padding: 104px var(--edge) 80px;
}
.hero__photo { position: absolute; inset: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
/* Caps the brightness of the photo behind the headline so the orange words stay readable
   over the bright screen. "darken" leaves pixels that are already darker untouched. */
.hero__photo::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--edge) + 894px + 320px);
  background: linear-gradient(90deg, #484848 calc(100% - 320px), #a0a0a0 calc(100% - 40px), #ffffff);
  mix-blend-mode: darken;
}
.hero > :not(.hero__photo) { position: relative; }
.hero__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__title {
  max-width: 894px; flex: 1 1 auto;
  font-size: 56px; font-weight: 700; line-height: 1.12; letter-spacing: -.02em; color: var(--heading);
}
.hero__title em { font-style: normal; color: var(--accent-text); }
.hero__note { flex: none; font-size: 16px; line-height: 1.6; color: var(--body); }
.hero__note span { display: block; }
.hero__what { display: flex; align-items: center; gap: 16px; }
.hero__services { font-size: 16px; line-height: 1.6; color: var(--heading); }
.hero__contact { display: flex; align-items: flex-end; gap: 48px; }
.hero__contact-text { display: flex; flex-direction: column; gap: 8px; }
.hero__contact-text p:last-child { font-size: 16px; line-height: 1.6; }
.actions { display: flex; align-items: center; gap: 20px; }

/* Project lists (Home + Work) ------------------------------------------ */
.projects { padding-inline: var(--edge); }
.projects--work { padding-block: 0; }
/* Filter bars: the lines run edge to edge, the links keep the page margins */
.projects--work { padding-inline: 0; }
.projects--work .filters { margin: 0; }
/* Work page rows run edge to edge so their divider lines span the screen */
.projects--work .project { padding-inline: var(--edge); }
:is(.projects--work, .motion-subnav) .filters { padding-inline: var(--edge); }

.meta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.meta__top { display: flex; flex-direction: column; gap: 8px; }
.meta__index { font-size: 40px; font-weight: 600; letter-spacing: -.03em; color: var(--accent-text); }
.meta__category { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.meta__title { font-size: 44px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--heading); }
.meta__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.meta__desc { font-size: 18px; line-height: 1.6; }
.meta__role { font-size: 14px; color: var(--muted); }

.project {
  display: grid; grid-template-columns: 552fr 624fr; gap: 24px; align-items: center;
  padding-block: 88px; border-top: 1px solid var(--rule);
}
.project--flip { grid-template-columns: 624fr 552fr; }
.project--flip .project__media { order: 2; }
.projects--work .project { align-items: start; }
/* Divider lines only between visible projects, so filtering never leaves a line under the filter bar */
.projects--work .project { border-top: 0; }
.projects--work .project:not([hidden]) ~ .project { border-top: 1px solid var(--rule); }
/* The first visible project sits right under the filter bar (so a tinted row touches it) */
.projects--work .project:not([hidden]):not(.project:not([hidden]) ~ .project) { padding-top: 88px; }
.project[hidden] { display: none; }
.project__media { display: block; min-width: 0; }

/* Work page "More projects": compact rows with a small thumbnail */
.more__head { padding: 88px var(--edge) 24px; border-top: 1px solid var(--rule); font-size: 40px; font-weight: 700; text-transform: uppercase; color: var(--heading); }
.more--alone .more__head { border-top: 0; }
.row { display: flex; align-items: center; gap: 40px; padding: 32px var(--edge); border-top: 1px solid var(--rule); }
.row:last-child { padding-bottom: 88px; }
.row[hidden], .more[hidden] { display: none; }
.row__media { flex: none; width: 320px; }
.row__media img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.row .meta { flex: 1; gap: 8px; }
.row .meta__index { font-size: 20px; }
.row .meta__title { font-size: 28px; }
.row .meta__desc { font-size: 16px; }

.featured { display: flex; flex-direction: column; gap: 40px; padding-bottom: 88px; }
.featured .meta { padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.featured .meta__index { font-size: 64px; }
.featured .meta__title { font-size: 56px; }
.featured .meta__desc { max-width: 690px; font-size: 20px; line-height: 1.5; }

/* Device frames */
.laptop { display: flex; flex-direction: column; align-items: center; width: 100%; }
.laptop__screen {
  width: calc(655 / 690 * 100%); padding: 14.4px 14.4px 19.2px;
  background: var(--device); border: 1.2px solid var(--device-line);
  border-radius: 12.8px 12.8px 0 0;
}
.laptop__screen img { width: 100%; aspect-ratio: 616 / 385; object-fit: cover; border-radius: 2.4px; }
.laptop__base {
  display: flex; justify-content: center; width: 100%; height: 12.8px;
  background: linear-gradient(#4a4a4a, #2b2b2b); border-radius: 1.6px 1.6px 9.6px 9.6px;
}
.laptop__base::before { content: ""; width: calc(110 / 690 * 100%); height: 4.8px; background: #1e1e1e; border-radius: 0 0 4px 4px; }
.laptop--lg { width: 80%; margin-inline: auto; }
.laptop--lg .laptop__screen { width: calc(937 / 1200 * 100%); padding: 16px 16px 20.8px; border-radius: 14.4px 14.4px 0 0; }
.laptop--lg .laptop__screen img { aspect-ratio: 894 / 559; }
.laptop--lg .laptop__base { width: calc(1100 / 1200 * 100%); height: 16px; border-radius: 1.6px 1.6px 11.2px 11.2px; }
.laptop--lg .laptop__base::before { width: calc(160 / 1100 * 100%); height: 5.6px; border-radius: 0 0 4.8px 4.8px; }

.phones { display: flex; justify-content: center; align-items: center; gap: 22.4px; }
.phone {
  flex: 0 1 calc(182 / 690 * 100%); padding: 2px;
  background: var(--phone); border: .8px solid var(--device-line); border-radius: 20.4px;
}
.phone img { width: 100%; aspect-ratio: 175 / 360; object-fit: cover; border-radius: 18.4px; }
/* Case-study screenshots in the same phone. Each screenshot carries a soft shadow margin,
   so it is shifted and scaled (--pw, --px, --py) to show only its screen inside the frame.
   --k shrinks the phone to the size the screen had inside the original image. */
.phone--shot {
  flex: none; width: calc(var(--w, 100%) * var(--k, 1)); margin-inline: auto;
  padding: min(1.1%, 4px); border-radius: 11.2% / 5.4%;
}
.phone--shot .phone__screen { aspect-ratio: var(--pa); overflow: hidden; border-radius: 10.4% / 5%; background: #fff; }
.phone--shot .phone__screen picture { display: block; }
.phone .phone__shot { display: block; width: var(--pw); max-width: none; height: auto; aspect-ratio: auto; margin: var(--py) 0 0 var(--px); border-radius: 0; object-fit: fill; }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px;
  padding-block: 20px; border-block: 1px solid var(--rule);
}
.filters + .project { border-top: 0; }
.filter {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--muted); transition: color var(--ease);
}
.filter:hover { color: var(--heading); }
.filter[aria-pressed="true"], .filter[aria-current] {
  color: var(--heading);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* Motion */
.play { position: relative; display: block; overflow: hidden; background: #000; }
.play img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.play__icon {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  transition: background-color var(--ease), color var(--ease);
}
.play:hover .play__icon { background: var(--heading); color: var(--bg); }
.play__icon svg { width: 13px; height: 16px; margin-left: 5px; fill: currentColor; }
.play--reel img { aspect-ratio: 1200 / 500; }
.play--reel .play__icon { left: 32px; bottom: 32px; width: 72px; height: 72px; }
.play--reel .play__icon svg { width: 22px; height: 24px; margin-left: 8px; }

.motion-subnav { padding: 0 0 64px; }
.player { scroll-margin-top: 24px; }
.player.is-playing { aspect-ratio: 16 / 9; max-height: calc(100vh - var(--nav-h) - 48px); background: #000; }
.player.is-playing .play { display: none; }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }

.reel { display: flex; flex-direction: column; gap: 24px; padding: 0 var(--edge) 112px; }
.reel__caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.reel__caption h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--heading); }
.reel__caption .link { flex: none; }

.motion-projects { display: flex; flex-direction: column; gap: 56px; padding: 96px var(--edge) 128px; border-top: 1px solid var(--rule); }
.motion-projects__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.motion-projects__head h2 { font-size: 40px; font-weight: 700; letter-spacing: -.02em; color: var(--heading); }
.motion-projects__head p { flex: 0 1 384px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.motion-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; align-items: start; }
.motion-card { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.motion-card__meta { display: flex; flex-direction: column; gap: 10px; }
.motion-card__category { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.motion-card__title { font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--heading); }
.motion-card__desc { font-size: 15px; line-height: 1.6; }

/* Page header (Work, Motion, About, Contact) ---------------------------- */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 56px var(--edge) 48px;
}
.page-head h1 { font-size: 72px; font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; color: var(--heading); }
.page-head p { flex: 0 1 384px; font-size: 18px; line-height: 1.55; }

/* Plain bordered band used by About / Contact */
.band { padding: 96px var(--edge); border-top: 1px solid var(--rule); }
.h-section { font-size: 40px; font-weight: 700; text-transform: uppercase; color: var(--heading); }
.lead-strong { font-size: 24px; font-weight: 600; line-height: 36px; color: var(--heading); }
.prose { font-size: 17px; line-height: 28px; }
.prose > * + * { margin-top: 28px; }

/* About */
.about-career { display: flex; align-items: flex-start; gap: 80px; }
.about-photo { order: 2; flex: 0 0 226px; width: 226px; height: auto; aspect-ratio: 226 / 301; object-fit: cover; border-radius: 4px; }
.about-story { display: flex; flex-direction: column; gap: 32px; flex: 0 1 894px; min-width: 0; }
.about-story :is(.prose, .lead-strong) { max-width: 690px; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-col { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.about-col h2 { font-size: 28px; font-weight: 700; text-transform: uppercase; color: var(--heading); }
.about-beyond { display: flex; flex-direction: column; gap: 48px; }
.about-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; align-items: start; }
.about-step { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.about-step h3 { font-size: 22px; font-weight: 600; line-height: 30px; color: var(--heading); }
.about-step p { font-size: 16px; line-height: 26px; }
.cta-band {
  display: flex; justify-content: space-between; align-items: center; gap: 48px;
  padding: 64px var(--edge); border-top: 1px solid var(--rule);
}
.cta-band h2 { font-size: 28px; font-weight: 600; line-height: 1.3; color: var(--heading); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact__details { display: flex; flex-direction: column; gap: 32px; }
.detail-list { border-bottom: 1px solid var(--rule); }
.detail {
  display: flex; align-items: center; gap: 24px; padding-block: 20px;
  border-top: 1px solid var(--rule);
}
.detail__label { flex: 0 0 140px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.detail__value { font-size: 17px; font-weight: 600; color: var(--heading); }
a.detail__value:hover { text-decoration: underline; }
.form {
  display: flex; flex-direction: column; gap: 24px; padding: 40px;
  background: var(--panel); border: 1px solid var(--rule);
}
.form__fields { display: flex; flex-direction: column; gap: 24px; }
.form__fields:empty { display: none; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--label); }
.field input, .field textarea {
  width: 100%; padding: 0 16px; background: var(--bg); border: 1px solid var(--field-line);
  font-size: 16px; color: var(--heading); border-radius: 0;
}
.field input { height: 52px; }
.field textarea { display: block; height: 160px; padding-block: 16px; resize: vertical; }
.field__error { font-size: 14px; line-height: 1.4; color: var(--accent-text); }
.field__error:empty { display: none; }
.field [aria-invalid="true"] { border-color: var(--accent-text); }
.field ::placeholder { color: var(--placeholder); opacity: 1; }
.field input:focus, .field textarea:focus { border-color: var(--accent-text); }
.form__send {
  align-self: flex-start; padding: 14px 28px; border: 0; border-radius: 6px;
  background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background-color var(--ease);
}
.form__send:hover { background: var(--heading); color: var(--bg); }
.form__send:disabled { opacity: .7; cursor: default; }
.form__send[hidden] { display: none; }
.form__status { font-size: 15px; line-height: 1.5; color: var(--heading); }
.form__status:empty { display: none; }
.form__note { font-size: 14px; line-height: 1.5; color: var(--muted); }
.form__note a { color: var(--heading); text-decoration: underline; }

/* Privacy and 404 */
.legal { display: flex; flex-direction: column; gap: 16px; }
.legal > * { max-width: 690px; }
.legal__updated { font-size: 14px; color: var(--muted); }
.legal h2 { margin-top: 24px; font-size: 22px; font-weight: 600; line-height: 30px; color: var(--heading); }
.legal p:not(.legal__updated) { font-size: 17px; line-height: 28px; }
.legal a { color: var(--heading); text-decoration: underline; }
.not-found { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

/* Crops from the top, for photos where a centre crop would cut off heads */
.img-top { object-position: 50% 0; }

/* Case studies --------------------------------------------------------- */
.cs-intro { display: flex; flex-direction: column; gap: 32px; padding: 48px var(--edge); }
.cs-intro .link { align-self: flex-start; }
.cs-title-row { display: flex; flex-direction: column; gap: 16px; }
.cs-labels { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.cs-labels .cs-eyebrow { color: var(--accent-text); }
.cs-title { font-size: 80px; font-weight: 700; line-height: 1.02; letter-spacing: -.01em; text-transform: uppercase; color: var(--heading); }
.cs-summary { max-width: 894px; font-size: 24px; line-height: 1.45; }
.cs-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cs-fact { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.cs-fact dt { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.cs-fact dd { margin: 0; font-size: 17px; font-weight: 600; color: var(--heading); }
.cs-fact dd.is-muted { color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: var(--g, 0); }
.cs-sec { padding: var(--pt, 96px) var(--edge) var(--pb, 96px); border-top: 1px solid var(--rule); }
.cs-sec--plain { border-top: 0; }
.cs-sec h2 { font-size: 40px; font-weight: 700; text-transform: uppercase; color: var(--heading); }
.cs-content { max-width: 894px; }
.cs-lead { font-size: 28px; line-height: 1.4; letter-spacing: -.01em; color: var(--heading); }
.cs-text { max-width: 690px; font-size: 18px; line-height: 1.6; }
.cs-text--wide { max-width: none; }
.cs-text--muted { color: var(--muted); }
.cs-text--soft { color: var(--body); }
.cs-text--large { font-size: 24px; line-height: 1.45; color: var(--muted); }
.cs-text ol { padding-left: 1.4em; list-style: decimal; }
.cs-heading { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--heading); }
.cs-heading--lh { line-height: 1.2; max-width: 894px; }

.cs-goal { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 2px solid var(--accent); }
.cs-goal__label { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--accent-text); }
.cs-goal__quote { font-size: 40px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; color: var(--heading); }

.cs-steps { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: var(--xg, 24px) 24px; align-items: start; }
.cs-step { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.cs-step__no { font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--accent-text); }
.cs-step__title { font-size: 22px; font-weight: 600; color: var(--heading); }
.cs-step__text { font-size: 16px; line-height: 1.55; color: var(--muted); }

.cs-img { width: 100%; aspect-ratio: var(--ar); object-fit: cover; border-radius: var(--r, 0); }
.cs-img--fit { object-fit: contain; }

.cs-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.cs-compare__col { display: flex; flex-direction: column; gap: 24px; padding-top: 16px; border-top: 1px solid var(--rule-strong); min-width: 0; }
.cs-compare__col--after { border-top-color: var(--accent); }
/* Comparison without the lines above the screens (myGP Connect) */
.cs-compare--plain .cs-compare__col { padding-top: 0; border-top: 0; }
.cs-compare__caption { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--muted); }
.cs-compare__col--after .cs-compare__caption { color: var(--heading); }
.cs-compare__screens { display: flex; justify-content: center; }
.cs-compare__screens img { width: var(--w, 100%); min-width: 0; }

.cs-screens { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: var(--sg, 24px); align-items: start; }
.cs-screen { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cs-caption { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.cs-caption__title { font-size: 20px; font-weight: 600; color: var(--heading); }
.cs-caption__text { font-size: 16px; line-height: 1.55; }

/* Carousel (myGP Connect "A closer look"): one screen at a time, swipe or use the arrows */
.carousel { display: flex; flex-direction: column; gap: 24px; }
.carousel__track {
  position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.carousel__slide { flex: 0 0 100%; display: flex; justify-content: center; scroll-snap-align: center; }
/* Two phones per slide (Health+) */
.carousel__pair { display: flex; justify-content: center; align-items: flex-start; gap: 48px; width: 100%; max-width: 690px; }
.carousel__pair .phone--shot { width: 240px; margin-inline: 0; }
/* iPad (landscape) around each screen. The screenshots carry a soft shadow margin,
   so the image is shifted and scaled to show only the screen area inside the bezel. */
.ipad {
  position: relative; width: 100%; max-width: 690px; padding: 2.4%;
  background: var(--device); border: 1.2px solid var(--device-line); border-radius: 28px;
}
.ipad::before {
  content: ""; position: absolute; top: calc(1.2% - 3px); left: 50%; width: 6px; height: 6px;
  margin-left: -3px; border-radius: 50%; background: #2e2e2e;
}
.ipad__screen { aspect-ratio: 918 / 735; overflow: hidden; border-radius: 12px; background: #000; }
.ipad__screen picture { display: block; }
.ipad__screen img { display: block; width: 108.932%; max-width: none; height: auto; aspect-ratio: 1000 / 816; margin: -2.941% 0 0 -4.466%; }
/* Wide tablet (Be Data-Driven, FSA): screenshots are full-bleed 16:10 crops, so show them as they are */
.ipad--wide .ipad__screen { aspect-ratio: 16 / 10; }
.ipad--wide .ipad__screen img { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; object-fit: cover; object-position: left top; }
/* Android tablet (FSA): fixed bezel from the design, 16.5px all round with a 657 x 411 screen */
.ipad--android { max-width: 692.4px; padding: 16.5px; }
.ipad--android::before { top: 5.25px; }
.ipad--android .ipad__screen { aspect-ratio: 657 / 411; }
.carousel__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; max-width: 690px; margin-inline: auto; padding-top: 20px; border-top: 1px solid var(--rule);
}
.carousel__count { min-width: 48px; font-size: 14px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--muted); }
.carousel__dots { display: flex; flex-wrap: wrap; justify-content: center; }
.carousel__dot { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel__dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); transition: background-color var(--ease), transform var(--ease); }
.carousel__dot:hover::before { background: var(--muted); }
.carousel__dot[aria-current]::before { background: var(--accent); transform: scale(1.25); }
.carousel__nav { display: flex; gap: 12px; }
.carousel__btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--rule-strong);
  border-radius: 50%; background: none; color: var(--heading); cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.carousel__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.carousel__btn:hover:not(:disabled) { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.carousel__btn:disabled { opacity: .35; cursor: default; }
/* Without JavaScript the screens still scroll sideways; only the controls are hidden */
html:not([data-theme]) .carousel__bar { display: none; }

.cs-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: var(--xg, 24px) var(--cg, 24px); }

.cs-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.cs-number { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.cs-number__value { font-size: 30px; font-weight: 600; letter-spacing: -.03em; color: var(--heading); }
.cs-number__label { font-size: 15px; color: var(--muted); }

.cs-quote { display: flex; gap: 28px; max-width: 894px; }
.cs-quote::before { content: ""; flex: 0 0 4px; background: var(--accent); }
.cs-quote blockquote { margin: 0; font-size: 24px; font-style: italic; line-height: 1.45; color: var(--heading); }
.cs-quote blockquote > * + * { margin-top: 1.45em; }

/* Small lead, for text in columns and accordion panels */
.cs-lead--sm { font-size: 22px; line-height: 1.5; }
.cs-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }

/* Small device frames, for images in three columns */
.tablet { padding: 7.32px; background: var(--device); border: .61px solid var(--device-line); border-radius: 10.58px; }
.tablet img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 1.2px; }
@media (min-width: 901px) {
  .laptop--sm .laptop__screen { padding: 7.36px 7.36px 9.81px; border-width: .61px; border-radius: 6.54px 6.54px 0 0; }
  .laptop--sm .laptop__screen img { border-radius: 1.2px; }
  .laptop--sm .laptop__base { height: 6.54px; border-radius: .82px .82px 4.9px 4.9px; }
  .laptop--sm .laptop__base::before { width: calc(45 / 282 * 100%); height: 2.45px; border-radius: 0 0 2px 2px; }
}

/* Case study sections: a menu beside an accordion. On mobile the menu is a dropdown above it. */
.cs-guide { display: grid; grid-template-columns: minmax(0, 282fr) minmax(0, 894fr); gap: 24px; align-items: start; }
.cs-toc { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.cs-toc__label { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.cs-toc__jump { display: none; }
.cs-toc__links { align-self: stretch; border-left: 1px solid var(--rule-strong); }
.cs-toc__links a {
  display: flex; align-items: center; gap: 12px;
  margin-left: -1px; padding: 10px 0 10px 17px; border-left: 2px solid transparent;
  font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--body);
  transition: color var(--ease);
}
.cs-toc__links a:hover { color: var(--heading); }
.cs-toc__links a[aria-current] { border-left-color: var(--accent); color: var(--heading); }
.cs-toc__no { flex: none; font-size: 12px; color: var(--muted); }
.cs-toc__links a[aria-current] .cs-toc__no { color: var(--accent-text); }
.cs-expand {
  display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--heading);
}
.cs-expand:hover .cs-expand__label { text-decoration: underline; }
.cs-expand__icon { font-size: 20px; line-height: 27px; font-weight: 400; color: var(--accent-text); }
.cs-expand__icon::before { content: "+"; }
.cs-expand[aria-pressed="true"] .cs-expand__icon::before { content: "\2212"; }
/* Without JavaScript the dropdown and Expand all can't work */
html:not([data-theme]) .cs-expand { display: none; }

.cs-items { border-bottom: 1px solid var(--rule-strong); min-width: 0; }
.cs-item { border-top: 1px solid var(--rule-strong); scroll-margin-top: 24px; }
.cs-item summary {
  display: flex; align-items: center; gap: 24px; padding-block: 28px;
  list-style: none; cursor: pointer;
}
.cs-item summary::-webkit-details-marker { display: none; }
.cs-item__no { flex: none; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.cs-sec .cs-item__title { flex: 1 1 auto; min-width: 0; font-size: 28px; font-weight: 600; line-height: 1.25; text-transform: none; }
.cs-item summary:hover .cs-item__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cs-item__icon { flex: none; font-size: 32px; line-height: 44px; color: var(--body); }
.cs-item__icon::before { content: "+"; }
.cs-item[open] .cs-item__icon { color: var(--accent-text); }
.cs-item[open] .cs-item__icon::before { content: "\2212"; }
.cs-panel { display: flex; flex-direction: column; gap: 32px; padding-bottom: 56px; }
@media (min-width: 901px) {
  /* Rows keep their column count, and wrap when the column beside the menu gets narrow */
  .cs-panel :is(.cs-steps, .cs-screens, .cs-grid) {
    grid-template-columns: repeat(auto-fit, minmax(max(200px, calc((100% - (var(--cols, 3) - 1) * 24px) / var(--cols, 3))), 1fr));
  }
}
@media (min-width: 901px) and (min-height: 600px) {
  /* Scrolls by itself if a long menu is taller than the window. The padding keeps focus outlines from being clipped. */
  .cs-toc {
    position: sticky; top: calc(var(--nav-h) + 28px);
    max-height: calc(100vh - var(--nav-h) - 44px); overflow-y: auto; scrollbar-width: thin;
    margin: -4px; padding: 4px;
  }
}

.cs-next { padding: 72px var(--edge); }
.cs-next__row { display: grid; grid-template-columns: 690fr 486fr; gap: 24px; align-items: center; }
.cs-next__text { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.cs-next__title { font-size: 44px; font-weight: 600; letter-spacing: -.03em; color: var(--heading); }
.cs-next__summary { font-size: 16px; line-height: 1.55; }
.cs-next .cs-img { aspect-ratio: 486 / 264; }

/* Mobile ---------------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --gutter: clamp(20px, 5vw, 40px); --nav-h: 64px; }

  .nav { padding-block: 18px; }
  .nav__divider, .nav__descriptor { display: none; }
  .nav__toggle { display: flex; }
  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--edge) 16px; background: var(--bg); border-bottom: 1px solid var(--rule);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__link { padding-block: 12px; font-size: 18px; }
  /* Without JavaScript the Menu button can't work, so the links are always shown.
     The inline script in <head> sets data-theme, so its absence means no JavaScript. */
  html:not([data-theme]) { --nav-h: 0px; }
  html:not([data-theme]) .nav { position: relative; flex-wrap: wrap; }
  html:not([data-theme]) .nav__toggle { display: none; }
  html:not([data-theme]) .nav__links { display: flex; position: static; flex-basis: 100%; padding: 8px 0 0; border-bottom: 0; }

  .footer { flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 24px; }

  .hero { gap: 20px; padding: 48px var(--edge) 260px; }
  .hero__photo::after { display: none; }
  .hero__top { display: block; }
  .hero__title { font-size: 32px; line-height: 1.18; }
  .hero__note { margin-top: 20px; font-size: 15px; }
  .hero__note .desktop-only { display: none; }
  .hero__what { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 8px; }
  .hero__contact { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__contact-text { gap: 12px; }
  .actions { flex-wrap: wrap; gap: 16px; }

  .meta { gap: 10px; }
  .meta__index { font-size: 28px; }
  .meta__title { font-size: 28px; }
  .meta__desc { font-size: 15px; line-height: 1.55; }

  /* Mobile: project details first, then the thumbnail */
  .project, .project--flip { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 52px; }
  .project .project__media { order: 2; }
  .featured { gap: 24px; padding-bottom: 52px; }
  .featured .meta { padding-top: 16px; gap: 10px; }
  .featured .meta__index { font-size: 40px; }
  .featured .meta__title { font-size: 34px; }
  .featured .meta__desc { font-size: 15px; line-height: 1.55; }

  .laptop--lg { width: 100%; }
  .laptop__screen, .laptop--lg .laptop__screen { width: calc(332 / 350 * 100%); padding: 8px 8px 11px; border-width: .75px; border-radius: 8px 8px 0 0; }
  .laptop__screen img, .laptop--lg .laptop__screen img { aspect-ratio: 314 / 196; border-radius: 2px; }
  .laptop__base, .laptop--lg .laptop__base { width: 100%; height: 9px; border-radius: 1px 1px 6px 6px; }
  .laptop__base::before, .laptop--lg .laptop__base::before { width: calc(52 / 350 * 100%); height: 3px; border-radius: 0 0 3px 3px; }

  .phones { gap: 14px; }
  .phone { flex-basis: calc(92.5 / 350 * 100%); padding: 1px; border-width: .75px; border-radius: 13.5px; }
  .phone img { border-radius: 12px; }
  .phone--shot { flex: none; width: calc(var(--wm, var(--w, 100%)) * var(--k, 1)); padding: min(1.1%, 4px); border-width: .75px; border-radius: 11.2% / 5.4%; }
  .phone .phone__shot { border-radius: 0; }

  .projects--work { padding-block: 0; }
  .projects--work .filters { margin-bottom: 0; }
  .projects--work .project:not([hidden]):not(.project:not([hidden]) ~ .project) { padding-top: 52px; }
  .projects--work .meta__index { font-size: 24px; letter-spacing: -.02em; }
  .projects--work .meta__title { font-size: 24px; line-height: normal; letter-spacing: -.01em; }
  .more__head { padding: 48px var(--edge) 16px; font-size: 28px; }
  .row { gap: 16px; padding: 20px var(--edge); }
  .row:last-child { padding-bottom: 48px; }
  .row__media { width: 120px; }
  .row .meta { gap: 6px; }
  .row .meta__top { gap: 4px; }
  .projects--work .row .meta__index { font-size: 16px; letter-spacing: -.02em; }
  .projects--work .row .meta__title { font-size: 18px; line-height: normal; letter-spacing: -.01em; }
  .row .meta__desc { display: none; }
  .filters { justify-content: flex-start; gap: 12px 20px; padding-block: 16px; }
  .filter { font-size: 14px; }

  .page-head { flex-direction: column; align-items: stretch; gap: 12px; padding: 32px var(--edge); }
  .page-head h1 { font-size: 48px; }
  .page-head--wrap h1 { line-height: 1.05; }
  .page-head p { flex: none; font-size: 16px; }

  .motion-subnav { padding-block: 0 40px; }
  .play--reel .play__icon { left: 16px; bottom: 16px; width: 44px; height: 44px; }
  .play--reel .play__icon svg { width: 13px; height: 16px; margin-left: 5px; }
  .reel { gap: 16px; padding-bottom: 56px; }
  .reel__caption h2 { font-size: 18px; }
  .motion-projects { gap: 48px; padding-block: 48px 64px; }
  .motion-projects__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .motion-projects__head h2 { font-size: 28px; }
  .motion-projects__head p { flex: none; }
  .motion-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .motion-card__title { font-size: 22px; }

  .band { padding: 56px var(--edge); }
  .h-section { font-size: 28px; }
  .lead-strong { font-size: 20px; line-height: 30px; }
  .about-career { flex-direction: column; gap: 32px; }
  .about-photo { order: 0; flex: none; align-self: flex-end; width: 120px; aspect-ratio: 120 / 160; }
  .about-story { flex: none; width: 100%; }
  .about-cols, .about-trio, .contact { grid-template-columns: minmax(0, 1fr); }
  .about-cols, .about-trio { gap: 32px; }
  .about-col h2 { font-size: 22px; }
  .about-beyond { gap: 32px; }
  .cta-band { flex-direction: column; align-items: flex-start; gap: 20px; padding: 48px var(--edge); }
  .cta-band h2 { font-size: 22px; }

  .contact { gap: 40px; }
  .detail { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 16px; }
  .detail__label { flex: none; }
  .form { padding: 24px; }

  .cs-intro { gap: 20px; padding: 24px var(--edge) 32px; }
  .cs-title { font-size: 44px; }
  .cs-summary { font-size: 18px; }
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }

  .stack { gap: var(--gm, var(--g, 0)); }
  .cs-sec { padding: var(--ptm, 56px) var(--edge) var(--pbm, 56px); }
  .cs-sec h2 { font-size: 28px; }
  .cs-lead { font-size: 21px; }
  .cs-text { max-width: none; font-size: 16px; }
  .cs-text--large { font-size: 20px; }
  .cs-heading { font-size: 22px; }
  .cs-goal__quote { font-size: 22px; }
  .cs-steps, .cs-numbers { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cs-number__value { font-size: 24px; }

  .cs-img { aspect-ratio: var(--arm, var(--ar)); border-radius: var(--rm, var(--r, 0)); }
  .cs-compare { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cs-compare__screens img { width: var(--wm, var(--w, 100%)); }
  .cs-screens { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cs-grid { grid-template-columns: repeat(var(--colsm, 2), minmax(0, 1fr)); gap: var(--xgm, 24px) var(--cgm, 20px); }
  .carousel { gap: 16px; }
  .carousel__dots { display: none; }
  .carousel__pair { gap: 20px; }
  .carousel__pair .phone--shot { width: calc((100% - 20px) / 2); }
  .ipad { padding: 3%; border-radius: 18px; border-width: .75px; }
  .ipad::before { width: 4px; height: 4px; margin-left: -2px; top: calc(1.5% - 2px); }
  .ipad__screen { border-radius: 6px; }
  .ipad--android { padding: 10.5px; }
  .ipad--android::before { top: 3.25px; }
  .carousel__bar { padding-top: 16px; }

  .cs-quote { gap: 16px; }
  .cs-quote::before { flex-basis: 3px; }
  .cs-quote blockquote { font-size: 20px; }

  .cs-lead--sm { font-size: 18px; }
  .cs-duo { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .tablet { padding: 9.09px; border-width: .75px; border-radius: 13px; }
  .tablet img { border-radius: 2px; }

  .cs-guide { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cs-toc { align-items: stretch; gap: 10px; }
  .cs-toc__jump {
    display: block; width: 100%; height: 52px; padding: 14px 44px 14px 16px;
    border: 1px solid var(--field-line); border-radius: 0; background-color: transparent; appearance: none;
    font-size: 16px; font-weight: 600; color: var(--heading); cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 6'%3E%3Cpath d='M.5.5 6 5.5 11.5.5' fill='none' stroke='%23f8752b' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 17px center; background-size: 12px 6px;
  }
  .cs-toc__links { display: none; }
  .cs-expand { align-self: flex-start; }
  html:not([data-theme]) .cs-toc__jump { display: none; }
  html:not([data-theme]) .cs-toc__links { display: block; }

  .cs-item summary { gap: 16px; padding-block: 20px; }
  .cs-sec .cs-item__title { font-size: 20px; }
  .cs-item__icon { font-size: 28px; line-height: 38px; }
  .cs-panel { gap: 24px; padding-bottom: 32px; }

  .cs-next { padding: 48px var(--edge); }
  .cs-next__row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cs-next__title { font-size: 22px; }
  .cs-next .cs-img { aspect-ratio: 350 / 190; }
}

/* Light theme -----------------------------------------------------------
   --muted, --placeholder and --accent-text are darker than the white set's
   #969799 and #f8752b so that text reaches 4.5:1 on both white and #f5f3f2. */
[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f5f3f2;
  --heading: #0c0c0c;
  --body: #111111;
  --muted: #6b6c6e;
  --placeholder: #6b6c6e;
  --accent-text: #bc4806;
  --rule: #e6e6e6;
  --rule-strong: #e0e0e0;
  --label: #111111;
  --field-line: #858585;
}

/* The nav, home hero and closing sections stay black in the light theme */
[data-theme="light"] :is(.nav, .hero, .cta-band, .cs-next, .footer:not(.footer--plain)) {
  --bg: #0c0c0c;
  --heading: #f5f3f2;
  --body: #969799;
  --muted: #969799;
  --accent-text: #f8752b;
  --rule: #262626;
  --rule-strong: #333333;
  background: var(--bg);
  color: var(--body);
}

/* Page title bar under the nav is white in the light theme, with a thin line to separate it from the content below */
[data-theme="light"] .page-head { background: var(--bg); border-bottom: 1px solid var(--rule-strong); }
/* ...except where a filter bar sits right under it: the bar's own line does the job */
[data-theme="light"] .page-head:has(+ .motion-subnav, + .projects--work) { border-bottom: 0; }

/* Case study intro: white, shorter, with a thin line under it */
[data-theme="light"] .cs-intro { border-bottom: 1px solid var(--rule-strong); }
[data-theme="light"] :is(.cs-intro .link--soft, .cs-summary, .page-head p) { color: var(--muted); }
[data-theme="light"] .cs-intro .link--soft:hover { color: var(--heading); }

/* Colour bands replace the rules between sections */
[data-theme="light"] :is(.band, .cs-sec, .motion-projects) { border-top: 0; }
[data-theme="light"] .is-alt { background: var(--panel); }
[data-theme="light"] .cs-sec:not(.is-alt) + .cs-sec:not(.is-alt, .cs-next, .cs-sec--plain) { border-top: 1px solid var(--rule-strong); }

/* Section menu: inactive links are a softer grey in the white designs */
[data-theme="light"] .cs-toc__links a:not([aria-current]):not(:hover) { color: #4d4d4d; }
[data-theme="light"] .project { align-items: start; }
[data-theme="light"] :is(.meta__desc, .motion-card__desc) { color: var(--heading); }
[data-theme="light"] :is(.cs-text, .cs-caption__text, .contact .prose) { color: var(--muted); }
[data-theme="light"] .featured .meta { border-top-color: #dddddd; }
[data-theme="light"] .contact { --rule: #e0e0e0; }
[data-theme="light"] .form { --bg: #ffffff; }

/* Work page: full-width alternating rows */
[data-theme="light"] .projects--work { padding-block: 0; padding-inline: 0; }
[data-theme="light"] .projects--work .project { padding-inline: var(--edge); border-top: 0; }
[data-theme="light"] .projects--work .project:nth-of-type(even) { background: var(--panel); }
[data-theme="light"] .projects--work .project:not([hidden]) ~ .project { border-top: 0; }

[data-theme="light"] .more { background: var(--panel); }
[data-theme="light"] .more__head { border-top: 0; }
[data-theme="light"] .row { border-top-color: var(--rule-strong); }

@media (max-width: 900px) {
  [data-theme="light"] .projects--work { padding-block: 0; }
  [data-theme="light"] .projects--work .filters { margin-bottom: 0; }
  [data-theme="light"] .projects--work .project { padding: 52px var(--edge); }
  [data-theme="light"] .projects--work .project:not([hidden]) ~ .project { border-top: 1px solid var(--rule); }
}

/* Column alignment rule: in any row of side-by-side columns, the headings share rows,
   so the text below them always starts on the same line, whatever the heading length. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 901px) {
    .cs-steps > .cs-step { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 10px; align-self: stretch; align-content: start; }
    .cs-numbers > .cs-number { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 8px; align-self: stretch; align-content: start; }
    .about-cols > .about-col, .about-trio > .about-step { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 16px; align-self: stretch; align-content: start; }
    .motion-grid > .motion-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 20px; align-self: stretch; }
    .motion-card > .motion-card__meta { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 10px; }
    .cs-screens > .cs-screen { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 16px; align-self: stretch; align-content: start; }
    .cs-screen > .cs-caption { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 8px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .carousel__track { scroll-behavior: auto; }
}

/* Browser window (The Arch Company): a dark Chrome-style frame around desktop screens.
   --bs scales the frame's chrome; the Work page thumbnail adds an address bar. */
.browser {
  --bs: 1; width: 100%; overflow: hidden; background: #202124;
  border-radius: calc(var(--bs) * 12px);
}
.browser__tabs {
  display: flex; align-items: flex-end; gap: calc(var(--bs) * 20px);
  height: calc(var(--bs) * 42px); padding: calc(var(--bs) * 8px) calc(var(--bs) * 14px) 0 calc(var(--bs) * 18px);
}
.browser__dots { display: flex; gap: calc(var(--bs) * 8px); padding-bottom: calc(var(--bs) * 11px); }
.browser__dots i { width: calc(var(--bs) * 12px); height: calc(var(--bs) * 12px); border-radius: 50%; background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; }
.browser__dots i:nth-child(3) { background: #28c840; }
.browser__tab {
  display: flex; align-items: center; gap: calc(var(--bs) * 10px); flex: 0 1 calc(var(--bs) * 230px); min-width: 0;
  height: calc(var(--bs) * 34px); padding: 0 calc(var(--bs) * 12px) 0 calc(var(--bs) * 14px);
  background: #35363a; border-radius: calc(var(--bs) * 10px) calc(var(--bs) * 10px) 0 0;
  color: #e8eaed; font-size: calc(var(--bs) * 12px); line-height: 1;
}
.browser__fav { flex: none; width: calc(var(--bs) * 14px); height: calc(var(--bs) * 14px); border-radius: 50%; background: #f25c2a; }
.browser__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser__x { color: #9aa0a6; font-size: calc(var(--bs) * 14px); }
.browser__new { color: #9aa0a6; font-size: calc(var(--bs) * 18px); line-height: 1; padding-bottom: calc(var(--bs) * 8px); }
.browser__bar {
  display: flex; align-items: center; gap: calc(var(--bs) * 12px);
  height: calc(var(--bs) * 34px); padding: 0 calc(var(--bs) * 10px) 0 calc(var(--bs) * 12px);
  background: #35363a; color: #e8eaed; font-size: calc(var(--bs) * 14px); line-height: 1;
}
.browser__bar .is-off { color: #6f7378; }
.browser__url {
  flex: 1; display: flex; align-items: center; height: calc(var(--bs) * 22px); padding: 0 calc(var(--bs) * 12px);
  border-radius: calc(var(--bs) * 11px); background: #202124; font-size: calc(var(--bs) * 11px);
}
.browser__screen { background: #fff; }
.browser__screen picture { display: block; }
.browser__screen img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: left top; }
.browser--thumb { --bs: .8; }
/* In a carousel the frame matches the iPad's 690px width, so its chrome scales by 690/960 */
.carousel__slide .browser { --bs: .71875; max-width: 690px; }
@media (max-width: 900px) {
  .browser, .browser--thumb, .carousel__slide .browser { --bs: .6; }
}
