/*!
 * landing.css — layout for the /qr-code-styles landing page.
 *
 * Every selector is prefixed `ls-` and every rule is scoped under `.ls-page`.
 * css/style.css is a shared, minified, append-only stylesheet that several
 * pages and four colour schemes depend on; a landing page that needs one
 * unusual grid must not be a reason to edit it. Nothing here overrides a
 * site-wide class.
 *
 * Colours come from the scheme tokens (`:root,[data-scheme=harbor]` in
 * style.css) with the older base tokens as fallbacks, so the page survives
 * both the harbor/tide/ember/noir schemes and the light/dark/sunset/ocean
 * themes without a second palette to keep in sync.
 *
 * The one exception is `.ls-qr` — the tiles that hold real QR codes. Those
 * stay white with a dark code in every scheme on purpose: a QR code is read by
 * a camera measuring contrast, so "match the page in dark mode" would mean
 * shipping a picture of a code that does not scan.
 */

.ls-page {
  --ls-ink: var(--ink, var(--text, #37352F));
  --ls-soft: var(--slate, var(--text-light, #787774));
  --ls-line: var(--hairline, var(--border, #E9E9E7));
  --ls-card: var(--surface, #FFFFFF);
  --ls-brand: var(--brand-1, var(--primary, #2383E2));
  --ls-r: var(--radius-lg, 10px);
  --ls-shadow: var(--elev, var(--shadow, 0 1px 3px rgba(15, 15, 15, .06)));
  color: var(--ls-ink);
}

.ls-wrap {
  max-width: var(--container, 1180px);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ls-section {
  padding: 4rem 0;
  border-top: 1px solid var(--ls-line);
}

.ls-section:first-of-type { border-top: 0; }

.ls-section h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 .6rem;
  letter-spacing: -.015em;
}

.ls-lede {
  max-width: 64ch;
  color: var(--ls-soft);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 2rem;
}

/* ---- hero --------------------------------------------------------------- */

.ls-hero {
  padding: 3.5rem 0 4rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}

.ls-hero h1 {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0 0 1rem;
}

.ls-hero p {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ls-soft);
  margin: 0 0 1.1rem;
  max-width: 52ch;
}

.ls-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ls-brand);
  margin: 0 0 1rem;
}

.ls-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.ls-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: var(--radius, 6px);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--transition, .15s ease), box-shadow var(--transition, .15s ease);
}

.ls-btn-primary {
  background: var(--ls-brand);
  color: #FFFFFF;
  box-shadow: var(--brand-shadow, var(--shadow-md, 0 4px 12px rgba(15, 15, 15, .08)));
}

.ls-btn-primary:hover { transform: translateY(-1px); }

.ls-btn-ghost {
  border-color: var(--ls-line);
  color: var(--ls-ink);
  background: var(--ls-card);
}

.ls-btn-ghost:hover { border-color: var(--ls-brand); }

.ls-hero-note {
  font-size: .88rem;
  color: var(--ls-soft);
  margin-top: 1.1rem;
  line-height: 1.6;
}

/* ---- QR tiles ----------------------------------------------------------- */

/* Deliberately not theme-aware: see the file header. */
.ls-qr {
  background: #FFFFFF;
  border: 1px solid var(--ls-line);
  border-radius: var(--ls-r);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--ls-shadow);
}

.ls-qr img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 220px;
  margin: 0 auto;
  /* The API renders its own quiet zone; nothing may crop it. */
  border-radius: 2px;
}

.ls-qr figcaption {
  margin-top: .7rem;
  font-size: .82rem;
  line-height: 1.45;
  color: #5A5A56;
}

.ls-qr figcaption strong {
  display: block;
  color: #1F1F1D;
  font-size: .92rem;
  margin-bottom: .15rem;
}

.ls-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* The claim that these two codes are real is only worth making next to them. */
.ls-proof {
  grid-column: 1 / -1;
  margin: .25rem 0 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ls-soft);
}

/* ---- generic card grids -------------------------------------------------- */

.ls-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ls-grid-6 { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }

.ls-card {
  background: var(--ls-card);
  border: 1px solid var(--ls-line);
  border-radius: var(--ls-r);
  padding: 1.35rem;
}

.ls-card h3 {
  font-size: 1.02rem;
  margin: 0 0 .5rem;
  line-height: 1.35;
}

.ls-card p {
  margin: 0;
  font-size: .93rem;
  line-height: 1.65;
  color: var(--ls-soft);
}

.ls-card p + p { margin-top: .6rem; }

.ls-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ls-brand) 12%, transparent);
  color: var(--ls-brand);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .8rem;
}

/* ---- tables -------------------------------------------------------------- */

/* Wide tables scroll inside their own box; the page body never scrolls sideways. */
.ls-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--ls-line);
  border-radius: var(--ls-r);
  background: var(--ls-card);
}

.ls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  min-width: 560px;
}

.ls-table th,
.ls-table td {
  text-align: left;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--ls-line);
  vertical-align: top;
  line-height: 1.55;
}

.ls-table thead th {
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ls-soft);
  font-weight: 600;
}

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

.ls-table td:first-child { font-weight: 600; }

.ls-free {
  display: inline-block;
  padding: .12rem .5rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: color-mix(in srgb, var(--success, #0F7B6C) 14%, transparent);
  color: var(--success, #0F7B6C);
  white-space: nowrap;
}

/* ---- measured-results list ---------------------------------------------- */

.ls-measure {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .93rem;
}

.ls-measure li {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .7rem 0;
  border-bottom: 1px dashed var(--ls-line);
  line-height: 1.6;
}

.ls-measure li:last-child { border-bottom: 0; }

.ls-measure b {
  flex: 0 0 11rem;
  font-weight: 600;
}

.ls-measure span { color: var(--ls-soft); }

/* ---- code block ---------------------------------------------------------- */

/* Fixed dark palette, not scheme tokens. Borrowing --paper-deep here shipped
   pale grey text on a pale background under the default scheme: a terminal
   block only reads as one if both halves of the contrast are pinned. */
.ls-code {
  background: #16161A;
  color: #E8E8EC;
  border-radius: var(--ls-r);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-size: .87rem;
  line-height: 1.7;
  margin: 0 0 1rem;
  border: 1px solid #2A2A31;
}

.ls-code code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre;
  color: inherit;
  background: none;
}

.ls-code .ls-c { color: #8FA6B8; }

.ls-api {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

/* ---- templates chips ----------------------------------------------------- */

.ls-chips {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.ls-chips li {
  border: 1px solid var(--ls-line);
  border-radius: var(--radius, 6px);
  padding: .7rem .9rem;
  background: var(--ls-card);
  font-size: .92rem;
  line-height: 1.4;
}

.ls-chips b { display: block; font-weight: 600; }

.ls-dim {
  font-size: .82rem;
  color: var(--ls-soft);
  font-variant-numeric: tabular-nums;
}

/* ---- closing CTA --------------------------------------------------------- */

.ls-close {
  text-align: center;
  padding: 4.5rem 0;
  border-top: 1px solid var(--ls-line);
}

.ls-close h2 { margin-bottom: .8rem; }

.ls-close .ls-lede { margin: 0 auto 1.8rem; }

.ls-close .ls-cta-row { justify-content: center; }

/* ---- responsive ---------------------------------------------------------- */

@media (max-width: 860px) {
  .ls-hero,
  .ls-api {
    grid-template-columns: minmax(0, 1fr);
  }
  .ls-section { padding: 3rem 0; }
  .ls-measure b { flex-basis: 100%; }
}

@media (max-width: 420px) {
  .ls-compare { grid-template-columns: minmax(0, 1fr); }
}
