/* Recast marketing page — page-specific CSS on top of the design-taste-frontend
   skill's system.css/ui/cards.css/motion.css/backgrounds.css. Only what sits
   inside a visual and the kit lacks (SKILL.md section 5, step 5). */

:root {
  /* start.mjs brand (--bg/--ink/--accent #FFFFFF/#15101F/#6B3DF4, surface
     #F7F5FD, muted #6B6680) — the same brand tokens as the React app's
     theme.ts, so the marketing page and the in-app tool read as one brand. */
  --p-bg: #ffffff; --p-surface: #f7f5fd; --p-ink: #15101f; --p-muted: #6b6680;
  --p-accent: #6b3df4; --p-accent-ink: #ffffff; --p-action: #6b3df4; --p-action-ink: #ffffff;
  --p-inv-bg: #15101f; --p-inv-surface: #221d2c; --p-inv-ink: #ffffff; --p-inv-muted: #9c9aa2;
  --p-inv-accent: #ffffff; --p-inv-accent-ink: #15101f; --p-inv-action: #ffffff; --p-inv-action-ink: #15101f;
  --font-display: "Funnel Display", system-ui, sans-serif;
  --font-text: "Funnel Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.03em;
}

/* ---------------------------------------------------------------- hero visual */
.hero-visual { background: var(--surface); }
/* system.css's hero-split stretches the visual frame to the column's full
   716px-ish height (716/628, taller than the photo's own 1000x850); no
   object-position crops the frame without also slicing the photo's own
   "AI-modified" pill baked in near its corner (it sits too close to centre
   for any crop window this narrow to clear it). Matching the frame to the
   photo's own ratio instead means nothing is ever cropped. */
.hero-visual.frame--photo { height: auto !important; aspect-ratio: 1000 / 850; align-self: start; }
.hero-visual .compare-before, .hero-visual .compare-after { position: absolute; inset: 0; }
.hero-result {
  width: 232px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-4); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 20px 40px -20px rgb(0 0 0 / .35);
}
@media (max-width: 639px) { .hero-result { display: none; } }
.hero-result__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.hero-result__title { font-size: var(--t-small); font-weight: 500; color: var(--ink); }
.hero-result__check {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px;
  background: var(--action); color: var(--action-ink); flex: none;
}
.hero-result__check svg { width: 11px; height: 11px; }
.hero-result__spin {
  width: 14px; height: 14px; border-radius: 999px; border: 2px solid color-mix(in oklab, var(--ink) 18%, transparent);
  border-top-color: var(--action); animation: hero-spin 800ms linear infinite; flex: none;
}
@keyframes hero-spin { to { transform: rotate(360deg); } }
.hero-result__track { display: flex; gap: 6px; margin-top: var(--s-3); }
.hero-result__step { flex: 1; height: 4px; border-radius: 999px; background: var(--line-strong); }
.hero-result__step.is-done { background: var(--action); }
@media (prefers-reduced-motion: reduce) { .hero-result__spin { animation: none; } }

/* ---------------------------------------------------------------- feature cards: before/after crossfade */
a.card--compare .panel { padding: 0; }
a.card--compare .compare-before { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity var(--m-image, 600ms) var(--m-ease, ease); }
a.card--compare:hover .compare-before { opacity: 1; }
a.card--compare:hover .compare-after { opacity: 0; }
.compare-tag {
  position: absolute; z-index: 2; top: var(--s-3); display: flex; align-items: center; gap: 6px;
  background: rgba(21,16,31,.72); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 5px 10px; border-radius: 999px;
}
.compare-tag--before { left: var(--s-3); }
.compare-tag--after { right: var(--s-3); }

/* ---------------------------------------------------------------- "Why Recast" concept icons */
/* Real dimensional icons (Microsoft Fluent Emoji 3D, MIT), not a flat tinted
   square with a thin-stroke glyph — they already carry their own shading, so
   no background tile or color-mix tint is layered on top of them. */
.why-icon { width: 64px; height: 64px; object-fit: contain; margin-bottom: var(--s-3); }

/* ---------------------------------------------------------------- feature card concept icons */
.feature-icon { width: 40px; height: 40px; object-fit: contain; margin-bottom: var(--s-2); }

/* ---------------------------------------------------------------- hero fact icons */
.hero-facts > div { grid-template-columns: 28px 1fr; column-gap: var(--s-2); row-gap: 2px; align-items: center; }
.hero-facts img { grid-row: span 2; width: 28px; height: 28px; object-fit: contain; }

/* ---------------------------------------------------------------- how-it-works */
.how-step { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.how-step img { width: 100%; max-width: 220px; height: 150px; object-fit: contain; margin-bottom: var(--s-2); }
.how-step .step-num { margin-bottom: var(--s-1); }

/* ---------------------------------------------------------------- brand mark */
.logo-mark { border-radius: 8px; flex: none; }

/* ---------------------------------------------------------------- mobile nav toggle wiring */
@media (max-width: 1023px) { body.nav-locked { overflow: hidden; } }

/* ---------------------------------------------------------------- section height: min, not fixed
   system.css locks every section to exactly `--h` screens tall (overflow
   left at its default "visible") on the assumption a section's content was
   tuned, screen by screen, to fit — real content here (the 2x2 feature grid,
   the "Why Recast" 2x3 icon grid) is taller than one fixed screen at normal
   browser/window heights, so it was spilling into the next section instead
   of pushing it down, reading as badly overlapping text. `min-height` keeps
   the same generous one-screen-minimum spacing but always grows to fit
   real content, so two sections can never occupy the same space. */
main > :is(section, .section), footer.closing, main > :is(.hero, .section--hero) {
  height: auto; min-height: calc(var(--h, 1) * 100vh);
}
/* system.css's own phone media query (max-width: 639px) re-locks every
   section to a FIXED height again (its :not(.hero) selector edges out the
   rule above on specificity) — real stacked-to-one-column content on a
   phone (the 2x3 icon grid, 2x2 feature cards) is routinely taller than
   that fixed height, so it overflowed into the next section instead of
   pushing it down (sections visibly overlapping), while shorter sections
   left dead space below them. Same min-height fix, repeated at matching
   specificity so it wins here too. */
@media (max-width: 639px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto;
    min-height: calc(var(--hm, var(--h, 1)) * 100vh);
    min-height: calc(var(--hm, var(--h, 1)) * 100lvh);
  }
}
