/* Self-hosted so the page makes no third-party requests.
   Instrument Sans and IBM Plex Mono are both SIL Open Font License 1.1.
   Instrument Sans is variable (one file covers 400-700). */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-sans-400-700-latin-ext.woff2') format('woff2');
  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: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-sans-400-700-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;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  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';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400-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;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
  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';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500-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;
}

/* --- Reset ---------------------------------------------------------------- */

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; }

ul { list-style: none; padding: 0; }

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Native UI — scrollbars, form controls, the canvas behind the page — follows
     the theme that is actually applied, including a manual override. A bare
     `color-scheme: light dark` would track the OS only and desync from the toggle. */
  color-scheme: light;

  /* Light palette — cool neutral paper, ink with a blue cast, drawn from the
     photograph's UI lines so the image belongs to the page rather than sitting on it. */
  --paper:        #f7f7f5;
  --surface:      #ffffff;
  --surface-sunk: #f1f1ee;
  --ink:          #12151c;
  --slate:        #5b6472;
  --rule:         #e3e3de;
  --signal:       #2f42de;
  --signal-ink:   #2f42de;
  --signal-tint:  rgba(47, 66, 222, 0.07);
  --beam:         #6d28d9;
  --beam-tint:    rgba(109, 40, 217, 0.05);
  --live:         #15803d;
  --shadow:       0 1px 2px rgba(18, 21, 28, 0.04), 0 12px 28px -14px rgba(18, 21, 28, 0.16);
  --shadow-lift:  0 2px 4px rgba(18, 21, 28, 0.05), 0 22px 44px -18px rgba(18, 21, 28, 0.24);

  --display: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-hero:  clamp(2.35rem, 6.1vw, 4.4rem);
  --fs-h2:    clamp(1.55rem, 3.3vw, 2.5rem);
  --fs-h2-sm: clamp(1.35rem, 2.4vw, 1.85rem);
  --fs-lede:  clamp(1.02rem, 0.95rem + 0.5vw, 1.2rem);
  --fs-micro: 0.72rem;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 44px);
  --section-y: clamp(68px, 9vw, 124px);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:        #0e1117;
    --surface:      #161a22;
    --surface-sunk: #12161d;
    --ink:          #e7e9ee;
    --slate:        #98a1b0;
    --rule:         #262c38;
    --signal:       #8c9bff;
    --signal-ink:   #8c9bff;
    --signal-tint:  rgba(140, 155, 255, 0.10);
    --beam:         #b79bff;
    --beam-tint:    rgba(183, 155, 255, 0.07);
    --live:         #4ade80;
    --shadow:       0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -14px rgba(0, 0, 0, 0.7);
    --shadow-lift:  0 2px 4px rgba(0, 0, 0, 0.45), 0 22px 44px -18px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:        #0e1117;
  --surface:      #161a22;
  --surface-sunk: #12161d;
  --ink:          #e7e9ee;
  --slate:        #98a1b0;
  --rule:         #262c38;
  --signal:       #8c9bff;
  --signal-ink:   #8c9bff;
  --signal-tint:  rgba(140, 155, 255, 0.10);
  --beam:         #b79bff;
  --beam-tint:    rgba(183, 155, 255, 0.07);
  --live:         #4ade80;
  --shadow:       0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px -14px rgba(0, 0, 0, 0.7);
  --shadow-lift:  0 2px 4px rgba(0, 0, 0, 0.45), 0 22px 44px -18px rgba(0, 0, 0, 0.8);
}

/* --- Base ----------------------------------------------------------------- */

body {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
}

::selection { background: var(--signal); color: #fff; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 16px; }

/* --- Layout --------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section-hero { padding-block: clamp(44px, 6vw, 76px) clamp(40px, 6vw, 72px); }

.section-approach,
.section-clients { background: var(--surface-sunk); }

.section-approach { border-block: 1px solid var(--rule); }
.section-clients  { border-block: 1px solid var(--rule); }

/* --- Shared type ---------------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 20px;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.022em;
  max-width: 21ch;
  text-wrap: balance;
}

.section-approach .section-title { max-width: 26ch; }

.section-title-sm { font-size: var(--fs-h2-sm); max-width: none; }

.section-lede {
  margin-top: 20px;
  max-width: 62ch;
  font-size: var(--fs-lede);
  color: var(--slate);
  text-wrap: pretty;
}

/* --- Masthead ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper); /* fallback: color-mix would otherwise drop the
                              whole declaration and leave the bar see-through */
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wordmark-name {
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.008em;
}

.nav {
  display: none;
  gap: 26px;
  font-size: 0.9rem;
}

.nav a {
  color: var(--slate);
  text-decoration: none;
  transition: color 0.16s ease;
}

.nav a:hover { color: var(--ink); }

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

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--rule);
  color: var(--slate);
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--slate); }

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  display: grid;
  gap: clamp(34px, 5vw, 60px);
  align-items: center;
}

@media (min-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
}

.eyebrow-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  letter-spacing: 0.08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--live) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 0%, transparent); }
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.hero-title em {
  font-style: normal;
  color: var(--signal-ink);
}

.lede {
  margin-top: 24px;
  max-width: 54ch;
  font-size: var(--fs-lede);
  color: var(--slate);
  text-wrap: pretty;
}

.lede a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--signal);
  padding-bottom: 1px;
  /* Keep the product name whole so the underline never splits across lines.
     Verified from 320px up: it always fits inside the lede column. */
  white-space: nowrap;
  transition: color 0.16s ease;
}

.lede a:hover { color: var(--signal-ink); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button:hover {
  background: var(--signal);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.button:hover svg { transform: translateX(3px); }

.link-quiet {
  font-size: 0.92rem;
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.link-quiet:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* On narrow screens the email button and the two text links wrap into a ragged
   three-across; give the button its own full-width row and let the links pair up
   underneath it instead. */
@media (max-width: 560px) {
  .hero-actions { gap: 18px 24px; }

  .hero-actions .button {
    flex: 1 0 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .button {
    padding: 12px 16px;
    font-size: 0.78rem;
  }
}

.hero-place {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

.hero-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #0b0d14;
  box-shadow: var(--shadow-lift);
}

.hero-figure img {
  width: 100%;
  height: auto;
}

/* --- Stack strip ---------------------------------------------------------- */

.stack-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: clamp(40px, 6vw, 68px);
  padding-block: 16px;
  border-block: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--slate);
}

.stack-strip li { display: flex; align-items: center; gap: 20px; }

.stack-strip li::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rule);
}

.stack-strip li:last-child::after { display: none; }

.stack-strip li:first-child { color: var(--signal-ink); }

/* --- Approach: the split -------------------------------------------------- */

.split {
  display: grid;
  margin-top: clamp(36px, 5vw, 56px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (min-width: 860px) {
  .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}

.split-agent {
  padding: clamp(24px, 3vw, 38px);
  background: var(--beam-tint);
  border-bottom: 1px solid var(--rule);
}

.split-human { padding: clamp(24px, 3vw, 38px); }

@media (min-width: 860px) {
  .split-agent { border-bottom: 0; border-right: 1px solid var(--rule); }
}

.split-label {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--beam);
  margin-bottom: 20px;
}

.split-label-mine { color: var(--signal-ink); }

.agent-list {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 2.05;
  color: var(--slate);
}

.agent-list li { display: flex; gap: 10px; }

.agent-list li::before {
  content: "›";
  color: var(--beam);
  opacity: 0.6;
}

.human-list {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
}

.human-list li {
  position: relative;
  padding-left: 22px;
  font-size: clamp(1rem, 0.92rem + 0.45vw, 1.22rem);
  line-height: 1.45;
  letter-spacing: -0.011em;
  color: var(--ink);
  text-wrap: pretty;
}

.human-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--signal);
}

.human-list em {
  font-style: italic;
  color: var(--signal-ink);
}

.split-note {
  grid-column: 1 / -1;
  padding: 18px clamp(24px, 3vw, 38px);
  border-top: 1px solid var(--rule);
  background: var(--surface-sunk);
  font-size: 0.9rem;
  color: var(--slate);
}

/* --- Work ----------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--signal) 40%, var(--rule));
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.card-featured {
  position: relative;
  margin-top: clamp(32px, 4vw, 48px);
  border-color: color-mix(in srgb, var(--signal) 32%, var(--rule));
  background: linear-gradient(180deg, var(--signal-tint), transparent 220px), var(--surface);
}

.card-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-years {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

.card-tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--signal-tint);
  color: var(--signal-ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-title {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.62rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.16;
}

.card-title a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.card-title a:hover { color: var(--signal-ink); }

.card-title svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.card-title a:hover svg { opacity: 1; transform: translate(2px, -2px); }

.card-role {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-ink);
}

.card-context {
  margin-top: 15px;
  max-width: 58ch;
  color: var(--slate);
  text-wrap: pretty;
}

.card-points {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  margin-bottom: 22px;
  max-width: 62ch;
  font-size: 0.94rem;
}

.card-points li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  text-wrap: pretty;
}

.card-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--signal);
}

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.card-stack li {
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--slate);
}

/* --- Clients -------------------------------------------------------------- */

.client-grid {
  display: grid;
  gap: 12px;
  margin-top: clamp(28px, 3.5vw, 40px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 620px) {
  .client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.client-grid li { display: block; }

.client-grid a,
.client-grid span {
  display: grid;
  place-items: center;
  min-height: clamp(76px, 8.5vw, 116px);
  padding: 14px clamp(14px, 2.4vw, 34px);
  border: 1px solid var(--rule);
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

/* The logo files disagree on everything — 100x100 marks, a 6:1 wordmark, an SVG.
   Pinning an explicit height (rather than capping it) is what makes them render at
   one consistent size, and keeping it in vw makes that hold at every width.
   Wordmarks get a shorter cap so they don't optically tower over the square marks. */
.client-grid img {
  height: clamp(44px, 4.2vw, 58px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.client-grid .logo-wide { height: clamp(30px, 2.9vw, 40px); }

.client-grid a:hover { border-color: var(--slate); transform: translateY(-2px); }
.client-grid a:hover img { filter: none; opacity: 1; }

/* The logos carry baked-in white backgrounds, so the plates stay light in both
   themes — dimmed on dark so nine bright rectangles don't shout down the page. */
:root[data-theme="dark"] .client-grid a,
:root[data-theme="dark"] .client-grid span {
  background: #dfe1e6;
  opacity: 0.62;
}

:root[data-theme="dark"] .client-grid img { opacity: 0.8; }

:root[data-theme="dark"] .client-grid a:hover {
  background: #fff;
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .client-grid a,
  :root:not([data-theme="light"]) .client-grid span {
    background: #dfe1e6;
    opacity: 0.62;
  }

  :root:not([data-theme="light"]) .client-grid img { opacity: 0.8; }

  :root:not([data-theme="light"]) .client-grid a:hover {
    background: #fff;
    opacity: 1;
  }
}

/* --- Contact -------------------------------------------------------------- */

.contact-inner { max-width: 780px; }

.mail-link {
  display: inline-block;
  margin-top: clamp(28px, 4vw, 40px);
  font-family: var(--mono);
  font-size: clamp(1.05rem, 0.6rem + 3.1vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  padding-bottom: 4px;
  transition: color 0.18s ease, background-size 0.25s ease;
}

.mail-link:hover {
  color: var(--signal-ink);
  background-size: 100% 3px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 30px;
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

/* --- Reveal on scroll ----------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .js .reveal { opacity: 1; transform: none; }
}

html { scroll-behavior: smooth; }

:target { scroll-margin-top: 88px; }
