/* ============================================================================
   Stampwise landing version — shared stylesheet (hand-written, no Tailwind).
   The page itself is authored with inline styles (ported from the
   docs/stampwise/ prototype); this file holds only what inline styles cannot
   express: element resets, keyframes, :root accent fallback, :hover states, and
   the responsive collapse for the home-page grids. Per-domain accent overrides
   are emitted server-side by {% stampwise_accent_vars %}.
   ========================================================================== */

/* Accent fallback (prototype emerald). Overridden in <head> per-domain. */
:root {
  --accent: 5 150 105;
  --accent-deep: 4 120 87;
  --accent-soft: 209 250 229;
  color-scheme: light;
}

html { overflow-x: clip; }
html, body {
  margin: 0;
  padding: 0;
  background: #f7f7f4;
  color: #1d1d1f;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: clip; }
::selection { background: rgb(var(--accent) / 0.18); }

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] .faq-plus { transform: rotate(45deg); }

a { -webkit-tap-highlight-color: transparent; }

/* Alpine pre-init guard: anything marked x-cloak stays hidden until Alpine
   boots and removes the attribute (the chatbox panel would otherwise flash
   open on load). Every landing theme carries this rule. */
[x-cloak] { display: none !important; }

/* Skip-to-content link (a11y) — visually hidden until focused. */
.sf-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #1d1d1f; color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.sf-skip:focus { left: 0; }

/* Keyframes ported from the prototype's inline <style>. */
@keyframes marqL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes blinkCaret { 50% { opacity: 0; } }

/* Reviews marquee rows pause on hover so a card can be read. */
.marq-row:hover { animation-play-state: paused; }

/* Card hover lift (subtle polish; the prototype cards are otherwise static). */
.bl-fcard, .fb-card, .st-step { transition: transform 0.35s ease; }
@media (hover: hover) {
  .bl-fcard:hover, .fb-card:hover, .st-step:hover { transform: translateY(-6px); }
}

/* Reduced motion: OWNER DECISION (mirrors parcelo PR #498 / sendfare PR #499) —
   this marketing scroll-film plays FULL motion on every device; the JS ignores
   prefers-reduced-motion (Android battery-saver was leaving the film static).
   Only the CSS marquee honours the preference, so it never auto-scrolls under
   an explicit reduce request. */
@media (prefers-reduced-motion: reduce) {
  .marq-row { animation: none !important; }
}

/* ============================ Responsive ================================= */
/* The home is desktop-first (prototype). These overrides keep the fixed-column
   grids on a single column at phone/tablet widths. Inline grid declarations
   require !important to override. The nav, footer and chatbox partials carry
   their own responsive <style> blocks. */

/* Hero: short viewports trim the giant number and drop the scroll cue so
   nothing collides with the checkmark row or the fixed nav. */
@media (max-height: 760px) {
  #bl-bignum { font-size: clamp(4.4rem, 13vw, 10.5rem) !important; }
  #bl-h1 { margin-top: 30px !important; }
}
@media (max-height: 700px) { #bl-cue { display: none !important; } }

/* Features bento + How-it-works steps: multi-col → single col. */
@media (max-width: 760px) {
  #fb-grid { grid-template-columns: 1fr !important; }
  #fb-grid > .fb-card { grid-column: auto !important; }
  #st-steps { grid-template-columns: 1fr !important; }
  #st-steps > div[style*="position:absolute"] { display: none !important; } /* connector line */
  /* FAQ two-col → stacked */
  #faq > div { grid-template-columns: 1fr !important; gap: 28px !important; }
}

/* Exhibit lane: the 5-column price row reflows to a readable 2-col grid. */
@media (max-width: 640px) {
  #bl-lanerow { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px 12px !important; }
  #bl-lanerow > span:first-child { grid-column: 1 / -1; }
  #bl-lanerow > span { text-align: left !important; }
}

/* Mobile hero: hide the drifting overpayment chips (they collide with real
   content at phone width), keep the $9.75 readable and tuck the $2.50 sticker
   to the corner instead of covering it. */
@media (max-width: 600px) {
  .bl-chip { display: none !important; }
  #bl-bignum { font-size: clamp(6rem, 25vw, 8.5rem) !important; }
  #bl-newprice { font-size: clamp(1.9rem, 8.5vw, 2.8rem) !important; right: -3% !important; bottom: -22% !important; }
}

/* Footer (shared sendfare-style partial): 5-col → 2-col → single col. */
@media (max-width: 900px) {
  footer [style*="grid-template-columns:1.4fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px !important;
  }
}
@media (max-width: 768px) {
  footer [style*="grid-template-columns:1.4fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Tap targets: give every footer link a real touch box. */
  footer a { display: inline-block; padding: 6px 0; }
}

/* Scroll-film pre-reveal state (issue #541). These elements are animated in by
   stampwise.js, so they start hidden — but only when JavaScript is actually
   going to run. The `.sw-js` gate is set by an inline head script and dropped
   again if the film never starts, so a no-JS (or blocked-script) visitor sees
   the hero payoff and the whole bench-log sales story as static content. */
.sw-js .sw-film-hidden { visibility: hidden; }
