/* NuPrint's site. Colours follow the SC03h itself: a white top over a pink base. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/fonts/space-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #fcf6f6;
  --sand: #fae6ec;
  --paper: #ffffff;
  --ink: #2a1a1f;
  --ink-hover: #4a2a35;
  --muted: #6e5259;
  --line: #f0d6dd;
  --dash: #ebcfd6;
  --link: #b4335a;
  --link-hover: #8a2443;
  --accent: #e0527a;
  --tint-1: #ffb3c6;
  --tint-2: #f06f92;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--tint-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--mono);
}

/* ---- nav */

/* Stays at the top while the page scrolls. The shadow carries its background to the window's edges. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  background: var(--cream);
  box-shadow: 0 0 0 100vmax var(--cream);
  clip-path: inset(0 -100vmax);
}

/* Links within a page land below the nav, not under it. */
html {
  scroll-padding-top: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 17px;
  font-weight: 600;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-links a:hover {
  background: var(--sand);
}

/*
 * On a phone the links keep to one row, so the sticky nav stays short. The moods
 * are a short scroll down the home page, so that link goes; on the narrowest
 * screens the row scrolls sideways.
 */
@media (max-width: 700px) {
  html {
    scroll-padding-top: 116px;
  }

  .nav {
    gap: 6px;
    padding: 10px 0 6px;
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 2px;
    width: 100%;
    margin: 0 -10px;
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 15px;
  }

  .nav-links a {
    flex: none;
    padding: 8px 10px;
  }

  .nav-links a[href="/#meet"] {
    display: none;
  }
}

@media (max-width: 380px) {
  .nav-links {
    font-size: 14px;
  }

  .nav-links a {
    padding: 8px 7px;
  }
}

/* ---- hero */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding: 8px 0 32px;
}

.hero-copy {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
}

h1 {
  margin: 0;
  font-size: clamp(44px, 6.2vw, 86px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 520px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--ink-hover);
  color: var(--cream);
}

.text-link {
  font-size: 17px;
  font-weight: 600;
}

.meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* the printer printing the receipt */

.hero-art {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/*
 * The art is 1.563 times as tall as it is wide (the receipt's room above the
 * printer, then the printer), so its width follows the window's height too: the
 * whole hero fits under the nav on a short laptop screen. Everything inside is
 * sized in cqw, so the receipt and its type scale with the printer.
 */
.stage {
  position: relative;
  width: clamp(280px, calc((100vh - 120px) / 1.563), 440px);
  width: clamp(280px, calc((100svh - 120px) / 1.563), 440px);
  max-width: 100%;
  container-type: inline-size;
}

.printer {
  position: relative;
  width: 100%;
  aspect-ratio: 624 / 720;
  margin-top: 40.9cqw;
}

.printer > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.printer .back {
  z-index: 1;
}

.printer .front {
  z-index: 3;
  pointer-events: none;
}

/* The receipt comes out of the slot: its bottom edge sits on the slot (y 471 of the 150–870 viewBox). */
.feed {
  position: absolute;
  left: 29.17%;
  width: 41.67%;
  bottom: 55.4%;
  height: 88.6cqw;
  overflow: hidden;
  z-index: 2;
}

.receipt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  filter: drop-shadow(0 6px 10px rgba(74, 20, 38, 0.12));
}

.receipt-body {
  background: var(--paper);
  padding: 1.09em 1.18em 2em;
  font-family: var(--mono);
  font-size: 2.5cqw;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.545em;
}

.receipt-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.364em;
  letter-spacing: 0.14em;
}

.receipt-sub {
  text-align: center;
  color: var(--muted);
}

.receipt-center {
  text-align: center;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 0.545em;
}

.receipt-total {
  font-weight: 700;
  font-size: 1.273em;
}

.rule {
  border-top: 1px dashed var(--ink);
}

.barcode {
  height: 2.727em;
  margin-top: 0.36em;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 8px,
    var(--ink) 8px 11px,
    transparent 11px 13px
  );
}

.receipt-heart {
  display: flex;
  justify-content: center;
  padding-top: 0.36em;
}

.receipt-heart svg {
  width: 2.36em;
  height: 2em;
}

.zig {
  height: 10px;
  background: linear-gradient(-45deg, var(--paper) 5px, transparent 0),
    linear-gradient(45deg, var(--paper) 5px, transparent 0);
  background-size: 10px 10px;
  background-repeat: repeat-x;
  background-position: left bottom;
}

.printer > .pop {
  inset: auto;
  height: auto;
  z-index: 4;
  opacity: 0;
}

.printer > .pop-1 {
  width: 11cqw;
  right: 6%;
  top: 18%;
}

.printer > .pop-2 {
  width: 6.5cqw;
  left: 8%;
  top: 26%;
}

.perforation {
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--dash) 0 10px, transparent 10px 18px);
}

@media (max-width: 700px) {
  .hero {
    gap: 8px;
  }
}

/* ---- sections */

.section {
  padding: 96px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 16px;
}

h2 {
  margin: 0;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-note {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 640px;
}

.lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lift:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: 0 14px 30px -14px rgba(74, 20, 38, 0.35);
}

/* meet the printer */

.moods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.mood,
.shot {
  background: var(--paper);
  border-radius: 28px;
  padding: 14px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mood-stage {
  height: 200px;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--tint-1) 0%, var(--tint-2) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  overflow: hidden;
}

.mood-stage svg {
  height: 160px;
  overflow: visible;
}

.mood h3,
.shot h3 {
  margin: 0;
  padding: 0 10px;
  font-size: 24px;
  font-weight: 800;
}

.mood p,
.shot p {
  margin: 0;
  padding: 0 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

/* meet the app: screenshots on the same pink stage as the moods */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
}

.shot-stage {
  border-radius: 20px;
  background: linear-gradient(160deg, var(--tint-1) 0%, var(--tint-2) 100%);
  padding: clamp(12px, 3vw, 28px);
}

.shot-stage img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 36px -18px rgba(74, 20, 38, 0.55);
}

.zz {
  font-family: var(--sans);
  font-weight: 800;
}

.zz-1 {
  font-size: 64px;
}

.zz-2 {
  font-size: 80px;
  animation-delay: 1s;
}

.zz-3 {
  font-size: 96px;
  animation-delay: 2s;
}

/* take a ticket */

.download {
  padding-bottom: 96px;
}

.tickets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.ticket {
  display: flex;
  min-height: 132px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.ticket:hover {
  color: var(--ink);
}

.ticket-stub {
  width: 18px;
  background: linear-gradient(180deg, var(--tint-1), var(--tint-2));
}

.ticket-main {
  flex-grow: 1;
  padding: 20px 20px 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border-right: 2px dashed var(--line);
}

.ticket-name {
  font-size: 22px;
  font-weight: 800;
}

.ticket-file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.ticket-icon {
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--link);
}

.printers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--sand);
  font-size: 16px;
  line-height: 1.5;
}

.tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
}

/* ---- footer */

.footer {
  padding: 28px 0 48px;
  border-top: 2px dashed var(--dash);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 15px;
  color: var(--muted);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-weight: 600;
}

/* ---- changelog */

.changelog {
  max-width: 760px;
  padding: 48px 0 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.release {
  background: var(--paper);
  border-radius: 20px;
  padding: 26px 28px 28px;
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.release h2 {
  font-size: 32px;
}

.release h2 a {
  color: var(--ink);
  text-decoration: none;
}

.release h2 a:hover {
  color: var(--link);
}

.release time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.release h3 {
  margin: 22px 0 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
}

.release ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  line-height: 1.5;
}

.release li a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.release-empty {
  margin: 14px 0 0;
  color: var(--muted);
}

/* ---- user guide: the changelog's cards, one per section of docs/user-guide.md, at full width */

.changelog.guide {
  max-width: none;
}

.guide-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-contents a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.guide-contents a:hover {
  color: var(--link);
}

.guide-part {
  background: var(--paper);
  border-radius: 20px;
  padding: 26px 28px 28px;
  font-size: 16px;
  line-height: 1.6;
}

.guide-part [id] {
  scroll-margin-top: 24px;
}

.guide-part h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.guide-part h3 {
  margin: 28px 0 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
}

.guide-part p,
.guide-part ul,
.guide-part ol,
.guide-part pre {
  margin: 0 0 14px;
}

.guide-part ul,
.guide-part ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-part code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--sand);
  border-radius: 6px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

.guide-part pre {
  background: var(--sand);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
}

.guide-part pre code {
  padding: 0;
  background: none;
  overflow-wrap: normal;
}

.guide-part table {
  display: block;
  overflow-x: auto;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 15px;
}

.guide-part th,
.guide-part td {
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.guide-part th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.guide-part img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto 4px;
  border-radius: 12px;
  box-shadow: 0 14px 30px -14px rgba(74, 20, 38, 0.35);
}

/* ---- 404 */

.lost {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 48px 0;
}

.lost svg {
  width: 200px;
  overflow: visible;
}

/* ---- motion: the printer's moods (see the design canvas) */

.a-breathe {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: np-breathe 3.2s ease-in-out infinite;
}

.a-snore {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: np-breathe 5s ease-in-out infinite;
}

.a-blink {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: np-blink 4.2s infinite;
}

.a-look {
  animation: np-look 3.6s ease-in-out infinite;
}

.a-feed {
  animation: np-feed 3.6s infinite;
}

.a-jitter {
  animation: np-jitter 0.16s linear infinite;
}

.a-hop {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: np-hop 2.4s cubic-bezier(0.3, 0.7, 0.4, 1) infinite;
}

.a-hopshadow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: np-hopshadow 2.4s cubic-bezier(0.3, 0.7, 0.4, 1) infinite;
}

.a-heart {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: np-heart 2.4s ease-out infinite;
}

.a-z {
  opacity: 0;
  animation: np-z 3s ease-out infinite;
}

.a-arc {
  animation: np-arc 1.5s ease-in-out infinite;
}

.d-1 {
  animation-delay: 0.2s;
}

.d-2 {
  animation-delay: 0.4s;
}

.a-receipt {
  animation: np-receipt 8s infinite;
}

.a-celebrate {
  animation: np-celebrate 8s infinite;
}

.a-pop {
  animation: np-pop 8s ease-out infinite;
}

.pop-2.a-pop {
  animation-delay: 0.25s;
}

@keyframes np-breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.025, 0.97); }
}

@keyframes np-blink {
  0%, 88%, 96%, 100% { transform: scaleY(1); }
  92% { transform: scaleY(0.08); }
}

@keyframes np-look {
  0%, 12%, 88%, 100% { transform: translateX(0); }
  22%, 42% { transform: translateX(-22px); }
  56%, 76% { transform: translateX(22px); }
}

@keyframes np-feed {
  0% { transform: translateY(250px); animation-timing-function: steps(10, end); }
  65% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

@keyframes np-jitter {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

@keyframes np-hop {
  0%, 62%, 100% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(0) scale(1.08, 0.88); }
  26% { transform: translateY(-90px) scale(0.95, 1.06); }
  42% { transform: translateY(0) scale(1.07, 0.9); }
  52% { transform: translateY(0) scale(0.98, 1.02); }
}

@keyframes np-hopshadow {
  0%, 62%, 100% { transform: scale(1); opacity: 1; }
  26% { transform: scale(0.62); opacity: 0.5; }
  42% { transform: scale(1.05); opacity: 1; }
}

@keyframes np-heart {
  0%, 18% { opacity: 0; transform: translateY(40px) scale(0.2); }
  32% { opacity: 1; transform: translateY(-30px) scale(1.15); }
  44% { transform: translateY(-50px) scale(1); }
  85%, 100% { opacity: 0; transform: translateY(-150px) scale(0.9); }
}

@keyframes np-z {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(60px, -150px) scale(1.25); }
}

@keyframes np-arc {
  0%, 100% { opacity: 0.18; }
  40% { opacity: 1; }
}

/* 18 steps out of the slot, a short hold, then it lifts away and the loop starts again */
@keyframes np-receipt {
  0% { transform: translateY(100%); opacity: 1; animation-timing-function: steps(18, end); }
  60% { transform: translateY(0); opacity: 1; }
  86% { transform: translateY(0); opacity: 1; animation-timing-function: ease-in; }
  94% { transform: translateY(-24px); opacity: 0; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes np-celebrate {
  0%, 60%, 72%, 100% { transform: translateY(0); }
  63% { transform: translateY(-16px); }
  66% { transform: translateY(0); }
  69% { transform: translateY(-6px); }
}

@keyframes np-pop {
  0%, 61% { opacity: 0; transform: translateY(20px) scale(0.3); }
  66% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  84% { opacity: 0; transform: translateY(-90px) scale(0.9); }
  100% { opacity: 0; }
}

/* Still poses: the full receipt, open eyes, no hearts. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .lift:hover {
    transform: none;
  }
}
