/* ============================================
   QR Tool — Professional SaaS Design System
   ============================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================
   Layout
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
}
nav a:hover { background: var(--surface-alt); color: var(--ink); }

main.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.developer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.developer img {
  max-width: 80px !important;
  max-height: 20px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border: 1.5px solid var(--line);
}
.btn-outline:hover { background: var(--surface-alt); border-color: #cbd5e1; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================
   Landing Page — Hero
   ============================================ */

.landing-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 32px 0 16px;
  min-height: 520px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-light);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}
.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.landing-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.landing-hero h1 span { color: var(--primary); }
.hero-lead {
  margin: 0 0 24px;
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.hero-metrics span i {
  font-style: normal;
  color: var(--primary);
  font-weight: 800;
}

/* Hero Visual — Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-mockup {
  width: min(320px, 100%);
  background: #111827;
  border-radius: 28px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
}
.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.phone-status span:first-child::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
}
.mockup-qr {
  width: min(200px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 14px;
  background:
    linear-gradient(90deg, #0f172a 10px, transparent 10px) 0 0 / 30px 30px,
    linear-gradient(#0f172a 10px, transparent 10px) 0 0 / 30px 30px,
    #fff;
  border: 12px solid #fff;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
}
.mockup-qr span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 6px solid #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.mockup-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.mockup-footer small { color: var(--muted); font-size: 12px; }

/* ============================================
   Landing Page — Sections
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 48px 0;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.how-section {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
}
.how-section h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}
.steps-list { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps-list li {
  counter-increment: step;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}
.steps-list li:last-child { border: none; }
.steps-list li::before {
  content: counter(step);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.cta-section {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  color: #fff;
  margin: 32px 0;
}
.cta-section h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}
.cta-section p {
  margin: 0 auto 24px;
  max-width: 500px;
  opacity: 0.9;
  font-size: 15px;
}
.cta-section .btn { background: #fff; color: var(--primary) !important; box-shadow: none; }
.cta-section .btn:hover { background: #f1f5f9; }

.faq-section { margin: 32px 0; }
.faq-section details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
}
.faq-section summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}
.faq-section details p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   Dashboard
   ============================================ */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; }

.credit-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 28px;
}
.credit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.credit-card .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.credit-card .value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.credit-card.paid { border-left: 3px solid var(--primary); }
.credit-card.free { border-left: 3px solid var(--accent); }

.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-card table { width: 100%; border-collapse: collapse; }
.table-card th {
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
.table-card td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.table-card tr:last-child td { border: none; }
.table-card .actions { display: flex; gap: 10px; }
.table-card .actions a {
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pill.paid { background: #dcfce7; color: #166534; }
.pill.free { background: #fef3c7; color: #92400e; }

/* ============================================
   Create QR & Forms
   ============================================ */

.form-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.form-card h1 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-group textarea,
.form-group input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  background: var(--surface-alt);
  transition: border-color 0.15s;
}
.form-group textarea:focus,
.form-group input[type="file"]:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-help {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ============================================
   Pricing
   ============================================ */

.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.pricing-card .eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.pricing-card h1 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
}
.pricing-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.price-display {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.price-display small {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}

/* ============================================
   QR Scan Pages
   ============================================ */

.scan-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.scan-card .tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.scan-card .tag.free { background: #fef3c7; color: #92400e; }
.scan-card .tag.paid { background: #dcfce7; color: #166534; }
.scan-card h1 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.scan-card .lead { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.ad-placeholder {
  min-height: 160px;
  background: var(--surface-alt);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
}

.content-display {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.content-display.large {
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.3;
}

.alert-bar {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-bar.success { background: #dcfce7; color: #166534; }
.alert-bar.error { background: #fee2e2; color: #991b1b; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty-state p { font-size: 15px; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 860px) {
  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 16px;
    gap: 32px;
  }
  .hero-visual { order: -1; }
  .phone-mockup { width: min(260px, 100%); }
  .features-grid { grid-template-columns: 1fr; }
  .how-section { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  nav { width: 100%; justify-content: flex-end; }
  nav a { padding: 6px 10px; font-size: 13px; }
  .credit-cards { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .table-card th, .table-card td { padding: 10px 12px; }
  .cta-section { padding: 32px 20px; }
  .pricing-card { padding: 24px; }
  .form-card { padding: 20px; }
  .scan-card { padding: 20px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
