Added background and foreground settings to blocks, and scroll in animations

This commit is contained in:
Jakub Dorfman 2026-05-18 18:39:49 +02:00
parent b4fbf3e411
commit 94c1e0b679
24 changed files with 826 additions and 44 deletions

View file

@ -15,11 +15,22 @@
}
:root {
--fg-heading: #2c2c2c;
--fg-body: #2c2c2c;
background: #faf8f5;
color: #2c2c2c;
color: var(--fg-body);
font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}
/* ── Foreground colour utilities (set per-block via BackgroundWrapper) ── */
.text-fg-body { color: var(--fg-body, #2c2c2c); }
.text-fg-body\/85 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 85%, transparent); }
.text-fg-body\/80 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 80%, transparent); }
.text-fg-body\/75 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 75%, transparent); }
.text-fg-body\/70 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 70%, transparent); }
.text-fg-body\/60 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 60%, transparent); }
.text-fg-heading { color: var(--fg-heading, #2c2c2c); }
body {
min-height: 100vh;
margin: 0;
@ -33,7 +44,7 @@ h2,
h3,
h4 {
font-family: 'Playfair Display', Georgia, serif;
color: #2c2c2c;
color: var(--fg-heading, #2c2c2c);
}
.prose-wellness p {
@ -62,3 +73,36 @@ h4 {
text-decoration: underline;
text-underline-offset: 3px;
}
/* ── Scroll-reveal animations ── */
.reveal {
opacity: 0;
transform: translateY(30px);
transition:
opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal-visible {
opacity: 1;
transform: translateY(0);
}
/* ── Hero fade-in stagger ── */
.animate-fade-in {
opacity: 0;
transform: translateY(20px);
animation: fadeInUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
@keyframes fadeInUp {
to {
opacity: 1;
transform: translateY(0);
}
}
/* ── Smooth scroll ── */
html {
scroll-behavior: smooth;
}