/* BuildQuake — modern-newspaper portfolio. Static, dependency-free. */

/* ── fonts:start (generated by tools/fonts.mjs — do not edit by hand) ── */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/fraunces-400-700.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: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/inter-400-600.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.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.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: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-600.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;
}
/* ── fonts:end ── */

/* One warm-grey family, top to bottom. Every surface is a dark grey with
   roughly a tenth of an orange mixed in — enough to keep it off dead
   neutral, not enough to read as brown. Turn the warmth up or down by
   moving the red/green channels apart or together: --paper's #26 23 20 is
   the reference, and every other surface tracks it. The page behind the
   sheet is black, so the sheet reads as a lit object on a dark desk.
   Nothing below this block hard-codes a surface or ink colour — the
   translucent ones compose from the -rgb triplets. */
:root {
  --page-bg: #000000;
  --paper: #262320;
  --paper-deep: #2d2a26;
  --ink: #ece9e4;
  --ink-soft: #b3aea6;
  /* The faintest ink that still reads at 4.5:1 on the lightest card
     (--card-bg-portfolio), so small print passes WCAG AA everywhere. */
  --ink-faint: #9b958b;
  --masthead: #d9484c;
  /* The accent, lifted just enough to pass 4.5:1 as small text on any
     surface here. --masthead stays for rules, borders, icons and large
     headline text, where 3:1 is the bar and the deeper red reads better. */
  --accent-text: #e27477;
  /* The filled button: white on this passes 4.5:1, on --masthead it
     doesn't quite (4.2:1). */
  --button: #ce4448;
  --button-hover: #b83c40;
  --line-strong: #ece9e4;
  --card-bg: #2d2a26;
  /* Cards are lighter than the sheet they sit on, so they read as objects
     rather than wells; the portfolio's are a shade lighter again, which
     is how the two pages' cards stay distinguishable now that they no
     longer differ in hue. */
  --card-bg-portfolio: #302c28;

  /* Channel triplets, for the rules, scrims and hovers that need alpha. */
  --ink-rgb: 236 233 228;
  --shade-rgb: 10 9 8;
  --accent-rgb: 217 72 76;

  --rule: rgb(var(--ink-rgb) / 0.17);
  --max: 1320px;
  --gutter: 28px;
}

* { box-sizing: border-box; }

/* Icons are inline SVG <use>s of one sprite per page (tools/build.mjs),
   sized to the text they sit in and drawn in its colour. */
.icon {
  display: inline-block;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  overflow: visible;
}

/* A <picture> is only a wrapper for its <source>s: let the <img> inside
   size itself against the figure as if the wrapper weren't there. */
picture { display: contents; }

/* Hidden until a keyboard user tabs to it, then the first thing they can
   reach — straight past the masthead and nav. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--button);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: 2px;
}
.skip-link:focus { top: 12px; }
.wordmark-link { text-decoration: none; color: inherit; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; width: 100%; }
.lede-title { margin-bottom: 10px; }

/* Always reserve the vertical scrollbar's space, even on pages short
   enough not to need one — otherwise centered content shifts a few
   pixels sideways from page to page as the scrollbar appears/disappears. */
html { -webkit-text-size-adjust: 100%; overflow-y: scroll; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

/* The whole site sits as one sheet, a shade brighter than the browser
   background behind it — dark screenshots read better against it than
   they would flush with the page edge. It's a flex column, same as
   body, so .site-main can grow to fill any leftover height and the
   footer never sits above the bottom of the screen on a short page. */
.site-sheet {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1560px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 40px 90px -30px #00000099, 0 10px 30px -8px #00000080;
}
@media (min-width: 760px) {
  .site-sheet { margin: 28px auto; border-radius: 10px; overflow: hidden; }
}

.site-main { flex: 1 0 auto; }

h1, h2, h3, .headline {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.mono, .byline, .tag, .stat-value, .chip {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

a { color: inherit; }

img, svg { display: block; max-width: 100%; }
/* The global rule above would otherwise beat the hidden attribute — and
   the icon sprite at the top of every page is an <svg hidden>. */
[hidden] { display: none !important; }

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

/* ── section divider ─────────────────────────────────────────────────── */
/* Sections share one continuous background, so the break between them is
   drawn rather than shaded: two offset rows of 5px blocks, i.e. a 50%
   dither at pixel scale, the same trick an 8-bit machine uses to fake a
   tone it doesn't have. The mask fades both ends so it reads as a rule
   rather than a fence, and the ::after drops three accent blocks at the
   left where the eye starts. Sizes are in px on purpose: a "pixel" that
   scales with the root font isn't a pixel. */

hr.pixel-rule {
  --px: 5px;
  position: relative;
  height: calc(var(--px) * 2);
  margin: 0;
  border: 0;
  /* Alpha lives in the block colour, not in an opacity on the element —
     the accent blocks in ::after would inherit that opacity and wash out. */
  background-image:
    linear-gradient(90deg, rgb(var(--ink-rgb) / 0.5) 0 var(--px), transparent var(--px)),
    linear-gradient(90deg, transparent 0 var(--px), rgb(var(--ink-rgb) / 0.5) var(--px));
  background-size: calc(var(--px) * 2) var(--px);
  background-position: 0 0, 0 var(--px);
  background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(90deg, #000 0 66%, transparent 96%);
  mask-image: linear-gradient(90deg, #000 0 66%, transparent 96%);
}

/* Three accent blocks at the left edge, where the eye starts a line. */
hr.pixel-rule::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--px) * 7);
  height: var(--px);
  background-image: linear-gradient(90deg, var(--masthead) 0 var(--px), transparent var(--px));
  background-size: calc(var(--px) * 3) var(--px);
  background-repeat: repeat-x;
}

/* ── section headings ────────────────────────────────────────────────── */
/* Every homepage section gets the same billing: a divider above, then one
   bold heading. With no background change to mark the boundary, the
   heading is doing that work and needs the weight to do it. */

.section-title {
  font-size: clamp(1.55rem, 3.4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.section-title em { font-style: normal; color: var(--masthead); }

.section-intro {
  color: var(--ink-soft);
  margin: 14px 0 0;
  max-width: 62ch;
}

/* ── masthead ──────────────────────────────────────────────────────────── */

.masthead-bar {
  border-bottom: 3px solid var(--line-strong);
  background: var(--paper);
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 22px 0 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.masthead .wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.masthead .wordmark .dot { color: var(--masthead); }

.masthead .sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

nav.primary {
  display: flex;
  gap: 22px;
  padding: 10px 0 14px;
  border-top: 1px solid var(--rule);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

nav.primary a { text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; }
nav.primary a:hover, nav.primary a[aria-current] { border-bottom-color: var(--masthead); }
nav.primary a .icon { margin-right: 6px; font-size: 0.92em; color: var(--ink-faint); }
nav.primary a:hover .icon, nav.primary a[aria-current] .icon { color: var(--masthead); }
nav.primary a.nav-home .icon { margin-right: 0; font-size: 1.05rem; }

.dateline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ── lede ──────────────────────────────────────────────────────────────── */
/* Still used by the hand-written pages; the homepage leads with .hook. */

.lede {
  padding: 34px 0 10px;
  border-bottom: 1px solid var(--rule);
}

.lede p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.4;
  max-width: 46em;
  margin: 0 0 22px;
  font-weight: 400;
}

/* ── hook (homepage, first frame) ─────────────────────────────────────── */
/* This is the whole pitch in one screen: a visitor decides whether to stay
   in a few seconds, so the headline is sized to dominate the fold rather
   than to sit politely above a screenshot. Vertical padding is clamped
   (not fixed) so the block still fits a laptop viewport under the
   masthead instead of pushing the sub and buttons below it. */

.hook {
  padding: clamp(38px, 7vw, 86px) 0 clamp(34px, 4.5vw, 58px);
  /* A wash of the masthead red from the top-left, so the first frame
     reads as a statement rather than another band of body copy. */
  background:
    radial-gradient(1100px 420px at 8% -25%, rgb(var(--accent-rgb) / 0.12), transparent 70%),
    var(--paper);
}

.hook-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
}

.hook-headline {
  font-size: clamp(2.3rem, 6.2vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 27ch;
  margin: 0;
  text-wrap: balance;
}

/* The second beat of the headline — the consequence, in the accent. */
.hook-headline em {
  font-style: normal;
  color: var(--accent-text);
  display: block;
}

.hook-sub {
  font-size: clamp(1.02rem, 1.7vw, 1.28rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 22px 0 0;
}

.hook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* .cta brings its own top margin for the pages that use it standalone. */
.hook-actions .cta { margin-top: 26px; }

.hook-proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin: 32px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}
.hook-proof strong { color: var(--ink); font-weight: 600; }

@media (max-width: 560px) {
  .hook-headline { max-width: none; }
  .hook-actions .cta { flex: 1 1 100%; text-align: center; }
}

/* ── risk band (homepage) ─────────────────────────────────────────────── */
/* Sits on the darker page background, between the hook and the service
   list, so the "here's what goes wrong" argument reads as its own beat. */

/* No background of its own: the divider above it and the bold heading are
   what separate it from the hook. */
.risk { padding: clamp(34px, 4.5vw, 56px) 0 clamp(40px, 5vw, 60px); }

.risk-heading { max-width: 30ch; }

.risk-grid {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}
.risk-grid li { border-top: 2px solid var(--masthead); padding-top: 15px; }
.risk-grid strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.risk-grid strong .icon { color: var(--masthead); margin-right: 9px; font-size: 0.85em; }
.risk-grid span { color: var(--ink-faint); font-size: 0.92rem; }

.risk-note {
  margin: 32px 0 0;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--masthead);
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 78ch;
}
.risk-note .icon { color: var(--masthead); margin-right: 9px; }

/* ── capabilities (homepage) ──────────────────────────────────────────── */

.capabilities { padding: clamp(34px, 4.5vw, 56px) 0 clamp(40px, 5vw, 60px); }

/* Fixed column counts rather than auto-fit: there are six items, and
   auto-fit lands on four across at full width, leaving two orphans on a
   second row. Three and three reads as a deliberate set. */
.cap-grid {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 620px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cap-grid { grid-template-columns: repeat(3, 1fr); } }
.cap-grid li {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px 20px;
}
.cap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.15);
  color: var(--masthead);
}
.cap-grid h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.08rem; margin: 0 0 6px; }
.cap-grid p { color: var(--ink-faint); font-size: 0.9rem; margin: 0; }

/* ── proof heading (homepage, above the slider) ───────────────────────── */

.proof-head { padding: clamp(34px, 4.5vw, 56px) 0 24px; }

/* The slider is the only section whose content reaches its own edges, so
   it carries the gap to the divider below rather than relying on padding
   inside it. */
.slider-wrap { padding-bottom: clamp(34px, 4.5vw, 56px); }

/* ── article card ──────────────────────────────────────────────────────── */
/* Every card on both the homepage and the portfolio page shares this same
   size and shape — no "lead story" tier. .card--full (portfolio only) adds
   the highlights list; everything else is identical. */

.article { display: flex; flex-direction: column; }

/* Every card is its own contained surface — background, border, shadow —
   so it reads as a distinct item rather than bleeding into its neighbours
   on the sheet. A cool slate, rather than the page's own warm brown, so
   the cards read as objects sitting on the page instead of blending into it. */
.article.card {
  background: var(--card-bg-portfolio);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 34px -18px #00000099;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-deep);
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
.card-figure svg,
.card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-body { flex: 1 1 auto; padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 14px; }

/* The category label is always one line, truncated with an ellipsis
   rather than wrapped — a category long enough to wrap would push
   everything below it down and misalign the row against its neighbours.
   Headline and dek reserve a fixed two-line height instead (see below),
   since clipping a headline is worse than letting it wrap. */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article h3 {
  font-size: 1.35rem;
  line-height: 1.18em;
  min-height: 2.36em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dek {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.3em;
  min-height: 2.6em;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.byline {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.byline a { text-decoration: none; border-bottom: 1px dotted var(--ink-faint); }

.blurb { color: var(--ink-soft); font-size: 0.92rem; max-width: 60ch; }

.stat-strip { display: flex; gap: 22px; flex-wrap: wrap; margin: 2px 0 4px; }
.stat { min-width: 76px; }
.stat-value { display: block; font-size: 1.3rem; font-weight: 600; color: var(--ink); }
.stat-label { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 0.68rem;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-soft);
  background: var(--paper);
  white-space: nowrap;
}

ul.highlights { margin: 6px 0 0; padding-left: 1.1em; color: var(--ink-soft); font-size: 0.9rem; display: none; }
ul.highlights li { margin-bottom: 4px; }
.card--full ul.highlights { display: block; }

/* ── grid section ──────────────────────────────────────────────────────── */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 30px 0 14px;
  border-bottom: 2px solid var(--line-strong);
}
.section-head h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.section-head .count { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--ink-faint); }
.section-head .count a { color: var(--accent-text); text-decoration: none; }
.section-head .count a:hover { text-decoration: underline; }

/* The portfolio is split into bands (websites, then web tools). The dek
   sits between the rule and the cards, so the grid's own top padding
   would double up on it — trim it back where a dek is present. */
.section-dek {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 0.95rem;
}
.section-dek + .grid { padding-top: 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px 30px;
  padding: 26px 0 40px;
}

/* A whole card is one link when the entry has a public URL — opens in a
   new tab so someone can actually poke around the site while keeping the
   portfolio open. Un-linked entries (the confidential one) render inert.
   Grid rows stretch every item to the row's tallest by default, but that
   stretch only reaches .card-link's own (invisible) box — height:100%
   carries it through to the visible card, and flex:1 on .card-body
   absorbs the difference so shorter entries just get trailing space
   instead of a shorter card. */
.card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.card-link .article.card,
.grid > .article.card { height: 100%; }
.card-link:hover .card {
  border-top-color: var(--masthead);
  border-color: var(--masthead);
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -16px #000000b8;
}
.card-link:hover .card-figure svg,
.card-link:hover .card-figure img { transform: scale(1.045); }
.card-link:hover h3 { color: var(--masthead); }
.card-link h3 { transition: color 0.2s ease; }

.visit-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  background: rgb(var(--shade-rgb) / 0.85);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.card-link:hover .visit-hint { opacity: 1; transform: translateY(0); }

/* ── hero slider (homepage) ───────────────────────────────────────────── */
/* Big, wide, low-detail — the opposite of a portfolio card. Every slide
   is a link to portfolio.html, not the live site: this is a taster, not
   the place to read the tech stack. */

/* Inset to the same column as the body copy (it sits inside .wrap) and
   given a border and radius, so it reads as one framed object on the
   sheet rather than a band cutting the page in half. Shorter than it was,
   too: at this width the old full-bleed height was most of a screen. */
.hero-slider {
  position: relative;
  width: 100%;
  height: clamp(260px, 30vw, 430px);
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
}

.hero-slider-track { position: relative; width: 100%; height: 100%; }

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  text-decoration: none;
  color: inherit;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }

.hero-slide-figure { margin: 0; width: 100%; height: 100%; overflow: hidden; }
/* Zoomed to show ~94% of the image's width (scale = 1/0.94) — about a
   third of the earlier 85% crop's overflow, so the pan below has much
   less distance to cover and reads as a subtle drift, not a zoom.
   Anchored top-left at rest; while a slide is active, transform-origin
   animates from top-left to bottom-right over the same span the slider
   shows the slide for — scaling away from a moving anchor point is a
   cheap way to get a smooth pan without animating transform/translate
   by hand. */
.hero-slide-figure svg,
.hero-slide-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.0588);
  transform-origin: 0% 0%;
}
.hero-slide.is-active .hero-slide-figure svg,
.hero-slide.is-active .hero-slide-figure img {
  animation: hero-pan 5.5s ease-in-out forwards;
}
@keyframes hero-pan {
  from { transform-origin: 0% 0%; }
  to { transform-origin: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide-figure svg,
  .hero-slide-figure img { transform: none; }
  .hero-slide.is-active .hero-slide-figure svg,
  .hero-slide.is-active .hero-slide-figure img { animation: none; }
}

.hero-slide-scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 50px 32px 26px;
  background: linear-gradient(to top, rgb(var(--shade-rgb) / 0.95) 0%, rgb(var(--shade-rgb) / 0.7) 45%, transparent 100%);
}
.hero-slide-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 6px;
}
.hero-slide-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--ink);
  margin: 0 0 4px;
}
.hero-slide-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  margin: 0;
  max-width: 52ch;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgb(var(--ink-rgb) / 0.24);
  background: rgb(var(--shade-rgb) / 0.65);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hero-nav:hover { background: rgb(var(--shade-rgb) / 0.88); border-color: var(--masthead); }
.hero-nav--prev { left: 18px; }
.hero-nav--next { right: 18px; }

/* Pause/play and the dots, bottom right. The dots' 24px buttons touch, so
   the row sits a little further in from the corner than the old 8px dots. */
.hero-controls {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-dots { display: flex; }
.hero-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgb(var(--ink-rgb) / 0.24);
  background: rgb(var(--shade-rgb) / 0.65);
  color: var(--ink);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.hero-toggle:hover { border-color: var(--masthead); }
.hero-toggle .icon-play,
.hero-slider.is-paused .hero-toggle .icon-pause { display: none; }
.hero-slider.is-paused .hero-toggle .icon-play { display: inline-block; }
.hero-dot {
  /* An 8px dot drawn inside a 24px button, so each is a tappable target
     (WCAG 2.5.8) without the row looking any heavier. */
  width: 24px;
  height: 24px;
  border: none;
  padding: 0;
  background: radial-gradient(circle, rgb(var(--ink-rgb) / 0.33) 0 4px, transparent 4.5px);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero-dot:hover { background: radial-gradient(circle, rgb(var(--ink-rgb) / 0.63) 0 4px, transparent 4.5px); }
.hero-dot.is-active { background: radial-gradient(circle, var(--masthead) 0 5px, transparent 5.5px); }

@media (max-width: 640px) {
  /* Room under the tagline for the pause button and dots, which span
     most of a phone's width; and the arrows ride higher, clear of the
     eyebrow. */
  .hero-slide-scrim { padding: 34px 18px 52px; }
  .hero-nav { width: 34px; height: 34px; font-size: 1.2rem; top: 24%; }
  .hero-controls { right: 10px; bottom: 10px; }
}

/* ── explore (homepage, below the slider) ─────────────────────────────── */

.explore { padding: 34px 0 44px; }
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.explore-tile {
  display: block;
  padding: 22px 20px;
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.explore-tile:hover { border-color: var(--masthead); transform: translateY(-2px); }
.explore-tile h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.12rem; margin: 0 0 6px; }
.explore-tile p { color: var(--ink-soft); font-size: 0.88rem; margin: 0 0 14px; }
.explore-tile .explore-arrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--accent-text);
}

/* ── services band ────────────────────────────────────────────────────── */

/* Same treatment as the homepage sections: one continuous background,
   separated by a drawn rule rather than a change of colour. */
.services {
  color: var(--ink);
  padding: 40px 0 46px;
}
.services .wrap { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 40px; }
@media (max-width: 800px) { .services .wrap { grid-template-columns: 1fr; } }
.services h2 { color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.services p { color: var(--ink-soft); max-width: 42ch; }
.services-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.services-points li { border-top: 1px solid var(--rule); padding-top: 14px; }
.services-points strong { display: block; font-family: 'Fraunces', Georgia, serif; font-size: 1.08rem; margin-bottom: 4px; color: var(--ink); }
.services-points strong .icon { color: var(--masthead); margin-right: 9px; font-size: 0.85em; }
.services-points span { color: var(--ink-faint); font-size: 0.92rem; }
.cta {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 22px;
  background: var(--button);
  color: #fff;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta:hover { background: var(--button-hover); transform: translateY(-1px); }
.cta .icon { margin-left: 7px; font-size: 0.85em; transition: transform 0.15s ease; }
.cta:hover .icon { transform: translateX(3px); }

/* Secondary action next to a .cta — outlined, so the primary button is
   unambiguously the one to press. Must follow .cta: same specificity. */
.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgb(var(--ink-rgb) / 0.35);
}
.cta--ghost:hover { background: rgb(var(--ink-rgb) / 0.07); border-color: var(--ink); }

/* ── footer ────────────────────────────────────────────────────────────── */

footer {
  border-top: 3px solid var(--line-strong);
  padding: 26px 0 40px;
  margin-top: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
footer a { text-decoration: none; border-bottom: 1px dotted var(--ink-faint); }

/* ── simple pages (about/contact/404) ─────────────────────────────────── */

.page {
  padding: 46px 0 60px;
  max-width: 62ch;
}
.page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 18px; }
.page p { color: var(--ink-soft); }

/* A page with a portrait image on the left (about, contact) instead of
   plain running text. */
.page-split {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 44px;
  padding: 46px 0 60px;
  align-items: start;
  max-width: calc(300px + 44px + 62ch);
  margin: 0 auto;
}
@media (max-width: 700px) {
  .page-split { grid-template-columns: 1fr; gap: 28px; }
}

.page-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-deep);
  margin: 0;
}
.page-portrait img { width: 100%; height: 100%; object-fit: cover; }

.page-copy { max-width: 62ch; }
.page-copy h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 18px; }
.page-copy p { color: var(--ink-soft); }
.page-copy h2 { margin-top: 34px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.page-copy h2 .icon { color: var(--masthead); margin-right: 8px; }
.page-copy p .icon { color: var(--ink-faint); margin-right: 3px; }
.page-copy a .icon { margin-right: 4px; }

/* ── tech section (services page) ─────────────────────────────────────── */

.tech-section h2 .icon { color: var(--masthead); margin-right: 10px; }
.tech-section { max-width: 72ch; padding-top: 40px; }
.tech-group { margin-top: 28px; }
.tech-group h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.tech-group p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 14px; }
.chips--tech { gap: 8px; }
.chips--tech .chip { font-size: 0.8rem; padding: 6px 13px; }

/* ── mobile: less, not just smaller ───────────────────────────────────── */
/* The grid already collapses to one column below ~320px card width. On a
   phone a full card's worth of stats/chips/highlights is more than anyone
   reads standing up, so trim it rather than just shrinking type. */
@media (max-width: 640px) {
  ul.highlights { display: none !important; }
  .stat:nth-child(n+3) { display: none; }
  .chip:nth-child(n+4) { display: none; }
  .visit-hint { display: none; }
  .card-body { padding: 14px 16px 18px; gap: 10px; }
  .grid { gap: 22px; }
}
