/*
 * Sloppy – Bootstrap 5 custom styles
 * Load after Bootstrap.
 */

/* --------------------------------------------------------------------------- */
/* Variables                                                                   */
/* --------------------------------------------------------------------------- */

:root {
	--sl-sand: #f6ebd9;
	--sl-sand-2: #efdfc4;
	--sl-foam: #fffdf8;
	--sl-ink: #0e3b4a;
	--sl-muted: #3d5a63;
	--sl-accent: #c8481f;
	--sl-sea: #1f6f86;
	--sl-sky: #cfe8ec;
	--sl-sun: #f2b33d;
	--sl-line: 3px solid var(--sl-ink);
	--sl-display: "Fraunces", Georgia, serif;
	--sl-gutter: clamp(16px, 5.5vw, 80px);

	--bs-body-bg: var(--sl-sand);
	--bs-body-color: var(--sl-ink);
	--bs-body-font-family: "Instrument Sans", system-ui, sans-serif;
	--bs-link-color-rgb: 14, 59, 74;
	--bs-link-hover-color-rgb: 200, 72, 31;
}

.sl-wrap {
	max-width: 1440px;
	margin-inline: auto;
	padding-inline: var(--sl-gutter);
}

.sl-display {
	font-family: var(--sl-display);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}

.sl-muted { color: var(--sl-muted); }
.sl-accent { color: var(--sl-accent); }

/* --------------------------------------------------------------------------- */
/* Buttons and chips                                                           */
/* --------------------------------------------------------------------------- */

.sl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 22px;
	border: var(--sl-line);
	border-radius: 999px;
	background: transparent;
	color: var(--sl-ink);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.sl-btn:hover { color: var(--sl-ink); background: var(--sl-sand-2); }
.sl-btn-lg { min-height: 60px; padding: 0 30px; font-size: 1.125rem; }
.sl-btn-ink { background: var(--sl-ink); color: var(--sl-foam); }
.sl-btn-ink:hover { background: #164f62; color: var(--sl-foam); }
.sl-btn-accent { background: var(--sl-accent); color: var(--sl-foam); }
.sl-btn-accent:hover { background: #a93a17; color: var(--sl-foam); }

.sl-pill {
	align-self: flex-start;
	display: inline-block;
	padding: 8px 16px;
	border: 2px solid var(--sl-ink);
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sl-chip {
	display: inline-block;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--sl-sand-2);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}
.sl-chip:hover { background: #e6d1ad; }

.sl-tag {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--sl-accent);
	color: var(--sl-foam);
	font-size: 0.8125rem;
	font-weight: 600;
	white-space: nowrap;
}
.sl-tag-mineral { background: var(--sl-sea); }

/* --------------------------------------------------------------------------- */
/* Header and footer                                                           */
/* --------------------------------------------------------------------------- */

.sl-header .navbar {
	min-height: 96px;
	padding-block: 16px;
}

.sl-wordmark {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: 2.125rem;
	letter-spacing: -0.02em;
	color: var(--sl-ink);
	text-decoration: none;
}
.sl-wordmark span { color: var(--sl-accent); }
.sl-wordmark:hover { color: var(--sl-ink); }

.sl-header .navbar-toggler {
	border: var(--sl-line);
	border-radius: 12px;
	padding: 8px 12px;
}
.sl-header .navbar-nav { gap: 8px 32px; }
.sl-header .nav-link {
	color: var(--sl-ink);
	font-size: 1.0625rem;
	font-weight: 500;
}
.sl-header .nav-link:hover,
.sl-header .nav-link.active { color: var(--sl-accent); }

.sl-footer {
	margin-top: 0;
	padding-block: 56px;
	background: var(--sl-ink);
	color: var(--sl-sand);
}
.sl-footer .sl-wordmark { color: var(--sl-sand); font-size: 2.5rem; }
.sl-footer .sl-wordmark span { color: var(--sl-sun); }
.sl-footer a { color: var(--sl-sand); }
.sl-footer a:hover { color: var(--sl-sun); }
.sl-footer p { color: #b9cbce; font-size: 0.9375rem; max-width: 820px; }

/* --------------------------------------------------------------------------- */
/* Home: hero                                                                  */
/* --------------------------------------------------------------------------- */

.sl-hero { padding-block: 24px 80px; }

.sl-hero h1 {
	font-size: clamp(3rem, 7vw, 6.25rem);
	line-height: 0.95;
	letter-spacing: -0.035em;
	margin: 0;
}

.sl-lede {
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	line-height: 1.5;
	max-width: 560px;
	color: var(--sl-muted);
	margin: 0;
}

.sl-search { max-width: 600px; }
.sl-search label { font-size: 0.9375rem; font-weight: 600; }
.sl-search input {
	flex-grow: 1;
	min-width: 0;
	min-height: 60px;
	padding: 0 24px;
	border: var(--sl-line);
	border-radius: 999px;
	background: var(--sl-foam);
	color: var(--sl-ink);
	font-size: 1.125rem;
}
.sl-search input:focus {
	outline: 3px solid var(--sl-sun);
	outline-offset: 2px;
}

.sl-scene {
	position: relative;
	aspect-ratio: 620 / 640;
	border: var(--sl-line);
	border-radius: 36px;
	overflow: hidden;
	background: var(--sl-sky);
}
.sl-scene svg { display: block; width: 100%; height: 100%; }

.sl-bubble {
	position: absolute;
	left: 5%;
	top: 30%;
	width: clamp(150px, 27%, 220px);
	padding: clamp(10px, 1vw, 16px) clamp(12px, 1vw, 20px);
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 30px 30px 2px 30px;
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: clamp(1.125rem, 2vw, 1.625rem);
	line-height: 1.1;
}

.sl-sticker {
	position: absolute;
	right: 4.5%;
	bottom: 4.5%;
	width: 21%;
	aspect-ratio: 1;
	border-radius: 999px;
	background: var(--sl-ink);
	color: var(--sl-sand);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: rotate(-10deg);
	text-align: center;
}
.sl-sticker small {
	font-size: clamp(0.5625rem, 0.9vw, 0.75rem);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.sl-sticker strong {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: clamp(1.25rem, 2.4vw, 2.125rem);
	line-height: 1;
}

/* --------------------------------------------------------------------------- */
/* Home: ingredients                                                           */
/* --------------------------------------------------------------------------- */

.sl-section { padding-block: clamp(56px, 7vw, 96px); }
.sl-section h2.sl-display { font-size: clamp(2.5rem, 4.5vw, 4rem); margin: 0; }
.sl-section-intro { max-width: 460px; font-size: 1.1875rem; line-height: 1.5; }

.sl-band {
	background: var(--sl-sand-2);
	border-block: var(--sl-line);
}

.sl-card {
	position: relative; /* anchors .stretched-link to the card, not the page */
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 28px;
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 24px;
}
.sl-card h3,
.sl-card h4 {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: 1.75rem;
	margin: 0;
}
.sl-card p {
	flex-grow: 1;
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--sl-muted);
	margin: 0;
}
.sl-card a { font-weight: 600; }

/* --------------------------------------------------------------------------- */
/* Home: Gus                                                                   */
/* --------------------------------------------------------------------------- */

.sl-cta {
	padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 72px);
	background: var(--sl-accent);
	color: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 40px;
	overflow: hidden;
}
.sl-cta h2 { font-size: clamp(2.25rem, 4.2vw, 3.75rem); }
.sl-cta p { font-size: 1.25rem; line-height: 1.5; max-width: 620px; margin: 0; }
.sl-cta .sl-search label { color: var(--sl-foam); }
.sl-cta svg { width: 100%; max-width: 340px; height: auto; }

/* --------------------------------------------------------------------------- */
/* Inner pages                                                                 */
/* --------------------------------------------------------------------------- */

.sl-page-title {
	font-size: clamp(2.5rem, 5vw, 4.5rem);
	margin: 0;
}
.sl-group-title {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	letter-spacing: -0.02em;
	margin-bottom: 20px;
}

.sl-panel {
	padding: 28px;
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 24px;
}
.sl-panel-title {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: 1.5rem;
	margin-bottom: 16px;
}

.sl-empty {
	padding: 28px;
	border: 3px dashed var(--sl-ink);
	border-radius: 24px;
	font-size: 1.125rem;
}

.sl-banner {
	padding: 18px 24px;
	background: var(--sl-sun);
	border: var(--sl-line);
	border-radius: 18px;
}

.sl-caveat {
	padding-top: 20px;
	border-top: 2px solid var(--sl-sand-2);
	font-size: 0.9375rem;
	color: var(--sl-muted);
}

.sl-prose { font-size: 1.125rem; line-height: 1.6; max-width: 720px; }
.sl-prose p:last-child { margin-bottom: 0; }

.sl-sources { padding-left: 1.2em; overflow-wrap: anywhere; }

/* Key facts: a row of label/value pairs, or a stack in a side panel */
.sl-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 0;
}
.sl-facts dt {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sl-muted);
}
.sl-facts dd {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}
.sl-facts-stack { flex-direction: column; gap: 14px; }
.sl-facts-stack dd { font-size: 1.0625rem; }

/* Concern pill, 1 least to 5 most. White text passes 4.5:1 on each fill. */
.sl-concern {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	white-space: nowrap;
}
.sl-concern-1 { background: #2e6e52; }
.sl-concern-2 { background: #56722a; }
.sl-concern-3 { background: #8a5a10; }
.sl-concern-4 { background: #b0461a; }
.sl-concern-5 { background: #9b2c24; }
.sl-concern-none { background: transparent; color: var(--sl-muted); border: 2px solid var(--sl-muted); padding: 3px 10px; }

.sl-tag-both { background: var(--sl-ink); }

/* Filter form */
.sl-filter-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 28px;
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 24px;
}
.sl-filter-form .form-label { font-weight: 600; }
.sl-filter-form .form-control,
.sl-filter-form .form-select {
	min-height: 48px;
	border: 2px solid var(--sl-ink);
	border-radius: 12px;
	background-color: #fff;
	color: var(--sl-ink);
}

/* Product rows */
.sl-product-list { display: flex; flex-direction: column; gap: 14px; }
.sl-product-row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 20px;
	align-items: center;
	padding: 18px 24px;
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 22px;
	color: var(--sl-ink);
	text-decoration: none;
}
.sl-product-row:hover { color: var(--sl-ink); background: #fff; box-shadow: 6px 6px 0 var(--sl-sand-2); }
.sl-product-thumb {
	width: 64px;
	height: 88px;
	object-fit: contain;
}
.sl-product-thumb-empty {
	display: block;
	border: 3px solid var(--sl-ink);
	border-radius: 14px;
	background: var(--sl-sky);
}
.sl-product-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sl-product-brand {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sl-muted);
	text-decoration: none;
}
a.sl-product-brand:hover { color: var(--sl-accent); }
.sl-product-name {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: 1.375rem;
	line-height: 1.15;
}
.sl-product-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-filter {
	padding: 4px 10px;
	border: 2px solid var(--sl-ink);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
}
.sl-filter small { font-weight: 500; color: var(--sl-muted); }
.sl-filter-on { background: var(--sl-ink); color: var(--sl-foam); }
.sl-filter-on small { color: var(--sl-sand); }
.sl-product-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }

@media (max-width: 575.98px) {
	.sl-product-row { grid-template-columns: 48px minmax(0, 1fr); padding: 16px; gap: 14px; }
	.sl-product-thumb { width: 48px; height: 66px; }
	.sl-product-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; }
}

/* Product page */
.sl-pack {
	padding: 24px;
	background: #fff;
	border: var(--sl-line);
	border-radius: 28px;
}
.sl-pack img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.sl-pack figcaption { margin-top: 12px; font-size: 0.8125rem; color: var(--sl-muted); }
.sl-pack-empty { aspect-ratio: 3 / 4; border-radius: 18px; background: var(--sl-sky); }

.sl-table { --bs-table-bg: transparent; --bs-table-color: var(--sl-ink); }
.sl-table th, .sl-table td { padding: 12px 10px; vertical-align: top; }
.sl-table thead th {
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sl-muted);
	border-bottom: 2px solid var(--sl-ink);
}

/* Brand tiles */
.sl-brand-tile {
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 24px;
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 22px;
	text-decoration: none;
	color: var(--sl-ink);
}
.sl-brand-tile:hover { color: var(--sl-ink); background: #fff; box-shadow: 6px 6px 0 var(--sl-sand-2); }
.sl-brand-name { font-family: var(--sl-display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.sl-brand-logo { width: 72px; height: 48px; object-fit: contain; }
.sl-brand-pack { max-width: 280px; }

/* --------------------------------------------------------------------------- */
/* About                                                                       */
/* --------------------------------------------------------------------------- */

.sl-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 48px;
	margin: 8px 0 0;
}
.sl-stats dt {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sl-muted);
}
.sl-stats dd {
	margin: 0;
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: clamp(2.5rem, 4vw, 3.5rem);
	line-height: 1;
}

.sl-about-gus {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	aspect-ratio: 1;
	max-width: 480px;
	margin-inline: auto;
	padding: 8%;
	background: var(--sl-sky);
	border: var(--sl-line);
	border-radius: 999px;
}
.sl-gus { width: 100%; height: auto; }
.sl-cta .sl-gus { max-width: 340px; }

.sl-steps {
	counter-reset: step;
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.sl-steps li {
	counter-increment: step;
	position: relative;
	padding-left: 64px;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--sl-muted);
}
.sl-steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: var(--sl-line);
	border-radius: 999px;
	background: var(--sl-foam);
	color: var(--sl-ink);
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: 1.25rem;
}
.sl-steps strong { display: block; color: var(--sl-ink); font-size: 1.1875rem; margin-bottom: 2px; }

.sl-scale { display: flex; flex-direction: column; }
.sl-scale li {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-block: 16px;
	border-top: 2px solid var(--sl-sand-2);
}
.sl-scale li:first-child { border-top: none; padding-top: 0; }
.sl-scale li:last-child { padding-bottom: 0; }
a.sl-filter { color: var(--sl-ink); text-decoration: none; }
a.sl-filter:hover { background: var(--sl-ink); color: var(--sl-foam); }

.sl-panel-sun { background: var(--sl-sun); }
.sl-section h2.sl-limits-title,
.sl-limits-title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 20px; }
.sl-limits {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 12px 40px;
	padding: 0;
	margin: 0;
	list-style: none;
	font-size: 1.0625rem;
	line-height: 1.5;
}
.sl-limits li { position: relative; padding-left: 26px; }
.sl-limits li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 12px;
	height: 12px;
	border-radius: 999px;
	background: var(--sl-ink);
}
.sl-limits-plain li::before { background: var(--sl-accent); }

.sl-tier h3 { font-size: 1.375rem; }
.sl-tier-warn { background: var(--sl-sun); }
.sl-tier-warn p { color: var(--sl-ink); }

/* --------------------------------------------------------------------------- */
/* Ingredients: scary names and fun facts                                      */
/* --------------------------------------------------------------------------- */

.sl-name-swaps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
@media (min-width: 768px) {
	.sl-name-swaps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sl-name-swaps li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 24px;
	background: var(--sl-foam);
	border: var(--sl-line);
	border-radius: 22px;
}
.sl-name-long {
	font-size: 0.9375rem;
	color: var(--sl-muted);
	text-decoration: line-through;
	text-decoration-color: var(--sl-accent);
	text-decoration-thickness: 2px;
	overflow-wrap: anywhere;
}
.sl-name-short {
	font-family: var(--sl-display);
	font-weight: 800;
	font-size: 1.75rem;
	line-height: 1.1;
}

.sl-funfact { position: relative; padding-top: 40px; }
.sl-funfact-label {
	position: absolute;
	top: -14px;
	left: 24px;
	padding: 4px 12px;
	background: var(--sl-sun);
	border: var(--sl-line);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transform: rotate(-3deg);
}
.sl-funfact h3 { font-size: 1.5rem; }
