:root {
  --bg-app:          #1a1a1a;
  --bg-sidebar:      #1c1c1e;
  --bg-canvas-area:  #242424;
  --bg-input:        #2c2c2e;
  --text-primary:    #f2f2f7;
  --text-secondary:  #8e8e93;
  --border:          #38383a;
  --btn-bg:          #3a3a3c;
  --btn-hover:       #48484a;
  --accent:          #6366f1;
  --accent-hover:    #4f46e5;
  --accent-soft:     #818cf8;
  --accent-deep:     #7c3aed;
  --accent-pale:     #a78bfa;
  --danger:          #ff453a;
  --scrim:           rgba(0, 0, 0, 0.60);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg-app:         #f2f2f7;
  --bg-sidebar:     #ffffff;
  --bg-canvas-area: #e5e5ea;
  --bg-input:       #e5e5ea;
  --text-primary:   #1c1c1e;
  --text-secondary: #8e8e93;
  --border:         #d1d1d6;
  --accent:         #6366f1;
  --btn-bg:         #e5e5ea;
  --btn-hover:      #d1d1d6;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(124,58,237,0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(99,102,241,0.10), transparent 60%),
    #0b0b0e;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(124,58,237,0.09), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(99,102,241,0.06), transparent 60%),
    #f2f2f7;
}

a { color: inherit; text-decoration: none; }

/* ─── Top nav ─────────────────────────────────────────────────────────── */
.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 32px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.2px;
  color: var(--text-primary);
}
.nav-brand-tag {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-secondary);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-left: 4px;
}
html[data-theme="dark"] .nav-brand-tag { border-color: rgba(255,255,255,0.1); }
.nav-links {
  display: flex; gap: 24px; align-items: center;
  font-size: 13px; color: var(--text-secondary);
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff !important;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.nav-cta:hover { box-shadow: 0 4px 14px rgba(99,102,241,0.4); }

/* ─── Page container ──────────────────────────────────────────────────── */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px 96px;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  margin-bottom: 24px;
}
html[data-theme="light"] .hero-eyebrow {
  color: var(--accent-hover);
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.2);
}
.hero-eyebrow::before {
  content: ""; display: block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hero h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1.6px;
  line-height: 1.05;
  margin: 0 auto 20px;
  max-width: 820px;
  color: var(--text-primary);
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #a78bfa 10%, #6366f1 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  text-wrap: pretty;
}

/* Hero actions */
.hero-actions {
  display: flex; justify-content: center; gap: 8px; align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex; gap: 18px; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.hero-meta-item { display: flex; align-items: center; gap: 6px; }
.hero-meta-item svg { color: var(--accent-soft); }
.hero-meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-secondary); opacity: 0.5;
}

/* ─── Before / After tiles ────────────────────────────────────────────── */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
}
.ba-card {
  background: rgba(30,30,35,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
html[data-theme="light"] .ba-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}
.ba-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-secondary);
  padding: 4px 10px 4px 8px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  position: absolute;
  top: 22px; left: 22px;
  z-index: 2;
}
html[data-theme="light"] .ba-label {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.06);
}
.ba-label.after {
  color: var(--accent-soft);
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.12);
}
html[data-theme="light"] .ba-label.after {
  color: var(--accent-hover);
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
}
.ba-label-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-secondary);
}
.ba-label.after .ba-label-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.ba-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #2a2a2e;
}
.ba-image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ba-image.after img {
  object-fit: contain;
  object-position: center bottom;
  top: auto;
}
.ba-image.after {
  background-color: #242424;
  background-image:
    linear-gradient(45deg, #333 25%, transparent 25%),
    linear-gradient(-45deg, #333 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #333 75%),
    linear-gradient(-45deg, transparent 75%, #333 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}
html[data-theme="light"] .ba-image.after {
  background-color: #eeeeee;
  background-image:
    linear-gradient(45deg, #cccccc 25%, transparent 25%),
    linear-gradient(-45deg, #cccccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cccccc 75%),
    linear-gradient(-45deg, transparent 75%, #cccccc 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

/* Arrow between tiles */
.ba-arrow {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
  flex-shrink: 0;
}

/* ─── Section header ──────────────────────────────────────────────────── */
.section { padding: 64px 0 16px; }
.section-eyebrow {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent-soft);
  margin-bottom: 12px;
}
.section h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--text-primary);
  text-wrap: nowrap;
  max-width: none;
}
.section-sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 40px;
  max-width: 620px;
  text-wrap: pretty;
}

/* ─── Steps (How it works) ────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  background: rgba(30,30,35,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}
html[data-theme="light"] .step {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.step-num {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--accent-soft);
  margin-bottom: 14px;
}
.step-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(99,102,241,0.12);
  color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
html[data-theme="light"] .step-icon {
  background: rgba(99,102,241,0.08);
  color: var(--accent);
}
.step h3 {
  font-size: 16px; font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.step p {
  font-size: 13px; line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ─── Collage workflow section ────────────────────────────────────────── */
.workflow {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  background: rgba(30,30,35,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 40px;
}
html[data-theme="light"] .workflow {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.workflow-text h2 {
  font-size: 30px; font-weight: 700;
  letter-spacing: -0.6px; line-height: 1.15;
  margin: 8px 0 14px;
  color: var(--text-primary);
}
.workflow-text p {
  font-size: 15px; line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 20px;
}
.workflow-list {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.workflow-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text-primary);
  line-height: 1.5;
}
.workflow-list li svg { color: var(--accent-soft); flex-shrink: 0; margin-top: 2px; }
.workflow-link {
  color: var(--accent-soft);
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .15s;
}
html[data-theme="light"] .workflow-link { color: var(--accent-hover); }
.workflow-link:hover { gap: 10px; }

/* Collage mock */
.collage-mock {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #e8e4dc;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.04), transparent 50%);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
html[data-theme="light"] .collage-mock { box-shadow: 0 14px 40px rgba(0,0,0,0.1); }
.collage-mock::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,0.06) 1px, transparent 0);
  background-size: 14px 14px;
  opacity: 0.5;
}
.cm-piece {
  position: absolute;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.cm-piece img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-piece.pet {
  top: 18%; left: 28%;
  width: 48%; height: 64%;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  z-index: 4;
  transform: rotate(-2deg);
}
.cm-piece.pet img { object-fit: contain; }
.cm-piece.polaroid-1 {
  top: 8%; left: 6%;
  width: 32%; height: 34%;
  background: #fff;
  padding: 8px 8px 20px;
  transform: rotate(-6deg);
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  z-index: 1;
}
.cm-piece.polaroid-1 img { border-radius: 2px; }
.cm-piece.tape-1 {
  top: 4%; left: 18%;
  width: 58px; height: 22px;
  background: rgba(255,222,125,0.7);
  border-radius: 2px;
  transform: rotate(-18deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 6;
}
.cm-piece.tape-2 {
  top: 68%; right: 10%;
  width: 64px; height: 20px;
  background: rgba(173,216,230,0.7);
  border-radius: 2px;
  transform: rotate(12deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 6;
}
.cm-piece.sticker-1 {
  bottom: 8%; left: 10%;
  width: 28%; height: 30%;
  background: #ff7a59;
  border-radius: 50%;
  transform: rotate(8deg);
  box-shadow: 0 6px 18px rgba(255,122,89,0.35);
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 28px;
  letter-spacing: -0.5px;
  font-style: italic;
}
.cm-piece.note {
  top: 8%; right: 4%;
  width: 30%; height: 24%;
  background: #fef3a0;
  transform: rotate(5deg);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  padding: 12px 14px;
  font-family: 'Caveat', 'Bradley Hand', cursive;
  color: #4a3c1f;
  font-size: 16px;
  z-index: 2;
  line-height: 1.2;
}
.cm-piece.strip {
  bottom: 4%; right: 6%;
  width: 36%; height: 28%;
  background: #fff;
  padding: 4px;
  transform: rotate(4deg);
  z-index: 5;
  display: flex; flex-direction: column; gap: 2px;
}
.cm-piece.strip div {
  flex: 1;
  background: #ddd;
  background-size: cover; background-position: center;
  border-radius: 1px;
}

/* ─── FAQ ─────────────────────────────────────────────────────────────── */
.faq {
  display: flex; flex-direction: column;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  background: rgba(30,30,35,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
}
html[data-theme="light"] .faq-item {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
}
.faq-item summary {
  padding: 18px 22px;
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  font-size: 14px; line-height: 1.6;
  color: var(--text-secondary);
}
.faq-item p a { color: var(--accent-soft); font-weight: 500; }
html[data-theme="light"] .faq-item p a { color: var(--accent-hover); }

/* ─── Final CTA ───────────────────────────────────────────────────────── */
.final-cta {
  margin-top: 64px;
  padding: 56px 32px;
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(99,102,241,0.15), transparent 60%),
    linear-gradient(135deg, rgba(30,30,35,0.6), rgba(30,30,35,0.4));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px;
}
html[data-theme="light"] .final-cta {
  background:
    radial-gradient(ellipse at center, rgba(99,102,241,0.1), transparent 60%),
    #ffffff;
  border: 1px solid rgba(99,102,241,0.2);
}
.final-cta h2 {
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
  color: var(--text-primary);
  text-wrap: balance;
}
.final-cta p {
  font-size: 16px; color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 520px; margin-left: auto; margin-right: auto;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff !important;
  font-family: var(--font);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
  transition: transform .1s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.5); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  margin-left: 8px;
}
.btn-secondary:hover { color: var(--text-primary); }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.footer {
  max-width: 1080px;
  margin: 48px auto 0;
  padding: 32px 32px 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-secondary);
}
html[data-theme="light"] .footer { border-top: 1px solid rgba(0,0,0,0.06); }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text-primary); }

/* ─── Theme toggle ────────────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 250;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(30,30,35,0.6);
  backdrop-filter: blur(20px);
  color: #a1a1a6;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent-soft); background: rgba(30,30,35,0.8); }
html[data-theme="light"] .theme-toggle {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.06);
  color: #3a3a3c;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
html[data-theme="light"] .theme-toggle:hover { color: var(--accent-hover); background: #ffffff; }
.theme-toggle .tm-sun { display: none; }
.theme-toggle .tm-moon { display: block; }
html[data-theme="light"] .theme-toggle .tm-sun { display: block; }
html[data-theme="light"] .theme-toggle .tm-moon { display: none; }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 38px; letter-spacing: -1px; }
  .hero-sub { font-size: 15px; }
  .ba-grid { grid-template-columns: 1fr; gap: 14px; }
  .ba-arrow { transform: rotate(90deg); justify-self: center; }
  .section h2 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr; padding: 28px; gap: 32px; }
  .workflow-text h2 { font-size: 24px; }
  .final-cta { padding: 40px 24px; }
  .final-cta h2 { font-size: 26px; }
  .page { padding: 0 20px 72px; }
  .nav { padding: 18px 20px 0; }
}
