:root {
  --bg: #191b1b;
  --surface: #242525;
  --text: #f1efe9;
  --muted: #a5a5a0;
  --accent: #e6a34a;
  --line: #383a39;
  --max: 1120px;
  --sans: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

section[id],
#about {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.25rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 18ch;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lede {
  max-width: 38rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 40px 0 0;
}

.showcase {
  padding: 20px 0 0;
}

.stage {
  position: relative;
  height: 500px;
}

.window,
.phone {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}

.shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.window img,
.phone img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

.window-bakbeat {
  z-index: 1;
  top: 0;
  left: 0;
  width: calc(100% - 108px);
  height: 78%;
  border-radius: 10px;
}

.window-bakbeat img {
  object-position: left center;
}

.phone {
  z-index: 3;
  top: 0;
  right: 0;
  width: 196px;
  height: 82%;
  border-radius: 28px;
}

.phone img {
  object-position: top center;
}

.window-rescue {
  z-index: 2;
  left: 9%;
  bottom: 0;
  width: 44%;
  height: 36%;
  border-radius: 10px;
}

.window-rescue img {
  object-position: left top;
}

.card-meta,
.notes time,
.footer-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.band {
  padding: 96px 0;
}

.band-tight {
  padding-top: 24px;
}

.why {
  max-width: 40rem;
}

.why-copy {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 28px;
}

.why-copy p {
  margin: 0;
}

.why-close {
  margin: 2.25rem 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  align-items: stretch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.card-primary {
  padding: 32px 28px 28px;
  border-top: 2px solid var(--accent);
}

.card-primary h3 {
  font-size: 1.6rem;
}

.card-quiet {
  background: transparent;
  padding: 22px 18px 20px;
}

.card p,
.project-list p,
.footer-note {
  margin: 0;
  color: var(--muted);
}

.card-meta {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card .text-link,
.project-list .text-link {
  margin-top: auto;
}

.text-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  width: fit-content;
  padding-bottom: 2px;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

.project-list,
.notes {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}

.project-list li,
.notes li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.project-list .text-link {
  flex: 0 0 auto;
  margin-top: 1.55rem;
}

.project-list .card-meta + h3 {
  margin-top: 6px;
}

.project-list li:last-child,
.notes li:last-child {
  border-bottom: 1px solid var(--line);
}

.project-list h3 {
  margin-bottom: 6px;
}

.solutions {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notes li {
  justify-content: flex-start;
  gap: 12px 28px;
}

.notes time {
  color: var(--muted);
  flex: 0 0 7.5rem;
}

.notes a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.notes a:hover,
.notes a:focus-visible {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.logo-footer {
  display: block;
  margin-bottom: 8px;
}

.tagline {
  margin: 0 0 16px;
  color: var(--text);
}

.footer-note {
  max-width: 32rem;
}

.footer-label {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-grid > nav,
.footer-grid > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
}

@media (max-width: 980px) {
  .cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .project-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .stage {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .window,
  .phone {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
  }

  .window .shot {
    height: auto;
  }

  .window img {
    height: auto;
    object-fit: contain;
  }

  .phone {
    width: min(240px, 70%);
    height: 460px;
    align-self: center;
  }

  .phone .shot {
    height: 100%;
  }

  .phone img {
    height: 100%;
    object-fit: cover;
  }
}

@media (max-width: 640px) {
  .wrap,
  .site-header-inner {
    width: min(var(--max), calc(100% - 32px));
  }

  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
    gap: 12px;
  }

  .hero {
    padding-top: 28px;
  }

  .band {
    padding: 64px 0;
  }
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 20px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(25, 27, 27, 0.94);
}

.lightbox-frame {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.lightbox-bar {
  width: min(1120px, 100%);
  display: flex;
  align-items: baseline;
  gap: 16px;
}

#lightbox-caption {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.lightbox-count {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 12px;
  cursor: pointer;
}

.lightbox-close {
  margin-left: auto;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lightbox-stage {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.lightbox-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  margin: 0 auto;
  object-fit: contain;
  background: #111;
}

.lightbox-nav[hidden] {
  visibility: hidden;
}

@media (max-width: 640px) {
  .lightbox-bar {
    flex-wrap: wrap;
  }

  .lightbox-stage {
    grid-template-columns: 1fr 1fr;
  }

  .lightbox-image {
    grid-column: 1 / -1;
    grid-row: 1;
    max-height: calc(100vh - 180px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox-image {
    transition: none;
  }
}

.study-feature {
  margin-top: 36px;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.study-feature h3,
.study-index h2,
.study-index h3 {
  max-width: none;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
}

.study-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.study-index > li {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.study-index article {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.study-index h2 a,
.study-index h3 a {
  color: inherit;
  text-decoration: none;
}

.study-index h2 a:hover,
.study-index h2 a:focus-visible,
.study-index h3 a:hover,
.study-index h3 a:focus-visible {
  color: var(--accent);
}

.article {
  padding-bottom: 32px;
}

.article h1 {
  max-width: 14ch;
}

.lede a {
  color: var(--text);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 28px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crumb {
  margin: 0 0 18px;
}

.crumb a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.crumb a:hover,
.crumb a:focus-visible {
  color: var(--accent);
}

.article-body {
  max-width: 40rem;
  padding-top: 12px;
}

.article-body h2 {
  max-width: 18em;
  margin-top: 3.25rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.article-body h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

.article-body p,
.article-body li {
  overflow-wrap: anywhere;
}

.article-body p {
  margin: 1rem 0 0;
}

.article-body a {
  color: var(--text);
  text-underline-offset: 3px;
}

.article-body a:hover,
.article-body a:focus-visible {
  color: var(--accent);
}

.article-body code {
  font-family: var(--mono);
  font-size: 0.84em;
  overflow-wrap: anywhere;
}

.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.checks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.checks li {
  position: relative;
  padding: 12px 0 12px 16px;
  border-top: 1px solid var(--line);
}

.checks li:last-child {
  border-bottom: 1px solid var(--line);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 7px;
  height: 1px;
  background: var(--accent);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  padding-top: 0.2rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.callout {
  margin: 1.75rem 0 0;
  padding: 16px 18px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.75rem;
}

.callout-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diagram {
  width: 100%;
  margin: 48px 0 8px;
}

.diagram figcaption {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.diagram-flow {
  list-style: none;
  margin: 0;
  padding: 0;
}

.diagram-flow li {
  position: relative;
  padding-bottom: 22px;
}

.diagram-flow li:last-child {
  padding-bottom: 0;
}

.diagram-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 4px;
  width: 1px;
  height: 14px;
  background: var(--accent);
}

.diagram-node {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}

.diagram-kicker,
.diagram-detail {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.diagram-kicker {
  margin-bottom: 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diagram-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.diagram-detail {
  margin-top: 4px;
}

.diagram-ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.diagram-ops > li {
  min-width: 0;
}

.diagram-ops .diagram-node {
  height: 100%;
  padding: 10px 12px;
}

.diagram-ops .diagram-name {
  font-size: 1rem;
}

.diagram-join {
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-align: center;
}

.diagram-join::before {
  content: "";
  display: block;
  width: 1px;
  height: 16px;
  margin: 0 auto 8px;
  background: var(--accent);
}

.diagram-layers {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.diagram-layers > li {
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.diagram-layers > li + li {
  margin-top: 10px;
}

.diagram-node.is-derived,
.diagram-node.is-separate {
  border-left-color: var(--muted);
}

.diagram-migrate {
  margin-top: 14px;
}

.diagram-oneway {
  margin: 0;
  padding: 12px 0 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-align: center;
}

.diagram-up {
  display: block;
  position: relative;
  width: 0;
  height: 22px;
  margin: 10px auto 8px;
  border-left: 1px dashed var(--accent);
}

.diagram-up::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid var(--accent);
}

.diagram-aside {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.diagram-aside .diagram-node {
  border-left-style: dashed;
  border-left-color: var(--muted);
}

@media (max-width: 640px) {
  .article h1 {
    max-width: none;
  }

  .diagram {
    margin-top: 36px;
  }
}

@media (max-width: 360px) {
  .diagram-ops {
    grid-template-columns: 1fr;
  }
}

.capability-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.capability-list li {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.capability-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.capability-list h3 {
  margin-bottom: 8px;
}

.capability-list p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.contact-block {
  margin: 28px 0 16px;
}

.project-list + .contact-block {
  margin-top: 8px;
}

.origin-legend {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 44rem;
}

.origin-legend li {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 12px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.origin-legend li:last-child {
  border-bottom: 1px solid var(--line);
}

.origin-tag {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.item-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 4px;
}

.study-brief {
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  max-width: 40rem;
}

.study-brief dt {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.study-brief dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.study-brief ul {
  margin: 4px 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.tech-list li {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 28px;
}

.product-visual {
  padding: 36px 0 8px;
}

.product-banner {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #161022;
}

.product-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.product-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.product-shots figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #161022;
}

.product-shots .shot {
  height: auto;
}

.product-shots img {
  display: block;
  width: 100%;
  height: auto;
}

.band .lede + .cta-row {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .origin-legend li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-list .text-link {
    margin-top: 0;
  }

  .product-shots {
    grid-template-columns: 1fr;
  }
}
