/* §09 — PUBLIC storefront + sales-page styles. Built strictly from DS tokens.
   The storefront (.store) is neutral house-style (warm paper, charcoal ink).
   The sales page (.sp) reads its palette/type/density from inline CSS vars
   (--sp-*) set per product from its resolved theme tokens — so it wears the
   product's own theme, not a single hard-coded look. No `.app` chrome here. */

.public { min-height: 100vh; }

.store-loading { min-height: 100vh; display: grid; place-items: center; background: var(--paper-100); }

/* ---------- Storefront (neutral house-style) ---------- */
.store {
  min-height: 100vh;
  background: var(--paper-100);
  color: var(--ink-900);
  font-family: var(--font-body, "Hanken Grotesk", system-ui, sans-serif);
  padding: 56px 24px 64px;
}
.store__head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.store__avatar {
  width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--paper-50); border: 1px solid var(--paper-300);
  font-family: var(--font-display, Spectral, serif); font-size: 2rem; color: var(--clay-600);
}
.store__avatar img { width: 100%; height: 100%; object-fit: contain; }
.store__avatar img.store__mark { width: 64%; height: 64%; }
.store__name { font-family: var(--font-display, Spectral, Georgia, serif); font-weight: 500; font-size: 2.3rem; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--ink-900); }
.store__tagline { font-size: 1.05rem; color: var(--ink-700); max-width: 36rem; margin: 0 auto 8px; line-height: 1.55; }
.store__handle { font-family: var(--font-mono, monospace); font-size: 0.85rem; color: var(--ink-500); margin: 0; }

.store__grid {
  max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px;
}
.shopcard {
  text-align: left; cursor: pointer; border: 1px solid var(--paper-300);
  background: var(--paper-card); border-radius: var(--radius-lg, 16px); overflow: hidden;
  padding: 0; font: inherit; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.shopcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg, 0 18px 40px rgba(31,27,21,.12)); border-color: var(--card-accent, var(--clay-300)); }
.shopcard__cover { padding: 22px 22px 0; }
.shopcard__cover .cover { width: 100%; aspect-ratio: 3 / 4; }
.shopcard__meta { padding: 16px 22px 22px; }
.shopcard__title { font-family: var(--font-display, Spectral, serif); font-weight: 500; font-size: 1.15rem; line-height: 1.25; margin: 0 0 6px; color: var(--ink-900); }
.shopcard__one { font-size: 0.9rem; color: var(--ink-600); line-height: 1.45; margin: 0 0 12px; }
.shopcard__cta { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--card-accent, var(--clay-600)); }

.store-empty { max-width: 520px; margin: 80px auto; text-align: center; color: var(--ink-600); }
.store-empty h1 { font-family: var(--font-display, Spectral, serif); color: var(--ink-900); margin: 0 0 10px; }
.store__foot { max-width: 980px; margin: 56px auto 0; text-align: center; color: var(--ink-500); font-size: 0.82rem; display: flex; gap: 7px; align-items: center; justify-content: center; }
.store__foot img { width: 18px; height: 18px; }

/* ---------- Sales page (wears the product's theme via --sp-* vars) ---------- */
.sp {
  min-height: 100vh;
  background: var(--sp-paper, #FAF7ED);
  color: var(--sp-ink, #1F1B15);
  font-family: var(--sp-body-font, "Hanken Grotesk", system-ui, sans-serif);
  padding: 0 24px 72px;
}
.sp__topbar { max-width: 1040px; margin: 0 auto; padding: 22px 0 0; }
.sp__back {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: none;
  color: var(--sp-accent-deep, #834124); font: inherit; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; padding: 6px 0; opacity: .85;
}
.sp__back:hover { opacity: 1; }

.sp__hero {
  max-width: 1040px; margin: 26px auto 0;
  display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 56px; align-items: center;
}
.sp__hero-cover .cover { width: 100%; aspect-ratio: 3 / 4; box-shadow: 0 24px 60px rgba(31,27,21,.22); }
.sp__eyebrow { font-family: var(--sp-body-font); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 0.72rem; color: var(--sp-accent, #C06A41); margin: 0 0 12px; }
.sp__headline {
  font-family: var(--sp-heading-font, Spectral, serif); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 calc(16px * var(--sp-rhythm, 1)); color: var(--sp-ink);
}
.sp__sub { font-size: 1.12rem; line-height: 1.55; color: var(--sp-ink); opacity: .82; max-width: var(--sp-measure, 40rem); margin: 0 0 calc(22px * var(--sp-rhythm, 1)); }
.sp__bullets { list-style: none; padding: 0; margin: 0 0 calc(26px * var(--sp-rhythm, 1)); display: grid; gap: calc(11px * var(--sp-rhythm, 1)); }
.sp__bullets li { display: flex; gap: 11px; align-items: flex-start; font-size: 1rem; line-height: 1.45; color: var(--sp-ink); }
.sp__bullets li span { color: var(--sp-accent, #C06A41); flex: none; margin-top: 2px; }

.sp__claim { display: flex; gap: 10px; flex-wrap: wrap; }
.sp__email {
  flex: 1 1 200px; min-width: 0; padding: 13px 16px; font: inherit; font-size: 1rem;
  border: 1.5px solid color-mix(in srgb, var(--sp-ink) 22%, transparent);
  border-radius: var(--radius-md, 10px); background: color-mix(in srgb, var(--sp-paper) 70%, #fff);
  color: var(--sp-ink);
}
.sp__email:focus { outline: none; border-color: var(--sp-accent, #C06A41); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-accent) 24%, transparent); }
.sp__cta {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1rem; color: #fff;
  background: var(--sp-accent, #C06A41); border-radius: var(--radius-md, 10px);
  transition: background .15s ease, transform .12s ease;
}
.sp__cta:hover { background: var(--sp-accent-deep, #834124); }
.sp__cta:active { transform: translateY(1px); }
.sp__cta:disabled { opacity: .6; cursor: default; }
.sp__delivered { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--sp-accent-deep, #834124); text-decoration: none; }
.sp__claim-hint { font-size: 0.85rem; color: var(--sp-ink); opacity: .6; margin: 10px 0 0; }
.sp__claim-err { font-size: 0.85rem; color: #B4452E; margin: 10px 0 0; }

.sp__body {
  max-width: 760px; margin: 72px auto 0;
  display: grid; gap: calc(40px * var(--sp-rhythm, 1));
}
.sp__sec h2 { font-family: var(--sp-heading-font, Spectral, serif); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 10px; color: var(--sp-ink); }
.sp__sec p { font-size: 1.05rem; line-height: 1.65; color: var(--sp-ink); opacity: .86; margin: 0; max-width: var(--sp-measure, 40rem); }

.sp__foot { max-width: 760px; margin: 64px auto 0; text-align: center; color: var(--sp-ink); opacity: .5; font-size: 0.82rem; display: flex; gap: 7px; align-items: center; justify-content: center; }
.sp__foot img { width: 18px; height: 18px; }

/* Entrance reveal — one orchestrated cascade, honoring reduced-motion. */
.sp-r { opacity: 0; transform: translateY(14px); }
.sp--in .sp-r { opacity: 1; transform: none; transition: opacity .5s ease, transform .55s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .sp-r { opacity: 1; transform: none; }
  .sp--in .sp-r { transition: none; }
}

@media (max-width: 760px) {
  .sp__hero { grid-template-columns: 1fr; gap: 28px; }
  .sp__hero-cover { max-width: 240px; }
}
