/* AsherPay — design tokens (matches payments.asherpay.com / demo.asherpay.com) */
:root {
  --bg: #080808;
  --surface: #0f0f11;
  --surface-2: #141417;
  --card: #141417;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #d9d9df;
  --text-dim: #b1b5c5;
  --muted: #7c7f8f;
  --muted-2: #585b68;
  --accent: #F27A1A;
  --accent-light: #FF9642;
  --accent-dim: rgba(242,122,26,0.08);
  --accent-border: rgba(242,122,26,0.35);
  --accent-glow: rgba(242,122,26,0.30);
  --white: #f5f7fb;
  --gold: #FFD700;
  --gold-glow: rgba(255,215,0,.5);

  --radius: 12px;
  --radius-lg: 16px;
  --max: 1180px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Menlo", "Monaco", ui-monospace, monospace;
}

/* Accent variations via Tweaks */
body[data-accent="ember"]   { --accent:#F27A1A; --accent-light:#FF9642; --accent-dim:rgba(242,122,26,0.08); --accent-border:rgba(242,122,26,0.35); --accent-glow:rgba(242,122,26,0.30); }
body[data-accent="amber"]   { --accent:#E8B000; --accent-light:#FFD24D; --accent-dim:rgba(232,176,0,0.08); --accent-border:rgba(232,176,0,0.38); --accent-glow:rgba(232,176,0,0.30); }
body[data-accent="electric"]{ --accent:#4ADE80; --accent-light:#86EFAC; --accent-dim:rgba(74,222,128,0.08); --accent-border:rgba(74,222,128,0.35); --accent-glow:rgba(74,222,128,0.30); }
body[data-accent="violet"]  { --accent:#A855F7; --accent-light:#C084FC; --accent-dim:rgba(168,85,247,0.08); --accent-border:rgba(168,85,247,0.35); --accent-glow:rgba(168,85,247,0.30); }
body[data-accent="ice"]     { --accent:#60A5FA; --accent-light:#93C5FD; --accent-dim:rgba(96,165,250,0.08); --accent-border:rgba(96,165,250,0.35); --accent-glow:rgba(96,165,250,0.30); }

/* Grid density */
body[data-grid="off"]   { --grid-size: 0; --grid-opacity: 0; }
body[data-grid="subtle"]{ --grid-size: 44px; --grid-opacity: 0.04; }
body[data-grid="dense"] { --grid-size: 28px; --grid-opacity: 0.06; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body { min-height: 100vh; overflow-x: hidden; }

/* Grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(242,122,26, var(--grid-opacity, 0.04)) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,122,26, var(--grid-opacity, 0.04)) 1px, transparent 1px);
  background-size: var(--grid-size, 44px) var(--grid-size, 44px);
  /* switch color with accent */
  --_ar: 242; --_ag: 122; --_ab: 26;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 30%, black 0%, black 55%, transparent 100%);
}
/* Radial orange glows */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -20%, var(--accent-dim) 0%, transparent 58%),
    radial-gradient(ellipse at 50% 120%, var(--accent-dim) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* Logo */
.logo {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.48rem 1rem;
  border-radius: 8px;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  transition: border-color .2s;
}
.logo:hover { border-color: var(--accent-border); }
.logo span { color: var(--accent); }

/* Eyebrow tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.tag-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Headings */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; color: var(--white); line-height: 1.08; }
.display-xl { font-size: clamp(2.6rem, 5.2vw, 4.6rem); font-weight: 900; line-height: 1.04; letter-spacing: -0.028em; color: var(--white); }
.display-xl > span:not(.word) { color: var(--accent); }
.display-xl > span:not(.word) .word { color: var(--accent); }
.display-lg { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 900; line-height: 1.08; letter-spacing: -0.022em; color: var(--white); }
.display-lg > span:not(.word) { color: var(--accent); }
.display-lg > span:not(.word) .word { color: var(--accent); }

.lede { font-size: 1.02rem; color: var(--muted); line-height: 1.65; max-width: 560px; }
.section { padding: 5.5rem 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin: 0 auto 2.8rem; text-align: center; }
.section-head.center .lede { margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.3rem;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--white); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--white); box-shadow: 0 10px 30px var(--accent-glow); }
.btn-accent { background: var(--accent); color: var(--white); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-accent:hover { background: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent-border); color: var(--white); background: var(--accent-dim); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.card h4 { font-size: 1rem; color: var(--white); font-weight: 700; margin-bottom: .45rem; }
.card p { font-size: .88rem; color: var(--muted); line-height: 1.6; }
.card .icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: grid; place-items: center;
  color: var(--accent-light);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .9rem;
}

/* Utility */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* Pills row */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .78rem;
  color: var(--text-dim);
  font-weight: 600;
  transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--accent-border); color: var(--white); }
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Code block */
.code {
  background: #0a0a0c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.75;
  color: #b1b5c5;
  overflow-x: auto;
}
.code .kw  { color: var(--accent-light); }
.code .str { color: #87d37c; }
.code .num { color: #E8B000; }
.code .cm  { color: #555; font-style: italic; }
.code .fn  { color: #E6E6E6; }
.code .prop{ color: #79b8ff; }

/* Stat */
.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  background: var(--surface);
  text-align: center;
}
.stat-val { font-size: 1.9rem; font-weight: 900; color: var(--accent); line-height: 1; letter-spacing: -0.02em; }
.stat-lbl { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-top: .5rem; font-weight: 600; }

/* Bullet list (orange check style from demo) */
.bullets { list-style: none; }
.bullets li {
  display: flex; gap: .7rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem; color: var(--text);
}
.bullets li:last-child { border-bottom: 0; }
.bullets .check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  display: grid; place-items: center;
  font-size: .7rem;
  flex-shrink: 0; font-weight: 700;
}
.bullets strong { color: var(--white); font-weight: 700; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Stagger children inside a revealed block */
.reveal .stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1);
}
.reveal.in .stagger > * { opacity: 1; transform: none; }
.reveal.in .stagger > *:nth-child(1)  { transition-delay: .04s; }
.reveal.in .stagger > *:nth-child(2)  { transition-delay: .10s; }
.reveal.in .stagger > *:nth-child(3)  { transition-delay: .16s; }
.reveal.in .stagger > *:nth-child(4)  { transition-delay: .22s; }
.reveal.in .stagger > *:nth-child(5)  { transition-delay: .28s; }
.reveal.in .stagger > *:nth-child(6)  { transition-delay: .34s; }
.reveal.in .stagger > *:nth-child(7)  { transition-delay: .40s; }
.reveal.in .stagger > *:nth-child(8)  { transition-delay: .46s; }
.reveal.in .stagger > *:nth-child(9)  { transition-delay: .52s; }
.reveal.in .stagger > *:nth-child(10) { transition-delay: .58s; }
.reveal.in .stagger > *:nth-child(11) { transition-delay: .64s; }
.reveal.in .stagger > *:nth-child(12) { transition-delay: .70s; }

/* ======================================
   Animations — keyframes
   ====================================== */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 18px var(--accent-glow); opacity: 1; }
  50%      { box-shadow: 0 0 30px var(--accent-glow); opacity: .88; }
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 0 6px rgba(242,122,26,0); }
}
@keyframes drawLine {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes nav-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes shimmer-sweep {
  0%   { transform: translateX(-120%) skewX(-20deg); }
  100% { transform: translateX(220%) skewX(-20deg); }
}
@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(30px, -18px); }
}

/* Nav slide down on initial paint */
header { animation: nav-in .6s ease both; }

/* LIVE badge breathing */
.live-badge { animation: breathe 2.4s ease-in-out infinite; }

/* "Most merchants" pulse — applied via class */
.badge-pulse { animation: badge-pulse 2s ease-in-out infinite; }

/* Shimmer sweep on primary / accent buttons */
.btn-primary, .btn-accent { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after, .btn-accent::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-120%) skewX(-20deg);
  pointer-events: none;
  z-index: 1;
}
.btn-primary:hover::after, .btn-accent:hover::after {
  animation: shimmer-sweep .9s ease forwards;
}

/* Headline word stagger */
.headline-stagger .word {
  display: inline-block;
  opacity: 0;
  animation: word-in .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.headline-stagger .word.sp { width: .3em; }

/* How it works line — draws in when parent .reveal fires */
.how-line {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1) .25s;
}
.reveal.in .how-line { transform: scaleX(1); }

/* Count-up numbers */
.counter { display: inline-block; font-variant-numeric: tabular-nums; }

/* Accessibility — reduced motion users get simple fades only */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  .live-badge, .badge-pulse { animation: none !important; }
  .btn-primary::after, .btn-accent::after { display: none !important; }
}

/* ============================================================
   Responsive — mobile-first overrides (inline styles require !important)
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .display-xl { font-size: clamp(2.2rem, 6.2vw, 3.4rem) !important; }
  .display-lg { font-size: clamp(1.7rem, 5.4vw, 2.4rem) !important; }
}

/* Phone — big shift */
@media (max-width: 700px) {
  .container { padding: 0 1.1rem !important; }
  .section { padding: 3rem 0 !important; }
  .section-head { margin-bottom: 1.7rem !important; }
  .section-head.center { margin: 0 auto 1.8rem !important; }

  h1, h2, h3, h4 { letter-spacing: -0.015em; }
  .display-xl { font-size: 2rem !important; line-height: 1.1 !important; }
  .display-lg { font-size: 1.55rem !important; line-height: 1.15 !important; }
  .lede { font-size: .95rem !important; line-height: 1.6 !important; }

  .btn { padding: .8rem 1.1rem !important; font-size: .82rem !important; width: auto; }
  .card { padding: 1.15rem 1.1rem !important; }

  /* Nav */
  .nav-inner { padding: .75rem 1.1rem !important; }
  .nav-signin { display: none !important; }
  .nav-cta { padding: .5rem .8rem !important; font-size: .72rem !important; }
  .logo { font-size: .82rem !important; padding: .38rem .75rem !important; }

  /* Hero */
  .hero-grid { gap: 2rem !important; }
  .hero-stats { grid-template-columns: repeat(3, 1fr) !important; gap: .8rem !important; margin-top: 2.2rem !important; }
  .hero-stats > div > div:first-child { font-size: 1.05rem !important; }
  .hero-stats > div > div:last-child { font-size: .58rem !important; }
  .hero-buttons { gap: .55rem !important; }
  .hero-buttons .btn { flex: 1 1 auto; min-width: 0; }

  /* Live payments — collapse into 2-line rows */
  .live-payments { padding: .85rem .9rem !important; }
  .live-rows { min-height: 0 !important; }
  .live-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "biz amt" "meta meta" !important;
    gap: .2rem .6rem !important;
    padding: .65rem .1rem !important;
  }
  .live-row .live-biz { grid-area: biz; min-width: 0; }
  .live-row .live-biz > div:first-child { font-size: .82rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .live-row .live-amt {
    grid-area: amt !important;
    font-size: .88rem !important;
    min-width: 0 !important;
  }
  .live-row .live-time,
  .live-row .live-status {
    grid-area: meta;
    display: inline-flex !important;
  }
  .live-row .live-time { justify-self: start; padding-right: .5rem; }
  .live-row .live-status { justify-self: end; }
  /* hide every other row on phone to keep card compact */
  .live-rows > .live-row:nth-child(n+6) { display: none; }

  .live-badge {
    top: -10px !important; right: -6px !important;
    padding: .35rem .55rem !important;
    font-size: .58rem !important;
  }

  /* Trusted by — stack */
  .trusted-by { padding: 1.4rem 0 !important; }
  .trusted-by-inner {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
  }
  .trusted-by-label { order: 0; }
  .trusted-by-marks {
    justify-content: center !important;
    gap: 1.2rem 1.6rem !important;
  }

  /* Capabilities */
  .cap-panel { padding: 1.4rem 1.2rem !important; gap: 1.4rem !important; }
  .cap-panel h3 { font-size: 1.3rem !important; }
  .cap-panel p { font-size: .92rem !important; }
  .cap-panel [style*="minHeight: 340"],
  .cap-panel > div:last-child > div { min-height: 240px !important; }

  /* Industries */
  .ind-grid { grid-template-columns: 1fr !important; }

  /* Developers */
  .dev-grid { gap: 2rem !important; }
  .code { font-size: .72rem !important; padding: .9rem 1rem !important; }
  .webhooks-panel { padding: .85rem .95rem !important; }
  .webhook-row { font-size: .68rem !important; gap: .4rem; }
  .webhook-row > div > span:nth-child(3) { display: none; } /* hide evt id on phone */

  /* Pricing */
  .price-card { padding: 1.6rem 1.3rem !important; }
  .price-card > div[style*="font-size: 2.4rem"],
  .price-card div:nth-child(3) > div:first-child { font-size: 2rem !important; }
  .price-bullets { grid-template-columns: 1fr 1fr !important; }
  .price-bullets > div { padding: 1rem .7rem !important; }

  /* How it works */
  .how-card { padding: 1.5rem 1.3rem !important; }
  .how-stats { grid-template-columns: 1fr 1fr !important; gap: .6rem !important; }
  .stat { padding: .9rem .7rem !important; }
  .stat-val { font-size: 1.5rem !important; }

  /* CTA */
  .cta-section { padding: 3rem 0 !important; }
  .cta-card { padding: 2.2rem 1.3rem !important; border-radius: 16px !important; }
  .cta-card .display-lg { font-size: 1.5rem !important; }

  /* Footer */
  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .5rem !important;
    font-size: .72rem !important;
  }
  .footer-bottom > span:last-child { font-size: .66rem !important; }
}

/* Very small phones */
@media (max-width: 420px) {
  .container { padding: 0 .95rem !important; }
  .display-xl { font-size: 1.75rem !important; }
  .hero-stats { gap: .5rem !important; }
  .hero-stats > div > div:first-child { font-size: .95rem !important; }
  .nav-cta { padding: .45rem .65rem !important; font-size: .68rem !important; }
  .trusted-by-marks { gap: 1rem 1.2rem !important; }
  .price-bullets { grid-template-columns: 1fr !important; }
}
