/* ==========================================================================
   QR Pro - Design tokens
   ========================================================================== */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #fdfaf7;
  --color-text: #0a0a0a;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #f97316;
  --color-accent-2: #ea580c;
  --color-accent-soft: #fef3e8;
  --gradient-accent: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  --radius-card: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 4px 24px rgba(10, 10, 10, 0.06);
  --shadow-hover: 0 12px 32px rgba(249, 115, 22, 0.16);
  --transition: 0.25s ease;
  --max-width: 1200px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, canvas { max-width: 100%; display: block; }

a { color: var(--color-accent); text-decoration: none; }

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

/* ==========================================================================
   Fade-in animation
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}
.btn-primary:hover { box-shadow: var(--shadow-hover); }

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.link-btn {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(249, 115, 22, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.lock-badge.hidden { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--color-text);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.logo-mark svg { width: 20px; height: 20px; }

.logo-text .accent { color: var(--color-accent); }

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  transition: color var(--transition);
}
.nav a:hover { color: var(--color-accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.header-logout {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
}

.header-logout:hover {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 2px;
}

/* Nav dropdowns (QR Solutions / Resources) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: color var(--transition);
}
.nav-dropdown-toggle:hover { color: var(--color-accent); }
.nav-dropdown .caret { font-size: 11px; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  min-width: 220px;
  flex-direction: column;
  z-index: 50;
}
.dropdown-menu a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--color-accent-soft); color: var(--color-accent); }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: flex;
}

/* ==========================================================================
   Hero + Generator
   ========================================================================== */
.hero-generator {
  padding: 56px 0 72px;
  background: radial-gradient(60% 60% at 80% 20%, rgba(249, 115, 22, 0.08), transparent 70%);
}

.hero-generator-inner {
  display: flex;
  justify-content: center;
}

.hero-content {
  max-width: 720px;
  text-align: center;
}
.hero-content .hero-actions,
.hero-content .trust-badges {
  justify-content: center;
  align-items: center;
}

.hero-content .eyebrow {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-content h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 800;
}
.hero-content h1 .accent { color: var(--color-accent); }

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.trust-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Color swatches */
.swatch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.swatch:hover { transform: translateY(-2px); }
.swatch.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}
input[type="color"].swatch {
  -webkit-appearance: none;
  appearance: none;
  background: none;
}
input[type="color"].swatch::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
input[type="color"].swatch::-webkit-color-swatch { border: none; border-radius: 50%; }
input[type="color"].swatch::-moz-color-swatch { border: none; border-radius: 50%; }

/* QR style icon buttons (frame style) */
.style-icon-row {
  display: flex;
  gap: 8px;
}
.style-icon-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-text-muted);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.style-icon-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.style-icon-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Size slider */
.field-label .size-value { color: var(--color-accent); font-weight: 800; }

/* ==========================================================================
   Section heading
   ========================================================================== */
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-heading h2 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 12px;
}
.section-heading p {
  color: var(--color-text-muted);
  font-size: 16px;
  margin: 0;
}

.section-heading-left { max-width: 640px; margin-bottom: 32px; }
.section-heading-left h2 { font-size: 30px; font-weight: 800; margin: 0 0 8px; }
.section-heading-left p { color: var(--color-text-muted); font-size: 15px; margin: 0; }

section { padding: 64px 0; }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

/* ==========================================================================
   Shared form / customize controls
   ========================================================================== */
.field-group { margin-bottom: 24px; }
.field-group:last-of-type { margin-bottom: 0; }

.field-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  transition: border-color var(--transition), color var(--transition), transform var(--transition), background var(--transition);
}
.type-btn span { font-size: 18px; }
.type-btn:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.type-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Dynamic form fields */
.form-row { display: flex; gap: 12px; }
.form-row .form-field { flex: 1; }

.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.form-field textarea { resize: vertical; min-height: 70px; }
.form-field .field-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
  border-color: #dc2626;
}
.form-field.invalid .field-error { display: block; }

.form-errors {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
}

.success-box {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.cancel-box {
  background: rgba(234, 179, 8, 0.1);
  color: #92660b;
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ==========================================================================
   How it works
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.step-number {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.step-card h3 { margin: 0 0 8px; font-size: 18px; }
.step-card p { margin: 0; color: var(--color-text-muted); font-size: 14px; }

/* ==========================================================================
   Feature bar
   ========================================================================== */
.feature-bar { background: var(--color-bg-alt); }
.feature-bar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.feature-bar-item { text-align: center; }
.feature-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  font-size: 22px;
  margin-bottom: 12px;
}
.feature-bar-item h3 { margin: 0 0 4px; font-size: 14px; }
.feature-bar-item p { margin: 0; color: var(--color-text-muted); font-size: 12px; }

/* ==========================================================================
   Solutions + pricing sidebar
   ========================================================================== */
.solutions-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.solution-card {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.solution-art {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 28px;
  margin-bottom: 14px;
}
.solution-art .mini-qr {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.solution-art-menu { background: var(--color-accent-soft); }
.solution-art-whatsapp { background: #dcfce7; }
.solution-art-vcard { background: #dbeafe; }
.solution-art-events { background: #ede9fe; }
.solution-art-pdf { background: #fee2e2; }
.solution-art-app { background: #e0e7ff; }
.solution-card h3 { margin: 0 0 6px; font-size: 16px; }
.solution-card p { margin: 0 0 12px; color: var(--color-text-muted); font-size: 13px; }
.solution-link { font-size: 13px; font-weight: 700; color: var(--color-accent); }

.pricing-sidebar { position: sticky; top: 96px; }
.pricing-card-sidebar {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  text-align: center;
}
.badge-popular {
  display: inline-block;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.pricing-card-sidebar h3 { margin: 0 0 8px; font-size: 16px; color: var(--color-text-muted); font-weight: 700; }
.price { margin-bottom: 24px; }
.price-amount {
  font-size: 56px;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-period { font-size: 16px; color: var(--color-text-muted); }
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

/* ==========================================================================
   Stats bar
   ========================================================================== */
.stats-bar {
  background: var(--gradient-accent);
  padding: 40px 0;
  color: #fff;
}
.stats-bar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-item strong { display: block; font-size: 28px; font-weight: 800; }
.stat-item span { font-size: 13px; opacity: 0.9; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
  transition: color var(--transition);
}
.faq-question:hover { color: var(--color-accent); }
.faq-icon {
  font-size: 18px;
  font-weight: 700;
  transition: transform var(--transition);
  color: var(--color-accent);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}
.faq-answer p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--color-text-muted);
  font-size: 14px;
}
.faq-item.open .faq-answer { max-height: 240px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 24px;
  background: var(--color-bg-alt);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.footer-brand { max-width: 360px; }
.footer-brand p { color: var(--color-text-muted); font-size: 14px; margin-top: 10px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: var(--color-text); font-size: 14px; font-weight: 500; }
.footer-nav a:hover { color: var(--color-accent); }
.footer-copy {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
}

/* ==========================================================================
   Display pages (wifi / vcard / text / expired)
   ========================================================================== */
.display-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  padding: 24px;
}
.display-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  padding: 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.display-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.display-card h1 { font-size: 24px; margin: 0 0 12px; }
.display-hint { color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; }
.display-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
.display-row span { color: var(--color-text-muted); }
.display-text {
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  margin: 0 0 20px;
}
.display-back { display: block; margin-top: 12px; }
.display-card .btn { margin-top: 16px; }

/* ==========================================================================
   Auth pages (login / register)
   ========================================================================== */
.auth-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.auth-logo {
  justify-content: center;
  margin-bottom: 24px;
}
.auth-card h1 { font-size: 26px; margin: 0 0 8px; }
.auth-subtitle {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.auth-form { text-align: left; }
.auth-form .form-field { margin-bottom: 16px; }
.auth-switch {
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-text-muted);
}
.auth-switch a { font-weight: 600; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .feature-bar-grid { grid-template-columns: repeat(3, 1fr); }
  .solutions-layout { grid-template-columns: 1fr; }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-sidebar { position: static; }
  .stats-bar-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    display: none;
    gap: 16px;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-dropdown { position: static; width: 100%; }
  .nav.open .dropdown-menu {
    display: flex;
    position: static;
    box-shadow: none;
    border: none;
    padding: 4px 0 4px 16px;
    min-width: 0;
    margin-top: 4px;
  }
  .hero-content h1 { font-size: 32px; }
  .feature-bar-grid { grid-template-columns: repeat(2, 1fr); }
  .solutions-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-bar-grid { grid-template-columns: repeat(2, 1fr); }
}
