/* Duka+ landing page — exact palette from both apps' constants/theme.ts (hex-for-hex,
   not eyeballed). Ink is a grayish near-black, never pure #000; green is reserved for
   money/success, red for destructive — everything else stays grayscale. */
:root {
  --primary: #1c1c1f;
  --primary-dark: #000000;
  --primary-light: #f4f4f5;
  --background: #fafafa;
  --card: #ffffff;
  --surface: #f4f4f5;
  --foreground: #1c1c1f;
  --muted-fg: #71717a;
  --faint: #a1a1aa;
  --border: #e4e4e7;
  --border-light: #efeff1;
  --success: #16a34a;
  --success-bg: #eef7f0;
  --warning: #b45309;
  --warning-bg: #f6f1e9;
  --error: #dc2626;
  --white: #ffffff;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 12px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--primary-light); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn-light { background: var(--white); color: var(--primary); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,250,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}
.brand-mark-dark { background: var(--white); color: var(--primary); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-fg);
}
.nav-links a:hover { color: var(--foreground); }
.nav-ctas { display: flex; gap: 10px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .nav-ctas .btn-ghost { display: none; }
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 72px 24px 40px; }
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-size: 52px;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted-fg);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-note { font-size: 13px; color: var(--faint); }

.hero-art {
  position: relative;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-blob {
  position: absolute;
  z-index: -1;
  top: 8%;
  right: 4%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--success-bg) 0%, rgba(238,247,240,0) 70%);
  filter: blur(2px);
}
@keyframes float-y {
  0%, 100% { transform: translateY(0) rotate(var(--float-rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--float-rot, 0deg)); }
}
.float-slow { animation: float-y 5.5s ease-in-out infinite; }
.phone-back.float-slow { --float-rot: -6deg; }
.phone-front.float-slow { --float-rot: 4deg; }
.float-delay { animation-delay: -2.2s; }
@media (prefers-reduced-motion: reduce) {
  .float-slow { animation: none; }
}
.phone {
  position: absolute;
  width: 220px;
  height: 440px;
  border-radius: 34px;
  background: var(--primary);
  padding: 10px;
  box-shadow: 0 24px 60px rgba(28,28,31,0.22);
}
.phone-back { left: 8%; top: 6%; transform: rotate(-6deg); opacity: 0.94; }
.phone-front { right: 6%; bottom: 0; transform: rotate(4deg); }
.phone-solo { position: static; transform: none; margin: 0 auto; }
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 18px;
  background: var(--primary);
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--background);
  border-radius: 26px;
  padding: 16px 14px;
  overflow: hidden;
}
.mock-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: 0.02em;
  padding-bottom: 10px;
}
.mock-statusbar-icons { color: var(--muted-fg); font-size: 8px; letter-spacing: 1px; }
.mock-header {
  width: 60%;
  height: 10px;
  border-radius: 6px;
  background: var(--border);
  margin-bottom: 16px;
}
.mock-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(28,28,31,0.06);
  margin-bottom: 14px;
}
.mock-label { font-size: 11px; color: var(--muted-fg); font-weight: 600; }
.mock-amount { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.mock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  margin-top: 4px;
}
.mock-pill-success { color: var(--success); background: var(--success-bg); }
.mock-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-light);
}
.mock-row span:first-child { width: 55%; height: 8px; border-radius: 4px; background: var(--border); }
.mock-row span:last-child { width: 15%; height: 8px; border-radius: 4px; background: var(--success); opacity: 0.5; }

.mock-search {
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.mock-story-row { display: flex; gap: 10px; margin-bottom: 16px; }
.mock-story {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
}
.mock-story-lit { border-color: var(--success); }
.mock-shop-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(28,28,31,0.05);
}
.mock-shop-thumb {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
}
.mock-shop-thumb-badge::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--card);
}
.mock-shop-card > div:last-child { display: flex; flex-direction: column; gap: 3px; }
.mock-shop-name { font-size: 12px; font-weight: 600; }
.mock-shop-meta { font-size: 10px; color: var(--muted-fg); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 38px; }
  .hero-art { height: 340px; margin-top: 20px; }
  .phone { width: 170px; height: 340px; }
}

/* ─── Section shared ─────────────────────────────────────────────────────── */
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 10px;
}
.section-sub {
  text-align: center;
  color: var(--muted-fg);
  max-width: 480px;
  margin: 0 auto 48px;
  font-size: 15px;
}

/* ─── Scroll reveal (IntersectionObserver toggles .in-view — script.js) ──── */
.reveal { opacity: 0; transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.reveal-up { transform: translateY(24px); }
.reveal.reveal-left { transform: translateX(-24px); }
.reveal.reveal-right { transform: translateX(24px); }
.reveal:not(.reveal-up):not(.reveal-left):not(.reveal-right) { transform: translateY(16px); }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ─── How it works — animated demo ───────────────────────────────────────── */
.steps { padding: 64px 24px; max-width: var(--max-width); margin: 0 auto; }

.demo {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 12px 40px rgba(28,28,31,0.06);
}
.demo-list { display: flex; flex-direction: column; gap: 6px; }
.demo-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  color: inherit;
  position: relative;
  transition: background 0.25s ease;
}
.demo-step:hover { background: var(--surface); }
.demo-step.active { background: var(--primary-light); }
.demo-step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted-fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.25s ease, color 0.25s ease;
}
.demo-step.active .demo-step-num { background: var(--primary); color: var(--white); }
.demo-step-text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.demo-step-text strong { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.demo-step-text span { font-size: 13px; color: var(--muted-fg); line-height: 1.5; }
.demo-step-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: transparent;
  border-radius: 2px;
  overflow: hidden;
}
.demo-step.active .demo-step-bar { background: var(--border); }
.demo-step-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--success);
  border-radius: 2px;
}
.demo-step.active .demo-step-bar-fill {
  animation: demo-bar-fill 3.4s linear forwards;
}
@keyframes demo-bar-fill {
  from { width: 0%; }
  to { width: 100%; }
}

.demo-phone-wrap { display: flex; justify-content: center; }
.demo-phone { position: static; transform: none; width: 200px; height: 400px; }
.demo-phone .phone-screen { padding-top: 16px; }
.demo-screen {
  position: absolute;
  top: 42px;
  left: 14px;
  right: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.demo-screen.active { opacity: 1; transform: none; pointer-events: auto; position: relative; top: 0; left: 0; right: 0; }

.demo-product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 2px 8px rgba(28,28,31,0.05);
  position: relative;
}
.demo-product-thumb { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); flex-shrink: 0; }
.demo-product-info { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.demo-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: demo-pop 0.4s ease 0.3s backwards;
}
@keyframes demo-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.demo-scan-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--success), transparent);
  margin-top: 14px;
  animation: demo-scan 1.6s ease-in-out infinite;
}
@keyframes demo-scan {
  0%, 100% { opacity: 0.2; transform: scaleX(0.6); }
  50% { opacity: 1; transform: scaleX(1); }
}
.demo-toast {
  margin-top: 16px;
  align-self: flex-start;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  animation: demo-toast-in 0.4s ease 0.5s backwards;
}
@keyframes demo-toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.demo-confetti { position: relative; height: 60px; margin-top: 10px; }
.demo-confetti span {
  position: absolute;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--success);
  animation: demo-confetti-fall 1.4s ease-in infinite;
}
.demo-confetti span:nth-child(1) { left: 8%; background: var(--success); animation-delay: 0s; }
.demo-confetti span:nth-child(2) { left: 24%; background: var(--primary); animation-delay: 0.15s; }
.demo-confetti span:nth-child(3) { left: 42%; background: var(--faint); animation-delay: 0.05s; }
.demo-confetti span:nth-child(4) { left: 58%; background: var(--success); animation-delay: 0.25s; }
.demo-confetti span:nth-child(5) { left: 76%; background: var(--primary); animation-delay: 0.1s; }
.demo-confetti span:nth-child(6) { left: 90%; background: var(--faint); animation-delay: 0.2s; }
@keyframes demo-confetti-fall {
  0% { top: -10px; opacity: 1; transform: rotate(0deg); }
  100% { top: 60px; opacity: 0; transform: rotate(180deg); }
}

.demo-story-ring { position: relative; }
.demo-pulse-ring {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--success);
  animation: demo-pulse 1.8s ease-out infinite;
}
@keyframes demo-pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; padding: 24px; gap: 28px; }
  .demo-phone-wrap { order: -1; }
}

/* ─── Feature blocks ─────────────────────────────────────────────────────── */
.feature-block { padding: 56px 24px; }
.feature-block-alt { background: var(--surface); }
.feature-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature-inner-reverse .feature-copy { order: 2; }
.feature-inner-reverse .feature-art { order: 1; }
.feature-copy h2 { font-size: 28px; margin-bottom: 14px; }
.feature-copy p { color: var(--muted-fg); font-size: 15px; margin-bottom: 18px; }
.feature-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.feature-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  font-weight: 500;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.feature-list-light li::before { background: var(--success); }

.feature-art { display: flex; justify-content: center; }
.art-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 12px 40px rgba(28,28,31,0.08);
  border: 1px solid var(--border-light);
}
.art-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  font-weight: 500;
}
.art-card-row:last-child { border-bottom: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-success { background: var(--success); }
.dot-warn { background: var(--warning); }
.dot.pulse { box-shadow: 0 0 0 rgba(22,163,74,0.5); animation: dot-pulse 2s ease-out infinite; }
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.art-card-anim { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.art-card-anim:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(28,28,31,0.12); }
@media (prefers-reduced-motion: reduce) {
  .dot.pulse { animation: none; }
}
.art-card-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.art-card-perm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
}
.art-card-perm:last-child { border-bottom: none; }
.switch {
  width: 34px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--border);
  position: relative;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--white);
}
.switch.on { background: var(--success); }
.switch.on::after { left: 16px; }

@media (max-width: 860px) {
  .feature-inner, .feature-inner-reverse { grid-template-columns: 1fr; }
  .feature-inner-reverse .feature-copy,
  .feature-inner-reverse .feature-art { order: initial; }
}

/* ─── Stats ──────────────────────────────────────────────────────────────── */
.stats { padding: 48px 24px; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.stats-row {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-value { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.stat-label { display: block; font-size: 13px; color: var(--muted-fg); margin-top: 4px; }
@media (max-width: 700px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Shoppers section (distinctly boxed, per plan) ──────────────────────── */
.shoppers { background: var(--primary); color: var(--white); padding: 72px 24px; }
.shoppers-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.shoppers .eyebrow { color: var(--success); }
.shoppers-copy h2 { font-size: 28px; margin-bottom: 14px; color: var(--white); }
.shoppers-copy p { color: rgba(255,255,255,0.7); font-size: 15px; margin-bottom: 18px; }
.shoppers-copy .feature-list li { color: var(--white); }
.shoppers-art { display: flex; justify-content: center; }
.shoppers-art .phone { position: static; transform: none; box-shadow: 0 24px 60px rgba(0,0,0,0.4); }

@media (max-width: 860px) {
  .shoppers-inner { grid-template-columns: 1fr; }
  .shoppers-art { order: -1; }
}

/* ─── Mission note ───────────────────────────────────────────────────────── */
.mission { padding: 72px 24px; }
.mission-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.mission-text { font-size: 19px; line-height: 1.6; color: var(--foreground); font-family: var(--font-display); font-weight: 500; }

/* ─── Footer CTA ─────────────────────────────────────────────────────────── */
.footer-cta { background: var(--primary-dark); color: var(--white); padding: 72px 24px; text-align: center; }
.footer-cta-inner { max-width: 600px; margin: 0 auto; }
.footer-cta h2 { font-size: 32px; margin-bottom: 10px; color: var(--white); }
.footer-cta p { color: rgba(255,255,255,0.6); margin-bottom: 28px; }
.footer-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ─── Site footer ────────────────────────────────────────────────────────── */
.site-footer { background: var(--primary-dark); padding: 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
}
.site-footer p { color: rgba(255,255,255,0.5); font-size: 13px; }
