/* Self-hosted Latin fonts matching vouchpin-website identically */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --vp-blue-600: #2563eb;
  --vp-blue-700: #1d4ed8;
  --vp-blue-800: #1e40af;
  --vp-ink-950: #0a0d14;
  --vp-ink-900: #0f172a;
  --vp-ink-700: #334155;
  --vp-ink-500: #64748b;

  --vp-surface: #ffffff;
  --vp-surface-muted: #f6f8fb;
  --vp-border: #e2e8f0;
  --vp-input-border: #cbd5e1;
  --vp-header-bg: #000000;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-family: "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  color: var(--vp-ink-700);
  background-color: var(--vp-surface-muted);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}

html.dark {
  color: #cbd5e1;
  background-color: #0b0f17;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--vp-surface-muted);
  color: var(--vp-ink-700);
}

html.dark body {
  background-color: #0b0f17;
  color: #cbd5e1;
}

h1,
h2,
h3,
.font-display {
  font-family: "Plus Jakarta Sans", "Inter Variable", ui-sans-serif, sans-serif;
}

:focus-visible {
  outline: 2px solid var(--vp-blue-600);
  outline-offset: 2px;
}

html.dark :focus-visible {
  outline-color: #3b82f6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 60;
  width: auto;
  height: auto;
  padding: 10px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  border-radius: 8px;
  background: var(--vp-blue-700);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Sticky #000000 Header matching vouchpin-website */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: #000000;
  color: #ffffff;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

.header-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 6px;
  padding-inline: 4px;
  margin-inline-start: -4px;
  text-decoration: none;
}

.wordmark-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (min-width: 640px) {
  .header-inner {
    padding-inline: 24px;
  }
  .wordmark-img {
    height: 36px;
  }
}

.demo-header-pill {
  display: none;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (min-width: 520px) {
  .demo-header-pill {
    display: inline-flex;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.back-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.back-nav-link:hover {
  color: #ffffff;
}

/* Tactile Glossy Buttons matching vouchpin-website */
.btn-glossy-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: "Inter Variable", ui-sans-serif, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 0 rgba(15, 23, 42, 0.22),
    0 1px 2px rgba(15, 23, 42, 0.16),
    0 10px 24px -6px rgba(37, 99, 235, 0.42);
  transition:
    transform 180ms ease-out,
    filter 180ms ease-out,
    box-shadow 180ms ease-out;
}

.btn-glossy-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(15, 23, 42, 0.24),
    0 2px 4px rgba(15, 23, 42, 0.18),
    0 12px 26px -6px rgba(37, 99, 235, 0.5);
}

.btn-glossy-primary:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.btn-glossy-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-glossy-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: "Inter Variable", ui-sans-serif, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 6px rgba(15, 23, 42, 0.06);
  transition:
    transform 180ms ease-out,
    border-color 180ms ease-out,
    background-color 180ms ease-out;
}

.btn-glossy-secondary:hover {
  border-color: #94a3b8;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.btn-glossy-secondary:active {
  transform: translateY(1px) scale(0.98);
}

html.dark .btn-glossy-secondary {
  background: linear-gradient(180deg, #1e293b 0%, #111827 100%);
  color: #f8fafc;
  border-color: #334155;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.45);
}

html.dark .btn-glossy-secondary:hover {
  border-color: #475569;
  background: linear-gradient(180deg, #273449 0%, #162032 100%);
}

.btn-glossy-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.45);
  transition:
    transform 180ms ease-out,
    border-color 180ms ease-out,
    background-color 180ms ease-out;
}

.btn-glossy-dark:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
}

.btn-glossy-dark:active {
  transform: translateY(1px) scale(0.98);
}

/* Sun <-> Moon spring morph driven directly by html.dark for zero FOUC */
.theme-icon-svg {
  width: 20px;
  height: 20px;
  transform: rotate(0deg) scale(1);
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark .theme-icon-svg {
  transform: rotate(-12deg) scale(0.95);
}

.theme-icon-core {
  transform-origin: center;
  transform: scale(1);
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark .theme-icon-core {
  transform: scale(1.62);
}

.theme-icon-rays {
  transform-origin: center;
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition:
    transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 180ms ease;
}

html.dark .theme-icon-rays {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

.theme-icon-moon-cutout {
  transform: translate(0px, 0px);
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark .theme-icon-moon-cutout {
  transform: translate(-7.5px, 6.5px);
}

/* Layered Card Surface matching vouchpin-website */
.card-elevated {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 14px 36px -12px rgba(15, 23, 42, 0.1);
}

html.dark .card-elevated {
  background: #111827;
  border-color: #1e293b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 36px -12px rgba(0, 0, 0, 0.65);
}

/* Main Workspace Layout */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: 20px 16px 32px;
}

@media (min-width: 640px) {
  .main-content {
    padding: 20px 24px 40px;
  }
}

.intro-block {
  margin-bottom: 16px;
}

.intro-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1d4ed8;
}

html.dark .intro-eyebrow {
  color: #60a5fa;
}

.intro-title {
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #0a0d14;
}

html.dark .intro-title {
  color: #f8fafc;
}

.intro-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  max-width: 78ch;
}

html.dark .intro-subtitle {
  color: #cbd5e1;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (min-width: 960px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 22px;
  }
}

.panel-card {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0a0d14;
}

html.dark .panel-title {
  color: #f8fafc;
}

.panel-tag {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

html.dark .panel-tag {
  color: #94a3b8;
}

/* 2x2 Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label,
.presets-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

html.dark .field label,
html.dark .presets-label {
  color: #e2e8f0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

@media (max-width: 639px) {
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
}

html.dark .field input,
html.dark .field select,
html.dark .field textarea {
  border-color: #334155;
  background-color: #0b0f17;
  color: #f1f5f9;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #94a3b8;
}

html.dark .field input::placeholder,
html.dark .field textarea::placeholder {
  color: #64748b;
}

.field textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--vp-blue-600);
}

/* Presets row */
.presets-wrap {
  margin-top: 12px;
  margin-bottom: 12px;
}

.presets-label {
  display: block;
  margin-bottom: 6px;
}

.presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.preset-chip:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.preset-chip:active {
  transform: scale(0.98);
}

.preset-chip[aria-pressed="true"] {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #ffffff;
  box-shadow: 0 2px 8px -2px rgba(29, 78, 216, 0.45);
}

html.dark .preset-chip {
  background: #0b0f17;
  color: #e2e8f0;
  border-color: #334155;
}

html.dark .preset-chip:hover {
  border-color: #3b82f6;
  background: #1e293b;
  color: #93c5fd;
}

html.dark .preset-chip[aria-pressed="true"] {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.submit-btn {
  width: 100%;
  margin-top: 12px;
  min-height: 46px;
  font-size: 15px;
}

.privacy-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}

html.dark .privacy-note {
  color: #94a3b8;
}

.privacy-note a {
  color: #1d4ed8;
  font-weight: 600;
  text-underline-offset: 2px;
}

html.dark .privacy-note a {
  color: #60a5fa;
}

/* Right Preview Column */
.preview-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

html.dark .preview-top {
  border-bottom-color: #1e293b;
}

.preview-business-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0a0d14;
}

html.dark .preview-business-name {
  color: #f8fafc;
}

.stars-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
}

.star-icon {
  width: 15px;
  height: 15px;
  fill: #fbbc04;
}

.star-icon.empty {
  fill: #cbd5e1;
}

html.dark .star-icon.empty {
  fill: #334155;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 12px;
}

.pill-emerald {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

html.dark .pill-emerald {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.pill-shield {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

html.dark .pill-shield {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.45);
}

.pill-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

html.dark .pill-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.shield-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #92400e;
}

html.dark .shield-note {
  color: #fde68a;
}

.reply-surface {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 14px;
  min-height: 140px;
}

html.dark .reply-surface {
  border-color: #1e293b;
  background: #0b0f17;
}

.reply-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

html.dark .reply-kicker {
  color: #94a3b8;
}

.reply-placeholder {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}

html.dark .reply-placeholder {
  color: #94a3b8;
}

.reply-output {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: #0f172a;
}

html.dark .reply-output {
  color: #f1f5f9;
}

/* Loading skeleton */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

html.dark .skeleton-line {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

.skeleton-line.short {
  width: 68%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* Bottom Conversion Bar */
.conversion-card {
  margin-top: 20px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.conversion-copy {
  flex: 1 1 320px;
}

.conversion-copy p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: #0a0d14;
}

html.dark .conversion-copy p {
  color: #f8fafc;
}

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

/* Monochrome Footer matching vouchpin-website */
.site-footer {
  border-top: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #334155;
}

html.dark .site-footer {
  border-top-color: #1e293b;
  background-color: #0b0f17;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: 28px 16px;
}

@media (min-width: 640px) {
  .footer-inner {
    padding: 32px 24px;
  }
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.footer-logo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  border-radius: 8px;
  background: #000000;
  padding: 6px 12px;
  border: 1px solid rgba(15, 23, 42, 0.2);
}

.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
}

html.dark .footer-meta {
  color: #94a3b8;
}

.footer-meta a,
.footer-links a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

html.dark .footer-meta a,
html.dark .footer-links a {
  color: #60a5fa;
}

.footer-meta a:hover,
.footer-links a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #334155;
  font-weight: 500;
}

html.dark .footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #1d4ed8;
}

html.dark .footer-links a:hover {
  color: #60a5fa;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-glossy-primary:active,
  .btn-glossy-secondary:active,
  .btn-glossy-dark:active,
  .preset-chip:active {
    transform: none !important;
  }
}
