/* ============================================================
   PLUME — clean / slick / modern
   4-column grid · 10px gutter · 24px side margins
   ============================================================ */

/* self-hosted SF Pro (variable, weight 1–1000) so every device gets the same
   typeface instead of only Apple users with the system font installed */
@font-face {
  font-family: "SF Pro";
  src: url("assets/fonts/SF-Pro.woff2") format("woff2");
  font-weight: 1 1000;
  font-stretch: 30% 150%;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #01ffc8;
  --green-ink: #0a0a0a;
  --black: #0a0a0a;
  --white: #ffffff;
  --paper: #f4f4f2;
  --line: #e2e2df;
  --line-dark: #262626;
  --muted: #6b6b6b;
  --muted-dark: #9a9a9a;
  --muted-dim: #b5b5b5;

  --gutter: 10px;
  --margin: 24px;
  --cols: 4;

  --font: "SF Pro", "SF Pro Display", "SF Pro Text", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  /* footer is black — make the overscroll/rubber-band area below it black too
     instead of flashing white (visible on mobile bounce and short pages) */
  background: var(--black);
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.15;
  /* SF Pro is variable with an optical-size axis — leave optical sizing on its
     default (auto) so each size renders its correct optical cut */
  font-optical-sizing: auto;
  overflow-x: hidden;
  /* sticky footer: keep the page at least full-height and push the footer to
     the bottom so short pages don't leave white space beneath it */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-footer {
  margin-top: auto;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

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

::selection {
  background: var(--black);
  color: var(--white);
}
::-moz-selection {
  background: var(--black);
  color: var(--white);
}

/* ---------- Grid system ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gutter);
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}

/* body is a flex column (sticky footer); without an explicit width its
   direct-child grids shrink to content instead of filling to the 1440 cap */
body > .grid { width: 100%; }

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

.display {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  font-size: clamp(44px, 8.5vw, 132px);
}

.h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(30px, 4.4vw, 62px);
}

.lead {
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.4;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.tag {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- Buttons (black / white, squared) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  border-radius: 0;
}
.btn:hover {
  background: var(--green);
  color: var(--black);
  border-color: var(--green);
}

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

.btn--white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn--white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

/* feather icon on buttons: green by default, flips to black when the
   whole button inverts to green on hover */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 14px;
  height: 14px;
}
.btn-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--green);
  transition: fill 0.18s ease;
}
.btn:hover .btn-icon svg { fill: var(--black); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
/* header uses its own flex layout, independent of the content grid's
   responsive --cols — otherwise brand + cta wrap to separate rows once
   --cols drops to 1 on narrow viewports */
.site-header .grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand img { height: 22px; width: auto; }
.brand span {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
/* header wordmark only: pin to the tighter Display optical cut */
.site-header .brand span { font-optical-sizing: none; }
.nav {
  flex: 1;
  display: flex;
  gap: 28px;
  justify-content: center;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--black); }
.header-cta {
  flex: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* Mobile hamburger trigger — hidden on desktop, shown <=900px in place of the CTA button */
.header-burger {
  display: none;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.header-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--black);
}
.header-burger span + span { margin-top: 5px; }

/* Full-screen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  padding: 0 24px 32px;
  background: var(--black);
  color: var(--white);
  border-radius: 0;
  /* clip/scroll content so a taller-than-viewport menu can't peek past the
     box edge when it's slid off-screen */
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  flex: none;
}
.mobile-menu-top .brand span { color: var(--white); }
.mobile-menu-top .brand img { filter: invert(1); }
.mobile-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.mobile-menu-links {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu-links a {
  padding: 16px 0;
  font-size: clamp(32px, 10vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}
.mobile-menu-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: none;
}
.mobile-menu-bottom .btn { width: 100%; justify-content: center; }
.mobile-menu-social {
  display: flex;
  gap: 20px;
}
.mobile-menu-social a {
  font-size: 13px;
  color: var(--muted-dark);
}
.mobile-menu-social a:hover { color: var(--white); }
.mobile-menu-copy {
  font-size: 12px;
  color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  padding-top: 16px;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 72px;
  padding-bottom: 32px;
}
.hero .display { grid-column: 1 / -1; }
.hero-lead {
  grid-column: 1 / 4;
  margin-top: 24px;
  max-width: 400px;
}
.nowrap { white-space: nowrap; }
.hero-robinhood-text { color: var(--black); }
.hero-robinhood-logo {
  display: inline-block;
  height: 0.85em;
  width: auto;
  vertical-align: middle;
  margin-left: 0.15em;
}
.ticker {
  display: inline-block;
  width: 4ch;              /* fixed — never resizes between tickers/scramble */
  box-sizing: content-box;
  text-align: center;
  padding: 2px 8px;
  background: var(--green);
  color: var(--green-ink);
  font-family: "SF Mono", ui-monospace, "Menlo", "Consolas", monospace;
  font-size: calc(1em - 2px);   /* 2px smaller than surrounding text */
  font-weight: 500;             /* medium */
  letter-spacing: 0;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
}
.hero-sub {
  grid-column: 1 / 4;
  margin-top: 24px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.link-min {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.link-min:hover {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-meta {
  grid-column: 4 / 5;
  margin-top: 28px;
  align-self: end;
  text-align: right;
}
.hero-meta .eyebrow { margin-bottom: 6px; }
/* keep each meta row on a single line above the tablet breakpoint */
.hero-meta p { white-space: nowrap; }

.hero-figure {
  margin-top: 40px;
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--paper);
  position: relative;
}
/* halftone dot texture revealed in a radius around the cursor — same effect
   as the CTA section. Two layers (white default, green over the figure) are
   cross-faded so the colour change is smooth. */
.hero-figure::before,
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: 8px 8px;
  opacity: 0;
  /* fixed-size gradient moved by mask-position (cheap to reposition) instead of
     re-defining the gradient centre each frame (which forces a full re-raster) */
  -webkit-mask-image: radial-gradient(circle 170px at center, black 0%, transparent 100%);
  mask-image: radial-gradient(circle 170px at center, black 0%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 340px 340px;
  mask-size: 340px 340px;
  -webkit-mask-position: calc(var(--mx, 50%) - 170px) calc(var(--my, 50%) - 170px);
  mask-position: calc(var(--mx, 50%) - 170px) calc(var(--my, 50%) - 170px);
  transition: opacity 0.35s ease;
  pointer-events: none;
  will-change: opacity;
}
.hero-figure::after  { background-image: radial-gradient(circle, var(--white) 1.4px, transparent 1.7px); }
.hero-figure::before { background-image: radial-gradient(circle, var(--green) 1.4px, transparent 1.7px); }
/* white by default; swap to green when the cursor is over the figure's zone */
.hero-figure:hover::after { opacity: 0.65; }
.hero-figure.is-green:hover::after  { opacity: 0; }
.hero-figure.is-green:hover::before { opacity: 0.65; }
.hero-figure picture { display: block; width: 100%; height: 100%; }
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-figure .figure-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: var(--green);
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
}
/* ---------- Marquee ---------- */
.marquee {
  display: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  margin-top: 40px;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 40px;
  animation: scroll 26s linear infinite;
}
.marquee-track span {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 40px;
}
.marquee-track .sep {
  width: 14px;
  height: 14px;
  background: var(--green);
  display: inline-block;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Section frame ---------- */
.section {
  padding-top: 96px;
  padding-bottom: 96px;
}
.section-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 40px;
}

/* ---------- Intro statement ---------- */
.intro .eyebrow { grid-column: 1 / 2; }
.intro .statement {
  grid-column: 2 / 5;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.intro .statement em {
  font-style: normal;
  background: var(--green);
  color: var(--green-ink);
  padding: 0 6px;
}

/* ---------- Work grid ---------- */
.work-item {
  grid-column: span 2;
  margin-bottom: 40px;
  cursor: pointer;
}
.work-item.tall { grid-column: span 2; }
.work-item .frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
}
.work-item .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.4s ease;
  filter: grayscale(100%);
}
.work-item:hover .frame img {
  transform: scale(1.04);
  filter: grayscale(0%);
}
.work-item .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  border-top: 1px solid var(--black);
  padding-top: 12px;
}
.work-item .meta h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding-right: 16px;
}
.work-item .meta .yr {
  flex: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.work-desc {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Services (dark band) ---------- */
.services {
  background: var(--black);
  color: var(--white);
}
.services .section-head {
  border-color: var(--line-dark);
}
.services .eyebrow { color: var(--muted-dark); }
.services .h2 { color: var(--white); }
.svc-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}
.svc {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
}
.svc-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #d7d7d7;
  overflow: hidden;
  margin-bottom: 20px;
}
.svc-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.svc-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: var(--black);
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.svc h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.svc p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted-dark);
}
.svc p .hl {
  color: var(--white);
}

/* ---------- Infrastructure ---------- */
.infra-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.infra-brand-logo {
  height: 16px;
  width: auto;
  position: relative;
  top: 0px;
}
.infra-media {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
}
.infra-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.infra-content {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding-left: 24px;
}
.infra-content .lead {
  max-width: 46ch;
}
.infra-label {
  margin-top: auto;
  padding-top: 40px;
  margin-bottom: 4px;
}
.infra-table {
  border-top: 1px solid var(--line);
}
.infra-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.infra-row span:first-child {
  color: var(--muted);
}
.infra-row span:last-child {
  color: var(--black);
  font-weight: 600;
  text-align: right;
}

/* ---------- FAQ ---------- */
.faq-list {
  grid-column: 1 / -1;
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
  transition: color 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--muted); }

.faq-icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.faq-icon::before { top: 7px; left: 0; width: 16px; height: 2px; }        /* horizontal */
.faq-icon::after  { left: 7px; top: 0; width: 2px; height: 16px; }        /* vertical */
.faq-item[open] .faq-icon::after { opacity: 0; transform: scaleY(0); }    /* becomes minus */

.faq-panel {
  display: block !important; /* override native UA rule hiding non-summary children; JS drives visibility via height */
  height: 0px;
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-panel > p {
  max-width: 62ch;
  margin: 0;
  padding-bottom: 28px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.faq-item[open] > .faq-panel > p {
  opacity: 1;
  transition: opacity 0.3s ease 0.1s; /* fades in after the reveal has started, masking the pop */
}
@media (prefers-reduced-motion: reduce) {
  .faq-panel, .faq-panel > p { transition: none; }
}

/* ---------- Big CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: var(--green-ink);
}
/* halftone dot texture, revealed only in a radius around the cursor */
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, var(--green-ink) 1px, transparent 1.2px);
  background-size: 8px 8px;
  opacity: 0;
  -webkit-mask-image: radial-gradient(circle 160px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
  mask-image: radial-gradient(circle 160px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.cta:hover::after { opacity: 0.35; }
/* the CTA button already sits on the green section background, so its
   hover should invert to white instead of the site-wide green */
.cta .btn:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.cta .btn:hover .btn-icon svg { fill: var(--black); }
.cta .inner {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}
.cta h2 {
  font-size: clamp(40px, 7vw, 108px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding-top: 72px;
  padding-bottom: 32px;
}
.footer-brand {
  grid-column: span 1;
}
.footer-logo-svg {
  display: block;
  height: 44px;
  width: auto;
}
.footer-logo-svg path { fill: var(--white); }
.footer-cols {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--white);
  padding: 6px 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line-dark);
  margin-top: 64px;
  padding-top: 24px;
  font-size: 12px;
  color: var(--muted-dark);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-disclaimer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

/* ---------- Docs ---------- */
.docs-grid {
  align-items: start;
}

/* mobile bar (docs nav toggle + search) — hidden on desktop */
.docs-mobilebar { display: none; }
.docs-mobilebar {
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 60px;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
}
.docs-mobilebar-menu {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.docs-mobilebar-menu span { display: block; width: 16px; height: 1.5px; background: var(--black); }
.docs-mobilebar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.docs-mobilebar-search svg { flex: none; width: 15px; height: 15px; }
.docs-mobilebar-search .label { flex: 1; text-align: left; }

/* backdrop behind the docs nav drawer */
.docs-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 390;
  background: rgba(10, 10, 10, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Left: cross-page navigation */
/* Outer wrapper: stretches to full row height and paints the full-bleed
   background. Kept separate from the sticky element below because a
   stretched sticky item doesn't stick in some engines. */
.docs-nav-wrap {
  grid-column: span 1;
  align-self: stretch;
  position: relative;
  background: #f8f8f8;
}
/* bleed the background to the viewport's left edge — sized with
   top:0/bottom:0 so it stays clipped to this element's own height
   (a box-shadow spread trick was tried here first, but spread grows
   the shadow on all four sides, not just horizontally, and bled down
   into the footer) */
.docs-nav-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: -2000px;
  background: #f8f8f8;
  /* paint order (not a negative z-index, which resolved unreliably once the
     body became a flex container): the ::before sits at the base of this
     element and the sticky .docs-nav below renders on top of it */
  z-index: 0;
}
.docs-nav {
  position: sticky;
  top: 96px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
}
/* Search trigger (sits where "Documentation" used to be) */
.docs-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.docs-search-trigger:hover { border-color: var(--black); color: var(--black); }
.docs-search-trigger svg { flex: none; width: 14px; height: 14px; }
.docs-search-trigger .label { flex: 1; text-align: left; }
.docs-search-kbd {
  flex: none;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

/* File-tree style groups */
.docs-nav-group {
  margin-bottom: 22px;
}
.docs-nav-group-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 4px;
}
.docs-nav-link {
  display: block;
  padding: 6px 10px;
  margin-left: -10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.docs-nav-link:hover { color: var(--black); }
.docs-nav-link.is-active {
  color: var(--black);
  background: #efefef;
  border-left-color: var(--green);
}

/* Full-screen search overlay */
.docs-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(10, 10, 10, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.docs-search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.docs-search-modal {
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px);
  transition: transform 0.15s ease;
}
.docs-search-overlay.is-open .docs-search-modal {
  transform: translateY(0);
}
.docs-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.docs-search-input-wrap svg { flex: none; width: 16px; height: 16px; color: var(--muted); }
#docsSearchInput {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--black);
}
.docs-search-esc {
  flex: none;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}
.docs-search-results {
  overflow-y: auto;
  padding: 8px;
}
.docs-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  cursor: pointer;
}
.docs-search-result.is-selected { background: var(--paper); }
.docs-search-result-group {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.docs-search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
}
.docs-search-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* Middle: content */
.docs-content {
  grid-column: span 2;
  padding: 64px 48px 96px;
  max-width: 720px;
}
.docs-content h1 {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.docs-content .lead {
  margin-bottom: 24px;
  max-width: 60ch;
}
.docs-content h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 64px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.docs-content h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 32px;
  margin-bottom: 10px;
  scroll-margin-top: 96px;
}
.docs-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: 16px;
}
.docs-content p strong { color: var(--black); font-weight: 600; }
.docs-content p em { font-style: normal; color: var(--black); font-weight: 600; }
.docs-content p a,
.docs-content dd a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.15s ease;
}
.docs-content p a:hover,
.docs-content dd a:hover { text-decoration-color: var(--black); }
.docs-content p .hl { color: var(--black); font-weight: 600; }

.docs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.docs-list--inline li {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
}

/* plain bulleted / numbered list inside docs prose */
.docs-content ul.docs-list-plain,
.docs-content ol.docs-list-plain {
  max-width: 68ch;
  margin: 12px 0 20px;
  padding-left: 22px;
}
.docs-content ul.docs-list-plain { list-style: disc; }
.docs-content ol.docs-list-plain { list-style: decimal; }
.docs-content .docs-list-plain li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 4px;
}
.docs-content .docs-list-plain li strong { color: var(--black); }
.docs-content .docs-list-plain a { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }

.docs-callout {
  border-left: 3px solid var(--green);
  background: var(--paper);
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 24px 0;
  max-width: 68ch;
}

.docs-table {
  width: 100%;
  max-width: 68ch;
  border-collapse: collapse;
  margin: 8px 0 32px;
  font-size: 14px;
}
.docs-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.docs-table td:first-child { color: var(--muted); }
.docs-table td:last-child { color: var(--black); font-weight: 600; text-align: right; }

/* code / formula block */
.docs-code {
  display: block;
  margin: 12px 0 24px;
  padding: 16px 20px;
  /* never exceed the content column (72ch on desktop, full width on mobile) */
  max-width: min(72ch, 100%);
  background: var(--paper);
  border-left: 3px solid var(--black);
  font-family: "SF Mono", ui-monospace, Menlo, "Consolas", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: var(--black);
  /* wrap long single-line embeds onto the next row instead of overflowing */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.docs-content code {
  font-family: "SF Mono", ui-monospace, Menlo, "Consolas", monospace;
  font-size: 0.88em;
  background: var(--paper);
  padding: 1px 5px;
  color: var(--black);
}

/* glossary definition list */
.docs-dl { max-width: 68ch; margin: 8px 0 24px; }
.docs-dl dt {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  margin-top: 22px;
}
.docs-dl dd {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* contract reference — stacked function blocks */
.docs-func {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  max-width: 72ch;
}
.docs-func:last-of-type { border-bottom: 1px solid var(--line); }
.docs-content code.docs-func-sig {
  display: block;
  font-family: "SF Mono", ui-monospace, Menlo, "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--black);
  background: var(--paper);
  padding: 10px 14px;
  word-break: break-word;
}
.docs-func-access {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 8px;
}
.docs-content .docs-func p { margin: 10px 0 0; font-size: 14px; }

/* reference tables (contract reference) */
.docs-table-scroll { overflow-x: auto; margin: 8px 0 32px; }
.docs-ref-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}
.docs-ref-table th {
  text-align: left;
  vertical-align: bottom;
  padding: 0 20px 10px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-dim);
  border-bottom: 1px solid var(--line);
}
.docs-ref-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 20px 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.5;
}
.docs-ref-table td:first-child {
  color: var(--black);
  font-weight: 500;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  white-space: nowrap;
}

/* Right: on this page + contact */
.docs-toc {
  grid-column: span 1;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}
.docs-toc .eyebrow { margin-bottom: 16px; color: var(--muted-dim); }
.docs-toc-link {
  display: block;
  padding: 6px 0 6px 12px;
  margin-left: -12px;
  font-size: 13px;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs-toc-link:hover { color: var(--black); }
.docs-toc-link.is-active {
  color: var(--black);
  border-left-color: var(--green);
}
.docs-toc-empty {
  font-size: 13px;
  color: var(--muted);
}

/* Prev / next page nav */
.docs-pagenav {
  display: flex;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.docs-pagenav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  flex: 1 1 0;
}
.docs-pagenav-next {
  justify-content: flex-end;
  text-align: right;
}
.docs-pagenav-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 2px;
}
.docs-pagenav-title {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
}
.docs-pagenav-next .docs-pagenav-title { background-position: 100% 100%; }
.docs-pagenav-link:hover .docs-pagenav-title { background-size: 100% 1px; }
.docs-pagenav-arrow {
  flex: none;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .svc-row { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}

@media (max-width: 900px) {
  :root { --cols: 2; }
  .nav { display: none; }
  .header-cta > a.btn { display: none; }
  .header-burger { display: flex; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head .eyebrow { order: -1; }
  .hero-lead, .hero-sub, .hero-meta { grid-column: 1 / 3; text-align: left; }
  .hero-meta { align-self: start; text-align: left; }
  .hero-meta p { white-space: normal; }
  .intro .eyebrow { grid-column: 1 / 3; margin-bottom: 16px; }
  .intro .statement { grid-column: 1 / 3; }
  .work-item, .work-item.tall { grid-column: 1 / -1; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 48px; }
  .footer-cols {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
  .docs-toc { display: none; }
  .docs-content { grid-column: 1 / -1; padding: 32px 0 80px; max-width: none; }

  /* docs nav becomes a slide-in drawer, opened from the mobile bar */
  .docs-mobilebar { display: flex; }
  .docs-nav-backdrop { display: block; }
  .docs-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .docs-nav-wrap {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 82%;
    max-width: 320px;
    z-index: 400;
    padding: 24px 24px 40px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
  }
  .docs-nav-wrap.is-open { transform: translateX(0); }
  .docs-nav-wrap::before { display: none; }
  .docs-nav { position: static; top: auto; padding: 0; }
  .docs-nav .docs-search-trigger { display: none; }
}

@media (max-width: 650px) {
  /* mobile hero: image moves above the disclaimer text, breaks out of the
     grid margins edge-to-edge, and shows at its natural (uncropped) ratio */
  .hero-figure {
    order: 1;
    aspect-ratio: auto;
    margin-left: calc(var(--margin) * -1);
    margin-right: calc(var(--margin) * -1);
  }
  .hero-figure img { height: auto; object-fit: initial; }
  .hero-figure .figure-tag { display: none; }
  .hero-meta { order: 2; margin-top: 24px; }
}

@media (max-width: 560px) {
  :root { --cols: 1; }
  .work-item, .work-item.tall { grid-column: 1 / -1; }
  .svc-row { grid-template-columns: 1fr; }
  .hero-lead, .hero-sub, .hero-meta { grid-column: 1 / 2; }
  .intro .eyebrow, .intro .statement { grid-column: 1 / 2; }
  .infra-media, .infra-content { grid-column: 1 / -1; padding-left: 0; }
}

/* ============================================================
   NEWSLETTER MODAL ("Coming soon")
   ============================================================ */
.nl-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 10, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nl-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nl-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 48px 40px 36px;
  box-shadow: 0 40px 120px rgba(10, 10, 10, 0.35);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.nl-overlay.is-open .nl-modal {
  transform: translateY(0) scale(1);
}

.nl-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--green);
}

.nl-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--black);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.15s ease;
}
.nl-close:hover { opacity: 0.55; }

.nl-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.nl-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--black);
  margin-bottom: 14px;
}

.nl-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 24px;
}

.nl-form {
  display: flex;
  gap: 10px;
}

.nl-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.nl-input::placeholder { color: var(--muted-dim); }
.nl-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.nl-submit {
  flex: none;
  height: 48px;
}

.nl-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted-dim);
}
.nl-note.is-error { color: #c0392b; }

.nl-done {
  text-align: center;
  padding: 8px 0;
}
.nl-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--green);
}
.nl-check svg {
  width: 30px;
  height: 30px;
  fill: var(--black);
}
.nl-done .nl-text { margin-bottom: 0; }

@media (max-width: 480px) {
  .nl-modal { padding: 44px 24px 28px; }
  .nl-title { font-size: 32px; }
  .nl-form { flex-direction: column; }
  /* stacked layout: don't let the vertical flex axis collapse the input's
     height — pin both controls to a fixed height and full width */
  .nl-input, .nl-submit { flex: none; width: 100%; height: 48px; }
}

/* ============================================================
   PRELOADER (first visit only)
   progress bar with the feather riding the leading edge,
   percentage tracking below
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ececec;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.preloader.is-done { opacity: 0; pointer-events: none; }
/* returning visitors: never render it (class set inline before first paint) */
.seen .preloader { display: none; }

.preloader-inner { width: min(280px, 68vw); }

.preloader-bar {
  position: relative;
  height: 2px;
  background: #cfcfcf;          /* unfilled track */
  --p: 0;
}
.preloader-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--p) * 1%);
  background: var(--black);
}
.preloader-feather {
  position: absolute;
  bottom: 0;                    /* quill tip sits on the line */
  left: calc(var(--p) * 1%);
  transform: translateX(-1px);
  line-height: 0;
}
.preloader-feather svg {
  display: block;
  height: 22px;
  width: auto;
}
.preloader-pct {
  position: absolute;
  top: calc(100% + 9px);
  left: calc(var(--p) * 1%);
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--black);
  font-optical-sizing: none;
  white-space: nowrap;
}
