/* ============================================================
   QRforLess — design tokens
   Ink on paper, one signal color, QR finder-pattern as motif.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #14151a;
  --ink-soft: #55565e;
  --paper: #f7f6f2;
  --paper-dim: #efede5;
  --paper-flat: #ffffff;
  --line: #d8d6cd;
  --signal: #ff4b2e;
  --signal-soft: #ffe4dc;
  --confirmed: #1f9d74;
  --confirmed-soft: #dcf1e8;

  --font-display: 'Space Mono', 'Courier New', monospace;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 2px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Finder-pattern motif ----------
   The three-square "finder pattern" that lets a scanner
   locate a QR code. Used here as a structural marker —
   it always marks the start of a new section. */
.finder {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  position: relative;
  flex-shrink: 0;
}
.finder::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--ink);
}
.finder.accent { border-color: var(--signal); }
.finder.accent::after { background: var(--signal); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(6px);
  z-index: 20;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
}
.site-nav nav {
  display: flex;
  gap: 28px;
}
.site-nav nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.site-nav nav a:hover { color: var(--ink); }
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .site-nav nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
h1 .hl { color: var(--signal); }
.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 28px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--font-display);
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row span::before { content: '—'; color: var(--line); }
.trust-row span:first-child::before { content: none; }

/* ---------- Generator card ---------- */
.generator {
  background: var(--paper-flat);
  border: 1px solid var(--line);
  padding: 28px;
  position: relative;
}
.generator::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 22px; height: 22px;
  border-top: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
}
.generator::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 22px; height: 22px;
  border-bottom: 3px solid var(--ink);
  border-right: 3px solid var(--ink);
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  border-radius: var(--radius);
}
.field input:focus, .field textarea:focus { border-color: var(--ink); }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.swatch-row { display: flex; gap: 10px; align-items: center; }
.swatch-row input[type="color"] {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  padding: 2px;
  background: var(--paper-flat);
  cursor: pointer;
}

.btn {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: var(--radius);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--signal); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.preview-stage {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.qr-frame {
  position: relative;
  width: 220px;
  height: 220px;
  background: var(--paper-flat);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#qr-canvas-wrap canvas, #qr-canvas-wrap img { image-rendering: pixelated; }
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--signal);
  box-shadow: 0 0 10px 1px var(--signal);
  animation: sweep 2.6s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes sweep {
  0% { top: 4%; }
  50% { top: 94%; }
  100% { top: 4%; }
}
.download-row { display: flex; gap: 10px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--paper-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 40px; }
h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 12px;
}
.section-head p { color: var(--ink-soft); font-size: 16px; margin: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 780px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--paper-flat);
  padding: 26px;
}
.feature .finder { margin-bottom: 16px; }
.feature h3 { font-family: var(--font-display); font-size: 16px; margin: 0 0 8px; }
.feature p { color: var(--ink-soft); font-size: 14px; margin: 0; }
.feature .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--confirmed-soft);
  color: var(--confirmed);
}

/* Comparison callout (vs paid tools) */
.compare {
  border: 1px solid var(--line);
  background: var(--paper-flat);
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 780px) { .compare { grid-template-columns: 1fr; } }
.compare-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.compare-col ul { list-style: none; margin: 0; padding: 0; }
.compare-col li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-col.us { position: relative; }
.compare-col.us h4 { color: var(--signal); }

/* Guides list */
.guide-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.guide-card {
  background: var(--paper-flat);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--ink);
}
.guide-card:hover { background: var(--paper-dim); }
.guide-card .meta { font-family: var(--font-display); font-size: 12px; color: var(--ink-soft); }
.guide-card h3 { margin: 4px 0 0; font-size: 17px; font-family: var(--font-body); font-weight: 700; }
.guide-card .arrow { font-family: var(--font-display); font-size: 20px; color: var(--signal); flex-shrink: 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-display); font-size: 20px; color: var(--signal); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { color: var(--ink-soft); margin: 12px 0 0; font-size: 15px; }

/* ---------- Article / content pages ---------- */
.article-head { padding: 48px 0 0; }
.article-head .eyebrow { margin-bottom: 18px; }
.article-body { padding: 30px 0 70px; max-width: 72ch; }
.article-body h2 { margin-top: 40px; font-size: 22px; }
.article-body h3 { font-family: var(--font-body); font-size: 17px; margin-top: 26px; }
.article-body p { font-size: 16px; color: var(--ink); }
.article-body p.lede-p { font-size: 18px; color: var(--ink-soft); }
.article-body ul, .article-body ol { font-size: 16px; }
.article-body li { margin-bottom: 6px; }
.callout {
  border-left: 3px solid var(--signal);
  background: var(--signal-soft);
  padding: 16px 20px;
  font-size: 15px;
  margin: 26px 0;
}

.legal-body { padding: 30px 0 70px; max-width: 76ch; }
.legal-body h2 { font-size: 19px; margin-top: 34px; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 15px; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 44px 0 36px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--signal); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--font-display);
}

/* ---------- Ad slots ----------
   Placeholders only. Never place inside .generator or
   adjacent to the Generate/Download buttons. */
.ad-slot {
  border: 1px dashed var(--line);
  background: var(--paper-dim);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 18px;
  margin: 40px 0;
}

/* ---------- Tip jar ---------- */
.tip-link {
  color: var(--signal) !important;
}
.support-card {
  border: 1px solid var(--line);
  background: var(--paper-flat);
  padding: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.support-card h2 { margin: 0 0 10px; }
.support-card p { color: var(--ink-soft); margin: 0; max-width: 46ch; }
.tip-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

#tip-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 18px;
  font-size: 14px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 45;
  box-shadow: 0 8px 24px rgba(20, 21, 26, 0.25);
}
#tip-toast.show { display: flex; }
.tip-toast-actions { display: flex; justify-content: flex-end; gap: 10px; }
.tip-toast-actions button, .tip-toast-actions a {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
}
.tip-toast-actions a.accept { background: var(--signal); border-color: var(--signal); color: var(--paper); }

/* ---------- Consent banner ---------- */
#consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 16px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  z-index: 50;
  font-size: 14px;
}
#consent-banner.show { display: flex; }
#consent-banner a { color: var(--paper); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions button {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  padding: 9px 16px;
  border: 1px solid var(--paper);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
.consent-actions button.accept { background: var(--paper); color: var(--ink); }
