/* ============================================================
   QR-DECODER.COM — Main Stylesheet
   Design: Dark-tech with electric teal accents
   Fonts: Syne (headings) + DM Sans (body) + JetBrains Mono (code)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary: #080b12;
  --bg-secondary: #0d1220;
  --bg-card: #111827;
  --bg-card-hover: #161f30;
  --bg-input: #0d1525;
  --border: rgba(0, 212, 170, 0.15);
  --border-strong: rgba(0, 212, 170, 0.35);
  --teal: #00d4aa;
  --teal-dim: rgba(0, 212, 170, 0.08);
  --teal-mid: rgba(0, 212, 170, 0.2);
  --orange: #ff6b35;
  --orange-dim: rgba(255, 107, 53, 0.12);
  --blue: #4fa3ff;
  --purple: #8b5cf6;
  --text-primary: #f0f4ff;
  --text-secondary: #8b9ab8;
  --text-muted: #4a5568;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 40px rgba(0, 212, 170, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg-primary: #f4f6fb;
  --bg-secondary: #eef1f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --bg-input: #eef1f8;
  --border: rgba(0, 172, 138, 0.18);
  --border-strong: rgba(0, 172, 138, 0.4);
  --teal: #009e80;
  --teal-dim: rgba(0, 172, 138, 0.07);
  --teal-mid: rgba(0, 172, 138, 0.15);
  --orange: #e85d20;
  --orange-dim: rgba(232, 93, 32, 0.08);
  --text-primary: #0f1724;
  --text-secondary: #3d4f68;
  --text-muted: #8899b2;
  --shadow-glow: 0 0 40px rgba(0, 172, 138, 0.1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ── Noise texture overlay ──────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── Grid Background ────────────────────────────────────────── */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .grid-bg {
  background-image:
    linear-gradient(rgba(0,120,100,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,120,100,0.04) 1px, transparent 1px);
}

/* ── Layout Wrapper ─────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
main { position: relative; z-index: 1; }

/* ── Header / Navbar ────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="light"] .navbar {
  background: rgba(244, 246, 251, 0.88);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  white-space: nowrap;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--teal), #006ddb);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 20px; height: 20px; fill: white; }
.logo span { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--teal);
  background: var(--teal-dim);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
}
.theme-btn:hover { border-color: var(--teal); color: var(--teal); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--teal), #00a8d6);
  color: #000;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,212,170,0.3); }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  cursor: pointer;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
}

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
  padding: 72px 0 48px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--teal), #4fa3ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb-sep { color: var(--text-muted); }

/* ── Tool Section ───────────────────────────────────────────── */
.tool-section {
  padding: 0 0 64px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.6;
}

/* ── Tab Nav ────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ── Tab Content ────────────────────────────────────────────── */
.tab-content { display: none; padding: 32px; }
.tab-content.active { display: block; }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
  position: relative;
  overflow: hidden;
}
.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--teal-dim) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--teal);
  background: var(--bg-card-hover);
}
.upload-zone:hover::before, .upload-zone.drag-over::before { opacity: 1; }

.upload-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--teal-dim), rgba(79,163,255,0.1));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.upload-icon svg { width: 32px; height: 32px; stroke: var(--teal); fill: none; stroke-width: 1.5; }
.upload-zone h3 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 6px; }
.upload-zone p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 16px; }
.upload-zone input[type="file"] { display: none; }
.format-chips {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chip {
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--teal);
}

/* URL Input */
.url-input-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.input-field {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
}
.input-field::placeholder { color: var(--text-muted); }
.input-field:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }

.btn-decode {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--teal), #00a8d6);
  border: none;
  border-radius: var(--radius-md);
  color: #000;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-decode:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,212,170,0.3); }
.btn-decode:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-decode svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* Camera view */
.camera-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scan-frame {
  width: 200px;
  height: 200px;
  position: relative;
}
.scan-frame::before, .scan-frame::after,
.scan-frame-inner::before, .scan-frame-inner::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--teal);
  border-style: solid;
}
.scan-frame::before { top: 0; left: 0; border-width: 3px 0 0 3px; }
.scan-frame::after { top: 0; right: 0; border-width: 3px 3px 0 0; }
.scan-frame-inner::before { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.scan-frame-inner::after { bottom: 0; right: 0; border-width: 0 3px 3px 0; }
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  animation: scan 2s linear infinite;
  box-shadow: 0 0 8px var(--teal);
}
@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}
.camera-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  padding: 48px;
  text-align: center;
}
.camera-idle svg { width: 56px; height: 56px; stroke: var(--teal); fill: none; stroke-width: 1.5; opacity: 0.6; }

.camera-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btn-secondary {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-secondary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }
.btn-danger {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(239,68,68,0.15); border-color: var(--danger); color: var(--danger); }

/* ── Result Section ─────────────────────────────────────────── */
.result-section {
  margin-top: 24px;
  display: none;
}
.result-section.show { display: block; }

.result-card {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: resultIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes resultIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--teal-dim), rgba(79,163,255,0.05));
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.result-type-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-type-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.result-body { padding: 20px; }
.result-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.6;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-height: 160px;
  overflow-y: auto;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.result-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
}
.result-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.result-btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }
.result-btn.primary-action {
  background: linear-gradient(135deg, var(--teal), #00a8d6);
  color: #000;
  border-color: transparent;
  font-weight: 700;
}
.result-btn.primary-action:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,170,0.3); }

/* Safety badge */
.safety-result {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
}
.safety-result.safe { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #10b981; }
.safety-result.warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
.safety-result.danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.safety-result svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }

/* ── Error/Processing States ────────────────────────────────── */
.decode-status {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  font-size: 0.9rem;
}
.decode-status.show { display: flex; }
.decode-status.processing { background: var(--teal-dim); border: 1px solid var(--border); color: var(--teal); }
.decode-status.error { background: var(--orange-dim); border: 1px solid rgba(255,107,53,0.3); color: var(--orange); }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── History Panel ──────────────────────────────────────────── */
.history-panel {
  margin-top: 32px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title svg { width: 18px; height: 18px; fill: none; stroke: var(--teal); stroke-width: 2; }
.btn-clear {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-clear:hover { border-color: var(--danger); color: var(--danger); }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}
.history-item:hover { border-color: var(--teal); background: var(--bg-card-hover); }
.history-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.history-icon svg { width: 16px; height: 16px; fill: none; stroke: var(--teal); stroke-width: 2; }
.history-content { flex: 1; min-width: 0; }
.history-text { font-size: 0.85rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.history-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Stats Row ──────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 48px 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }

/* ── Feature Grid ───────────────────────────────────────────── */
.features-section { padding: 64px 0; }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), #4fa3ff);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--teal); stroke-width: 1.8; }
.feature-card h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ── QR Types Grid ──────────────────────────────────────────── */
.qr-types-section { padding: 64px 0; }
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.type-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}
.type-card:hover { border-color: var(--teal); background: var(--teal-dim); transform: translateY(-2px); }
.type-card .type-icon { font-size: 1.8rem; margin-bottom: 8px; }
.type-card .type-name { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.type-card:hover .type-name { color: var(--teal); }

/* ── How-To Steps ───────────────────────────────────────────── */
.howto-section { padding: 64px 0; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: steps;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
}
.step-card:hover { border-color: var(--teal); }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}
.step-card h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: 0.87rem; line-height: 1.6; }

/* ── FAQ Section ────────────────────────────────────────────── */
.faq-section { padding: 64px 0; }
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: var(--teal); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  background: var(--bg-card);
  font-weight: 600;
  font-size: 0.95rem;
  gap: 12px;
  transition: background var(--transition);
}
.faq-q:hover { background: var(--bg-card-hover); }
.faq-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.faq-icon::after { content: '+'; font-size: 0.9rem; color: var(--text-secondary); line-height: 1; }
.faq-item.open .faq-icon { border-color: var(--teal); background: var(--teal); }
.faq-item.open .faq-icon::after { content: '−'; color: #000; }
.faq-a {
  display: none;
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  background: var(--bg-card);
}
.faq-item.open .faq-a { display: block; }

/* ── Content Sections ───────────────────────────────────────── */
.content-section { padding: 64px 0; }
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) { .content-grid { grid-template-columns: 1fr; } }
.content-block h2 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.01em; }
.content-block h3 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; margin: 20px 0 10px; color: var(--teal); }
.content-block p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.75; margin-bottom: 14px; }
.content-block ul { margin: 0 0 14px 20px; }
.content-block li { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.75; margin-bottom: 6px; }

/* ── Trust Section ──────────────────────────────────────────── */
.trust-section { padding: 48px 0; border-top: 1px solid var(--border); }
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.trust-item svg { width: 16px; height: 16px; fill: none; stroke: var(--teal); stroke-width: 2; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; margin: 14px 0 20px; max-width: 280px; }
.footer-col h4 { font-family: var(--font-head); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-primary); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.82rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.82rem; text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--teal); }

/* ── Mobile Nav ─────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.mobile-nav a:hover { color: var(--teal); background: var(--teal-dim); }

/* ── Dividers ───────────────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .btn-primary.nav-hide { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 48px 0 32px; }
  .tab-content { padding: 20px 16px; }
  .url-input-wrap { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .result-actions { flex-direction: column; }
  .camera-controls { flex-direction: column; }
}

/* ── Scroll styling ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ── Utility ────────────────────────────────────────────────── */
.text-teal { color: var(--teal); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
