/* ==========================================================================
   yohanesmar.io: static rebuild
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Roboto Condensed"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/roboto-condensed.woff2") format("woff2"); }
@font-face { font-family: "Roboto Flex"; font-weight: 100 1000; font-style: normal; font-display: swap; src: url("../fonts/roboto-flex.woff2") format("woff2"); }

:root {
  /* Colour */
  --bg: #f8f8f8;
  --ink: #0e0e0e;
  --text: #3a3736;
  --text-soft: #6b6b6b;           /* secondary text, hover fade on light */
  --pink: #cc0a8a;
  --white: #fff;
  --white-soft: #ffffffcc;        /* button hover fill, secondary text on dark */
  --line: #0000001a;              /* dividers */
  --placeholder: #e6e6e6;         /* behind light images while they load */
  --placeholder-dark: #222;       /* behind dark images and video */

  /* Type */
  --font-display: "Poppins", system-ui, sans-serif;
  --font-ui: "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "Roboto Flex", system-ui, sans-serif;
  --text-base: 1.125rem;          /* body, prose, lists */
  --text-lg: 1.25rem;             /* card hooks */
  --text-lead: clamp(1.15rem, 1.7vw, 1.5rem); /* hero intro */
  --ui-sm: .875rem;               /* labels, nav, captions, footer */
  --ui-md: 1rem;                  /* buttons */
  --tracking: .06em;              /* all uppercase UI text */

  /* Space */
  --s-1: 24px;
  --s-2: 40px;
  --s-3: 64px;
  --s-4: 96px;

  /* Shape */
  --container: 1200px;
  --gutter: 25px;
  --header-h: 100px;
  --radius: 20px;                 /* cards, hero, full-width media */
  --radius-sm: 14px;              /* thumbnails: screenshots, photo grid, lightbox */
  --radius-pill: 999px;
  --shadow-lg: 0 10px 23px 8px rgba(0, 0, 0, .25); /* project cards, play button */
  --shadow-md: 0 8px 20px rgba(0, 0, 0, .18);       /* case-study media */
  --shadow-sm: 0 5px 10px rgba(0, 0, 0, .15);       /* buttons */
  --shadow-hover: 0 18px 36px 6px rgba(0, 0, 0, .3); /* lifted card */
  --shadow-pink: 0 8px 18px rgba(204, 10, 138, .3); /* lifted button */

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);              /* fast start, soft landing */
  --dur: .3s;
  --dur-slow: .7s;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* One uppercase UI style: nav, buttons, labels, captions */
.skip-link, .nav a, .menu nav a, .pill, .lightbox__caption,
.page-head__eyebrow, .cs-meta h2, .shot__caption, .card__label, .app__label {
  font-family: var(--font-ui); font-weight: 500; text-transform: uppercase; letter-spacing: var(--tracking);
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ink); color: var(--white); padding: .75rem 1.25rem; border-radius: var(--radius-pill);
  font-size: var(--ui-sm); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  height: var(--header-h);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { display: block; width: var(--header-h); height: var(--header-h); flex: none; align-self: flex-start; }
.logo img { width: 100%; height: 100%; transition: transform var(--dur) var(--ease); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav nav ul { list-style: none; padding: 0; display: flex; gap: 32px; }
.nav nav a { position: relative; font-size: var(--ui-sm); color: var(--text); text-decoration: none; transition: color var(--dur) var(--ease); }
/* Underline that draws in from the left; the current page keeps it */
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: var(--pink); transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.nav nav a[aria-current] { color: var(--pink); }
.nav nav a[aria-current]::after { transform: scaleX(1); }

.social { display: flex; list-style: none; padding: 0; margin-inline: -11px; }
.social a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); transition: color var(--dur) var(--ease); }
.social svg { transition: transform var(--dur) var(--ease); }
.social svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.nav .social svg { translate: 0 .6px; } /* centre on the uppercase nav links beside them */

.menu-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); }
.menu-toggle svg { width: 36px; height: 36px; }

/* --------------------------------------------------------------------------
   Full-screen menu (mobile)
   -------------------------------------------------------------------------- */
.menu {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink); color: var(--white);
  display: flex; flex-direction: column;
  padding: 0 var(--gutter) 30px;
  opacity: 0; visibility: hidden; transform: translateX(30px);
  transition: opacity .3s, transform .3s, visibility 0s .3s;
}
.menu.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s; }
.menu__top { display: flex; justify-content: space-between; align-items: flex-start; height: 60px; }
.menu__top .logo { width: 60px; height: 60px; }
.menu__close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.menu__close svg { width: 22px; height: 22px; fill: currentColor; }
.menu nav { margin-top: var(--s-2); }
.menu nav ul { list-style: none; padding: 0; }
.menu nav a { display: inline-block; padding: 4px 0; font-size: 1.5rem; color: var(--white); text-decoration: none; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.menu nav a[aria-current] { color: var(--pink); }
.menu .social { margin-top: auto; }
.menu .social a { color: var(--white); }
.menu__copy { margin-top: var(--s-1); font-family: var(--font-ui); font-size: var(--ui-sm); color: var(--white-soft); }

body.menu-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Buttons: one pill, two sizes
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--white); color: var(--pink);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
  padding: 18px 34px;
  font-size: var(--ui-md); line-height: 1;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pill--sm { padding: 13px 26px; }
.pill svg { transition: transform var(--dur) var(--ease); }

/* Drawn border: a pink ring that sweeps round the button from its left edge on hover,
   like the nav underline, and retracts on the way out. A conic gradient masked down to a
   2px ring; --ring is registered so the browser can animate it. */
@property --ring { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.pill { position: relative; } /* .play-btn is already absolutely positioned */
.pill::before, .play-btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from 270deg, var(--pink) var(--ring), transparent 0);
  -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);
  transition: --ring .6s cubic-bezier(.65, 0, .35, 1); /* even ease-in-out so the trace reads */
}
.pill svg { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
/* Roboto Condensed capitals sit ~6% of the font size above the middle of their line box;
   lift icons beside uppercase text by the same amount so they centre on the letters */
.pill svg, .shot__caption svg { translate: 0 -.0625em; }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
  background: radial-gradient(at top right, #e9e9e9 0%, #e9e9e900 30%);
}
.hero .container { display: grid; grid-template-columns: 1fr 450px; align-items: end; gap: var(--s-2); }
.hero__copy { padding-block: var(--s-3) var(--s-4); align-self: center; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(3.25rem, 7.2vw, 6.5rem); line-height: .95; color: var(--ink);
  max-width: 650px;
}
.hero p { margin-top: var(--s-2); font-size: var(--text-lead); line-height: 1.5; max-width: 550px; }
.hero .pill { margin-top: var(--s-2); }
.hero__portrait { align-self: end; }
.hero__portrait img { width: 450px; height: auto; }

/* Scroll effects (driven by main.js; desktop only for the hero, as on the original site) */
@media (min-width: 1025px) {
  .js .hero {
    position: sticky; top: var(--header-h); z-index: 0;
    will-change: filter, opacity;
    filter: blur(var(--hero-blur, 0px));
    opacity: var(--hero-opacity, 1);
  }
}
.js .work { position: relative; z-index: 1; }
.js .card { opacity: var(--card-opacity, 1); }
.site-footer { position: relative; z-index: 1; background: var(--bg); }

/* --------------------------------------------------------------------------
   Project cards
   -------------------------------------------------------------------------- */
.work { padding-block: var(--s-2) var(--s-4); }
.work__list { display: grid; gap: var(--s-2); }

.card {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 30px;
  min-height: 600px; padding: 50px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: var(--white); text-decoration: none;
  background: var(--placeholder-dark);
  transition: transform var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
}
.card__img {
  position: absolute; inset: -6px; z-index: -1;
  width: calc(100% + 12px); height: calc(100% + 12px); max-width: none;
  object-fit: cover;
  filter: brightness(60%) saturate(0%) blur(2px);
  transition: filter var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
/* Dark gradient behind the text so it stays readable over any photo, including the full-brightness hover state */
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,0) 85%);
}
/* Touch screens can't hover: show the photo in colour; the gradient below keeps the text readable */
@media (hover: none) {
  .card__img { filter: none; }
}
.card__label { display: block; font-size: var(--ui-sm); line-height: 1.3; }
.card__title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.2; margin-top: 6px; }
.card__body { display: block; }
.card__text { display: block; margin-top: 30px; font-size: var(--text-lg); line-height: 1.5; max-width: 300px; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.card__cta { flex: none; }

/* Page header (portfolio, about, case studies, 404) */
.page-head { padding-block: var(--s-3) var(--s-2); }
.page-head__eyebrow { display: block; font-size: var(--ui-sm); line-height: 1.3; color: var(--pink); }
.page-head h1, .page-head__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: .95; color: var(--ink); margin-top: 10px;
}

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); padding-bottom: var(--s-4); }
.grid .card { min-height: 420px; padding: 40px; }

/* --------------------------------------------------------------------------
   Software (home): own products, as light text cards
   -------------------------------------------------------------------------- */
/* Solid background so the sticky, faded hero doesn't show through; the top fades in from the card list */
.software {
  position: relative; z-index: 1;
  padding-block: var(--s-3) var(--s-4);
  background: linear-gradient(to bottom, rgba(248,248,248,0), var(--bg) var(--s-3));
}
.section-head__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: .95; color: var(--ink); margin-top: 10px;
}
.section-head p { margin-top: var(--s-1); max-width: 55ch; }

.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); margin-top: var(--s-2); }
.app {
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
}
.app__body { flex: 1; display: flex; flex-direction: column; padding: var(--s-2); }
.app__icon { width: 64px; height: 64px; margin-bottom: var(--s-1); }
.app__label { font-size: var(--ui-sm); line-height: 1.3; color: var(--pink); }
.app__title { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.2; color: var(--ink); margin-top: 6px; }
.app__text { margin-top: 14px; }
.app__stack { margin-top: 12px; font-family: var(--font-ui); font-size: var(--ui-sm); color: var(--text-soft); }
.app__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: var(--s-2); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about { padding-bottom: var(--s-4); }
.about__section { display: grid; grid-template-columns: 340px 1fr; gap: var(--s-3); padding-block: var(--s-3); border-top: 1px solid var(--line); }
.about__section h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1.2; color: var(--ink); }
.prose { max-width: 65ch; }
.prose p { line-height: 1.7; }
.prose p + p { margin-top: 1.1em; }

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */
.cs-hero {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  background: var(--placeholder-dark); aspect-ratio: 16 / 9;
}
.cs-hero video, .cs-hero img { width: 100%; height: 100%; object-fit: cover; }

/* Click-to-play hero: big play button over the poster until playback starts */
.cs-hero--click { position: relative; }
.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--pink); box-shadow: var(--shadow-lg);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.play-btn svg { width: 44px; height: 44px; margin-left: 6px; fill: currentColor; }
.cs-hero--click.is-playing .play-btn { display: none; }

.cs-intro { padding-block: var(--s-3) var(--s-2); }
.cs-tagline {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; max-width: 900px;
}
.cs-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-top: var(--s-3); }
.cs-meta h2 { font-size: var(--ui-sm); line-height: 1.3; color: var(--pink); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.cs-meta ul { list-style: none; padding: 0; }
.cs-meta li { line-height: 1.8; }

.cs-block { padding-block: var(--s-2); }

/* Full-width media: same corner and shadow as the hero */
.media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--placeholder);
}
.media img, .media video { width: 100%; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery--photos { grid-template-columns: repeat(6, 1fr); gap: var(--s-1); }
.gallery--photos > * { grid-column: span 2; }
/* five photos: 3 on the first row, 2 wider ones on the second */
.gallery--photos > :nth-child(4):nth-last-child(2), .gallery--photos > :nth-child(5):last-child { grid-column: span 3; }
.gallery--photos .media { border-radius: var(--radius-sm); aspect-ratio: 4 / 3; }
.gallery--photos img { height: 100%; object-fit: cover; }

/* Thumbnails (screenshots, photo grid): smaller corner, same shadow */
.shot { display: block; width: 100%; text-align: left; }
.shot__frame {
  display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--placeholder);
  box-shadow: var(--shadow-md); aspect-ratio: var(--shot-ratio, 16 / 10);
  transition: box-shadow var(--dur-slow) var(--ease);
}
.shot__frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform var(--dur-slow) var(--ease); }
.shot__caption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px;
  font-size: var(--ui-sm); line-height: 1.3; color: var(--ink);
}
.shot__caption svg { width: 20px; height: 20px; flex: none; fill: var(--ink); transition: fill var(--dur) var(--ease), transform var(--dur) var(--ease); }

.cs-back { padding-block: var(--s-2) var(--s-4); }

.not-found { min-height: 55vh; }
.not-found p { margin-top: var(--s-1); }
.not-found .pill { margin-top: var(--s-2); }

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.9); padding: 60px 70px;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
.lightbox__stage { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: calc(100vh - 160px); width: auto; border-radius: var(--radius-sm); }
.lightbox__caption { margin-top: 14px; color: var(--white); font-size: var(--ui-sm); }
.lightbox button { position: absolute; color: var(--white); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; opacity: .8; }
.lightbox button { transition: opacity var(--dur) var(--ease), scale var(--dur) var(--ease); }
.lightbox button svg { width: 26px; height: 26px; fill: currentColor; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { padding-block: 30px 40px; border-top: 1px solid var(--line); }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer p { font-family: var(--font-ui); font-size: var(--ui-sm); color: var(--text-soft); }

/* --------------------------------------------------------------------------
   Interaction: hover (mouse only, so taps on phones never leave things stuck
   mid-hover), keyboard focus (mirrors hover) and press
   -------------------------------------------------------------------------- */
@media (hover: hover) {
  .logo:hover img { transform: rotate(-4deg) scale(1.04); }

  .nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }
  .social a:hover { color: var(--pink); }
  .social a:hover svg { transform: translateY(-2px); }
  .menu nav a:hover { color: var(--pink); transform: translateX(6px); }

  .pill:hover, .card:hover .pill { box-shadow: var(--shadow-pink); }
  .pill:hover::before, .card:hover .pill::before, .play-btn:hover::before { --ring: 100%; }
  /* Arrows nudge the way they point */
  .pill:hover .icon-right, .card:hover .icon-right { transform: translateX(4px); }
  .pill:hover .icon-left { transform: translateX(-4px); }
  .pill:hover .icon-down { transform: translateY(3px); }
  .pill:hover .icon-external { transform: translate(2px, -2px); }

  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
  .card:hover .card__img { filter: brightness(100%) saturate(100%) blur(0); transform: scale(1.04); }

  .shot:hover .shot__frame { box-shadow: var(--shadow-lg); }
  .shot:hover .shot__frame img { transform: scale(1.04); }
  .shot:hover .shot__caption svg { fill: var(--pink); transform: scale(1.15); }

  .play-btn:hover { transform: translate(-50%, -50%) scale(1.08); }
  .lightbox button:hover { opacity: 1; scale: 1.12; }
}

/* Keyboard focus gets the same colour changes, without movement so the focus ring stays put */
.nav nav a:focus-visible::after { transform: scaleX(1); }
.social a:focus-visible { color: var(--pink); }
.pill:focus-visible::before, .card:focus-visible .pill::before, .play-btn:focus-visible::before { --ring: 100%; }
.card:focus-visible .card__img { filter: brightness(100%) saturate(100%) blur(0); }
.shot:focus-visible .shot__caption svg { fill: var(--pink); }

/* Press */
.pill:active, .card:active .pill { transform: translateY(0) scale(.97); box-shadow: var(--shadow-sm); }
.card:active { transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --header-h: 80px; }
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .hero .container { grid-template-columns: 1fr; }
  .hero__portrait { display: none; }
  .hero { min-height: auto; }
  .card { min-height: 480px; }
  /* Text can fill most of a shorter card, so the gradient never fades below .55 */
  .card::after { background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.55) 50%); }
  .grid, .gallery { gap: var(--s-1); }
  .about__section { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 767px) {
  :root {
    --header-h: 60px; --gutter: 12px; --radius: 12px; --radius-sm: 8px;
    --text-base: 1.0625rem; --text-lg: 1.0625rem;
    --s-1: 12px; --s-2: 24px; --s-3: 40px; --s-4: 64px;
  }
  .hero__copy { padding-block: 10px var(--s-4); }
  .pill { padding: 15px 24px; font-size: var(--ui-sm); }
  .pill--sm { padding: 12px 20px; }
  .work { padding-block: 10px var(--s-4); }
  .card { min-height: 380px; padding: 38px; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .card__body { width: 100%; }
  .card__cta { align-self: flex-end; margin-top: -10px; }
  .card__text { max-width: 220px; margin-top: var(--s-2); }
  .card__title { font-size: 1.6rem; }
  .grid { grid-template-columns: 1fr; gap: var(--s-2); }
  .grid .card { min-height: 300px; padding: 30px; }
  .apps { grid-template-columns: 1fr; }
  .app .pill { padding-block: 15px; } /* standalone links: keep a 44px tap target */
  .app__title { font-size: 1.6rem; }
  .app__icon { width: 56px; height: 56px; }
  .cs-meta { grid-template-columns: 1fr; gap: var(--s-2); }
  .gallery, .gallery--3 { grid-template-columns: 1fr; gap: var(--s-2); }
  .gallery--photos { grid-template-columns: repeat(2, 1fr); gap: var(--s-1); }
  .gallery--photos > *, .gallery--photos > :nth-child(4):nth-last-child(2) { grid-column: span 1; }
  .gallery--photos > :nth-child(5):last-child { grid-column: span 2; aspect-ratio: 16 / 9; }
  .play-btn { width: 68px; height: 68px; }
  .play-btn svg { width: 32px; height: 32px; margin-left: 4px; }
  .lightbox { padding: 60px 10px; }
  .site-footer .container { flex-direction: column-reverse; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
  /* Keep the colour changes, drop the movement */
  .logo:hover img, .social a:hover svg, .menu nav a:hover,
  .pill:hover, .card:hover .pill, .pill:hover [class^="icon-"], .card:hover [class^="icon-"], .pill:active, .card:active .pill,
  .card:hover, .card:active, .card:hover .card__img, .shot:hover .shot__frame img, .shot:hover .shot__caption svg { transform: none; }
}
