/* ─────────────────────────────────────────────────────────────
   Spargo for stores (for-stores.html)
   Builds on css/home.css: same tokens, nav, type, buttons, join card and footer,
   so moving between the homepage and this page feels like one site.
   Works with no JavaScript; js/stores.js adds the entrance and scroll reveals.
   ───────────────────────────────────────────────────────────── */

/* Shared section heading: title on the left, lede on the right */
.s-head { display: flex; align-items: end; justify-content: space-between; gap: 20px 56px; flex-wrap: wrap; }
.s-head > div { max-width: 760px; }
.s-head .lede { max-width: 42ch; margin-top: 0; }

/* Before js/stores.js reveals them; never hidden without it */
.js-motion [data-in], .js-motion [data-reveal] { opacity: 0; }

/* ── 01 · Hero ── */
.s-hero { position: relative; padding: calc(var(--nav-h) + clamp(40px, 6vw, 88px)) 0 clamp(56px, 7vw, 96px); overflow: clip; }
.s-hero::before {
    content: ''; position: absolute; right: -14%; top: 4%; width: 70vw; max-width: 980px; aspect-ratio: 1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(47, 63, 207, 0.13), rgba(47, 63, 207, 0.04) 55%, transparent 72%);
}
.s-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(16px, 3vw, 40px); }
.s-hero .hero-title { font-size: clamp(2.4rem, 3.9vw, 4.4rem); }
.s-benefits { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; list-style: none; }
.s-benefits li, .s-checks li { position: relative; padding-left: 28px; font-size: 15px; font-weight: 500; color: var(--ink-mid); }
.s-benefits li::before, .s-checks li::before, .plan li::before {
    content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 6px; background: var(--indigo-soft)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%232F3FCF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
/* The laptop sits low and right in its canvas; enlarge it and pull it into the empty top left */
.s-hero-art { position: relative; }
.s-laptop { width: 128%; max-width: none; height: auto; margin: -8% -6% -6% -18%; filter: drop-shadow(0 30px 50px rgba(27, 35, 144, 0.18)); }

/* ── 02 · Every kind of store ── */
.s-kinds { padding: clamp(88px, 10vw, 130px) 0; background: var(--cream); }
.kinds { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 52px; }
.kind {
    position: relative; display: flex; flex-direction: column; border-radius: 28px; background: var(--card); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: box-shadow 250ms ease, translate 350ms var(--ease-out);
}
/* The art keeps its cream background; the mask fades it into a cream band at the top of the card */
.kind .art { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; background: var(--cream); -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); -webkit-mask-composite: source-over; mask-composite: add; }
.kind-body { display: flex; flex-direction: column; flex: 1; padding: 4px 26px 26px; }
.kind h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.kind p { margin-top: 8px; font-size: 15px; color: var(--ink-mid); text-wrap: pretty; }
.kind-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 20px; }
.kind .arrow-link { font-size: 14.5px; }
.kind-see { font-size: 13.5px; font-weight: 500; color: var(--ink-muted); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    .kind:hover { translate: 0 -4px; box-shadow: var(--shadow-md); }
    .kind-see:hover { color: var(--indigo); }
}
.kinds-note { margin-top: 22px; }

/* ── 03 · Features: pinned intro beside a ruled list ── */
.s-features { padding: clamp(88px, 10vw, 140px) 0 clamp(56px, 7vw, 96px); }
.s-features-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.s-features-intro { position: sticky; top: calc(var(--nav-h) + 40px); }
.s-feature-list { list-style: none; border-top: 1px solid var(--line-strong); }
.s-feature { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 22px; padding: 34px 0; border-bottom: 1px solid var(--line-strong); }
.s-glyph {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    background: var(--indigo-soft); color: var(--indigo); transition: background-color 250ms ease, color 250ms ease;
}
.s-glyph svg { width: 24px; height: 24px; }
.s-glyph-text { font-family: var(--font-serif); font-size: 32px; line-height: 1; }
.s-feature h3 { margin-top: 4px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.s-feature p { margin-top: 8px; max-width: 52ch; font-size: 16px; color: var(--ink-mid); }
@media (hover: hover) and (pointer: fine) { .s-feature:hover .s-glyph { background: var(--indigo); color: #fff; } }

/* ── 04 · How it works: a timeline that draws across when it comes into view ── */
.s-how { padding: clamp(56px, 7vw, 96px) 0 clamp(88px, 10vw, 130px); }
.s-steps { position: relative; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; }
.s-steps::before, .s-steps::after { content: ''; position: absolute; left: 0; right: 0; top: 27px; height: 1px; background: var(--line-strong); }
.s-steps::after { height: 2px; margin-top: -0.5px; background: var(--indigo); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out) 0.15s; }
.s-steps.is-in::after, .s-steps:not(.js-steps)::after { transform: none; }
.s-step { position: relative; padding-right: 28px; }
.s-step-n {
    position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px; border-radius: 50%;
    background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--primary-border); color: var(--indigo);
    font-family: var(--font-serif); font-size: 28px; line-height: 1;
    transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
.s-steps.is-in .s-step-n, .s-steps:not(.js-steps) .s-step-n { background: var(--indigo); color: #fff; box-shadow: none; }
.s-steps.is-in .s-step:nth-child(2) .s-step-n { transition-delay: 0.45s; }
.s-steps.is-in .s-step:nth-child(3) .s-step-n { transition-delay: 0.85s; }
.s-steps.is-in .s-step:nth-child(4) .s-step-n { transition-delay: 1.25s; }
.s-step h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.s-step p { margin-top: 6px; font-size: 15px; color: var(--ink-mid); }

/* ── 05 · What shoppers see: phones on a sideways rail ── */
.s-screens { padding: clamp(88px, 10vw, 130px) 0; background: var(--indigo-soft); overflow: clip; }
.s-rail {
    display: flex; gap: 28px; margin-top: 52px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 12px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 28px;
    scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.s-rail::-webkit-scrollbar { display: none; }
.s-rail:focus-visible { outline-offset: -3px; }
.s-shot { flex: 0 0 240px; scroll-snap-align: start; }
.s-shot img { width: 100%; height: auto; border-radius: 34px; border: 8px solid var(--ink); background: var(--ink); box-shadow: var(--shadow-md); }
.s-shot figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-mid); }
.s-shot strong { display: block; font-family: var(--font-display); font-size: 16px; letter-spacing: -0.02em; color: var(--ink); }

/* ── Analytics ── */
.s-analytics { padding: clamp(88px, 10vw, 130px) 0; }
.s-analytics-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.s-analytics-img { width: 100%; height: auto; filter: drop-shadow(0 24px 44px rgba(27, 35, 144, 0.16)); }
.s-checks { list-style: none; display: grid; gap: 14px; margin-top: 28px; }
.s-checks li { font-size: 16px; color: var(--ink); }

/* ── Plans ── */
.s-pricing { padding: clamp(56px, 7vw, 96px) 0 clamp(88px, 10vw, 130px); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 52px; align-items: stretch; }
.plan {
    display: flex; flex-direction: column; padding: 36px 32px 32px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow-sm);
    transition: box-shadow 250ms ease, translate 350ms var(--ease-out);
}
.plan-featured { box-shadow: inset 0 0 0 2px var(--indigo), var(--shadow-md); }
.plan-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.plan-chip { padding: 5px 11px; border-radius: 999px; background: var(--orange-tint); color: var(--orange-text); font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.plan-sub { margin-top: 6px; min-height: 3.2em; font-size: 15px; color: var(--ink-mid); }
.plan-amount {
    margin: 22px 0 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line);
    font-family: 'DM Sans', sans-serif; font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.plan-amount span { margin-left: 4px; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-muted); }
.plan-amount small { display: block; margin-top: 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ink-muted); }
.plan ul { flex: 1; list-style: none; display: grid; align-content: start; gap: 12px; margin-bottom: 28px; }
.plan li { position: relative; padding-left: 28px; font-size: 15px; color: var(--ink-mid); }
.plan .btn { width: 100%; }
.plans-note { margin-top: 20px; font-size: 12.5px; color: var(--ink-muted); }
@media (hover: hover) and (pointer: fine) { .plan:hover { translate: 0 -4px; } }

/* ── Sign up: the homepage's indigo join card, holding the store form ── */
.merchant-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; max-width: 620px; }
.m-row { display: grid; gap: 8px; }
.m-wide { grid-column: 1 / -1; }
.merchant-form label { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.merchant-form input, .merchant-form select {
    width: 100%; min-width: 0; height: 54px; padding: 0 18px; border: 2px solid transparent; border-radius: 14px;
    background: #fff; color: var(--ink); font: inherit; font-size: 16px; outline: none;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.merchant-form select {
    appearance: none; cursor: pointer; padding-right: 44px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%232F3FCF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center;
}
.merchant-form input::placeholder { color: var(--ink-muted); }
.merchant-form input:focus-visible, .merchant-form select:focus-visible { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.3); }
.merchant-form input:user-invalid, .merchant-form select:user-invalid { border-color: var(--error); }
.merchant-form .btn { margin-top: 8px; }
.m-status { font-size: 14px; line-height: 1.6; color: #fff; }
.m-status:empty { display: none; }
.m-status:not(:empty) { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); }
.s-signup-art img { width: min(380px, 100%); margin-left: auto; filter: drop-shadow(0 26px 30px rgba(27, 35, 144, 0.2)); }

/* ─────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .s-hero-grid, .s-features-grid, .s-analytics-grid { grid-template-columns: minmax(0, 1fr); }
    .s-hero-art { order: -1; }
    .s-laptop { width: 112%; margin: -6% 0 -4% -8%; }
    .s-hero .hero-title { font-size: clamp(2.1rem, 8.6vw, 4rem); }
    .hero-ctas .btn { flex: 1 1 200px; }
    .s-features-intro { position: static; }
    .s-steps { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
    .s-steps::before, .s-steps::after { top: 0; bottom: 0; left: 27px; right: auto; width: 1px; height: auto; }
    .s-steps::after { width: 2px; margin: 0 0 0 -0.5px; transform: scaleY(0); transform-origin: top; }
    .s-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 20px; padding: 0 0 28px; }
    .s-step-n { grid-row: span 2; margin-bottom: 0; }
    .s-step h3 { align-self: end; margin-top: 6px; }
    .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
    .plan-sub { min-height: 0; }
    .s-signup-art img { width: min(200px, 56%); margin: 0 auto; }
}

@media (max-width: 600px) {
    .kinds { grid-template-columns: minmax(0, 1fr); }
    .kind .art { aspect-ratio: 16 / 10; }
    .merchant-form { grid-template-columns: minmax(0, 1fr); }
    .merchant-form .btn { width: 100%; }
    .s-shot { flex-basis: 200px; }
    .plan { padding: 30px 24px 26px; }
    .plan-amount { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .kind, .plan, .s-glyph, .s-step-n { transition: none; }
    .s-steps::after { transition: none; transform: none; }
    .s-steps .s-step-n { transition-delay: 0s !important; }
}
