@font-face {
	font-family: "Fredoka";
	src: url("/fonts/fredoka.woff2") format("woff2");
	font-weight: 300 700;
	font-display: swap;
}
@font-face {
	font-family: "Nunito";
	src: url("/fonts/nunito.woff2") format("woff2");
	font-weight: 200 1000;
	font-display: swap;
}

:root {
	--cream: #fff7ec;
	--ink: #4a2c2a;
	--berry: #d64550;
	--butter: #ffe9a8;
	--muted: rgb(74 44 42 / 0.6);
	--line: rgb(74 44 42 / 0.1);
	--ring: 0 0 0 1px rgb(74 44 42 / 0.05);
	--display: "Fredoka", ui-rounded, system-ui, sans-serif;
	--ease: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- base --- */
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: var(--cream);
	color: var(--ink);
	font: 16px/1.5 "Nunito", ui-rounded, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul { list-style: none; padding: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; }
label { display: block; }
label span { font-size: 0.875rem; }
main { flex: 1; width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 1rem 5rem; }

/* red-and-white picnic cloth */
.gingham {
	background-color: #fff;
	background-image:
		linear-gradient(90deg, rgb(214 69 80 / 0.45) 50%, transparent 50%),
		linear-gradient(rgb(214 69 80 / 0.45) 50%, transparent 50%);
	background-size: 18px 18px;
}

/* --- header and footer --- */
header { position: sticky; top: 0; z-index: 10; background: rgb(255 247 236 / 0.9); backdrop-filter: blur(8px); }
header .gingham { height: 0.5rem; }
.nav { display: flex; align-items: center; gap: 0.75rem; max-width: 64rem; margin: 0 auto; padding: 1rem; white-space: nowrap; }
.logo { margin-right: auto; font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--berry); }
.hi { display: none; font-size: 0.875rem; color: var(--muted); }
.link { font-size: 0.875rem; font-weight: 600; }
.link:hover { color: var(--berry); }
.basket-pill {
	border-radius: 999px;
	background: var(--butter);
	padding: 0.5rem 1rem;
	font-family: var(--display);
	font-size: 0.875rem;
	box-shadow: 0 3px 0 #e8c96a;
	transition: transform var(--ease);
}
.basket-pill:hover { transform: translateY(-2px); }
.wide { display: none; }

footer { margin-top: 2.5rem; }
footer .gingham { height: 0.75rem; }
footer p { padding: 2rem 1rem; text-align: center; font-size: 0.875rem; color: var(--muted); }

/* --- shop --- */
.hero { margin-top: 1.5rem; border-radius: 2.5rem; padding: 0.75rem; }
.hero-inner { border-radius: 2rem; background: var(--cream); padding: 3rem 1.5rem; text-align: center; }
.hero-jars { display: flex; align-items: flex-end; justify-content: center; gap: 0.5rem; }
.jar-sm { width: 4rem; }
.jar-lg { width: 6rem; }
.hero h1 { max-width: 42rem; margin: 1.5rem auto 0; font-size: 2.25rem; line-height: 2.5rem; }
.hero p { max-width: 28rem; margin: 1rem auto 0; color: rgb(74 44 42 / 0.7); }
.section-title { margin: 4rem 0 1.5rem; text-align: center; font-size: 1.875rem; }

.grid { display: grid; gap: 1.5rem; }
.card {
	overflow: hidden;
	border-radius: 2rem;
	background: #fff;
	box-shadow: 0 6px 0 rgb(74 44 42 / 0.06), var(--ring);
	transition: transform var(--ease);
}
.card:hover { transform: translateY(-0.25rem) rotate(-1deg); }
.card-art { display: grid; place-items: center; aspect-ratio: 4 / 3; }
.jar-card { width: 7rem; transition: transform var(--ease); }
.card:hover .jar-card { transform: scale(1.05) rotate(3deg); }
.card-body { display: flex; align-items: flex-end; gap: 1rem; padding: 1.25rem; }
.card h3 { font-size: 1.25rem; }
.grow { margin-right: auto; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.bold { font-weight: 600; }
.price { margin-top: 0.5rem; font-family: var(--display); font-size: 1.125rem; color: var(--berry); }
.add {
	flex-shrink: 0;
	border-radius: 999px;
	background: rgb(214 69 80 / 0.1);
	padding: 0.5rem 1rem;
	font-family: var(--display);
	font-size: 0.875rem;
	color: var(--berry);
	transition: background var(--ease), color var(--ease);
}
.add:hover { background: var(--berry); color: #fff; }
.add.added { background: var(--butter); color: var(--ink); }

/* --- buttons and fields --- */
.btn {
	display: inline-block;
	border-radius: 999px;
	background: var(--berry);
	padding: 0.75rem 1.5rem;
	font-family: var(--display);
	color: #fff;
	box-shadow: 0 4px 0 #a8323c;
	transition: filter var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(0.25rem); box-shadow: none; }
.btn:disabled { opacity: 0.5; }
.btn.full { width: 100%; }
.field {
	display: block;
	width: 100%;
	margin-top: 0.25rem;
	border: 2px solid var(--line);
	border-radius: 1rem;
	background: #fff;
	padding: 0.75rem 1rem;
	outline: none;
}
.field:focus { border-color: var(--berry); box-shadow: 0 0 0 4px rgb(214 69 80 / 0.15); }
.stack { display: flex; flex-direction: column; gap: 1rem; } /* gap skips hidden rows */
.error { font-size: 0.875rem; color: #b91c1c; }

/* --- basket --- */
.narrow { max-width: 42rem; margin: 0 auto; padding: 3rem 0; }
.narrow h1, .login h1 { font-size: 1.875rem; }
.basket { margin-top: 2rem; border-radius: 2rem; background: #fff; padding: 0 1.25rem; box-shadow: var(--ring); }
.basket li { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; }
.basket li + li { border-top: 2px dashed var(--line); }
.thumb { display: grid; flex-shrink: 0; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 1rem; }
.jar-thumb { width: 2.25rem; }
.qty { display: flex; align-items: center; gap: 0.5rem; }
.qty button { width: 2rem; height: 2rem; border: 1px solid rgb(74 44 42 / 0.15); border-radius: 999px; }
.qty button:hover { border-color: var(--berry); }
.qty span, .line-total { font-variant-numeric: tabular-nums; }
.qty span { width: 1.5rem; text-align: center; }
.line-total { display: none; width: 5rem; text-align: right; }
.total { margin-top: 1rem; text-align: right; font-size: 1.125rem; }
.total strong { font-weight: 600; }
.checkout { margin-top: 2.5rem; }
.panel { margin-top: 2.5rem; border-radius: 1.5rem; background: #fff; padding: 2rem; text-align: center; box-shadow: var(--ring); }
.panel .btn { margin-top: 1.25rem; }

/* --- login, empty basket, thank you --- */
.login { max-width: 24rem; margin: 0 auto; padding: 4rem 0; }
.login form { margin-top: 2rem; }
.toggle { display: block; width: 100%; margin-top: 1.5rem; text-align: center; font-size: 0.875rem; color: var(--muted); }
.toggle:hover { color: var(--berry); }
.center-page { padding: 6rem 0; text-align: center; }
.center-page h1 { margin-top: 1rem; font-size: 1.875rem; }
.center-page .big { margin-top: 1.5rem; font-size: 2.25rem; }
.center-page .lead { max-width: 28rem; margin: 1rem auto 0; color: var(--muted); }
.center-page .btn { margin-top: 2rem; }
.emoji { font-size: 3.75rem; line-height: 1; }

/* --- wider screens --- */
@media (min-width: 640px) {
	.nav { gap: 1.25rem; }
	.logo { font-size: 1.5rem; }
	.hi, .wide { display: inline; }
	.hero-inner { padding: 4rem 1.5rem; }
	.jar-sm { width: 5rem; }
	.jar-lg { width: 7rem; }
	.hero h1 { font-size: 3.75rem; line-height: 1; }
	.grid { grid-template-columns: repeat(2, 1fr); }
	.line-total { display: block; }
}
@media (min-width: 1024px) {
	.grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- photos instead of drawn jars --- */
.photo { object-fit: cover; }
.card-art .photo { width: 100%; height: 100%; }
.thumb .photo { width: 100%; height: 100%; border-radius: 1rem; }
.hero-jars .photo { aspect-ratio: 5 / 6; border-radius: 1rem; }

/* --- admin --- */
.admin { padding: 1.5rem 0 3rem; }
.admin h1 { font-size: 1.875rem; }
.admin h2 { font-size: 1.25rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.row h1, .row h2 { margin-right: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.tab { border-radius: 999px; background: #fff; padding: 0.5rem 1rem; font-family: var(--display); font-size: 0.875rem; box-shadow: var(--ring); }
.tab.on { background: var(--berry); color: #fff; }
.panel-card { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; border-radius: 1.5rem; background: #fff; padding: 1.25rem; box-shadow: var(--ring); }
.panel-card.stack { gap: 1rem; }
.pill { border-radius: 999px; background: var(--butter); padding: 0.125rem 0.625rem; font-size: 0.75rem; font-weight: 600; }
.status-new { background: rgb(214 69 80 / 0.15); color: var(--berry); }
.status-paid, .status-done { background: #dcefd9; color: #2f6b2a; }
.status-cancelled { background: var(--line); color: var(--muted); }
.lines li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding: 0.25rem 0; font-size: 0.875rem; }
.note { font-style: italic; color: var(--muted); }
.reply { margin-top: 0.5rem; white-space: pre-wrap; border-radius: 1rem; background: var(--cream); padding: 0.75rem; font-size: 0.875rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1rem; }
.field.color { height: 3.25rem; padding: 0.25rem; }
.field.inline { display: inline-block; width: auto; margin: 0 0 0 0.5rem; padding: 0.375rem 0.75rem; }
.check { display: flex; align-items: center; gap: 0.5rem; }
.danger { color: #b91c1c; }
.btn.small-btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
.upload { margin-top: 1rem; cursor: pointer; }
.preview { display: grid; place-items: center; height: 10rem; border-radius: 1.25rem; overflow: hidden; }
.preview .photo { width: 100%; height: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.media-grid .panel-card { margin-top: 0; }
.media-grid img { width: 100%; aspect-ratio: 1; border-radius: 1rem; object-fit: cover; }
.media-grid p { overflow-wrap: anywhere; }

/* --- welcome page for visitors who aren't logged in --- */
.welcome-top { padding-top: 3rem; text-align: center; }
.kicker { font-family: var(--display); color: var(--berry); }
.welcome-top h1 { max-width: 40rem; margin: 0.5rem auto 0; font-size: 2.25rem; }
.welcome-top .lead { max-width: 34rem; margin: 1rem auto 0; color: var(--muted); }
.guest-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 2rem;
	max-width: 44rem;
	margin: 2rem auto 0;
	border-radius: 2rem;
	background: #fff;
	padding: 1.5rem 1.75rem;
	text-align: left;
	box-shadow: 0 6px 0 rgb(74 44 42 / 0.06), var(--ring);
}
.guest-card h2 { font-size: 1.375rem; }
.guest-card p { margin-top: 0.25rem; color: var(--muted); }
.polaroids { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; margin-top: 2.5rem; padding: 2.75rem 2.25rem; border-radius: 2.5rem; }
.polaroid { margin: 0; background: #fff; padding: 0.75rem 0.75rem 0; text-align: center; box-shadow: 0 10px 24px rgb(74 44 42 / 0.2); transform: rotate(var(--turn)); transition: transform var(--ease); }
.polaroid:hover { transform: rotate(0deg) scale(1.03); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid figcaption { padding: 0.6rem 0 0.8rem; font-family: var(--display); }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; margin-top: 4rem; border-radius: 2.5rem; background: #fff; padding: 1.5rem; box-shadow: var(--ring); }
.about img { width: 100%; height: 440px; border-radius: 2rem; object-fit: cover; object-position: 50% 70%; }
.about h2 { font-size: 2rem; }
.about .muted { margin-top: 0.75rem; }
.about .btn { margin-top: 1.5rem; }
.join { max-width: 36rem; margin: 4rem auto 0; text-align: center; }
.join h2 { font-size: 2rem; }
.join .muted { margin-top: 0.75rem; }
.join-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
@media (max-width: 640px) {
	.welcome-top h1 { font-size: 1.875rem; }
	.guest-card .btn { width: 100%; text-align: center; }
	.polaroids { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; padding: 1.5rem; }
	.about { grid-template-columns: 1fr; }
	.about img { height: 300px; object-position: 50% 82%; }
}
