/*
 * PalletLabs / Greenbar
 *
 * The motif is greenbar paper: the green-and-white banded continuous-feed
 * stock that mainframe reports printed on, which is where the product name
 * comes from. Alternating bands, tractor-feed perforations down both edges,
 * and data set in monospace as content rather than decoration.
 *
 * Palette and type are inherited from prototype/greenbar.html so the marketing
 * site and the product look like the same thing.
 */

:root {
  --bg: #eef3ef;
  --paper: #ffffff;
  --band: #dceedf;
  --band-edge: #cfe4d4;
  --ink: #15231a;
  --muted: #56685c;
  --rule: #c3d3c7;
  --rule-strong: #9fb6a5;

  --blue: #2447c9;
  --ok: #1f7446;
  --warn: #9a6300;
  --fail: #be2f1c;
  --str: #8a4b08;
  --num: #8e2a73;
  --key: #15231a;

  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --measure: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d1410;
    --paper: #121c16;
    --band: #1a2c20;
    --band-edge: #21372a;
    --ink: #dae7de;
    --muted: #8ea395;
    --rule: #2b3d32;
    --rule-strong: #3d5546;

    --blue: #93a9ff;
    --ok: #5ccb8c;
    --warn: #e3aa3e;
    --fail: #ff7b67;
    --str: #e6b67b;
    --num: #e58bcb;
    --key: #dae7de;
  }
}

:root[data-theme='dark'] {
  --bg: #0d1410;
  --paper: #121c16;
  --band: #1a2c20;
  --band-edge: #21372a;
  --ink: #dae7de;
  --muted: #8ea395;
  --rule: #2b3d32;
  --rule-strong: #3d5546;

  --blue: #93a9ff;
  --ok: #5ccb8c;
  --warn: #e3aa3e;
  --fail: #ff7b67;
  --str: #e6b67b;
  --num: #e58bcb;
  --key: #dae7de;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* --- Tractor-feed perforation strips ------------------------------------ */
/* The holes punched down both edges of continuous-feed paper. Decorative, so
   hidden from assistive tech and dropped entirely on narrow screens where
   there is no room to spare. */

.feed {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 26px;
  background: var(--paper);
  border-inline: 1px solid var(--rule);
  z-index: 5;
  pointer-events: none;
}
.feed::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 13px 12px, var(--bg) 4.5px, transparent 5px);
  background-size: 26px 26px;
  background-repeat: repeat-y;
  border-inline: 0;
}
.feed--left {
  left: 0;
}
.feed--right {
  right: 0;
}

@media (max-width: 860px) {
  .feed {
    display: none;
  }
}

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

@media (min-width: 861px) {
  body {
    padding-inline: 26px;
  }
}

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

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 2px solid var(--ink);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.wordmark strong {
  font-weight: 800;
  font-stretch: 112%;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.wordmark span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 550;
}

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

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

@media (max-width: 620px) {
  .masthead nav a:not(.nav-primary) {
    display: none;
  }
}

.nav-primary {
  color: var(--blue) !important;
}

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

.hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px);
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  padding: 5px 10px;
  margin-bottom: 26px;
}

.stamp b {
  color: var(--ok);
  font-weight: 600;
}

h1 {
  font-weight: 800;
  font-stretch: 122%;
  font-size: clamp(40px, 8.2vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 17ch;
}

h1 em {
  font-style: normal;
  font-stretch: 78%;
  font-weight: 500;
  color: var(--muted);
}

.lede {
  max-width: 54ch;
  margin: 0 0 32px;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--muted);
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
}

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

.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 2px;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--rule-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  box-shadow: 3px 3px 0 var(--rule);
}

/* --- The transformation: the product in one glance ---------------------- */

.transform {
  border: 1px solid var(--rule);
  background: var(--paper);
  margin-bottom: clamp(48px, 8vw, 96px);
}

.transform-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.transform-head .spacer {
  flex: 1;
}

.transform-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .transform-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .transform-grid > * + * {
    border-left: 1px solid var(--rule);
  }
}

.pane {
  padding: 0;
  min-width: 0;
}

.pane h3 {
  margin: 0;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--band);
  border-bottom: 1px solid var(--rule);
}

.pane pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 2;
}

/* Greenbar paper: alternate the background of every other data row. */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
}

.rows li {
  padding: 3px 16px;
  white-space: pre;
}

.rows li:nth-child(odd) {
  background: var(--band);
}

.seg {
  color: var(--ink);
  font-weight: 600;
}

.sep {
  color: var(--rule-strong);
}

.s {
  color: var(--str);
}
.d {
  color: var(--num);
}
.k {
  color: var(--key);
  font-weight: 600;
}
.b {
  color: var(--blue);
}

/* --- Sections ----------------------------------------------------------- */

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

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

.section-head .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 720px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.cell {
  background: var(--paper);
  padding: 22px;
}

.cell h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
}

.cell p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.cell .tag {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* --- Steps -------------------------------------------------------------- */

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0 20px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 3px;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
}

.steps p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.steps code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--band);
  padding: 1px 5px;
  border: 1px solid var(--rule);
}

/* --- Transaction set table --------------------------------------------- */

.sets {
  border: 1px solid var(--rule);
  background: var(--paper);
  overflow-x: auto;
}

.sets table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.sets th,
.sets td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.sets thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--band);
}

.sets tbody tr:nth-child(even) {
  background: var(--band);
}

.sets tbody tr:last-child td {
  border-bottom: 0;
}

.sets td:first-child {
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

.sets .when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.out-of-scope {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--warn);
  background: var(--paper);
  font-size: 15px;
  color: var(--muted);
  max-width: 78ch;
}

.out-of-scope strong {
  color: var(--ink);
  font-weight: 650;
}

/* --- Promises ----------------------------------------------------------- */

.promises {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 760px) {
  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.promises li {
  background: var(--paper);
  padding: 20px 22px;
}

.promises b {
  display: block;
  font-weight: 650;
  margin-bottom: 5px;
}

.promises span {
  color: var(--muted);
  font-size: 15px;
}

.promises .mark {
  font-family: var(--mono);
  color: var(--ok);
  font-weight: 600;
  margin-right: 7px;
}

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

.contact {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: clamp(24px, 4vw, 44px);
  display: grid;
  gap: 24px;
}

@media (min-width: 880px) {
  .contact {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }
}

.contact h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

.contact p {
  margin: 0;
  color: var(--muted);
  max-width: 50ch;
}

.contact-detail {
  font-family: var(--mono);
  font-size: 13px;
  border-top: 1px solid var(--rule);
}

.contact-detail div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

.contact-detail dt {
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10.5px;
  margin: 0;
}

.contact-detail dd {
  margin: 0;
  font-weight: 500;
}

.contact-detail a {
  color: var(--blue);
}

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

footer {
  border-top: 2px solid var(--ink);
  padding: 22px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

footer .spacer {
  flex: 1;
}

footer a {
  color: var(--muted);
}

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

/* --- Motion ------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 620ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .reveal:nth-child(1) {
    animation-delay: 40ms;
  }
  .reveal:nth-child(2) {
    animation-delay: 110ms;
  }
  .reveal:nth-child(3) {
    animation-delay: 180ms;
  }
  .reveal:nth-child(4) {
    animation-delay: 250ms;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
