Cookbook — Vintage / Retro Recipes landing
A nostalgic 70s vintage-recipes landing page with a mustard-and-avocado hero, groovy display headline and scalloped retro borders. Browse a recipe-box grid of kitschy index cards that flip from a gradient food photo to a hand-typed recipe, soak up a rotating tip of the day, and sign up for a recipe-by-mail strip. Scroll-reveal animations, a playful retro toast and an aged-paper footer round out the period mood. Pure HTML, CSS and vanilla JS — no libraries, no images.
MCP
Code
/* ============================================================
Aunt Marigold's Kitchen — Vintage / Retro Recipes landing
Themed palette: mustard + avocado + cream, 70s display mood
============================================================ */
:root {
/* warm cookbook base */
--cream: #f3ead4; /* aged paper page */
--paper: #fbf4e2; /* card surface */
--ink: #34281a; /* deep brown ink */
--ink-2: #5e4b34;
--muted: #8c785a;
--line: rgba(52, 40, 26, 0.18);
--line-2: rgba(52, 40, 26, 0.32);
/* 70s themed accents — mustard / avocado / clay */
--mustard: #d9a521;
--mustard-d: #b8851a;
--avocado: #6f7b3c;
--avocado-d: #586431;
--pumpkin: #c8651f;
--clay: #b9532c;
--rust: #9c3d1c;
--teal: #3f7d72;
--ok: #5b7d3a;
--warn: #c8651f;
--danger: #9c3d1c;
--r-sm: 8px;
--r-md: 14px;
--r-lg: 26px;
--sh-1: 0 1px 2px rgba(52, 40, 26, 0.18);
--sh-2: 0 12px 30px rgba(52, 40, 26, 0.22);
--sh-card: 0 2px 0 rgba(52, 40, 26, 0.12), 0 14px 26px rgba(52, 40, 26, 0.16);
--serif: "Playfair Display", Georgia, serif;
--sans: "Inter", system-ui, -apple-system, sans-serif;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
font-family: var(--sans);
line-height: 1.6;
color: var(--ink);
background-color: var(--cream);
/* aged paper grain */
background-image:
radial-gradient(circle at 18% 22%, rgba(217, 165, 33, 0.1), transparent 42%),
radial-gradient(circle at 82% 12%, rgba(111, 123, 60, 0.12), transparent 40%),
radial-gradient(circle at 50% 100%, rgba(200, 101, 31, 0.08), transparent 55%);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
img {
max-width: 100%;
display: block;
}
a {
color: inherit;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.skip-link {
position: absolute;
left: 12px;
top: -48px;
background: var(--ink);
color: var(--paper);
padding: 10px 16px;
border-radius: var(--r-sm);
z-index: 50;
transition: top 0.18s ease;
text-decoration: none;
font-weight: 600;
}
.skip-link:focus {
top: 12px;
}
:focus-visible {
outline: 3px solid var(--pumpkin);
outline-offset: 2px;
border-radius: 4px;
}
/* ---------- Buttons ---------- */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
border: 2px solid var(--ink);
background: var(--paper);
color: var(--ink);
font-family: var(--sans);
font-weight: 700;
font-size: 0.95rem;
padding: 11px 20px;
border-radius: 999px;
cursor: pointer;
text-decoration: none;
box-shadow: 3px 3px 0 var(--ink);
transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
white-space: nowrap;
}
.btn:hover {
transform: translate(-1px, -1px);
box-shadow: 4px 4px 0 var(--ink);
}
.btn:active {
transform: translate(2px, 2px);
box-shadow: 1px 1px 0 var(--ink);
}
.btn--primary {
background: var(--mustard);
color: var(--ink);
}
.btn--primary:hover {
background: var(--mustard-d);
}
.btn--ghost {
background: transparent;
}
.btn--clay {
background: var(--clay);
color: var(--paper);
}
.btn--clay:hover {
background: var(--rust);
}
.btn--mini {
padding: 7px 14px;
font-size: 0.85rem;
box-shadow: 2px 2px 0 var(--ink);
}
.btn--mini:hover {
box-shadow: 3px 3px 0 var(--ink);
}
/* ---------- Kicker / titles ---------- */
.kicker {
font-family: var(--sans);
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
font-size: 0.74rem;
color: var(--rust);
margin: 0 0 10px;
}
.kicker--center {
text-align: center;
}
/* ============================================================
Top bar
============================================================ */
.topbar {
position: sticky;
top: 0;
z-index: 30;
background: var(--avocado);
border-bottom: 4px solid var(--ink);
color: var(--paper);
}
.topbar__inner {
max-width: 1140px;
margin: 0 auto;
padding: 12px 22px;
display: flex;
align-items: center;
gap: 18px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 12px;
text-decoration: none;
color: inherit;
}
.brand__badge {
display: grid;
place-items: center;
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--mustard);
border: 3px solid var(--ink);
font-size: 1.3rem;
box-shadow: var(--sh-1);
}
.brand__text {
display: flex;
flex-direction: column;
line-height: 1.1;
}
.brand__name {
font-family: var(--serif);
font-weight: 700;
font-size: 1.2rem;
}
.brand__sub {
font-size: 0.72rem;
letter-spacing: 0.12em;
text-transform: uppercase;
opacity: 0.85;
}
.topbar__links {
list-style: none;
display: flex;
gap: 22px;
margin: 0 0 0 auto;
padding: 0;
}
.topbar__links a {
text-decoration: none;
font-weight: 600;
font-size: 0.95rem;
padding-bottom: 2px;
border-bottom: 2px solid transparent;
transition: border-color 0.15s ease;
}
.topbar__links a:hover {
border-color: var(--mustard);
}
.topbar .btn--mini {
margin-left: 4px;
}
/* ============================================================
Hero
============================================================ */
.hero {
position: relative;
overflow: hidden;
background:
radial-gradient(circle at 80% 20%, rgba(217, 165, 33, 0.55), transparent 45%),
linear-gradient(135deg, var(--mustard) 0%, var(--pumpkin) 48%, var(--avocado) 100%);
border-bottom: 4px solid var(--ink);
}
/* groovy swirl overlay */
.hero::before {
content: "";
position: absolute;
inset: 0;
background-image:
radial-gradient(circle at 12% 78%, rgba(252, 244, 226, 0.25) 0 60px, transparent 61px),
radial-gradient(circle at 90% 88%, rgba(52, 40, 26, 0.12) 0 90px, transparent 91px);
pointer-events: none;
}
.hero__scallop {
position: absolute;
left: 0;
right: 0;
bottom: -2px;
height: 22px;
background:
radial-gradient(circle at 14px -2px, transparent 14px, var(--cream) 15px) repeat-x;
background-size: 28px 22px;
}
.hero__inner {
position: relative;
z-index: 2;
max-width: 1140px;
margin: 0 auto;
padding: 64px 22px 78px;
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 40px;
align-items: center;
}
.hero .kicker {
color: var(--ink);
}
.hero__title {
font-family: var(--serif);
font-weight: 700;
font-size: clamp(2.4rem, 6vw, 4.2rem);
line-height: 1.02;
margin: 0 0 18px;
color: var(--ink);
text-shadow: 2px 2px 0 rgba(251, 244, 226, 0.45);
}
.hero__title em {
font-style: italic;
color: var(--paper);
text-shadow: 3px 3px 0 var(--rust);
}
.hero__lede {
max-width: 46ch;
font-size: 1.06rem;
color: var(--ink);
margin: 0 0 26px;
font-weight: 500;
}
.hero__cta {
display: flex;
flex-wrap: wrap;
gap: 14px;
}
.hero__stats {
list-style: none;
display: flex;
gap: 28px;
margin: 34px 0 0;
padding: 0;
}
.hero__stats li {
display: flex;
flex-direction: column;
}
.hero__stats strong {
font-family: var(--serif);
font-size: 1.7rem;
color: var(--ink);
}
.hero__stats span {
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--ink-2);
font-weight: 600;
}
/* hero artwork "platter" blobs */
.hero__art {
position: relative;
min-height: 320px;
}
.platter {
position: absolute;
display: grid;
place-items: center;
border-radius: 50%;
border: 5px solid var(--ink);
box-shadow: var(--sh-2);
}
.platter--big {
width: 230px;
height: 230px;
top: 36px;
left: 50%;
transform: translateX(-50%);
background:
radial-gradient(circle at 35% 30%, #fff5d6, transparent 45%),
radial-gradient(circle at 60% 70%, var(--avocado), var(--avocado-d) 70%),
var(--mustard);
}
.platter__emoji {
font-size: 5rem;
filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}
.platter--sm {
width: 96px;
height: 96px;
font-size: 2.4rem;
}
.platter--a {
top: 0;
left: 4%;
background:
radial-gradient(circle at 35% 30%, #fff7da, transparent 50%), var(--mustard);
}
.platter--b {
bottom: 8px;
right: 2%;
background:
radial-gradient(circle at 35% 30%, #eaf0c8, transparent 50%), var(--avocado);
}
.sticker {
position: absolute;
top: 6px;
right: 6px;
background: var(--clay);
color: var(--paper);
font-family: var(--serif);
font-weight: 700;
font-size: 0.9rem;
padding: 14px 12px;
border: 3px solid var(--ink);
border-radius: 50%;
width: 88px;
height: 88px;
display: grid;
place-items: center;
text-align: center;
line-height: 1.05;
transform: rotate(-14deg);
box-shadow: var(--sh-1);
}
/* ============================================================
Section shell
============================================================ */
.section {
max-width: 1140px;
margin: 0 auto;
padding: 70px 22px;
}
.section__head {
text-align: center;
margin-bottom: 40px;
}
.section__title {
font-family: var(--serif);
font-weight: 700;
font-size: clamp(1.9rem, 4vw, 2.8rem);
margin: 0 0 10px;
}
.section__sub {
max-width: 52ch;
margin: 0 auto;
color: var(--ink-2);
font-weight: 500;
}
/* ============================================================
Recipe index cards (flippable)
============================================================ */
.cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
gap: 26px;
}
.card {
perspective: 1400px;
border: 0;
background: transparent;
padding: 0;
cursor: pointer;
font-family: inherit;
text-align: left;
height: 360px;
}
.card__inner {
position: relative;
width: 100%;
height: 100%;
transition: transform 0.6s cubic-bezier(0.4, 0.1, 0.2, 1);
transform-style: preserve-3d;
}
.card.is-flipped .card__inner {
transform: rotateY(180deg);
}
.card__face {
position: absolute;
inset: 0;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
background: var(--paper);
border: 2px solid var(--ink);
border-radius: var(--r-md);
box-shadow: var(--sh-card);
overflow: hidden;
display: flex;
flex-direction: column;
}
/* index-card ruled lines */
.card__face::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background-image: repeating-linear-gradient(
transparent 0 27px,
rgba(63, 125, 114, 0.16) 27px 28px
);
opacity: 0.5;
}
.card__front .card__face,
.card__back {
/* placeholder */
}
/* FRONT — the food "photo" */
.card__front .card__photo {
height: 56%;
position: relative;
border-bottom: 2px solid var(--ink);
display: grid;
place-items: center;
}
.card__photo .emoji {
font-size: 3.6rem;
z-index: 1;
filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.3));
}
/* appetizing CSS-gradient "food photos" per dish */
.card__photo[data-photo="0"] {
background:
radial-gradient(circle at 30% 28%, #fff4cf, transparent 46%),
radial-gradient(circle at 72% 74%, var(--avocado), var(--avocado-d) 72%),
linear-gradient(135deg, var(--mustard), var(--pumpkin));
}
.card__photo[data-photo="1"] {
background:
radial-gradient(circle at 28% 26%, #fff8d4, transparent 48%),
radial-gradient(circle at 78% 70%, #f2d24a, transparent 60%),
linear-gradient(135deg, var(--mustard), #cdae2b);
}
.card__photo[data-photo="2"] {
background:
radial-gradient(circle at 32% 30%, #fff2c4, transparent 50%),
radial-gradient(circle at 75% 78%, var(--pumpkin), transparent 62%),
linear-gradient(135deg, #e2a93a, var(--clay));
}
.card__photo[data-photo="3"] {
background:
radial-gradient(circle at 30% 26%, #fff0cf, transparent 46%),
radial-gradient(circle at 70% 72%, var(--clay), var(--rust) 75%),
linear-gradient(135deg, var(--mustard), var(--pumpkin));
}
.card__photo[data-photo="4"] {
background:
radial-gradient(circle at 28% 30%, #fbe9c2, transparent 48%),
radial-gradient(circle at 76% 74%, #b9532c, transparent 60%),
linear-gradient(135deg, #d8a64a, var(--clay));
}
.card__photo[data-photo="5"] {
background:
radial-gradient(circle at 30% 28%, #eef3c9, transparent 50%),
radial-gradient(circle at 74% 76%, var(--avocado-d), transparent 64%),
linear-gradient(135deg, var(--avocado), #586431);
}
/* subtle vignette over every photo */
.card__photo::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 40%, transparent 55%, rgba(52, 40, 26, 0.22));
pointer-events: none;
}
.card__front .card__body {
position: relative;
z-index: 1;
padding: 16px 18px;
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
}
.card__cat {
font-size: 0.7rem;
letter-spacing: 0.14em;
text-transform: uppercase;
font-weight: 700;
color: var(--rust);
}
.card__name {
font-family: var(--serif);
font-weight: 700;
font-size: 1.25rem;
line-height: 1.15;
margin: 0;
}
.card__meta {
margin-top: auto;
display: flex;
gap: 14px;
font-size: 0.82rem;
color: var(--ink-2);
font-weight: 600;
}
.card__flip-hint {
position: absolute;
bottom: 10px;
right: 12px;
font-size: 0.72rem;
font-weight: 700;
color: var(--avocado-d);
z-index: 2;
display: flex;
align-items: center;
gap: 4px;
}
/* corner tape */
.card__tape {
position: absolute;
top: -8px;
left: 50%;
transform: translateX(-50%) rotate(-2deg);
width: 90px;
height: 22px;
background: rgba(217, 165, 33, 0.55);
border: 1px dashed rgba(52, 40, 26, 0.35);
z-index: 3;
}
/* BACK — the recipe */
.card__back {
transform: rotateY(180deg);
background: var(--paper);
}
.card__back .card__inner-back {
position: relative;
z-index: 1;
padding: 18px 18px 16px;
height: 100%;
display: flex;
flex-direction: column;
}
.card__back h4 {
font-family: var(--serif);
margin: 0 0 4px;
font-size: 1.1rem;
color: var(--rust);
}
.card__back .recipe-cat {
font-size: 0.68rem;
letter-spacing: 0.14em;
text-transform: uppercase;
font-weight: 700;
color: var(--avocado-d);
margin: 0 0 10px;
}
.card__back ul {
margin: 0 0 10px;
padding: 0 0 0 1.05em;
font-size: 0.84rem;
color: var(--ink);
line-height: 1.5;
}
.card__back li::marker {
color: var(--mustard-d);
}
.card__back .steps {
font-size: 0.82rem;
color: var(--ink-2);
margin: 0;
line-height: 1.5;
}
.card__back .card__meta {
margin-top: auto;
}
/* ============================================================
Tip of the day
============================================================ */
.tip {
background:
repeating-linear-gradient(
45deg,
rgba(111, 123, 60, 0.08) 0 14px,
transparent 14px 28px
),
var(--avocado);
border-top: 4px solid var(--ink);
border-bottom: 4px solid var(--ink);
color: var(--paper);
}
.tip__inner {
max-width: 760px;
margin: 0 auto;
padding: 56px 22px;
text-align: center;
}
.tip__badge {
display: inline-flex;
align-items: center;
gap: 10px;
background: var(--mustard);
color: var(--ink);
border: 3px solid var(--ink);
border-radius: 999px;
padding: 8px 18px;
margin-bottom: 22px;
box-shadow: var(--sh-1);
}
.tip__badge span {
font-size: 1.2rem;
}
.tip__badge em {
font-family: var(--serif);
font-style: italic;
font-weight: 700;
}
.tip__quote {
font-family: var(--serif);
font-size: clamp(1.3rem, 3.2vw, 1.85rem);
line-height: 1.4;
margin: 0 0 22px;
quotes: "“" "”";
}
.tip__quote::before {
content: open-quote;
}
.tip__quote::after {
content: close-quote;
}
.tip__foot {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.tip__from {
font-family: var(--serif);
font-style: italic;
font-size: 1.05rem;
}
/* ============================================================
Signup strip
============================================================ */
.signup {
max-width: 1140px;
margin: 0 auto;
padding: 60px 22px;
}
.signup__inner {
background: var(--paper);
border: 3px solid var(--ink);
border-radius: var(--r-lg);
box-shadow: var(--sh-card);
padding: 34px 36px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 26px;
flex-wrap: wrap;
position: relative;
overflow: hidden;
}
.signup__inner::before {
content: "🍋🥑🍅";
position: absolute;
right: -10px;
bottom: -14px;
font-size: 4rem;
opacity: 0.18;
letter-spacing: -6px;
}
.signup__title {
font-family: var(--serif);
font-size: clamp(1.5rem, 3vw, 2rem);
margin: 0 0 6px;
}
.signup__sub {
margin: 0;
color: var(--ink-2);
font-weight: 500;
}
.signup__form {
display: flex;
gap: 10px;
flex-wrap: wrap;
z-index: 1;
}
.signup__form input {
font-family: var(--sans);
font-size: 0.98rem;
padding: 11px 16px;
border: 2px solid var(--ink);
border-radius: 999px;
background: var(--cream);
color: var(--ink);
min-width: 230px;
}
.signup__form input::placeholder {
color: var(--muted);
}
.signup__form input[aria-invalid="true"] {
border-color: var(--danger);
background: #f8e6df;
}
/* ============================================================
Footer
============================================================ */
.footer {
background: var(--ink);
color: var(--cream);
border-top: 4px solid var(--mustard);
}
.footer__inner {
max-width: 1140px;
margin: 0 auto;
padding: 48px 22px 30px;
display: flex;
justify-content: space-between;
gap: 40px;
flex-wrap: wrap;
}
.footer__brand {
display: flex;
align-items: center;
gap: 14px;
max-width: 320px;
}
.footer .brand__name {
font-family: var(--serif);
font-size: 1.15rem;
margin: 0;
}
.footer__tag {
margin: 4px 0 0;
font-size: 0.85rem;
opacity: 0.75;
}
.footer__cols {
display: flex;
gap: 56px;
flex-wrap: wrap;
}
.footer__cols h3 {
font-family: var(--serif);
font-size: 1rem;
margin: 0 0 12px;
color: var(--mustard);
}
.footer__cols a {
display: block;
text-decoration: none;
color: var(--cream);
opacity: 0.82;
font-size: 0.9rem;
padding: 4px 0;
transition: opacity 0.15s ease;
}
.footer__cols a:hover {
opacity: 1;
}
.footer__fine {
max-width: 1140px;
margin: 0 auto;
padding: 16px 22px 34px;
font-size: 0.78rem;
opacity: 0.6;
border-top: 1px solid rgba(243, 234, 212, 0.15);
}
.noscript {
text-align: center;
color: var(--rust);
font-weight: 600;
}
/* ============================================================
Reveal-on-scroll
============================================================ */
.reveal {
opacity: 0;
transform: translateY(22px);
transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-in {
opacity: 1;
transform: none;
}
/* ============================================================
Toast
============================================================ */
.toast {
position: fixed;
left: 50%;
bottom: 26px;
transform: translateX(-50%) translateY(120%);
background: var(--clay);
color: var(--paper);
border: 3px solid var(--ink);
border-radius: 999px;
padding: 12px 22px;
font-weight: 700;
box-shadow: var(--sh-2);
z-index: 60;
transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.4);
max-width: 90vw;
}
.toast.is-show {
transform: translateX(-50%) translateY(0);
}
/* ============================================================
Responsive
============================================================ */
@media (max-width: 860px) {
.hero__inner {
grid-template-columns: 1fr;
padding-top: 48px;
}
.hero__art {
min-height: 280px;
order: -1;
margin: 0 auto;
max-width: 360px;
width: 100%;
}
.topbar__links {
display: none;
}
.topbar__inner .btn--mini {
margin-left: auto;
}
}
@media (max-width: 720px) {
.signup__inner {
flex-direction: column;
align-items: flex-start;
}
.signup__form {
width: 100%;
}
.signup__form input {
flex: 1;
min-width: 0;
}
.footer__inner {
flex-direction: column;
gap: 28px;
}
}
@media (max-width: 480px) {
.hero__stats {
gap: 18px;
}
.section,
.signup {
padding-left: 16px;
padding-right: 16px;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
.card__inner {
transition: none;
}
}/* ============================================================
Aunt Marigold's Kitchen — Vintage / Retro Recipes landing
Vanilla JS: flippable index cards, tip rotator, scroll-reveal,
signup validation, retro toast. No external libraries.
============================================================ */
(function () {
"use strict";
/* ---------- Toast helper ---------- */
var toastEl = null;
var toastTimer = null;
function toast(msg) {
if (!toastEl) {
toastEl = document.createElement("div");
toastEl.className = "toast";
toastEl.setAttribute("role", "status");
toastEl.setAttribute("aria-live", "polite");
document.body.appendChild(toastEl);
}
toastEl.textContent = msg;
// force reflow so the transition re-triggers
void toastEl.offsetWidth;
toastEl.classList.add("is-show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toastEl.classList.remove("is-show");
}, 2600);
}
/* ---------- Recipe data (fictional, illustrative) ---------- */
var RECIPES = [
{
name: "Avocado Tuna Bake",
cat: "Casserole",
emoji: "🥑",
time: "45 min",
serves: "Serves 6",
cardNo: "014",
ingredients: [
"2 ripe avocados, mashed",
"2 cans albacore tuna, drained",
"1½ cups egg noodles, cooked",
"¾ cup cheddar, grated",
"1 sleeve buttery crackers, crushed"
],
steps: "Fold it all together, crown with cracker crumbs and bake at 350°F until golden & bubbling."
},
{
name: "Lime Jell-O Tower",
cat: "Molded Salad",
emoji: "🍋",
time: "4 hr chill",
serves: "Serves 8",
cardNo: "031",
ingredients: [
"2 boxes lime gelatin",
"1 cup small-curd cottage cheese",
"1 can crushed pineapple",
"½ cup chopped pecans",
"1 cup whipped topping"
],
steps: "Layer in a ring mold, chill 4 hours, then unmold onto a paper doily. Show-stopper!"
},
{
name: "Swiss Fondue Pot",
cat: "Party Sharing",
emoji: "🧀",
time: "25 min",
serves: "Serves 4",
cardNo: "008",
ingredients: [
"8 oz Gruyère, shredded",
"8 oz Emmental, shredded",
"1 cup dry white wine",
"1 clove garlic, halved",
"splash of kirsch + nutmeg"
],
steps: "Rub the pot with garlic, melt low and slow, then dunk crusty bread cubes. Don’t lose your bread!"
},
{
name: "Pineapple Upside-Down Cake",
cat: "Jiffy Dessert",
emoji: "🍍",
time: "1 hr",
serves: "Serves 10",
cardNo: "002",
ingredients: [
"7 pineapple rings + cherries",
"½ cup brown sugar",
"½ cup butter",
"1½ cups flour",
"2 eggs + 1 cup sugar"
],
steps: "Caramel in the pan, batter on top, bake, then flip warm onto a platter for the big reveal."
},
{
name: "Deviled Ham Spread",
cat: "Cocktail Nibble",
emoji: "🥖",
time: "15 min",
serves: "Serves 12",
cardNo: "047",
ingredients: [
"1 cup minced cooked ham",
"3 tbsp mayonnaise",
"1 tsp yellow mustard",
"2 tbsp sweet pickle relish",
"a dash of paprika"
],
steps: "Mash smooth, mound into a little crock and serve with rye toast points."
},
{
name: "Garden Pea Casserole",
cat: "Supper Side",
emoji: "🫛",
time: "35 min",
serves: "Serves 6",
cardNo: "022",
ingredients: [
"3 cups green peas",
"1 can cream of mushroom",
"1 small onion, diced",
"1 cup French-fried onions",
"½ cup diced pimientos"
],
steps: "Stir together, top with crispy onions and bake at 350°F for 25 minutes till crackly."
}
];
/* ---------- Build the flippable index cards ---------- */
function buildCards() {
var wrap = document.getElementById("cardbox");
if (!wrap) return;
RECIPES.forEach(function (r, i) {
var li = r.ingredients
.map(function (x) {
return "<li>" + esc(x) + "</li>";
})
.join("");
var card = document.createElement("button");
card.className = "card reveal";
card.type = "button";
card.setAttribute("aria-pressed", "false");
card.setAttribute(
"aria-label",
"Flip recipe card for " + r.name + " to read the recipe"
);
card.innerHTML =
'<div class="card__inner">' +
// FRONT
'<div class="card__face card__front">' +
'<span class="card__tape" aria-hidden="true"></span>' +
'<div class="card__photo" data-photo="' +
i +
'"><span class="emoji" aria-hidden="true">' +
r.emoji +
"</span></div>" +
'<div class="card__body">' +
'<span class="card__cat">' +
esc(r.cat) +
"</span>" +
'<h3 class="card__name">' +
esc(r.name) +
"</h3>" +
'<div class="card__meta"><span>⏱ ' +
esc(r.time) +
"</span><span>" +
esc(r.serves) +
"</span></div>" +
"</div>" +
'<span class="card__flip-hint">Flip <span aria-hidden="true">↻</span></span>' +
"</div>" +
// BACK
'<div class="card__face card__back">' +
'<div class="card__inner-back">' +
"<h4>" +
esc(r.name) +
"</h4>" +
'<p class="recipe-cat">Card No. ' +
esc(r.cardNo) +
" · " +
esc(r.cat) +
"</p>" +
"<ul>" +
li +
"</ul>" +
'<p class="steps">' +
esc(r.steps) +
"</p>" +
'<div class="card__meta"><span>⏱ ' +
esc(r.time) +
"</span><span>" +
esc(r.serves) +
"</span></div>" +
"</div>" +
"</div>" +
"</div>";
card.addEventListener("click", function () {
var flipped = card.classList.toggle("is-flipped");
card.setAttribute("aria-pressed", flipped ? "true" : "false");
if (flipped) toast("📝 " + r.name + " — here’s the recipe!");
});
wrap.appendChild(card);
});
// observe the freshly-built cards for reveal
observeReveal(wrap.querySelectorAll(".reveal"));
}
function esc(s) {
return String(s).replace(/[&<>"']/g, function (c) {
return {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}[c];
});
}
/* ---------- Tip of the day rotator ---------- */
var TIPS = [
"A pat of butter rubbed under the lid keeps your fondue from boiling over — works like a charm, dearie!",
"Chill your mixing bowl before whipping cream and it’ll fluff up twice as fast.",
"Add a pinch of baking soda to the pot and your green beans stay bright and groovy.",
"Stale bread? A damp tea towel and a warm oven brings it right back to life.",
"Rub a cut lemon on your cutting board to chase away yesterday’s onion smell.",
"Save your pickle brine — it makes the zippiest potato salad in the neighborhood.",
"A spoonful of cold coffee deepens the color of any beef gravy. Far out!"
];
function initTip() {
var el = document.getElementById("tipText");
var btn = document.getElementById("nextTip");
if (!el || !btn) return;
var i = 0;
btn.addEventListener("click", function () {
i = (i + 1) % TIPS.length;
el.textContent = TIPS[i];
toast("💡 Fresh tip served up!");
});
}
/* ---------- Signup form ---------- */
function initSignup() {
var form = document.getElementById("signupForm");
if (!form) return;
var input = document.getElementById("email");
form.addEventListener("submit", function (e) {
e.preventDefault();
var ok = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(input.value.trim());
if (!ok) {
input.setAttribute("aria-invalid", "true");
input.focus();
toast("📬 Pop in a real email, sugar.");
return;
}
input.removeAttribute("aria-invalid");
input.value = "";
toast("🍋 You’re on the list — see you Sunday!");
});
input.addEventListener("input", function () {
if (input.getAttribute("aria-invalid")) input.removeAttribute("aria-invalid");
});
}
/* ---------- Scroll reveal ---------- */
var io = null;
function observeReveal(nodes) {
if (!nodes || !nodes.length) return;
if (!("IntersectionObserver" in window)) {
nodes.forEach(function (n) {
n.classList.add("is-in");
});
return;
}
if (!io) {
io = new IntersectionObserver(
function (entries) {
entries.forEach(function (en) {
if (en.isIntersecting) {
en.target.classList.add("is-in");
io.unobserve(en.target);
}
});
},
{ threshold: 0.12, rootMargin: "0px 0px -8% 0px" }
);
}
nodes.forEach(function (n) {
io.observe(n);
});
}
/* ---------- Smooth-scroll for in-page anchors (with toast on CTA) ---------- */
function initAnchors() {
document.querySelectorAll('a[href^="#"]').forEach(function (a) {
a.addEventListener("click", function () {
var msg = a.getAttribute("data-toast");
if (msg) toast(msg);
});
});
}
/* ---------- Boot ---------- */
function init() {
buildCards();
initTip();
initSignup();
initAnchors();
observeReveal(document.querySelectorAll(".reveal"));
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init);
} else {
init();
}
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Aunt Marigold's Kitchen — Vintage Recipes</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="topbar" role="banner">
<nav class="topbar__inner" aria-label="Primary">
<a class="brand" href="#top">
<span class="brand__badge" aria-hidden="true">🍳</span>
<span class="brand__text">
<span class="brand__name">Aunt Marigold’s</span>
<span class="brand__sub">Kitchen · est. 1974</span>
</span>
</a>
<ul class="topbar__links">
<li><a href="#classics">The Classics</a></li>
<li><a href="#tip">Tip of the Day</a></li>
<li><a href="#cardbox">Recipe Box</a></li>
</ul>
<a class="btn btn--mini" href="#classics">Browse ›</a>
</nav>
</header>
<main id="main">
<!-- HERO -->
<section class="hero" id="top">
<div class="hero__scallop" aria-hidden="true"></div>
<div class="hero__inner">
<div class="hero__copy reveal">
<p class="kicker">★ Far‑Out Home Cooking Since 1974 ★</p>
<h1 class="hero__title">
Groovy Recipes<br />
from the <em>Avocado</em> Era
</h1>
<p class="hero__lede">
Dig into a far‑out collection of casseroles, fondues and
jiffy desserts — lovingly typed onto index cards, splattered
with mustard, and passed down through three generations.
</p>
<div class="hero__cta">
<a class="btn btn--primary" href="#classics">Browse the Classics</a>
<a class="btn btn--ghost" href="#cardbox">Open the Recipe Box</a>
</div>
<ul class="hero__stats" aria-label="Cookbook highlights">
<li><strong>240+</strong><span>Vintage recipes</span></li>
<li><strong>12</strong><span>Groovy chapters</span></li>
<li><strong>1974</strong><span>First printing</span></li>
</ul>
</div>
<div class="hero__art reveal" aria-hidden="true">
<div class="platter platter--big">
<span class="platter__emoji">🥘</span>
</div>
<div class="platter platter--sm platter--a"><span>🍋</span></div>
<div class="platter platter--sm platter--b"><span>🥑</span></div>
<div class="sticker">Best in Show!</div>
</div>
</div>
</section>
<!-- CLASSICS GRID -->
<section class="section" id="classics">
<div class="section__head reveal">
<p class="kicker kicker--center">From the Recipe Card Box</p>
<h2 class="section__title">The Classics</h2>
<p class="section__sub">
Tap any index card to flip it over and read the recipe — just
like rummaging through Grandma’s tin.
</p>
</div>
<div class="cards" id="cardbox">
<!-- cards injected by JS, with a noscript fallback below -->
</div>
<noscript>
<p class="noscript">Enable JavaScript to flip the recipe cards.</p>
</noscript>
</section>
<!-- TIP OF THE DAY -->
<section class="tip" id="tip">
<div class="tip__inner reveal">
<div class="tip__badge" aria-hidden="true">
<span>💡</span>
<em>Tip of the Day</em>
</div>
<blockquote class="tip__quote" id="tipText" aria-live="polite">
A pat of butter rubbed under the lid keeps your fondue from boiling
over — works like a charm, dearie!
</blockquote>
<div class="tip__foot">
<span class="tip__from">— Aunt Marigold</span>
<button class="btn btn--mini btn--clay" id="nextTip" type="button">
Another Tip ›
</button>
</div>
</div>
</section>
<!-- NEWSLETTER STRIP -->
<section class="signup reveal">
<div class="signup__inner">
<div>
<h2 class="signup__title">Get a recipe card in the mail</h2>
<p class="signup__sub">
One groovy recipe, every Sunday. No junk, just supper.
</p>
</div>
<form class="signup__form" id="signupForm" novalidate>
<label class="sr-only" for="email">Email address</label>
<input
id="email"
name="email"
type="email"
inputmode="email"
placeholder="you@kitchen.com"
autocomplete="email"
required
/>
<button class="btn btn--primary" type="submit">Sign me up</button>
</form>
</div>
</section>
</main>
<footer class="footer" role="contentinfo">
<div class="footer__inner">
<div class="footer__brand">
<span class="brand__badge" aria-hidden="true">🍳</span>
<div>
<p class="brand__name">Aunt Marigold’s Kitchen</p>
<p class="footer__tag">Home cooking, the way it oughta be.</p>
</div>
</div>
<nav class="footer__cols" aria-label="Footer">
<div>
<h3>Chapters</h3>
<a href="#classics">Casseroles</a>
<a href="#classics">Fondue & Dips</a>
<a href="#classics">Jiffy Desserts</a>
</div>
<div>
<h3>The Kitchen</h3>
<a href="#tip">Tips & Tricks</a>
<a href="#cardbox">Recipe Box</a>
<a href="#top">Top of page</a>
</div>
</nav>
</div>
<p class="footer__fine">
© 1974–2026 Aunt Marigold’s Kitchen. A fictional vintage
cookbook — recipes for illustration only.
</p>
</footer>
<script src="script.js"></script>
</body>
</html>Vintage / Retro Recipes landing
A full nostalgic landing page for Aunt Marigold’s Kitchen, a fictional 1974 home-cooking almanac. The hero pours a mustard-to-avocado gradient behind a groovy Playfair display headline, retro pill buttons with hard offset shadows, a scalloped bottom edge and floating “platter” blobs built entirely from CSS radial gradients and food emoji — no images, no libraries.
The heart of the page is the recipe card box: a responsive grid of index
cards rendered from JS data. Each card shows an appetizing gradient food “photo”
with corner tape and ruled-line texture; click or keyboard-activate it and it
performs a 3D flip to reveal the hand-typed recipe on the back, toggling
aria-pressed and firing a playful retro toast. Below that, a kitschy
tip of the day rotates through period kitchen wisdom, and a “recipe by mail”
strip validates the email field inline. A staggered IntersectionObserver
scroll-reveal animates sections in as you go, with a prefers-reduced-motion
fallback, sticky avocado nav, focus-visible rings and a fully responsive layout
that collapses to a single column on small screens.
Illustrative UI only — recipes & nutrition data are fictional, not dietary advice.