/* ============================================
   MARTEN.SOLUTIONS — Design Tokens & Base
   ============================================ */

:root {
  /* Palette */
  --bg: #0b0e11;
  --bg-raised: #11151a;
  --text: #e8e6e1;
  --text-muted: #8b8d93;
  --accent: #3fe0c5;
  --accent-dim: rgba(63, 224, 197, 0.16);
  --depth: #1b2a4a;
  --border: rgba(232, 230, 225, 0.1);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  /* Scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 7rem;
  --space-7: 11rem;

  --radius: 2px;
  --max-width: 1180px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 450;
  font-style: normal;
  font-variation-settings: "wght" 450, "WONK" 0.39, "opsz" 89, "SOFT" 39;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { color: var(--text-muted); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.accent { color: var(--accent); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================
   Site header / nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
}

/* Blur lives on a decorative layer, not on .site-header itself — backdrop-filter
   on an ancestor becomes the containing block for position:fixed descendants,
   which was trapping the mobile .site-nav overlay inside the header's own
   height instead of letting it cover the viewport. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 14, 17, 0.97);
  backdrop-filter: blur(6px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo img {
  height: 26px;
  width: auto;
  display: block;
}

.logo-text {
  white-space: nowrap;
}

.logo .dot { color: var(--accent); }

.site-nav {
  display: flex;
  gap: var(--space-4);
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
}

.site-nav a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 0;
    /* matches the real rendered header height (2×space-3 padding + 26px logo + 1px border) */
    top: calc(2 * var(--space-3) + 27px);
    background: var(--bg);
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-3);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  /* Even padding above and below the rule. No margin-top: every section
     already carries its own bottom padding, and the two were stacking
     into a 224px void above the footer. */
  padding: var(--space-4) 0;
}

.site-footer .mono { color: var(--accent); }

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  align-items: baseline;
}

.site-footer a:hover { color: var(--accent); }

/* ============================================
   Buttons / CTA
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  transition: background 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--accent);
  color: #06110f;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: transparent;
  color: var(--text);
}

/* ============================================
   Section spacing utility
   ============================================ */
.section {
  padding: var(--space-6) 0;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.eyebrow-home {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

/* ============================================
   Home page
   ============================================ */
.hero {
  padding-top: var(--space-7);
  padding-bottom: var(--space-5);
}

.hero h1 {
  max-width: 16ch;
  margin-bottom: var(--space-3);
}

.hero-sub {
  max-width: 46ch;
  font-size: 1.05rem;
  margin-bottom: var(--space-3);
}

/* The last one carries the larger gap down to the buttons */
.hero-sub:last-of-type { margin-bottom: var(--space-4); }

.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.anchors {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.anchors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.anchor {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--space-4);
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.anchor:hover {
  border-color: var(--accent);
}

.anchor::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(63, 224, 197, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.anchor:hover::before {
  opacity: 1;
}

.anchor:hover h3 {
  text-shadow: 0 0 18px rgba(63, 224, 197, 0.45);
  transition: text-shadow 0.3s ease;
}

.anchor .mono {
  display: block;
  font-size: 2.75rem;
  letter-spacing: 0;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.anchor h3 { margin: var(--space-1) 0 var(--space-1); }
.anchor p { max-width: 30ch; }

@media (max-width: 900px) {
  .anchor .mono { font-size: 2.2rem; }
}

@media (max-width: 720px) {
  .anchors-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

.teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

@media (max-width: 900px) {
  .teaser-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* The skyline sits in a half-width column now, so it no longer needs the
   vertical margin the placeholder box carries by default. */
.teaser-grid .img-placeholder { margin: 0; }

.teaser h2 { margin-bottom: var(--space-2); }
.teaser p { margin-bottom: var(--space-3); max-width: 50ch; }

/* ============================================
   About page
   ============================================ */
.about-hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-3);
}

.about-body { padding-top: 0; }

.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: var(--space-5);
  align-items: start;
}

.placeholder-portrait {
  aspect-ratio: 4/5;
  background: var(--bg-raised);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Real portrait dropped into the slot — same box, filled edge to edge.
   The source is square, so cover trims a little from each side. */
.placeholder-portrait--filled {
  border-style: solid;
  overflow: hidden;
}

.placeholder-portrait--filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   Generic image placeholders
   ============================================ */
.img-placeholder {
  background: var(--bg-raised);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  text-align: center;
  color: var(--text-muted);
  margin: var(--space-4) 0;
}

.img-placeholder .mono {
  max-width: 42ch;
  line-height: 1.6;
}

.img-placeholder--wide { aspect-ratio: 21/9; }
.img-placeholder--banner { aspect-ratio: 16/6; }
.img-placeholder--square { aspect-ratio: 1/1; max-width: 320px; }
.img-placeholder--card { aspect-ratio: 16/10; margin: var(--space-2) 0 0; }

@media (max-width: 720px) {
  .img-placeholder--wide,
  .img-placeholder--banner { aspect-ratio: 4/3; }
}

/* Real screenshot dropped into a placeholder slot — same box, filled edge to edge */
.img-placeholder--filled {
  padding: 0;
  border-style: solid;
  overflow: hidden;
}

.img-placeholder--filled img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.about-copy p {
  max-width: 58ch;
  margin-bottom: var(--space-3);
  font-size: 1.02rem;
}

.about-cta {
  margin-top: var(--space-2);
}

.about-facts-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.about-facts dl {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about-facts dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.about-facts dd {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 220px 1fr; }
  .about-facts { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .placeholder-portrait { max-width: 160px; }
}

/* ============================================
   Contact page
   ============================================ */
.contact-hero { padding-top: var(--space-6); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.contact-intro h1 { margin-bottom: var(--space-3); }
.contact-intro p { max-width: 42ch; margin-bottom: var(--space-3); }

.contact-email {
  color: var(--accent);
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  /* Dropped clear of the eyebrow it would otherwise top-align with, so the
     first field starts against the headline rather than the kicker above it. */
  margin-top: var(--space-5);
}

.hidden-field { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field input,
.field textarea {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.contact-form .btn {
  align-self: flex-start;
  border: 1px solid var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
  /* Stacked, so the form follows the copy directly and needs no offset */
  .contact-form { margin-top: 0; }
}

/* ============================================
   Services / Blog shared layout
   ============================================ */
.page-hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-4);
}

.page-hero h1 { margin-bottom: var(--space-2); }

/* A figure that belongs to the hero copy rather than to the next section —
   sits close under the prose, with the section break doing the separating. */
.hero-figure { margin: var(--space-4) 0 0; }
.page-hero p { font-size: 1.02rem; }
/* Consecutive prose paragraphs need a gap — the global reset zeroes margins. */
.page-hero p + p,
.work-hero p + p { margin-top: var(--space-3); }

/* Inline links in body copy must be distinguishable from the text around them.
   Scoped to <main> so nav/footer/logo links are untouched, and excluding the
   utility link classes that carry their own styling. */
main p a:not(.card-link):not(.btn):not(.contact-email),
.includes-list strong a,
.includes-list span a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.tag-row { margin: var(--space-2) 0 var(--space-4); }
.tag-row .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 0.15rem 0.5rem;
  margin: 0 0.3rem 0.3rem 0;
}

.work-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.lab-more-note { margin-top: var(--space-3); }

/* ============================================
   Dev sitemap
   ============================================ */
h2 + .sitemap-list { margin-top: var(--space-2); }
.sitemap-list { list-style: none; margin-bottom: var(--space-4); }

.sitemap-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.sitemap-list a { font-size: 1.05rem; }
.sitemap-list a:hover { color: var(--accent); }

.sitemap-list .path {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sitemap-list--pending li { color: var(--text-muted); }

/* Card grid — used on hub pages */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  transition: border-color 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(63, 224, 197, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.card:hover { border-color: var(--accent); }
.card:hover::before { opacity: 1; }
.card .eyebrow { font-size: 1.5rem; margin-bottom: var(--space-3); }
.card h3 { font-size: 1.1rem; }
.card p { font-size: 0.95rem; flex: 1; }
.card-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-link:hover { text-decoration: underline; }
.card .card-link { margin-top: var(--space-1); }

/* Service detail page */
.service-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
  margin-top: var(--space-3);
}

.service-hero-grid .img-placeholder { margin: 0; }

@media (max-width: 900px) {
  .service-hero-grid { grid-template-columns: 1fr; }
}

.service-intro {
  font-size: 1.02rem;
  margin-bottom: var(--space-4);
}

.service-intro:last-child { margin-bottom: 0; }

.service-includes {
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
}

.service-includes h2 { margin-bottom: var(--space-3); }

.includes-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-2);
}

.includes-list li {
  padding: var(--space-2) var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.includes-list li strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.includes-list li span {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Blog index */
.blog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.blog-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-3);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
}

.blog-item .blog-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.3rem;
}

.blog-item h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.blog-item h3 a { color: var(--text); }
.blog-item h3 a:hover { color: var(--accent); }
.blog-item p { font-size: 0.92rem; max-width: 58ch; }

/* Blog post page */
.post-header { padding-top: var(--space-6); padding-bottom: var(--space-3); }
.post-header .post-meta {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.post-body {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.75;
}
.post-body h2 {
  font-size: 1.5rem;
  margin: var(--space-4) 0 var(--space-2);
}
.post-body p { margin-bottom: var(--space-2); color: var(--text-muted); }
.post-body ul {
  list-style: disc;
  padding-left: var(--space-3);
  margin-bottom: var(--space-2);
  color: var(--text-muted);
}
.post-body li { margin-bottom: 0.4rem; }

/* Breadcrumb */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border); }

/* ============================================
   Screenshot carousel (lab-kwintel.html)
   Native scroll-snap track, so it still swipes
   and scrolls with JS off — the buttons, counter
   and progress bar are the progressive layer.
   ============================================ */
.carousel {
  margin-top: var(--space-4);
}

.carousel-viewport {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Scrollbar hidden — the progress bar below reports position instead */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-viewport::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  .carousel-viewport { scroll-behavior: auto; }
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* The framed screenshot itself */
.carousel-frame {
  /* 2:1 is the compromise across a mixed set — the tall app screens
     (~1.3:1) and the wide strips (~4:1) both letterbox by a similar
     amount, and the track height stays fixed as you move between them. */
  aspect-ratio: 2 / 1;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  width: 100%;
  display: block;
  cursor: zoom-in;
  /* Reset, since this is a <button> wrapping the image */
  font: inherit;
  color: inherit;
  transition: border-color 0.18s ease;
}

.carousel-frame:hover { border-color: var(--text-muted); }

.carousel-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-caption {
  margin-top: var(--space-2);
  /* Runs the full width of the frame above it — no measure cap, so the
     caption uses the space to the right rather than stacking up narrow. */
}

.carousel-caption strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.carousel-caption span {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Controls row: prev/next, progress, counter */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.carousel-btn {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.carousel-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-progress {
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  position: relative;
}

.carousel-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  width: 0;
  transition: width 0.24s ease;
}

.carousel-count {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Full-size view — screenshots are dense, the framed
   version is a preview rather than something readable */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 14, 17, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-3);
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border);
}

.lightbox-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-3);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  cursor: pointer;
}

.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .carousel-frame { aspect-ratio: 4 / 3; padding: var(--space-1); }
}

/* ============================================
   Hero jump link (lab-kwintel.html)
   Sits where the hero screenshot used to, and
   sends you to the carousel that replaced it.
   ============================================ */
.hero-jump {
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.hero-jump:hover { color: var(--accent); }

.hero-jump-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The chevron drifts down and back; the global reduced-motion rule
   flattens it along with every other animation on the site. */
.hero-jump-chevron {
  animation: hero-jump-bob 2.4s ease-in-out infinite;
}

@keyframes hero-jump-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ============================================
   Section that follows straight on from the one
   above it, rather than opening its own gap
   ============================================ */
.section--tight { padding-top: 0; }

/* "Related" and the closing CTA belong together at the foot of a page.
   As two plain .section blocks they were opening two 224px voids — one
   before Related and another between it and the button. */
.section--related {
  padding-top: var(--space-5);
  padding-bottom: var(--space-4);
}

.service-includes--tight { padding-bottom: var(--space-4); }

.kwintel-tour {
  padding-top: var(--space-5);
  padding-bottom: var(--space-4);
  /* Anchor target for the hero jump link — keeps the heading clear of the
     sticky header now that the section's own top padding is smaller. */
  scroll-margin-top: var(--space-4);
}

/* ============================================
   Capability index (lab-kwintel.html)
   Names only — the detail is deliberately not
   here. Numbering rhymes with the page eyebrow
   and the carousel counter rather than adding a
   decorative device of its own.
   ============================================ */
.capability-lede {
  /* Full width, matching the carousel captions below */
  margin-bottom: var(--space-4);
}

.capability-index {
  list-style: none;
  display: grid;
  /* 240px floor lands on four columns at full width, so eight items break
     as a clean 4x2 rather than an odd 5+3. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4) var(--space-3);
}

.capability-index li {
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
}

.capability-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.capability-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 450;
  font-variation-settings: "wght" 450, "WONK" 0.39, "opsz" 89, "SOFT" 39;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--text);
}

/* ============================================
   Prose utilities
   The global reset zeroes margins, so running
   copy needs its gaps declared. These replace
   the <br/><br/> pairs and inline style
   attributes that were doing that job by hand.
   ============================================ */
.prose p + p        { margin-top: var(--space-3); }
.prose p.link-row   { margin-top: var(--space-2); }
.prose h2           { margin-bottom: var(--space-3); }

.contact-intro p + p { margin-top: var(--space-3); }
.anchor p + p        { margin-top: var(--space-2); }

.section--related h2 { margin-bottom: var(--space-2); }

/* Bulleted list inside body copy */
.prose-list {
  list-style: disc;
  padding-left: var(--space-3);
  margin-bottom: var(--space-3);
  color: var(--text-muted);
  max-width: 42ch;
}

.prose-list li { margin-bottom: 0.4rem; }

/* Short explanatory line under a heading, or trailing a CTA */
.note { max-width: 62ch; margin-bottom: var(--space-2); }
.note--after-cta { margin: var(--space-3) 0 0; }

/* Image with a caption underneath */
.figure { margin: var(--space-4) 0 0; }
.figure .img-placeholder { margin: 0; }

.figure figcaption {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 62ch;
}

/* Closing "get in touch" block on a blog post */
.post-close {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.post-close p { margin-bottom: var(--space-2); }

/* ============================================
   Cookie consent banner
   Shown only until a choice is made; GA4 is not
   loaded at all before that (see js/analytics.js).
   ============================================ */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: var(--space-3);
  transform: translate(-50%, 12px);
  width: calc(100% - var(--space-4));
  max-width: 480px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  /* No entrance animation. A paused animation holds its first keyframe, so
     any transition here risks leaving a consent notice invisible; it simply
     appears instead, which is the right failure direction. */
}

.consent-banner p {
  margin-bottom: var(--space-2);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.consent-actions {
  display: flex;
  gap: var(--space-1);
}

.consent-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 0.7rem 1rem;
  background: transparent;
  cursor: pointer;
}

@media (max-width: 480px) {
  .consent-banner { bottom: var(--space-1); }
}

/* Statutory trading disclosure — supporting detail, so it sits under the
   copyright line rather than competing with it. */
.site-footer .footer-legal {
  /* .site-footer .mono sets accent at the same specificity, so this needs
     the descendant selector to win on source order. */
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  line-height: 1.5;
}
