@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --background: 0 0% 100%;
  --foreground: 256 31% 14%;
  --primary: 12.6 95.3% 50.2%;
  --muted-foreground: 220 9% 46%;
  --border: 240 6% 90%;
  --destructive: 0 84% 60%;

  --accent-orange: 12.6 95.3% 50.2%;
  --light-orange: 12.6 95.3% 97%;
  --accent-purple: 270 100% 65%;

  --section-spacing-mobile: 60px;
  --section-spacing-tablet: 80px;
  --section-spacing-desktop: 100px;
  --section-spacing-desktop-xl: 120px;
}

/* ============================================================
   BASE
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  font-family: "DM Sans", system-ui, sans-serif;
  overflow-x: clip;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* ============================================================
   SHADOWS
   ============================================================ */
.shadow-soft    { box-shadow: 0 4px 20px -2px rgba(0,0,0,.05); }
.shadow-soft-lg { box-shadow: 0 10px 40px -4px rgba(0,0,0,.06); }
.shadow-glass   { box-shadow: 0 8px 32px 0 rgba(0,0,0,.06); }

/* ============================================================
   TEXTURES
   ============================================================ */
.bg-grid-texture {
  background-image:
    linear-gradient(to right,  rgba(0,0,0,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,.03) 1px, transparent 1px);
  background-size: 32px 32px;
}
.bg-radial-orange {
  background: radial-gradient(circle at center,
    hsl(var(--accent-orange) / .06) 0%, transparent 60%);
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.section-spacing {
  padding-top: var(--section-spacing-mobile);
  padding-bottom: var(--section-spacing-mobile);
}
@media (min-width: 768px) {
  .section-spacing {
    padding-top: var(--section-spacing-tablet);
    padding-bottom: var(--section-spacing-tablet);
  }
}
@media (min-width: 1024px) {
  .section-spacing {
    padding-top: var(--section-spacing-desktop);
    padding-bottom: var(--section-spacing-desktop);
  }
}
@media (min-width: 1280px) {
  .section-spacing {
    padding-top: var(--section-spacing-desktop-xl);
    padding-bottom: var(--section-spacing-desktop-xl);
  }
}

.container-custom {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 640px)  { .container-custom { padding-left: 2.5rem; padding-right: 2.5rem; } }
@media (min-width: 1024px) { .container-custom { padding-left: 3rem;   padding-right: 3rem;   } }

.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ============================================================
   APPS CAROUSEL — continuous marquee, pause on hover.
   Persistent home for the animation so it never depends on
   JS-injected <style>. JS only clones cards + adds .om-marquee.
   ============================================================ */
@keyframes omMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
[data-carousel] { overflow: hidden; }
[data-carousel-track].om-marquee { display: flex; width: max-content; flex-wrap: nowrap; gap: 0; animation: omMarquee linear infinite; will-change: transform; }
[data-carousel]:hover [data-carousel-track].om-marquee,
[data-carousel]:focus-within [data-carousel-track].om-marquee { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { [data-carousel-track].om-marquee { animation: none; } }

/* ============================================================
   FORM PRIMITIVES
   ============================================================ */
.form-label-base {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: #334155;
}
.form-input-base {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  font-size: .95rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  transition: border-color .2s, box-shadow .2s;
}
textarea.form-input-base { height: auto; padding-top: .75rem; padding-bottom: .75rem; }
.form-input-base::placeholder { color: #94a3b8; }
.form-input-base:focus {
  outline: none;
  border-color: hsl(var(--accent-orange));
  box-shadow: 0 0 0 3px hsl(var(--accent-orange) / .15);
}
.form-input-base.is-error          { border-color: hsl(var(--destructive)); }
.form-input-base.is-error:focus    { box-shadow: 0 0 0 3px hsl(var(--destructive) / .15); }
.form-error-base { font-size: .8rem; font-weight: 500; color: hsl(var(--destructive)); }

/* ============================================================
   ARTICLE / PROSE TYPOGRAPHY
   ============================================================ */
.prose h2 {
  font-size: 1.55rem; font-weight: 800; color: #0f172a;
  margin: 2.5rem 0 1rem; letter-spacing: -.02em; line-height: 1.25;
}
.prose h3 {
  font-size: 1.15rem; font-weight: 700; color: #0f172a;
  margin: 2rem 0 .75rem;
}
.prose p   { font-size: 1.0625rem; color: #475569; line-height: 1.8; margin-bottom: 1.25rem; }
.prose ul,
.prose ol  { margin: 1rem 0 1.5rem 1.25rem; }
.prose li  { font-size: 1.0625rem; color: #475569; line-height: 1.75; margin-bottom: .5rem; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose strong { color: #0f172a; font-weight: 700; }
.prose code {
  background: #f1f5f9; color: #0f172a; font-size: .875rem;
  padding: 2px 7px; border-radius: 6px; font-family: ui-monospace, monospace;
}
.prose hr  { border: none; border-top: 1px solid #e2e8f0; margin: 2.5rem 0; }
.prose a   { color: hsl(var(--accent-orange)); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   CALLOUT BOXES
   ============================================================ */
.callout {
  background: hsl(var(--light-orange));
  border: 1px solid rgba(249,58,7,.15);
  border-left: 4px solid hsl(var(--accent-orange));
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.callout p      { margin: 0; color: #334155; font-size: .9875rem; }
.callout strong { color: hsl(var(--accent-orange)); }

.callout-warn              { background: #fffbeb; border-color: #fcd34d; border-left-color: #f59e0b; }
.callout-warn p            { color: #78350f; }

/* ============================================================
   ARTICLE SIDEBAR — TOC
   ============================================================ */
.toc-link {
  display: block; font-size: .875rem; color: #64748b;
  padding: 5px 0 5px 12px; border-left: 2px solid transparent;
  transition: all .15s; text-decoration: none;
}
.toc-link:hover,
.toc-link.active { color: hsl(var(--accent-orange)); border-left-color: hsl(var(--accent-orange)); }

@media (max-width: 1023px) { .toc-rail { display: none; } }

/* ============================================================
   STEP CARDS  (setup guides)
   ============================================================ */
.step-card {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: white; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 1.5rem; margin-bottom: 1rem;
  box-shadow: 0 2px 10px -4px rgba(0,0,0,.06);
}
.step-num {
  min-width: 2.5rem; height: 2.5rem; border-radius: 10px;
  background: hsl(var(--accent-orange)); color: white;
  font-weight: 800; font-size: 1rem;
  display: grid; place-items: center; flex-shrink: 0;
}

/* WAY CARDS  (5-ways article) */
.way-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 1.75rem; margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px -4px rgba(0,0,0,.06);
}
.way-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 8px;
  background: hsl(var(--accent-orange)); color: white;
  font-weight: 800; font-size: .875rem; flex-shrink: 0;
}

/* STEP CONNECTOR  (how-it-works horizontal steps) */
.step-connector {
  flex: 1; height: 2px;
  background: repeating-linear-gradient(
    90deg,
    hsl(var(--accent-orange)) 0,
    hsl(var(--accent-orange)) 6px,
    transparent 6px,
    transparent 14px
  );
}

/* ============================================================
   TAG PILLS + CHECK LIST
   ============================================================ */
.tag-pill {
  display: inline-flex; align-items: center;
  background: #f1f5f9; color: #475569;
  font-size: .75rem; font-weight: 600;
  padding: 4px 12px; border-radius: 9999px;
}
.check-list li                { list-style: none; display: flex; align-items: flex-start; gap: 10px; margin-left: 0; }
.check-list li::before        { content: ''; display: none; }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-item .faq-body  {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding-bottom .35s ease;
  padding-bottom: 0 !important;
}
.faq-item.open .faq-body {
  max-height: 400px;
  padding-bottom: 1.5rem !important;
}
.faq-item .faq-icon  { transition: transform .3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ============================================================
   DASHBOARD TABS
   ============================================================ */
.db-tab { transition: all .2s; cursor: pointer; }
.db-tab.active {
  background: white; color: #0f172a;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.db-panel        { display: none; }
.db-panel.active { display: block; }

/* ============================================================
   CHANGELOG BADGES
   ============================================================ */
.cl-badge-new      { background:#dcfce7; color:#15803d; border:1px solid #bbf7d0; font-size:.7rem; font-weight:800; padding:2px 10px; border-radius:9999px; letter-spacing:.04em; }
.cl-badge-improved { background:#dbeafe; color:#1d4ed8; border:1px solid #bfdbfe; font-size:.7rem; font-weight:800; padding:2px 10px; border-radius:9999px; letter-spacing:.04em; }
.cl-badge-fixed    { background:#fef3c7; color:#b45309; border:1px solid #fde68a; font-size:.7rem; font-weight:800; padding:2px 10px; border-radius:9999px; letter-spacing:.04em; }

.cl-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem 0; border-bottom: 1px solid #f1f5f9;
}
.cl-item:last-child { border-bottom: none; }

.cl-section {
  background: white; border: 1px solid #e2e8f0;
  border-radius: 20px; padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px -4px rgba(0,0,0,.06);
}

/* ============================================================
   PAGE-SPECIFIC ANIMATIONS
   ============================================================ */

/* ---- Afterpay Sync — flow arrows ---- */
@keyframes flowPulse {
  0%,100% { opacity:.4; transform:scaleY(.9); }
  50%     { opacity:1;  transform:scaleY(1);  }
}
.flow-arrow { animation: flowPulse 1.8s ease-in-out infinite; }
.flow-arrow:nth-child(2) { animation-delay:.6s; }
.flow-arrow:nth-child(3) { animation-delay:1.2s; }

/* ---- Afterpay Sync — activity log rows ---- */
@keyframes logSlideIn {
  from { opacity:0; transform:translateX(-8px); }
  to   { opacity:1; transform:none; }
}
.log-row { animation: logSlideIn .4s ease both; }
.log-row:nth-child(2) { animation-delay:.1s; }
.log-row:nth-child(3) { animation-delay:.2s; }
.log-row:nth-child(4) { animation-delay:.3s; }
.log-row:nth-child(5) { animation-delay:.4s; }

/* ---- Storefront Discounts — price reveal ---- */
@keyframes priceReveal {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:none; }
}
.price-reveal { animation: priceReveal .5s ease both; }
.price-reveal:nth-child(2) { animation-delay:.15s; }
.price-reveal:nth-child(3) { animation-delay:.3s; }

@keyframes savingsPop {
  0%,100% { transform:scale(1); }
  50%     { transform:scale(1.04); }
}
.savings-pop { animation: savingsPop 3s ease-in-out infinite; }

/* ---- Syncer — sync arrows ---- */
@keyframes syncPulse {
  0%,100% { opacity:.5; transform:scaleX(.8); }
  50%     { opacity:1;  transform:scaleX(1);  }
}
.sync-arrow { animation: syncPulse 1.6s ease-in-out infinite; }
.sync-arrow:nth-child(2) { animation-delay:.4s; }
.sync-arrow:nth-child(3) { animation-delay:.8s; }

@keyframes progressFill {
  from { width:0%; }
  to   { width:65%; }
}
.progress-fill { animation: progressFill 2s ease-out both; }

/* ============================================================
   HERO ANIMATIONS  (shared)
   ============================================================ */
.animate-orbital-rotation         { animation: orbital-rotation 40s linear infinite; will-change: transform; }
.animate-orbital-rotation-reverse { animation: orbital-rotation 50s linear infinite reverse; will-change: transform; }
.animate-floating-nodes           { animation: floating-nodes 6s ease-in-out infinite; will-change: transform; }
.animate-floating-nodes-delayed   { animation: floating-nodes 6s ease-in-out infinite 3s; will-change: transform; }
.animate-pulsing-glow             { animation: pulsing-glow 3s ease-in-out infinite; will-change: opacity, filter; }
.animate-particle-flow            { animation: particle-flow 3s linear infinite; will-change: stroke-dashoffset; }

@keyframes orbital-rotation {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes floating-nodes {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}
@keyframes pulsing-glow {
  0%,100% { opacity:.4; filter:drop-shadow(0 0 4px  hsl(var(--accent-orange) / .4)); }
  50%     { opacity:1;  filter:drop-shadow(0 0 12px hsl(var(--accent-orange) / .8)); }
}
@keyframes particle-flow {
  from { stroke-dashoffset:24; }
  to   { stroke-dashoffset:0;  }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
@keyframes fade-up {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:none; }
}
.reveal         { opacity: 1; }
.reveal.in-view { animation: fade-up .6s ease-out both; }

/* ============================================================
   REDUCED MOTION  (global override)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .animate-orbital-rotation,
  .animate-orbital-rotation-reverse,
  .animate-floating-nodes,
  .animate-floating-nodes-delayed,
  .animate-pulsing-glow,
  .animate-particle-flow,
  .flow-arrow,
  .log-row,
  .price-reveal,
  .savings-pop,
  .sync-arrow,
  .progress-fill { animation: none !important; }

  .faq-item .faq-body { transition: none !important; }
  .reveal { opacity: 1 !important; animation: none !important; }
}
