:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --violet: #7c3aed;
  --bg: #f4f5fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --border: #e5e7eb;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 45px -15px rgba(79, 70, 229, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(120% 160% at 15% 0%, #6d5ef0 0%, var(--primary) 45%, var(--violet) 100%);
  color: #fff;
  padding-bottom: 110px;
}

.navbar {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.hero-compact {
  padding-bottom: 56px;
}

.hero-copy-compact {
  margin: 28px auto 0;
}

.hero-copy-compact h1 {
  margin: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
}

.navbar-badge {
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
}

.hero-copy {
  max-width: 640px;
  margin: 56px auto 0;
  padding: 0 24px;
  text-align: center;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.hero-copy p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

/* ---------- App shell ---------- */

.app-shell {
  max-width: 1080px;
  margin: -78px auto 40px;
  padding: 0 20px;
}

.app-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  overflow: hidden;
}

@media (max-width: 820px) {
  .app-card {
    grid-template-columns: 1fr;
  }
}

.form-side {
  padding: 36px 36px 32px;
}

.preview-side {
  background: linear-gradient(180deg, #faf9ff 0%, #f3f1fe 100%);
  border-left: 1px solid var(--border);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 820px) {
  .preview-side {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

/* ---------- Type tabs ---------- */

.type-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}

@media (max-width: 560px) {
  .type-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.type-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.type-tab svg {
  transition: transform 0.15s ease;
}

.type-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.type-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.55);
}

/* ---------- Form fields ---------- */

.fieldset {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fieldset.hidden {
  display: none;
}

.fieldset label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 14px;
}

.fieldset label:first-child {
  margin-top: 0;
}

.fieldset input[type="text"],
.fieldset input[type="url"],
.fieldset input[type="email"],
.fieldset input[type="tel"],
.fieldset select,
.fieldset textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: #fbfbfe;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fieldset input:focus,
.fieldset select:focus,
.fieldset textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.fieldset textarea {
  resize: vertical;
  font-family: inherit;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.88rem;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ---------- Customize ---------- */

.customize {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
}

.customize h2 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}

.customize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.customize-item-wide {
  grid-column: 1 / -1;
}

.customize-item label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  background: #fbfbfe;
}

.color-field input[type="color"] {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 7px;
  padding: 0;
  background: none;
  cursor: pointer;
}

.color-field span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.customize-item-wide select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  background: #fbfbfe;
  color: var(--text);
}

/* ---------- Preview ---------- */

.preview-frame {
  width: 100%;
  max-width: 300px;
}

.qrcode-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  box-shadow: 0 12px 30px -14px rgba(15, 23, 42, 0.18);
  padding: 16px;
}

.qrcode-box img, .qrcode-box canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
}

.qrcode-placeholder {
  color: var(--muted-light);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 18px;
  min-height: 1.2em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 26px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(79, 70, 229, 0.55);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #e2e4ec;
  color: #a3a8b8;
  box-shadow: none;
  cursor: not-allowed;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
  margin: 20px 0 0;
  max-width: 260px;
}

.footer {
  text-align: center;
  color: var(--muted-light);
  font-size: 0.78rem;
  padding: 8px 20px 32px;
}

.footer p:first-child {
  margin: 0 0 6px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ---------- Legal pages (Termos / Privacidade) ---------- */

.legal-shell {
  max-width: 760px;
  margin: -32px auto 40px;
  padding: 0 20px;
}

.legal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px clamp(24px, 5vw, 48px);
}

.legal-updated {
  font-size: 0.8rem;
  color: var(--muted-light);
  margin: 0 0 24px;
}

.legal-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text);
}

.legal-card h2:first-of-type {
  margin-top: 0;
}

.legal-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 14px;
}

.legal-card ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal-card li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 6px;
}

.legal-card a {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- Recommended products / affiliate disclosure ---------- */

.recommended {
  padding: 8px 20px 8px;
}

.recommended-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.recommended h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}

.disclosure {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--primary-light);
  border: 1px solid #dfe3fb;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 20px;
  max-width: 640px;
  line-height: 1.5;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 820px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 26px -14px rgba(79, 70, 229, 0.4);
  transform: translateY(-2px);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.product-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

.product-domain {
  font-size: 0.72rem;
  color: var(--muted-light);
}
