/* mdmserialscanner.com. Plain and typographic: one accent colour, system
   font, generous space, hairlines in place of boxes. */

:root {
  --bg: #FCFCFD;
  --ink: #14131A;
  --ink-2: #55535F;
  --line: rgba(20, 19, 26, 0.12);
  --accent: #3D48F0;
  --soft: #F1F1F6;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101116;
    --ink: #F3F2F7;
    --ink-2: #A9A7B6;
    --line: rgba(243, 242, 247, 0.14);
    --accent: #8B94FF;
    --soft: #1A1B23;
  }
}
:root[data-theme="dark"] {
  --bg: #101116;
  --ink: #F3F2F7;
  --ink-2: #A9A7B6;
  --line: rgba(243, 242, 247, 0.14);
  --accent: #8B94FF;
  --soft: #1A1B23;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; text-decoration: none; }
.brand img { border-radius: 7px; }
nav { display: flex; gap: 6px 26px; flex-wrap: wrap; }
nav a { color: var(--ink-2); text-decoration: none; font-size: 16px; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
nav { align-items: center; }
nav a:last-child { padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; }
nav a:last-child:hover { color: var(--bg); opacity: 0.85; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Page widths */
main { margin: 0 auto; padding: 0 24px 96px; }
main.doc { max-width: 728px; padding-top: 32px; }
main.wide { max-width: 1080px; }

/* Type */
h1 { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.04; letter-spacing: -0.028em; font-weight: 700; margin: 0 0 20px; text-wrap: balance; }
main.doc h1 { font-size: clamp(34px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; letter-spacing: -0.018em; margin: 64px 0 14px; text-wrap: balance; }
h3 { font-size: 19px; line-height: 1.3; margin: 32px 0 6px; }
p, li, dd { color: var(--ink-2); }
p { margin: 0 0 16px; }
strong { color: var(--ink); font-weight: 600; }
ul, ol { padding-left: 1.25em; margin: 0 0 16px; }
li { margin: 8px 0; }
main.doc > p:first-of-type { font-size: 21px; line-height: 1.5; }

/* Home hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 48px;
  align-items: center;
  padding: 56px 0 72px;
}
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent); margin: 0 0 18px; }
.lede { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.5; max-width: 34em; }
.status { margin: 28px 0 0; font-size: 16px; }
.status strong { display: inline-block; padding: 9px 16px; margin-right: 10px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.hero-art { display: flex; justify-content: center; }

/* Sections on the home page */
.band { border-top: 1px solid var(--line); padding: 64px 0 8px; }
.band > h2 { margin-top: 0; }
.band > p { max-width: 40em; }

/* Motion. site.js adds the "motion" class, and only when the visitor
   hasn't asked for reduced motion. */
.motion .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
.motion .reveal.in { opacity: 1; transform: none; }
.motion .rise { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.motion .rise span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 55ms + 80ms);
}
@keyframes rise { to { transform: none; } }
.motion .lit span { opacity: 0.22; transition: opacity 0.35s ease; }
.motion .lit span.on { opacity: 1; }
.motion .hero-art .shot, .motion .steps .shot { will-change: transform; }

/* A scan line sweeps the first phone, like the app's own scanner. */
.hero-art .shot { position: relative; }
.motion .hero-art .shot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  width: min(250px, 80%);
  height: 3px;
  margin-left: calc(min(250px, 80%) / -2);
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #5CFFB0, transparent);
  box-shadow: 0 0 18px 2px rgba(92, 255, 176, 0.7);
  opacity: 0;
  animation: sweep 5.5s ease-in-out 1.4s infinite;
}
@keyframes sweep {
  0% { top: 6%; opacity: 0; }
  8% { opacity: 1; }
  38% { top: 92%; opacity: 1; }
  46%, 100% { top: 92%; opacity: 0; }
}

/* The maker's story */
.story p { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.55; color: var(--ink); }
.story .byline { font-size: 16px; color: var(--ink-2); margin-top: 20px; }
.closing { padding-bottom: 24px; }

/* App screens */
.shot { margin: 0; text-align: center; }
.shot img {
  display: block;
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  border: 5px solid #14131A;
  border-radius: 32px;
  box-shadow: 0 24px 48px -18px rgba(20, 19, 26, 0.35);
}
.hero-art .shot img { max-width: 290px; }
.hero-art .shot figcaption { display: none; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; margin: 32px 0 16px; }
.shots .shot { flex: 0 1 250px; }

/* Three steps */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.steps li { margin: 0; }
.steps .shot figcaption { display: none; }
.steps h3 { margin: 24px 0 6px; }
.steps p { font-size: 17px; margin: 0; }
.steps .num { color: var(--accent); margin-right: 6px; }

/* Plain two-column facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 28px 0 0; }
.facts div { border-top: 1px solid var(--line); padding: 20px 0 22px; }
.facts dt { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 17px; }

/* Questions */
.faq { margin-top: 20px; border-bottom: 1px solid var(--line); max-width: 728px; }
.faq details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 400; color: var(--ink-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 24px 0; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 600; font-size: 14px; }
td { color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 500; }

/* Comparison cells: yes, no and partly. */
td.yes, td.no, td.part { position: relative; padding-left: 30px; }
td.yes::before, td.no::before, td.part::before {
  position: absolute;
  left: 0;
  top: 15px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
td.yes { color: var(--ink); }
td.yes::before { content: "\2713"; background: #19C37D; color: #fff; }
td.no::before { content: "\2715"; background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); line-height: 18px; }
td.part::before { content: "\2013"; background: #F2B84B; color: #14131A; }
table.compare th:last-child, table.compare td:last-child { background: var(--soft); padding-right: 14px; }
table.compare td:last-child { padding-left: 42px; }
table.compare td:last-child::before { left: 12px; }
table.compare th:last-child { padding-left: 12px; border-radius: 12px 12px 0 0; color: var(--accent); }
table.compare { min-width: 640px; }

.more { font-weight: 600; margin-top: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 36px 24px 56px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 20px; font-size: 15px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.site-footer p { margin: 4px 0; font-size: 14px; color: var(--ink-2); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 32px 0 56px; gap: 40px; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .site-header { padding: 16px; }
  main { padding: 0 16px 72px; }
  main.doc { padding-top: 16px; }
  nav { gap: 6px 18px; }
  .band { padding-top: 48px; }
  h2 { margin-top: 48px; }
  .site-footer .inner { padding: 28px 16px 40px; }
  table.compare { min-width: 0; font-size: 14px; }
  table.compare th, table.compare td { padding-right: 8px; }
  table.compare td.yes, table.compare td.no, table.compare td.part { padding-left: 26px; }
  table.compare td:last-child { padding-left: 34px; }
  table.compare td:last-child::before { left: 8px; }
}
