/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, figure { margin: 0; }
img, picture { display: block; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }

/* ---------- tokens (architecture doc §1.2) ---------- */
:root {
  --ink: #17150F;
  --ink-2: #241F17;
  --jade: #16A97C;
  --jade-deep: #0C6B4F;
  --clay: #C4674A;
  --paper: #FAF6EC;
  --slate: #6A6157;
  --line: rgba(23, 21, 15, 0.13);
  --line-dark: rgba(250, 246, 236, 0.16);

  /* Softened shapes and real depth. The flat, hairline-ruled, zero-radius
     treatment is what made the site read as machine-made; cards now sit on
     the page instead of being scored into it. */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 21, 15, 0.04), 0 6px 20px rgba(23, 21, 15, 0.07);
  --shadow-lift: 0 4px 10px rgba(23, 21, 15, 0.06), 0 16px 36px rgba(23, 21, 15, 0.13);
}

/* ---------- fonts ----------
   "Archivo Expanded" has no standalone static family on Google Fonts anymore
   (only variable Archivo with a wdth axis). These files are the wdth:125
   static instances of variable Archivo, pulled via the css2 API and
   self-hosted under the "Archivo Expanded" family name so the rest of the
   CSS can reference it as the architecture doc specifies. */
@font-face {
  font-family: "Archivo Expanded";
  src: url("/assets/fonts/archivo-expanded-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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: "Archivo Expanded";
  src: url("/assets/fonts/archivo-expanded-latin-ext-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo Expanded";
  src: url("/assets/fonts/archivo-expanded-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  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: "Archivo Expanded";
  src: url("/assets/fonts/archivo-expanded-latin-ext-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-ext-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  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: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-ext-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-ext-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  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: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-ext-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- type scale (§1.3, fluid) ---------- */
:root {
  --font-display: "Archivo Expanded", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --size-display-xl: clamp(2.75rem, 7vw, 6rem);
  --size-display-l: clamp(2rem, 4.5vw, 3.5rem);
  --size-h2: clamp(1.5rem, 3vw, 2.25rem);
  --size-body-l: 1.125rem;
  --size-body: 1rem;
  --size-mono-eyebrow: 0.75rem;
}

/* Chinese pages: none of our self-hosted faces carry CJK glyphs, so Han
   characters would otherwise land on whatever generic sans the OS picks —
   often a Simplified-leaning face, which is wrong for Hong Kong readers.
   Latin glyphs still resolve from Archivo/Plex, which come first in the stack.
   No download: every name here is a font the visitor already has.
   NOTE: font families ONLY — the type scale above must stay on bare :root or
   every non-Chinese page loses it. */
:root:lang(zh-HK) {
  --font-display: "Archivo Expanded", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK HK", "Noto Sans TC", sans-serif;
  --font-body: "IBM Plex Sans", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK HK", "Noto Sans TC", sans-serif;
  --font-mono: "IBM Plex Mono", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK HK", monospace;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--size-body);
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.006em;
}

h1 { font-size: var(--size-display-xl); line-height: 1.04; }
h2 { font-size: var(--size-h2); line-height: 1.1; }

p.body-l { font-size: var(--size-body-l); line-height: 1.6; }

/* Was monospace, uppercase, 0.12em tracked — on every label on every section.
   Now a plain sentence-case label in the body face. */
.mono-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--slate);
}

/* Section labels were doing a heading's job in 12px monospace. Let them be
   headings. */
.section-head .mono-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--size-h2);
  line-height: 1.1;
  letter-spacing: -0.006em;
  color: var(--ink);
}

.section--dark .section-head .mono-eyebrow,
.section--dark .mono-eyebrow { color: var(--paper); }

.section--dark .section-head .mono-eyebrow { opacity: 1; }

a { color: inherit; }

/* ---------- layout shell ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

/* Pages with a dark hero: header starts transparent with light text,
   readable even before JS adds .is-scrolled (no-JS / slow-JS fallback). */
body.has-hero .site-header {
  color: var(--paper);
}

.site-header nav {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
}

.site-header nav a {
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch {
  display: inline-flex;
  gap: 0.5rem;
  padding-left: 1rem;
  margin-left: 0.25rem;
  border-left: 1px solid currentColor;
  opacity: 0.7;
}

.lang-switch a {
  text-decoration: none;
  opacity: 0.7;
}

.lang-switch a.lang-current {
  opacity: 1;
  font-weight: 600;
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 150ms ease, opacity 150ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .site-header nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 1rem;
    transition: max-height 220ms ease;
  }

  .site-header nav.is-open {
    max-height: 320px;
    padding: 0.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--line-dark);
  }

  .site-header nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .lang-switch {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
    padding-top: 0.85rem;
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding: 1rem;
  }

  .site-logo svg {
    width: 104px;
    height: 18px;
  }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.site-logo svg { display: block; }

.site-header.is-scrolled {
  background: var(--ink);
  color: var(--paper);
}

.lang-hint {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.65rem 3rem 0.65rem 1rem;
  margin-top: 3.5rem;
  background: var(--jade-deep);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
}

.lang-hint[hidden] {
  display: none;
}

.lang-hint a {
  color: var(--paper);
  font-weight: 600;
  text-decoration: underline;
}

.lang-hint-close {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.75;
}

.lang-hint-close:hover {
  opacity: 1;
}

.clock-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0;
  background: var(--ink);
  color: var(--paper);
}

.clock-strip .region {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0.85;
}

.clock-strip [data-time] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.clock-strip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-dark);
}

.clock-strip .region.is-awake .dot {
  background: var(--jade);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  /* jade-deep, not jade: white on mid-jade is 3.0:1, under AA for 16px text */
  background: var(--jade-deep);
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.btn:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

/* On dark ground the default jade-deep is dim and the ink hover disappears
   into the background entirely. Brighter fill with dark text (6.1:1), and
   hover goes to paper rather than to ink. */
.hero .btn,
.section--dark .btn,
.cta-band--dark .btn {
  background: var(--jade);
  color: var(--ink);
}

.hero .btn:hover,
.section--dark .btn:hover,
.cta-band--dark .btn:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(22, 169, 124, 0.16), transparent 58%),
    radial-gradient(90% 80% at 92% 20%, rgba(196, 103, 74, 0.13), transparent 60%),
    var(--ink);
  color: var(--paper);
}

.hero-inner {
  padding: 9rem 1.5rem 4rem;
  max-width: 72rem;
  margin: 0 auto;
}

.hero-inner p.body-l {
  color: var(--paper);
  opacity: 0.8;
  margin-top: 1.5rem;
  max-width: 36rem;
}

.hero-inner .btn {
  margin-top: 2rem;
}

.hero h1 {
  color: var(--paper);
  font-family: "Archivo Expanded", var(--font-display);
  overflow: hidden;
  overflow-wrap: break-word;
}

/* Locked --size-display-xl (architecture doc §1.2) floors at 2.75rem, which
   is too wide for long single words (e.g. Spanish "CONVERTIMOS") to fit
   without clipping on narrow phones — scale the hero headline down further
   below the token's own floor for this element only. */
@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(1.6rem, 7.5vw, 6rem);
  }
}

.hero h1 span {
  display: block;
  animation: mask-reveal-up 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes mask-reveal-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.clock-strip {
  animation: fade-in 400ms ease 200ms both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- section scaffolding ---------- */
.section {
  padding: 4.5rem 1.5rem;
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto 2rem;
}

.section-head a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--jade-deep);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}

.section-head a:hover { border-bottom-color: currentColor; }

.section--dark .section-head a { color: var(--jade); }

/* ---------- work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-grid--full {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 700px) {
  .work-grid--full { grid-template-columns: 1fr; }
}

.work-card .work-card-descriptor {
  margin-top: 0;
  color: var(--slate);
}

.page-intro {
  max-width: 40rem;
  margin: 0 auto 3rem;
  padding: 6rem 1.5rem 0;
}

.page-intro .body-l {
  color: var(--slate);
  margin-top: 0.75rem;
}

[data-observe-group] > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}

[data-observe-group] > *.is-visible {
  opacity: 1;
  transform: none;
}

.work-card a { text-decoration: none; }

.work-card picture {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.work-card:hover picture {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 120ms ease;
}

.work-card:hover img {
  transform: scale(1.02);
}

.work-card .work-card-name {
  margin-top: 0.75rem;
  font-weight: 500;
}

/* tag on the left, the stack it was built on on the right, sharing one line */
.work-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.35rem;
}

.work-card .work-card-tag {
  color: var(--slate);
}

/* third line: the year we built it. Right-aligned so it stacks directly under
   the tech pills, which are right-aligned in the row above. */
.work-card .work-card-year {
  color: var(--slate);
  text-align: right;
}

/* the stack a project was built on, as colour-coded pills. Our own tech reads
   in the brand colours; third-party platforms get quieter, cooler tints so the
   UT-built projects are what the eye lands on first. */
.work-card .work-card-tech {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.375rem;
  text-align: right;
}

.tech-pill {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--pill-bg, rgba(106, 97, 87, 0.12));
  color: var(--pill-fg, var(--slate));
}

/* ours — the two brand colours, at full confidence */
.tech-pill[data-tech="ute"]      { --pill-bg: rgba(196, 103, 74, 0.16);  --pill-fg: #8F4028; }
.tech-pill[data-tech="utwf"]     { --pill-bg: rgba(22, 169, 124, 0.16);  --pill-fg: var(--jade-deep); }
/* UTE & UTWF together is a psite — the full stack, not two tools bolted
   together — so it gets one pill in gold. Gold sits deliberately outside the
   token palette: it is the only colour on the page that means "top of the
   range", and sharing clay or jade would flatten it back into a variant. */
.tech-pill[data-tech="ute-utwf"] { --pill-bg: rgba(191, 149, 42, 0.22);  --pill-fg: #7A5A0F; }

/* not a technology but a distinction, so it inverts: solid gold rather than a
   tint, which is what separates "this is the first one" from "this is gold-tier" */
/* the gold ladder, three rungs:
     psite-ready  — outline only: has the engine, could become one
     UTE & UTWF   — gold tint: is a psite
     First psite  — solid gold: the first one there was            */
.tech-pill[data-tech="psite-ready"] {
  --pill-bg: transparent;
  --pill-fg: #8A6512;
  box-shadow: inset 0 0 0 1px rgba(138, 101, 18, 0.45);
}

.tech-pill[data-tech="first-psite"] {
  --pill-bg: #8A6512;
  --pill-fg: var(--paper);
}

/* third-party platforms — cooler and quieter, each still distinguishable */
.tech-pill[data-tech="elementor"]   { --pill-bg: rgba(146, 0, 61, 0.10);   --pill-fg: #92003D; }
.tech-pill[data-tech="wordpress"]   { --pill-bg: rgba(33, 117, 155, 0.12); --pill-fg: #21759B; }
.tech-pill[data-tech="avada"]       { --pill-bg: rgba(106, 76, 147, 0.13); --pill-fg: #5C4185; }
.tech-pill[data-tech="squarespace"] { --pill-bg: rgba(23, 21, 15, 0.10);   --pill-fg: var(--ink); }
.tech-pill[data-tech="flutter"]     { --pill-bg: rgba(2, 86, 155, 0.12);   --pill-fg: #02569B; }
.tech-pill[data-tech="godaddy"]     { --pill-bg: rgba(29, 116, 240, 0.12); --pill-fg: #1B5FBF; }

.section--dark .work-card .work-card-tag {
  color: var(--paper);
  opacity: 0.6;
}

/* Below 700px the grid is one column, so a card is only as wide as the screen
   — roughly 310px on a phone. Splitting that into descriptor-left / pills-right
   leaves the descriptor about 150px, so "Web design and build." breaks over two
   lines while the pills stack over two more, and the right-aligned year trails
   under both: four ragged lines where there should be two. Stack them instead
   and align everything left, so the descriptor gets the full card width. */
@media (max-width: 700px) {
  .work-card-meta {
    display: block;
  }

  .work-card .work-card-tech {
    justify-content: flex-start;
    text-align: left;
    margin-top: 0.35rem;
  }

  .work-card .work-card-year {
    text-align: left;
  }
}

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* a lead-in paragraph spanning the full grid, above the blocks it introduces */
.section-intro {
  grid-column: 1 / -1;
  max-width: 46rem;
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.service-block {
  background: #fff;
  padding: 2.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.service-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.service-block--wide {
  grid-column: 1 / -1;
}

.service-block h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* a warm rule under each service title, instead of a hairline box around it */
.service-block h3::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 2px;
  background: var(--clay);
}

.service-block p {
  color: var(--slate);
}

.service-block .product-status {
  color: var(--jade);
  margin-bottom: 0.75rem;
}

/* ---------- technology (engine + framework) ---------- */
.tech-features {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
}

@media (max-width: 700px) {
  .tech-features { grid-template-columns: 1fr; }
}

.tech-features li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* small clay tick-mark instead of a bullet, to echo the rule under the h3 */
.tech-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--clay);
}

.tech-features strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- clients carousel ---------- */
.clients-carousel {
  overflow: hidden;
  max-width: 72rem;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

.clients-track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  animation: clients-scroll 32s linear infinite;
}

/* deliberately no pause-on-hover: the strip spans the full width, so a cursor
   resting anywhere over it froze the carousel until the mouse moved away */

.client-card {
  flex: 0 0 auto;
  width: 11rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  /* deliberately lighter than --shadow: these sit inside a masked, animated
     container where a 20px blur on 14 cards is real paint cost every frame */
  box-shadow: 0 1px 3px rgba(23, 21, 15, 0.07);
}

.client-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.client-card--wordmark {
  gap: 0.6rem;
}

.client-card--wordmark img {
  max-width: 2.5rem;
  max-height: 2.5rem;
}

.client-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
}

@keyframes clients-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* The client marquee is the one animation exempt from prefers-reduced-motion
   (see the global reduce block at the end of this file). It is a slow, linear,
   single-axis scroll with no flashing or parallax, and it is the only thing
   that makes the logo strip read as a strip rather than a stranded row — so
   it keeps running even when the OS asks for reduced motion. Everything else
   on the site still honours the setting. */

/* ---------- about + founders + stats ---------- */
.about-preview {
  max-width: 72rem;
  margin: 0 auto;
}

.about-preview > p.body-l {
  max-width: 40rem;
  color: var(--slate);
  margin-bottom: 3rem;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 700px) {
  .founders-grid { grid-template-columns: 1fr; }
}

.founder-card picture {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--ink);
}

.founder-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder-card .founder-name {
  margin-top: 1rem;
  font-weight: 500;
}

.founder-card .founder-role {
  color: var(--slate);
}

.section-title-center {
  text-align: center;
  max-width: 72rem;
  margin: 0 auto 2rem;
}

.investors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.investors-grid .founder-card {
  width: 100%;
  max-width: 22.6667rem;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

@media (max-width: 700px) {
  .stats-band { grid-template-columns: repeat(2, 1fr); }
}

.stat-figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--jade-deep);
}

.stat-label {
  margin-top: 0.5rem;
  color: var(--slate);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  max-width: 72rem;
  margin: 0 auto;
}

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--jade);
  outline-offset: -1px;
}

.form-field textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.contact-info p {
  color: var(--slate);
  margin-bottom: 1.5rem;
}

.form-status {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ---------- case study gallery ---------- */
.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  max-width: 40rem;
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--slate);
}

.case-study-gallery {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.case-study-gallery figure {
  margin: 0;
}

.case-study-gallery img {
  width: 100%;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.case-study-gallery figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--slate);
}

/* ---------- CTA band ---------- */
/* Client pitch band — hidden until an hour before the meeting (site.js).
   The [hidden] rule is explicit because the display below would otherwise
   beat the attribute's own default styling. */
.pitch-band {
  display: block;
  background: var(--jade);
  color: var(--ink);
}

.pitch-band[hidden] {
  display: none;
}

.pitch-band__link {
  /* block, not flex: on a phone the line wraps to three lines and a flex arrow
     floats beside the block instead of following the last word */
  display: block;
  padding: 3rem 1.5rem;
  font-family: var(--font-display);
  font-size: var(--size-display-l);
  line-height: 1.1;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

/* Inline, and glued to the copy by a non-breaking space in the markup: an
   inline-block would be its own break opportunity and wrap onto a line by
   itself once the line gets long. Horizontal margin animates on an inline
   element, so the nudge survives. */
.pitch-band__arrow {
  margin-left: 0.15rem;
  transition: margin-left 160ms ease;
}

.pitch-band__link:hover .pitch-band__arrow,
.pitch-band__link:focus-visible .pitch-band__arrow {
  margin-left: 0.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .pitch-band__arrow { transition: none; }
}

.cta-band {
  text-align: center;
  padding: 5rem 1.5rem;
}

.cta-band h2 {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.site-footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--slate);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* ...except the client marquee, per the note above */
  .clients-track {
    animation-duration: 32s !important;
    animation-iteration-count: infinite !important;
  }
}
