:root {
  --green: #12352a;
  --green-light: #1d4a3b;
  --paper: #f6f1e3;
  --ink: #1f1e1a;
  --ink-soft: #5c5a50;
  --yellow: #f5c518;
  --red: #b92d1b;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, Consolas, monospace;
}

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

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--green);
  color: var(--paper);
  font-family: var(--display);
}

/* Layout */

.page {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 88px) 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: center;
  gap: clamp(40px, 7vw, 88px);
}

/* Intro */

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

h1 {
  margin-top: 24px;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.lede {
  margin-top: 28px;
  max-width: 28em;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
}

/* Receipt */

.receipt {
  position: relative;
  padding: 32px 24px 20px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  transform: rotate(1.5deg);
}

/* Torn bottom edge */
.receipt::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cpath d='M0 0h14v1L7 8 0 1z' fill='%23f6f1e3'/%3E%3C/svg%3E") repeat-x;
}

.receipt-head {
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--ink-soft);
  color: var(--ink-soft);
  text-align: center;
}

.receipt-name {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lines {
  padding: 16px 0;
  list-style: none;
  padding-left: 0;
}

.lines li,
.total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.lines li + li {
  margin-top: 8px;
}

.voided {
  color: var(--red);
}

.total {
  padding: 14px 0;
  border-top: 2px dashed var(--ink-soft);
  border-bottom: 2px dashed var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
}

.barcode {
  height: 48px;
  margin-top: 20px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 5px,
    var(--ink) 5px 9px,
    transparent 9px 11px,
    var(--ink) 11px 12px,
    transparent 12px 17px
  );
}

.thanks {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  text-align: center;
}

/* Parking lot */

.lot {
  position: relative;
  height: 96px;
  overflow: hidden;
  background: var(--green-light);
  border-top: 4px solid var(--paper);
  background-image: repeating-linear-gradient(
    105deg,
    transparent 0 110px,
    rgba(246, 241, 227, 0.35) 110px 116px
  );
}

.cart {
  position: absolute;
  left: 72%;
  bottom: 34px;
  width: 48px;
  height: 48px;
  color: var(--yellow);
  animation: roll-in 3.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.copyright {
  position: absolute;
  left: 24px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.beta-link {
  position: absolute;
  right: 24px;
  bottom: 4px;
  padding: 6px 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
}

@keyframes roll-in {
  from {
    left: -60px;
  }
  to {
    left: 72%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart {
    animation: none;
  }
}

@media (max-width: 760px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 40px;
    padding-bottom: 56px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .receipt {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }
}
