/* SUDO-CYCLES: blueprint style. White, one theme colour, thin lines, monospace labels. */
:root {
  --t: #c4471c;          /* theme colour */
  --t-line: #c4471c59;   /* theme colour, faint */
  --t-wash: #f9ede8;
  --t-dark: #a13a17; --t-deep: #833013; --t-light: #e5ae9b; --t-pale: #f0d1c6; --t-paler: #f9ede8; --t-on: #fff;   /* all worked out from the theme colour by /theme.css */
  --ink: #1a1f1e;
  --muted: #5d6b69;
  --grid: #f1f5f4;
  --mono: "IBM Plex Mono", "DejaVu Sans Mono", ui-monospace, Menlo, monospace;   /* labels, buttons, menus */
  --sans: "IBM Plex Sans", "Inter", system-ui, sans-serif;                         /* body text */
  --head: "Chakra Petch", "IBM Plex Sans", system-ui, sans-serif;                   /* headings and logo: cut corners, like machined parts */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ink); background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.w { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.k { font: 14px var(--mono); color: var(--t); letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: 0; line-height: 1.08; }
section { scroll-margin-top: 20px; }

.btn { display: inline-block; white-space: nowrap; background: var(--t); color: var(--t-on); border: 0; font: 500 15px var(--mono); padding: 15px 24px; cursor: pointer; transition: background .15s, transform .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn:hover { background: var(--t-dark); }
.btn.ghost { background: #fff; color: var(--t); box-shadow: inset 0 0 0 1.5px var(--t); margin-left: 10px; }
.btn.ghost:hover { background: var(--t-wash); box-shadow: inset 0 0 0 1.5px var(--t), 4px 4px 0 var(--t); }
.btn.wa { display: inline-flex; align-items: center; gap: 10px; }
.float-wa { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 54px; height: 54px; background: #25d366; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,0,0,.18); }

.announce { background: var(--t); color: var(--t-on); text-align: center; font: 15px var(--mono); padding: 9px 16px; }
.announce a { text-decoration: underline; }

/* header */

/* ===== header and menu: same behaviour as the template site ===== */
:root { --rule: 3px; --ease: cubic-bezier(.65, 0, .35, 1); }
.site-head { position: sticky; top: 0; z-index: 50; background: #fff; transition: transform .3s ease; }
.site-head.hide { transform: translateY(-100%); }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--rule); background: var(--ink); transition: opacity .3s ease; }
.head-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1180px; margin: 0 auto; padding: 14px 40px calc(14px + var(--rule)); }
.site-head .logo { grid-column: 2; display: block; position: relative; font: 600 42px var(--head); letter-spacing: -.015em; line-height: 1; text-align: center; transition: opacity .3s ease; }
.site-head .logo span { color: inherit; }
.site-head .logo img { height: 44px; width: auto; display: block; }
.head-right { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 18px; transition: opacity .3s ease; }
.head-wa { display: inline-flex; align-items: center; gap: 8px; font: 15px var(--mono); color: var(--ink); }
.head-wa:hover { color: var(--t); }
.menu-btn { grid-column: 1; justify-self: start; position: relative; width: 34px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.menu-btn span { position: absolute; left: 0; width: 34px; height: var(--rule); background: var(--ink); transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-btn span:nth-child(1) { top: 6px; }
.menu-btn span:nth-child(2) { top: 15px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 10.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 10.5px; transform: rotate(-45deg); }
.nav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(380px, 86vw); background: #fff; border-right: var(--rule) solid var(--ink);
  padding: 96px 32px 32px; overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s linear .5s; display: flex; flex-direction: column; }
.nav.open { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav ul a { display: flex; align-items: baseline; gap: 14px; padding-block: 14px; font: 600 1.45rem var(--head); text-transform: uppercase; letter-spacing: .01em; color: var(--ink); }
.nav ul a i { font: 14px var(--mono); font-style: normal; color: var(--t); }
.nav ul a:hover { color: var(--t); }
.nav-foot { margin-top: auto; padding-top: 32px; display: grid; gap: 8px; }
.nav-foot a { font: 15px var(--mono); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s linear .5s; }
.scrim.on { opacity: 1; visibility: visible; transition: opacity .5s, visibility 0s; }
html.menu-open { overflow: hidden; }
html.menu-open .site-head { z-index: 80; background: transparent; transform: none; }
html.menu-open .site-head::after, html.menu-open .site-head .logo, html.menu-open .head-right { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .head-bar { padding: 12px 40px calc(12px + var(--rule)); }
  .site-head .logo { font-size: 30px; }
  .head-right { gap: 12px; }
  .head-wa span { display: none; }
  .menu-btn, .menu-btn span { width: 30px; }
}
@media (prefers-reduced-motion: reduce) { .site-head, .nav, .scrim, .menu-btn span, .site-head .logo, .head-right { transition: none !important; } }

/* hero */
.hero { padding: 52px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; }
.hero .hero-side .ctas { justify-content: flex-end; margin-top: 0; }
.hero-side .tags { flex-direction: column; align-items: flex-end; gap: 6px; }
.hero h1 { font-size: 60px; margin: 0 0 16px; }
.hero .sub { font-size: 18px; color: var(--muted); max-width: 30rem; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.hero .btn.ghost { margin-left: 0; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 28px; font: 14px var(--mono); color: #567; }
.tags li::before { content: "+ "; color: var(--t); }


/* work */
.work { padding: 56px 0 0; }
.work .head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.work h2 { font-size: 34px; }
.placeholder-note { font: 13px var(--mono); background: #fff4cc; border: 1px solid #f0d27a; color: #6b5300; padding: 8px 12px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.job { background: #fff; aspect-ratio: 1 / 1; display: grid; grid-template-rows: 2fr 1fr; min-width: 0; text-align: left; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; box-shadow: 1px 0 0 var(--t-light), 0 1px 0 var(--t-light); }
.job .ph img { transition: transform .4s ease; }
.job:focus-visible { outline: 2px solid var(--t); outline-offset: -2px; }
.job .more { position: absolute; right: 12px; top: 10px; font: 500 20px/22px var(--mono); color: var(--t); }
.job[hidden] { display: none; }
.job .ph { min-height: 0; display: grid; place-items: center; color: var(--t); background: #fff; overflow: hidden; }
.job .ph svg { width: 50%; }
.job .ph img { width: 100%; height: 100%; object-fit: cover; }
.job .cap { border-top: 1px solid var(--t-line); padding: 12px 34px 0 14px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 5px; position: relative; }
.job h3 { font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .spec { font: 12px/1.35 var(--mono); color: #567; text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* contact */
.contact-sec { padding: 56px 0 0; }
.contact-sec .head { margin-bottom: 24px; }
.contact-sec .head h2 { font-size: 34px; color: var(--ink); margin: 0; }
.contact { margin: 0 0 48px; border: 1.5px solid var(--t); background: #fff; display: grid; grid-template-columns: 1fr 1.25fr; }
.contact .intro { background: var(--t); color: var(--t-on); padding: 32px 36px; }
.contact .intro .k { color: var(--t-pale); }
.contact h2 { font-size: 32px; margin: 10px 0 10px; }
.contact .intro > p:not(.k) { color: var(--t-paler); max-width: 26rem; }
.direct { list-style: none; margin-top: 20px; display: grid; gap: 6px; }
.direct a { font: 15px var(--mono); color: var(--t-on); }
.direct a span { color: var(--t-pale); margin-left: 6px; }
.direct a:hover { text-decoration: underline; }
.form { padding: 28px 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-content: start; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 6px; font: 14px var(--mono); color: #456; text-transform: lowercase; }
.form label em { font-style: normal; color: #9aa7a5; }
.form input, .form select, .form textarea { font: 16px var(--sans); color: var(--ink); background: #fff; border: 1px solid #c9d6d3; border-radius: 0; padding: 9px 12px; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--t); outline-offset: -1px; border-color: var(--t); }
.form textarea { min-height: 84px; resize: vertical; }
.form .file input { padding: 9px; font-size: 15px; }
.actions { display: grid; gap: 8px; margin-top: 2px; }
.actions .btn { width: 100%; justify-content: center; padding: 14px 24px; }
.actions .note { font: 13px var(--mono); color: #7a8886; }
.hp { position: absolute; left: -9999px; }
.form-err { color: #b3261e; font-size: 15px; display: none; }
.form-msg { font: 14px var(--mono); background: var(--t-wash); color: var(--t-deep); padding: 10px 12px; display: none; }

footer { display: grid; grid-template-columns: 1fr; gap: 22px; border-top: 1px solid var(--t-line); padding: 32px 0 90px; color: #5d6b69; font-size: 15px; }
.f-logo { font: 600 24px var(--head); color: var(--ink); justify-self: start; }
footer a.f-logo { text-decoration: none; }
.f-logo span { color: inherit; }
footer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--t); }


/* job detail */
.job-dialog { border: 1.5px solid var(--t); padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; background: #fff; color: var(--ink); }
.job-dialog::backdrop { background: rgba(10, 30, 28, .55); }
.jd-gal { position: relative; }
.jd-ph { aspect-ratio: 3 / 2; display: grid; place-items: center; color: var(--t); background: #fff; border-bottom: 1px solid var(--t-line); }
.jd-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jd-ph svg { width: 40%; }
.jd-count { position: absolute; left: 10px; bottom: 10px; font: 13px var(--mono); color: var(--t); background: rgba(255,255,255,.9); padding: 3px 8px; border: 1px solid var(--t-line); }
.jd-count:empty { display: none; }
.jd-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 30px) / 4); gap: 10px; padding: 12px 26px 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.jd-thumbs[hidden] { display: none; }
.jd-thumbs button { aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--t-line); background: #fff; color: var(--t); cursor: pointer; scroll-snap-align: start; display: grid; place-items: center; overflow: hidden; }
.jd-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jd-thumbs button.on { border: 2px solid var(--t); }
.jd-thumbs button svg { width: 60%; }
.jd-body { padding: 24px 26px 28px; }
.jd-body h3 { font-size: 26px; margin: 10px 0 8px; }
.jd-body p:not(.k):not(.spec) { color: var(--muted); }
.jd-body .spec { font: 14px var(--mono); color: #567; text-transform: uppercase; margin: 10px 0 22px; }
.jd-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 1.5px solid var(--t); background: #fff; color: var(--t); font: 22px var(--mono); cursor: pointer; z-index: 2; }

/* photos are full strength; on hover the photo eases in closer under a light teal wash and blueprint grid */
.job .ph { position: relative; overflow: hidden; }
.job .ph img { transition: transform .5s ease; }
.job:hover .ph img, .job:focus-visible .ph img { transform: scale(1.06); }
.job .ph::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: linear-gradient(#ffffff40 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, #ffffff40 1px, transparent 1px) 0 0 / 22px 22px, var(--t-line); }
.job:hover .ph::after, .job:focus-visible .ph::after { opacity: 1; }

/* gentle fade-in as sections scroll into view */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .rv.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { padding: 32px 0 0; grid-template-columns: 1fr; gap: 0; }
  .hero-side { align-items: flex-start; }
  .hero .hero-side .ctas { justify-content: flex-start; margin-top: 34px; }
  .hero-side .tags { flex-direction: row; align-items: center; gap: 8px 18px; }
  .hero h1 { font-size: 46px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .job .cap { padding: 9px 26px 0 10px; }
  .job .spec { font-size: 11px; -webkit-line-clamp: 1; }
  .job .more { right: 8px; font-size: 18px; }
  .job h3 { font-size: 14px; }
  .w { padding: 0 18px; }
  .head-bar { padding-left: 18px; padding-right: 18px; }
  .hero-side { align-items: stretch; }
  .hero .hero-side .ctas { flex-direction: column; }
  .hero .ctas .btn { width: 100%; text-align: center; }
  .hero h1 { font-size: 38px; }
  .hero .ctas { margin-top: 26px; }
  footer { padding-bottom: 100px; }
  .work { padding-top: 44px; }
  .work h2 { font-size: 28px; }
  .contact-sec { padding-top: 44px; }
  .contact .intro { padding: 26px 20px; }
  .form { padding: 22px 20px; }
  .contact .intro, .form { padding: 28px 22px; }
  .contact h2 { font-size: 30px; }
  .form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .rv { opacity: 1; transform: none; transition: none; } .job .ph img { transition: none; } }

/* ===== movement ===== */
/* logo: letters lift and turn teal under the pointer; a ruler measures up to that letter; a click sends a wave across */
.site-head .logo .l { display: inline-block; color: var(--ink); transform-origin: 50% 80%; transition: transform .3s ease, color .3s ease; }
.site-head .logo .l.hot { color: var(--t); transform: translateY(-1px) scale(1.08); transition: transform .1s ease-out, color .1s ease-out; }
.logo-ruler { position: absolute; left: 0; right: 0; top: 100%; height: 10px; margin-top: 1px; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.logo-ruler .tk { position: absolute; top: 0; width: 1.5px; height: 4px; margin-left: -.75px; background: var(--t-light); transition: background .2s ease; }
.logo-ruler .tk.maj { height: 8px; }
.logo-ruler .tk.on { background: var(--t); }
.logo-ruler::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--t-light); }
.logo-ruler .tk.end { height: 10px; width: 2px; margin-left: -1px; background: var(--t); }
.logo-ruler .tk.end.last { margin-left: -1px; }
.logo-ruler .bar { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--t); transition: width .3s var(--ease); }
.site-head .logo.measuring .logo-ruler { opacity: 1; }
.site-head .logo.waving .logo-ruler { opacity: 0; transition-duration: .15s; }
.site-head .logo.waving .logo-ruler .bar { width: 0 !important; transition-duration: .15s; }
@keyframes wave { 0% { transform: none; color: var(--ink); } 35% { transform: translateY(-2px) scale(1.1); color: var(--t); } 100% { transform: none; color: var(--ink); } }
.site-head .logo.waving .l { animation: wave .7s ease both; animation-delay: calc(.15s + var(--n) * 45ms); }
.f-logo { transition: color .2s ease, letter-spacing .35s var(--ease); }
footer a.f-logo:hover { color: var(--t); letter-spacing: .03em; }

/* headline arrives in steps when the page opens */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js .hero h1 span, .js .hero .sub, .js .hero-side { animation: rise .45s ease-out both; }
.js .hero h1 span { display: inline-block; }
.js .hero h1 span:last-child { animation-delay: .06s; }
.js .hero .sub { animation-delay: .12s; }
.js .hero-side { animation-delay: .18s; }

/* service cards arrive one after another, then react to the pointer */
.js .work.in .job { animation: rise .4s ease-out backwards; animation-delay: calc(var(--i, 0) * 40ms); }
.job { position: relative; }
.job::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--t); opacity: 0; transform: scale(.97); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.job:hover::after, .job:focus-visible::after { opacity: 1; transform: none; }
.job h3 { transition: color .2s ease; }
.job:hover h3 { color: var(--t); }
.job .more { transition: transform .25s ease, letter-spacing .25s ease; }
.job:hover .more { transform: rotate(90deg); }

/* pop-up opens with a small lift; photos fade across */
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.job-dialog[open] { animation: pop .3s var(--ease); }
.job-dialog[open]::backdrop { animation: fade .3s ease; }
.jd-ph img { animation: fade .35s ease; }
.jd-gal.many .jd-ph { cursor: pointer; }
.jd-thumbs button { transition: transform .2s ease, border-color .2s ease; }
.jd-thumbs button:hover { transform: translateY(-3px); border-color: var(--t); }
.jd-close { transition: background .15s, color .15s, transform .25s ease; }
.jd-close:hover { background: var(--t); color: var(--t-on); transform: rotate(90deg); }

/* small touches */
.float-wa { transition: transform .2s ease, box-shadow .2s ease; }
.float-wa:hover { transform: scale(1.1) rotate(-6deg); box-shadow: 0 12px 26px rgba(0,0,0,.24); }
.tags li { transition: color .2s ease; }
.tags li:hover { color: var(--t); }

@media (prefers-reduced-motion: reduce) {
  .site-head .logo.waving .l, .js .hero h1 span, .js .hero .sub, .js .hero-side, .js .work.in .job, .job-dialog[open], .job-dialog[open]::backdrop, .jd-ph img { animation: none; }
  .btn, .job::after, .job .more, .site-head .logo, .site-head .logo .l, .logo-ruler, .jd-thumbs button, .jd-close, .float-wa { transition: none; }
}

/* service drawings (see assets/css/anim.css) fill their frame */
.job .ph svg.an, .jd-ph svg.an, .jd-thumbs button svg.an { width: 100%; height: 100%; }
.jd-thumbs button svg.an * { animation-play-state: paused; animation-delay: -7.4s; }


/* service photos share one calmer tone, whatever is uploaded; full colour returns on hover */
.job .ph img { filter: grayscale(.25) contrast(1.04); transition: transform .5s ease, filter .3s ease; }
.job:hover .ph img, .job:focus-visible .ph img { filter: none; }
/* footer line */
.f-line { font: 13px var(--mono); color: var(--muted); display: flex; gap: 6px 22px; flex-wrap: wrap; }
.f-line a { color: var(--t); }
.f-line a[hidden] { display: none; }
footer { gap: 12px; }

/* hero photo: framed like a drawing on the right, fading into the text on a gentle angle */
.hero-photo { display: none; position: absolute; right: 0; z-index: 0; pointer-events: none; background: center / cover no-repeat; border: 1.5px solid var(--t); border-left: 0; }
.has-hero-photo .hero { position: relative; grid-template-columns: 1fr; gap: 0; min-height: 430px; align-content: center; padding: 44px 0; }
.has-hero-photo .hero > div:not(.hero-photo) { position: relative; z-index: 1; max-width: 560px; }
.has-hero-photo .hero-side { align-items: flex-start; margin-top: 26px; }
.has-hero-photo .hero .hero-side .ctas { justify-content: flex-start; }
.has-hero-photo .hero-side .tags { flex-direction: row; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.has-hero-photo .hero { min-height: calc(var(--hd-h, 342px) + 88px); }
.has-hero-photo .hero-photo { display: block; top: 50%; height: var(--hd-h, 342px); transform: translateY(-50%); left: 12%; background-position: var(--hd-x, 50%) var(--hd-y, 50%);
  /* the photo runs well under the text so an angled fade is never cut off by the photo's own edge; the sums keep the fade where the sliders put it */
  --f0: calc(31.82% + (var(--hd-p, 37%) - var(--hd-s, 30%) / 2) * .6818); --f1: calc(31.82% + (var(--hd-p, 37%) + var(--hd-s, 30%) / 2) * .6818);
  -webkit-mask-image: linear-gradient(calc(90deg + var(--hd-a, 14deg)), transparent var(--f0), #000 var(--f1));
  mask-image: linear-gradient(calc(90deg + var(--hd-a, 14deg)), transparent var(--f0), #000 var(--f1)); }
.has-hero-photo .work { padding-top: 36px; }
@media (max-width: 900px) {
  .has-hero-photo .hero { min-height: 0; padding: calc(var(--hm-h, 220px) - 50px) 0 20px; }
  .has-hero-photo .hero-photo { left: 50%; right: auto; top: 0; bottom: auto; width: 100vw; height: var(--hm-h, 220px); transform: translateX(-50%); border: 0; background-position: var(--hm-x, 50%) var(--hm-y, 50%);
    -webkit-mask-image: linear-gradient(calc(180deg + var(--hm-a, 0deg)), #000 calc(var(--hm-p, 70%) - var(--hm-s, 60%) / 2), transparent calc(var(--hm-p, 70%) + var(--hm-s, 60%) / 2));
    mask-image: linear-gradient(calc(180deg + var(--hm-a, 0deg)), #000 calc(var(--hm-p, 70%) - var(--hm-s, 60%) / 2), transparent calc(var(--hm-p, 70%) + var(--hm-s, 60%) / 2)); }
  .has-hero-photo .hero-side { align-items: stretch; margin-top: 0; }
}

/* service cards: a small gap, each in its own frame */
.job { border: 1.5px solid var(--t); box-shadow: none; }
.nav-foot a[hidden] { display: none; }
@media (max-width: 760px) { .grid { gap: 8px; } }

/* footer: logo left, year line right */
footer { grid-template-columns: 1fr auto; align-items: center; }
.f-line { justify-self: end; text-align: right; }
.nav li[hidden] { display: none; }

/* when the menu is open, the X slides over to line up with the menu items instead of floating mid-panel */
.menu-btn { transition: transform .5s var(--ease); }
html.menu-open .menu-btn { transform: translateX(calc(32px - max(40px, (100vw - 1180px) / 2 + 40px))); }
@media (max-width: 600px) { html.menu-open .menu-btn { transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) { .menu-btn { transition: none; } }

/* gallery: sideways strip, swipe or scroll; photos keep their own shape at one shared height */
.gal-sec { padding: 8px 0 48px; }
.gal-sec[hidden] { display: none; }
.gal-sec .head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.gal-sec .head h2 { font-size: 34px; margin: 0; }
.gal { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: none; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--t) transparent; padding-bottom: 12px; cursor: grab; }
.gal.drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.gal figure { flex: none; height: 380px; margin: 0; position: relative; border: 1.5px solid var(--t); background: #fff; scroll-snap-align: start; }
.gal img { height: 100%; width: auto; max-width: 86vw; object-fit: cover; display: block; -webkit-user-drag: none; }
.gal figcaption { position: absolute; left: 0; bottom: 0; max-width: 100%; background: #fff; border-top: 1.5px solid var(--t); border-right: 1.5px solid var(--t); padding: 5px 10px; font: 12px var(--mono); color: var(--ink); text-transform: uppercase; }
@media (max-width: 760px) { .gal figure { height: 280px; } .gal-sec .head h2 { font-size: 30px; } .gal-arrow { width: 40px; } .gal-arrow svg { width: 28px; height: 28px; } .gal { scroll-snap-type: x mandatory; } .gal figure { scroll-snap-align: center; } }

/* gallery arrows sit on the outer edges of the strip, on phones too */
.gal-wrap { position: relative; }
.gal-arrow { position: absolute; top: calc(50% - 6px); transform: translateY(-50%); z-index: 2; width: 48px; height: 64px; display: grid; place-items: center; border: 0; background: none; padding: 0; color: #fff; cursor: pointer;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.55)) drop-shadow(0 1px 6px rgba(0,0,0,.35)); transition: transform .2s ease, opacity .2s ease; opacity: .92; }
.gal-arrow.prev { left: 2px; }
.gal-arrow.next { right: 2px; }
.gal-arrow.prev:hover { transform: translateY(-50%) translateX(-3px); opacity: 1; }
.gal-arrow.next:hover { transform: translateY(-50%) translateX(3px); opacity: 1; }
.gal-arrow[hidden] { display: none; }

/* key points strip under the headline */
.points { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); border: 1.5px solid var(--t); background: #fff; }
.points[hidden] { display: none; }
.points li { padding: 18px 20px 20px; border-left: 1px solid var(--t-line); }
.points li:first-child { border-left: 0; }
.points .pn { font: 13px var(--mono); color: var(--t); }
.points h3 { font: 600 20px/1.2 var(--head); margin: 6px 0 4px; }
.points p { font-size: 15px; color: var(--muted); }
.has-hero-photo .points { margin-top: 0; }
@media (max-width: 760px) {
  .points { grid-template-columns: 1fr; margin-top: 26px; }
  .has-hero-photo .points { margin-top: 26px; }
  .points li { border-left: 0; border-top: 1px solid var(--t-line); padding: 14px 16px 16px; }
  .points li:first-child { border-top: 0; }
  .points h3 { font-size: 18px; }
}

/* key points: centred text in one frame, faint lines between */
.points { text-align: center; }
.points li { padding: 20px 20px 22px; }

/* key points: the dividing lines stop short of the frame */
.points li { border: 0; position: relative; }
.points li + li::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--t-line); }
@media (max-width: 760px) { .points li + li::before { left: 18px; right: 18px; top: 0; bottom: auto; width: auto; height: 1px; } }

/* key points strip and contact box: a dashed frame set out from the box, like a cut line on a drawing */
.points, .contact { position: relative; border-color: transparent; }
.points::after, .contact::after { content: ""; position: absolute; inset: -9px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--t) 0 10px, transparent 10px 17px) top left / 100% 1.5px no-repeat, repeating-linear-gradient(90deg, var(--t) 0 10px, transparent 10px 17px) bottom left / 100% 1.5px no-repeat, repeating-linear-gradient(180deg, var(--t) 0 10px, transparent 10px 17px) top left / 1.5px 100% no-repeat, repeating-linear-gradient(180deg, var(--t) 0 10px, transparent 10px 17px) top right / 1.5px 100% no-repeat; }
.points { margin-top: 44px; }
.has-hero-photo .points { margin-top: 12px; }
@media (max-width: 760px) { .points, .has-hero-photo .points { margin-top: 34px; } }

/* headline photo: its top edge lines up with the top of the headline's capital letters (computers) */
@media (min-width: 901px) {
  .has-hero-photo .hero { align-content: start; min-height: calc(var(--hd-h, 342px) + 99px); }
  .has-hero-photo .hero-photo { top: 55px; transform: none; }
}

/* hover: corner marks appear just outside service cards and buttons, like crop marks on a drawing */
.job::after { border: 0; transform: none; inset: -1px; opacity: 0; transition: opacity .2s ease, inset .25s var(--ease);
  background: linear-gradient(var(--ink),var(--ink)) top left/14px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) top left/2px 14px no-repeat,
    linear-gradient(var(--ink),var(--ink)) top right/14px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) top right/2px 14px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom left/14px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom left/2px 14px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom right/14px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom right/2px 14px no-repeat; }
.job:hover::after, .job:focus-visible::after { opacity: 1; inset: -5px; transform: none; }
.btn { position: relative; }
.btn:hover, .btn.ghost:hover { transform: none; box-shadow: none; }
.btn.ghost, .btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--t); }
.btn::after { content: ""; position: absolute; inset: -1px; opacity: 0; pointer-events: none; transition: opacity .2s ease, inset .25s var(--ease);
  background: linear-gradient(var(--ink),var(--ink)) top left/9px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) top left/2px 9px no-repeat,
    linear-gradient(var(--ink),var(--ink)) top right/9px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) top right/2px 9px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom left/9px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom left/2px 9px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom right/9px 2px no-repeat,
    linear-gradient(var(--ink),var(--ink)) bottom right/2px 9px no-repeat; }
.btn:hover::after, .btn:focus-visible::after { opacity: 1; inset: -5px; }
.btn:active { transform: scale(.98); }
.btn:active::after { inset: -2px; }
@media (prefers-reduced-motion: reduce) { .job::after, .btn::after { transition: none; } }

/* headline area without the small points: larger supporting line and buttons; on computers the buttons sit level with the bottom of the photo */
.hero .sub { font-size: 18px; line-height: 1.55; max-width: 31rem; }
.hero .btn { font-size: 16px; padding: 17px 28px; }
@media (min-width: 901px) {
  .has-hero-photo .hero { grid-template-rows: auto 1fr; }
  .has-hero-photo .hero-side { align-self: end; margin-top: 30px; }
  /* the photo runs from the top of the headline to the bottom of the buttons; the height slider is its minimum */
  .has-hero-photo .hero-photo { top: 55px; bottom: 44px; height: auto; }
}
@media (max-width: 600px) { .hero .sub { font-size: 17px; } .hero .btn { padding: 16px 20px; } }

/* the headline photo can be moved and zoomed freely inside its frame; parts of the frame may be left empty (they sit under the fade) */
.hero-photo { background: none; overflow: hidden; }
.hero-img { position: absolute; inset: 0; background: center / cover no-repeat; transform: translate(var(--hd-mx, 0%), var(--hd-my, 0%)) scale(var(--hd-z, 1)); }
@media (max-width: 900px) { .hero-img { transform: translate(var(--hm-mx, 0%), var(--hm-my, 0%)) scale(var(--hm-z, 1)); } }

/* dashed frames line up with the other frames on the page; the box inside is set in from them */
.points, .contact { margin-left: 9px; margin-right: 9px; }
.points { margin-top: 53px; }
.has-hero-photo .points { margin-top: 21px; }
.contact { margin-top: 9px; margin-bottom: 57px; }
@media (max-width: 760px) { .points, .has-hero-photo .points { margin-top: 43px; } }

/* the whole photo is kept (never trimmed to the frame), so it can be moved, zoomed and turned freely; the frame shows whatever part sits inside it */
@supports (width: 1cqw) {
  .hero-photo { container-type: size; }
  .hero-img { inset: auto; left: 50%; top: 50%; aspect-ratio: var(--ar, 1.5); width: max(100cqw, calc(100cqh * var(--ar, 1.5))); height: auto; background-size: 100% 100%;
    transform: translate(-50%, -50%) translate(calc(var(--hd-mx, 0) * 1cqw), calc(var(--hd-my, 0) * 1cqh)) rotate(var(--hd-r, 0deg)) scale(var(--hd-z, 1)); }
  @media (max-width: 900px) { .hero-img { transform: translate(-50%, -50%) translate(calc(var(--hm-mx, 0) * 1cqw), calc(var(--hm-my, 0) * 1cqh)) rotate(var(--hm-r, 0deg)) scale(var(--hm-z, 1)); } }
}

/* headline photo opacity (editor slider) */
.hero-img { opacity: var(--hd-o, 1); }
@media (max-width: 900px) { .hero-img { opacity: var(--hm-o, 1); } }
