{ui.loop.writer.eyebrow}
@@ -310,6 +322,13 @@ const localizeHref = (href: string): string => {
border-radius: 7px;
background: var(--surface-sunk);
}
+ /* Dark theme: the hero is a white product render, which stayed a glaring
+ white block on the dark page. The image itself is dimmed (no dark variant
+ of the render exists); the hues and the depth survive, the white does
+ not dominate the panel. */
+ :global(:root[data-theme='dark']) .hero-snapshot {
+ filter: brightness(0.6) contrast(1.12);
+ }
.loop-step {
min-height: 124px;
padding: 0.85rem;
diff --git a/src/components/MarketingHome.astro b/src/components/MarketingHome.astro
index e47da2a..27d5124 100644
--- a/src/components/MarketingHome.astro
+++ b/src/components/MarketingHome.astro
@@ -1,4 +1,6 @@
---
+import { Image } from 'astro:assets';
+import heroImage from '../assets/objectos-home-hero.png';
import { getPostsInLocale } from '../lib/posts';
import { blogPath, formatDate, pricingPath, postPath, ui, type Locale } from '../lib/i18n';
import { homeCopy } from '../lib/home';
@@ -80,10 +82,18 @@ const compareLinks = [
{ slug: 'is-lovable-safe-for-production', tone: 'amber' },
];
-const coverSrc = (cover: unknown): string =>
- typeof cover === 'string'
- ? cover
- : (cover as { src?: string })?.src ?? '';
+// A raster post cover is served as WebP at the card's width, not as the
+// 1.5-1.9 MB original: one of three columns (about 345px) on a desktop, one of
+// two at 641-900px, the full column on a phone. The widest candidate covers
+// the phone column at 3x. An SVG cover is a few KB and is served as is.
+const ARTICLE_WIDTHS = [360, 540, 720, 1080];
+const ARTICLE_SIZES = '(max-width: 640px) calc(100vw - 2rem), (max-width: 900px) calc(50vw - 2rem), 360px';
+// The product diagram under the positioning copy, as WebP instead of the
+// 1.7 MB PNG. Its box is at most 850px wide at 3:2 (4:3 on a phone), and
+// object-fit: cover draws the 1.6:1 image about 1.07x (1.2x) the box's width.
+// It sits below the hero and the video at every viewport, so it stays lazy.
+const HERO_WIDTHS = [480, 720, 960, 1280, 1586];
+const HERO_SIZES = '(min-width: 898px) 910px, calc(120vw - 2.4rem)';
---
@@ -132,11 +142,12 @@ const coverSrc = (cover: unknown): string =>
page's first visual now, so this sits below it, illustrating the
positioning it belongs to. */}