/* PurpleRail marketing site. Tokens + fonts from theme.css (Ecomstat house design). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: hsl(var(--card)); color: var(--ink); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
[hidden] { display: none !important; }

/* header */
.site-head { position: sticky; top: 0; z-index: 30; background: hsl(var(--card)); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.site-head .logo img { height: 28px; width: auto; }
.site-nav { display: flex; gap: 6px; margin-left: 8px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover, .site-nav a.on { color: var(--purple); background: hsl(var(--primary) / .07); }
.head-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; margin-left: auto; height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, box-shadow .15s, transform .15s; font-family: inherit; }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 8px 20px -10px hsl(var(--primary) / .7); }
.btn-primary:hover { background: var(--purple-600); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: hsl(var(--primary) / .4); color: var(--purple); }
.btn-light { background: #fff; color: hsl(var(--band)); }
.btn-outline-light { color: #fff; border-color: hsl(0 0% 100% / .35); }
.btn-outline-light:hover { border-color: #fff; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, hsl(265 80% 45% / .55), transparent 60%), linear-gradient(170deg, #2a1660 0%, #1d1240 55%, #150d30 100%);
  color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 84px; padding-bottom: 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: hsl(255 80% 82%); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(150 70% 55%); box-shadow: 0 0 0 4px hsl(150 70% 55% / .2); }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; margin: 16px 0 18px; color: #fff; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #c4b5fd, #a5f3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: hsl(255 40% 88%); max-width: 560px; margin: 0 0 30px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 22px; font-size: 14px; color: hsl(255 30% 75%); }
.shot { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), 0 0 0 1px hsl(0 0% 100% / .08); }
.shot .bar { height: 30px; background: #f1eff6; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: #d6d2e0; display: block; }
.hero .shot { transform: perspective(1600px) rotateY(-8deg) rotateX(2deg); }

/* logos / stats strip */
.strip { border-bottom: 1px solid var(--line); background: hsl(var(--background)); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 28px; color: hsl(var(--band)); }
.stat span { color: var(--muted); font-size: 14px; }

/* sections */
section.s { padding: 96px 0; }
section.alt { background: hsl(var(--background)); }
.s-head { max-width: 720px; margin: 0 0 48px; }
.s-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.kicker { color: var(--purple); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.s-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin: 10px 0 14px; letter-spacing: -0.015em; }
.s-head p { color: var(--muted); font-size: 18px; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 19px; margin: 14px 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: hsl(var(--primary) / .09); color: var(--purple); }
.icon svg { width: 22px; height: 22px; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
.split h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; margin: 10px 0 16px; letter-spacing: -0.015em; }
.split p { color: var(--muted); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: hsl(var(--primary) / .12); }
.ticks li::after { content: ''; position: absolute; left: 7px; top: 7px; width: 5px; height: 9px; border: solid var(--purple); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.frame { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff; }
.phones { display: flex; gap: 18px; justify-content: center; }
.phone { width: 230px; border-radius: 30px; padding: 10px; background: #15112a; box-shadow: var(--shadow-lg); }
.phone img { border-radius: 22px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: st; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; }
.step::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--purple); color: #fff;
  font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.step h3 { font-size: 16px; margin: 0 0 6px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); }

/* flows (funds-flow options) */
.flows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flow { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; }
.flow h3 { font-size: 16px; margin: 0 0 8px; }
.flow p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.flow .path { font-size: 12.5px; font-weight: 600; color: var(--purple); }

/* CTA band */
.cta-band { background: linear-gradient(135deg, #2a1660, #1d1240); color: #fff; border-radius: 22px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.cta-band h2 { margin: 0 0 8px; font-size: 32px; color: #fff; }
.cta-band p { margin: 0; color: hsl(255 40% 86%); font-size: 17px; }
.cta-band .ctas { display: flex; gap: 12px; flex: none; }

/* page header (inner pages) */
.page-hero { background: linear-gradient(170deg, #2a1660 0%, #1d1240 100%); color: #fff; padding: 72px 0 64px; }
.page-hero h1 { font-size: clamp(32px, 4.2vw, 48px); margin: 12px 0 14px; color: #fff; line-height: 1.12; letter-spacing: -0.02em; }
.page-hero p { color: hsl(255 40% 88%); font-size: 19px; max-width: 720px; margin: 0; }

/* contact */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.form input, .form select, .form textarea { height: 46px; padding: 0 14px; font-size: 15px; width: 100%; }
.form textarea { height: 130px; padding: 12px 14px; resize: vertical; }
.form .hp { position: absolute; left: -10000px; }
.form .ok { padding: 14px 16px; border-radius: 10px; background: var(--ok-50); color: var(--ok); font-weight: 600; }
.form .err { color: var(--bad); font-size: 14px; }
.fine { font-size: 13px; color: var(--muted); }
.badge-beta { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: hsl(45 100% 90%); color: hsl(35 100% 25%); vertical-align: middle; }

/* footer */
.site-foot { background: #120b29; color: hsl(255 25% 78%); padding: 64px 0 28px; margin-top: 0; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-foot h3 { color: #fff; font-size: 14px; margin: 0 0 12px; font-family: var(--font-display); }
.site-foot a { color: hsl(255 25% 78%); text-decoration: none; display: block; padding: 3px 0; font-size: 14.5px; }
.site-foot a:hover { color: #fff; }
.site-foot .legal { border-top: 1px solid hsl(255 30% 22%); margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot img { height: 26px; width: auto; margin-bottom: 14px; }
.pr-build { font: 11px/1.3 var(--mono); color: hsl(255 20% 60%); }

@media (max-width: 960px) {
  .hero .wrap, .split, .grid2 { grid-template-columns: 1fr; gap: 36px; }
  .split.rev > :first-child { order: 0; }
  .hero .shot { transform: none; }
  .grid3, .flows { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .site-nav, .head-cta { display: none; }
  .menu-toggle { display: inline-block; }
  body.nav-open .site-head .wrap { flex-wrap: wrap; height: auto; min-height: 68px; row-gap: 0; padding-top: 14px; padding-bottom: 18px; }
  body.nav-open .site-nav { display: flex; order: 3; flex-basis: 100%; flex-direction: column; margin: 10px 0 0; gap: 2px; }
  body.nav-open .site-nav a { padding: 12px 10px; font-size: 16px; }
  body.nav-open .head-cta { display: flex; order: 4; flex-basis: 100%; margin: 12px 0 0; }
  body.nav-open .head-cta .btn { flex: 1; }
  body.nav-open .site-head { background: #fff; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  section.s { padding: 64px 0; }
  .grid3, .flows, .steps, .form .row { grid-template-columns: 1fr; }
  .phones { flex-direction: column; align-items: center; }
  .hero .wrap { padding-top: 56px; padding-bottom: 64px; }
}

/* code sample on /developers */
pre.code { margin: 0; background: hsl(var(--band)); color: hsl(250 30% 92%); border-radius: 16px; padding: 22px 24px; font-size: 13px; line-height: 1.6; overflow-x: auto; box-shadow: var(--shadow-lg); min-width: 0; }
.split > * { min-width: 0; }
.page-hero p a:not(.btn) { color: #fff; text-decoration: underline; }

/* hero: desktop screenshot on wide screens, phone frame on small ones */
.hero-phone { display: none; }
@media (max-width: 600px) {
  .hero-shot { display: none; }
  .hero-phone { display: block; margin: 0 auto; width: 250px; }
}
.phone img { aspect-ratio: 390 / 844; object-fit: cover; object-position: top; width: 100%; }

/* skip layout/paint of off-screen sections until they scroll near */
section.s, .site-foot { content-visibility: auto; contain-intrinsic-size: auto 700px; }
