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

:root {
  --cobalt: #2344E0;
  --deep: #1B2A8C;
  --paper: #F6F1E6;
  --paper-edge: #E7DFCB;
  --red: #E8412C;
  --white: #FFFFFF;
  --sans: "Bricolage", "Segoe UI", system-ui, -apple-system, sans-serif;
  --dot: "Dot", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--deep);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ---------- Hero (cobalt) ---------- */
.hero { background: var(--cobalt); color: var(--paper); overflow: hidden; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px var(--paper); }
.bar nav { display: flex; gap: 22px; font-weight: 500; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: start;
  padding: 64px 0 72px;
}
h1 {
  margin: 0 0 28px;
  font-size: clamp(3.1rem, 7.4vw, 6.4rem);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.lead { margin: 0 0 32px; font-size: 1.25rem; line-height: 1.55; max-width: 34em; }

/* ---------- Signup ---------- */
.join { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.join[hidden], .note[hidden] { display: none; }
.join input {
  flex: 1 1 220px; min-width: 0;
  padding: 15px 16px;
  font: inherit; font-size: 1.0625rem;
  color: var(--deep); background: var(--paper);
  border: 2px solid var(--paper); border-radius: 10px;
}
.join input::placeholder { color: #6a6f9a; }
.join input:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
.join[data-from="hero"] input[type="email"] { flex-basis: 100%; }
.join .store { flex: 1 1 200px; }
.join button {
  flex: 0 0 auto;
  padding: 15px 22px;
  font: inherit; font-size: 1.0625rem; font-weight: 700;
  color: var(--paper); background: var(--deep);
  border: 2px solid var(--paper); border-radius: 10px;
  cursor: pointer;
}
.join button:hover { background: #142070; }
.join button:disabled { opacity: 0.7; cursor: progress; }
.msg { margin: 12px 0 0; min-height: 1.6em; font-weight: 600; }
.msg:empty { display: none; }
.msg[data-kind="ok"] {
  display: inline-block;
  padding: 12px 16px;
  font-family: var(--dot); font-weight: 400; font-size: 1rem;
  color: var(--deep); background: var(--paper);
  border-radius: 4px;
}
.note { margin: 12px 0 0; font-size: 0.95rem; opacity: 0.85; }

/* ---------- The till receipt ---------- */
.till { width: min(100%, 360px); justify-self: center; margin-top: 8px; }
.slot {
  position: relative; z-index: 2;
  height: 18px; border-radius: 9px;
  background: var(--deep);
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.28);
}
.paper-window { overflow: hidden; margin: -9px 16px 0; padding: 0 0 22px; }
.receipt {
  position: relative;
  padding: 30px 22px 18px;
  background: var(--paper);
  color: var(--deep);
  font-family: var(--dot);
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 16px 28px rgba(9, 18, 80, 0.35);
  animation: print 2.4s steps(36, end) 0.35s both;
}
.receipt::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 100%;
  height: 8px;
  background: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0) 0 0 / 16px 8px repeat-x;
}
.receipt p { margin: 0; }
.receipt hr { margin: 12px 0; border: 0; border-top: 2px dashed currentColor; opacity: 0.55; }
.r-c { text-align: center; }
.r-big { font-size: 1.7em; letter-spacing: 0.12em; line-height: 1.2; margin-bottom: 4px !important; }
.r-problem {
  margin-top: 4px !important;
  text-decoration: underline wavy var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.r-row { display: flex; justify-content: space-between; gap: 12px; }
.r-right { text-align: right; }
.tick { color: var(--cobalt); }
.barcode {
  height: 40px; margin: 12px 10px 2px;
  background: repeating-linear-gradient(90deg,
    var(--deep) 0 2px, transparent 2px 5px, var(--deep) 5px 6px, transparent 6px 8px,
    var(--deep) 8px 11px, transparent 11px 13px, var(--deep) 13px 14px, transparent 14px 18px);
}
.receipt.wait { animation: none; transform: translateY(-100%); }
@keyframes print {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ---------- Paper sections ---------- */
main section { padding-top: 88px; }
h2 { margin: 0 0 28px; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; color: var(--cobalt); }
h3 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px dashed var(--deep); padding-top: 18px; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 10px;
  font-size: 3.2rem; line-height: 1; font-weight: 800; color: var(--cobalt);
}
.steps p { margin: 0; max-width: 32em; }

.price { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.price-main h2 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 12px; }
.price-main p { margin: 0; max-width: 26em; }
.price-needs ul { margin: 0; padding-left: 1.1em; }
.price-needs li { margin-bottom: 8px; max-width: 36em; }

.faq details { border-top: 2px dashed var(--paper-edge); padding: 16px 0; max-width: 760px; }
.faq details:last-of-type { border-bottom: 2px dashed var(--paper-edge); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; }
.faq details p { margin: 10px 0 0; max-width: 40em; }

.last .join input { background: var(--white); border-color: var(--deep); }
.last .join input:focus-visible { outline-color: var(--cobalt); }
.last .join button { background: var(--cobalt); color: var(--white); border-color: var(--cobalt); }
.last .join button:hover { background: var(--deep); border-color: var(--deep); }
.last .msg[data-kind="ok"] { background: var(--white); border: 2px dashed var(--deep); }
.msg[data-kind="err"] { color: inherit; }
.last .msg[data-kind="err"] { color: #b3261e; }

.foot { margin-top: 96px; padding-top: 24px; padding-bottom: 40px; border-top: 2px dashed var(--paper-edge); font-size: 0.9rem; }
.foot p { margin: 0 0 8px; max-width: 60em; }
.foot a { margin-right: 18px; }

/* Plain pages (privacy, thanks, 404) */
.plain { padding-top: 56px; padding-bottom: 40px; max-width: 760px; }
.plain h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--cobalt); margin-bottom: 20px; }
.plain h2 { font-size: 1.4rem; margin: 32px 0 8px; letter-spacing: -0.01em; }
.plain p, .plain li { max-width: 38em; }
.plainbar { background: var(--cobalt); color: var(--paper); }
.plainbar .bar { padding-bottom: 22px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding: 44px 0 56px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .price { grid-template-columns: 1fr; gap: 24px; }
  main section { padding-top: 64px; }
}
@media (max-width: 480px) {
  .bar nav a[href="#how"] { display: none; }
  .join button { flex: 1 1 100%; }
  .lead { font-size: 1.125rem; }
  .receipt { font-size: 14px; padding: 26px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .receipt { animation: none; }
}
