/* ─────────────────────────────────────────────────────────────
   603Urns Prayer Cards — styles
   Palette and type from the dev hand-off spec
   ───────────────────────────────────────────────────────────── */

@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url("/assets/fonts/cormorant-garamond-latin.woff2") format("woff2");
}

@font-face {
	font-family: "Outfit";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
}

:root {
	--bg: #f2eee8;
	--surface: #ffffff;
	--surface-soft: #fbf8f4;
	--text: #2a2420;
	--text-body: #4a3f37;
	--text-muted: #6b5f55;
	--border: #e2dad0;
	--border-strong: #cfc5b8;
	--accent: #c2410c; /* action color: buttons, focus */
	--accent-ink: #9a3412; /* links, eyebrows */
	--accent-ink-hover: #7c2d12;
	--accent-tint: #fde9df;
	--brand-orange: #f26128; /* decorative only, never for text */
	--success: #15803d;

	--font-heading: "Cormorant Garamond", Georgia, serif;
	--font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

	--radius: 12px;
	--radius-sm: 8px;
	--container: 1160px;
	--gutter: 24px;
}

/* ── Base ───────────────────────────────────────────────────── */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.5;
}

main {
	flex-grow: 1;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

[hidden] {
	display: none !important;
}

a {
	color: var(--accent-ink);
}

a:hover {
	color: var(--accent-ink-hover);
}

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.05;
}

h1 {
	font-size: clamp(44px, 6vw, 68px);
	line-height: 1.02;
}

h2 {
	font-size: clamp(34px, 5vw, 44px);
}

p {
	margin: 0;
}

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

@media (max-width: 480px) {
	:root {
		--gutter: 16px;
	}
}

.skip-link {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100;
	background: var(--surface);
	padding: 10px 16px;
	border-radius: var(--radius-sm);
}

.skip-link:focus {
	top: 8px;
}

.eyebrow {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-ink);
	margin-bottom: 6px;
}

.icon {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 10px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.btn--lg {
	min-height: 48px;
	padding: 0 22px;
	font-size: 16px;
}

.btn--primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #ffffff;
}

.btn--primary:hover {
	background: var(--accent-ink);
	border-color: var(--accent-ink);
	color: #ffffff;
}

.btn--secondary {
	background: var(--surface);
	border-color: var(--border-strong);
	color: var(--text);
}

.btn--secondary:hover {
	border-color: var(--text-muted);
	color: var(--text);
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 10px;
	padding-bottom: 10px;
}

.site-header__logo img {
	height: 76px;
	width: auto;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
	padding: 64px 0 56px;
}

.hero__text {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 760px;
}

.hero__text .eyebrow {
	margin-bottom: 0;
}

.hero__lead {
	font-size: 18px;
	line-height: 1.6;
	color: var(--text-body);
	max-width: 560px;
}

.steps {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 14px;
}

.steps__item {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.steps__num {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--accent-tint);
	color: var(--accent-ink);
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.steps__title {
	font-weight: 600;
}

.steps__desc {
	font-size: 14px;
	line-height: 1.45;
	color: var(--text-muted);
}

.hero__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 4px;
}

/* Hero illustration: three sample cards (transparent PNG) */
.hero__art img {
	display: block;
	width: 100%;
	max-width: 300px;
	height: auto;
	margin: 0 auto;
}

@media (min-width: 900px) {
	.hero__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 400px;
		align-items: center;
		gap: 48px;
	}

	.hero__art img {
		max-width: none;
	}
}

/* ── Sections ───────────────────────────────────────────────── */

.section {
	padding: 48px 0 32px;
	scroll-margin-top: 16px;
}

.section--quote {
	padding: 72px 0 80px;
}

/* ── Filter chips ───────────────────────────────────────────── */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 22px;
}

.chip {
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

.chip[aria-pressed="true"] {
	background: var(--text);
	border-color: var(--text);
	color: #ffffff;
}

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
	background: var(--text);
	color: #e9e2d8;
	font-size: 14px;
}

.site-footer a {
	color: var(--bg);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
	justify-content: space-between;
	padding-top: 28px;
	padding-bottom: 28px;
}



/* ── Section intro ──────────────────────────────────────────── */

.section__intro {
	margin-top: 6px;
	color: var(--text-muted);
}

/* ── Prayers ────────────────────────────────────────────────── */

.prayer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 18px;
	align-items: start;
	margin-top: 22px;
}

.prayer-card {
	background: var(--surface);
	border: 2px solid #e9e2d8;
	border-radius: var(--radius);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.prayer-card__title {
	font-size: 26px;
	line-height: 1.15;
}

.prayer-card__source {
	margin-top: -10px;
	font-size: 13px;
	color: var(--text-muted);
}

.prayer-card__preview,
.prayer-card__text {
	font-size: 15px;
	line-height: 1.7;
	color: #3a3029;
}

.prayer-card__text {
	white-space: pre-line;
}

.prayer-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* Choice buttons (choose a design / prayer) */
.btn--choice {
	background: var(--surface);
	border-color: var(--border-strong);
	color: var(--text);
	font-size: 14px;
	border-radius: var(--radius-sm);
}

.btn--choice[aria-pressed="true"] {
	background: var(--accent);
	border-color: var(--accent);
	color: #ffffff;
}

/* Text-style button ("Read full prayer") */
.link-btn {
	min-height: 44px;
	padding: 0 8px;
	border: none;
	background: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--accent-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.prayer-card.is-selected {
	border-color: var(--accent);
	box-shadow: 0 8px 22px rgba(42, 36, 32, 0.16);
}


/* ── Section head with search ───────────────────────────────── */

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.search {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 300px;
	max-width: 100%;
}

.search label {
	font-size: 14px;
	font-weight: 600;
}

.search input {
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 16px;
}

/* ── Card backs ─────────────────────────────────────────────── */

.back-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin-top: 22px;
}

.back-card {
	background: var(--surface);
	border: 2px solid #e9e2d8;
	border-radius: var(--radius);
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.back-card.is-selected {
	border-color: var(--accent);
	box-shadow: 0 8px 22px rgba(42, 36, 32, 0.16);
}

.back-card__view {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

/* Room for the stacked cards behind assorted sets */
.back-card--assorted .back-card__view {
	padding: 12px 12px 0 0;
}

.back-card__frame {
	position: relative;
	display: block;
	aspect-ratio: 5 / 8.5;
	border-radius: 6px;
}

.back-card__frame picture {
	display: block;
	height: 100%;
}

.back-card__frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
}

/* Two "cards" peeking out behind the first image */
.back-card--assorted .back-card__frame {
	box-shadow:
		6px -6px 0 -1px var(--surface-soft),
		6px -6px 0 0 var(--border-strong),
		12px -12px 0 -1px var(--surface-soft),
		12px -12px 0 0 var(--border-strong);
}

.back-card__badge {
	position: absolute;
	left: 8px;
	bottom: 8px;
	background: var(--text);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 999px;
}

.back-card__info {
	padding: 0 4px;
	flex-grow: 1;
}

.back-card__name {
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.back-card__themes {
	margin-top: 2px;
	font-size: 13px;
	color: var(--text-muted);
}


/* ── Empty state and "Show more" ────────────────────────────── */

.empty-state {
	margin-top: 22px;
	background: var(--surface);
	border-radius: var(--radius);
	padding: 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	font-size: 17px;
}

.show-more {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}


/* ── Lightbox (<dialog>) ────────────────────────────────────── */

.lightbox {
	width: min(1000px, calc(100% - 32px));
	max-height: 92vh;
	overflow: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--surface);
	color: var(--text);
}

.lightbox::backdrop {
	background: rgba(42, 36, 32, 0.62);
}

/* Don't scroll the page behind an open dialog */
body:has(dialog[open]) {
	overflow: hidden;
}

.lightbox__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.lightbox__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.lightbox__title {
	font-size: 32px;
	line-height: 1.1;
}

.lightbox__line {
	margin-top: 4px;
	font-size: 15px;
	color: var(--text-body);
}

.lightbox__close {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
}

.lightbox__designs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 300px));
	justify-content: center;
	gap: 16px;
}

.lightbox__designs--assorted {
	grid-template-columns: repeat(auto-fit, minmax(130px, 190px));
}

.lightbox__designs img {
	width: 100%;
	aspect-ratio: 5 / 8.5;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(42, 36, 32, 0.16);
}

.lightbox__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 12px;
}



/* ── Special options (custom design, own words, no prayer) ──── */

.choice-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 16px 18px;
	background: var(--surface);
	border: 2px solid #e9e2d8;
	border-radius: var(--radius);
}

.choice-card--custom {
	margin-top: 24px;
}

.choice-card.is-selected {
	border-color: var(--accent);
	box-shadow: 0 8px 22px rgba(42, 36, 32, 0.16);
}

.choice-card__icon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--accent-tint);
	color: var(--accent-ink);
}

.choice-card__text {
	flex: 1 1 220px;
}

.choice-card__title {
	font-weight: 600;
}

.choice-card__desc {
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-muted);
}

.choice-heading {
	margin-top: 28px;
	font-weight: 600;
}

.choice-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	gap: 14px;
	margin-top: 12px;
}

/* "✓ Selected" tag on the chosen design's image */
.back-card.is-selected .back-card__frame::before {
	content: "✓ Selected";
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	padding: 5px 10px;
	border-radius: 999px;
	background: #ffffff;
	color: var(--text);
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}


/* ── Sticky selection bar ───────────────────────────────────── */

.selection-bar {
	position: sticky;
	bottom: 16px;
	z-index: 5;
	margin-top: 8px;
}

.selection-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 10px 10px 10px 20px;
	background: var(--text);
	color: #ffffff;
	border-radius: 14px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.selection-bar__text {
	font-size: 15px;
	line-height: 1.5;
}

/* ── Quote section layout ───────────────────────────────────── */

.quote-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 24px;
	margin-top: 28px;
}

.quote-aside {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.quote-form {
	flex: 999 1 540px;
	min-width: 0;
	padding: 28px;
	background: var(--surface);
	border-radius: var(--radius);
}

/* ── "Your selections" summary ──────────────────────────────── */

.summary {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 22px;
	background: var(--surface);
	border-radius: var(--radius);
}

.summary__title,
.next-steps h3 {
	font-family: var(--font-body);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.summary__back {
	display: flex;
	align-items: center;
	gap: 14px;
}

.summary__thumb {
	width: 54px;
	flex-shrink: 0;
	aspect-ratio: 5 / 8.5;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--bg) center / cover no-repeat;
}

.summary__thumb--custom {
	background-image: repeating-linear-gradient(135deg, var(--accent-tint) 0 6px, #ffffff 6px 12px);
}

.summary__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.summary__label,
.summary__detail {
	font-size: 13px;
	color: var(--text-muted);
}

.summary__value {
	font-weight: 600;
}

.summary__item a {
	font-size: 14px;
	font-weight: 500;
}

.summary__divider {
	height: 1px;
	margin: 0;
	border: 0;
	background: #ede6dc;
}

/* ── "What happens next" ────────────────────────────────────── */

.next-steps {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
	background: var(--surface-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.next-steps h3 {
	font-size: 16px;
}

.next-steps p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--text-body);
}


/* ── Quote form ─────────────────────────────────────────────── */

.form {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.form fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.form__group {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form__group > legend {
	margin-bottom: 14px;
	padding: 0;
	font-size: 18px;
	font-weight: 600;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.field label,
.field__label {
	padding: 0;
	font-size: 14px;
	font-weight: 600;
}

.req {
	color: var(--accent-ink);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 16px;
}

.field textarea {
	resize: vertical;
}

.field input[type="file"] {
	max-width: 100%;
	font: inherit;
	font-size: 15px;
}

.field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.field-row > .field {
	flex: 1 1 220px;
}

.hint {
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-muted);
}

.dropzone {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 20px;
	border: 2px dashed var(--border-strong);
	border-radius: 10px;
	background: var(--surface-soft);
}

/* Conditional fields box (custom design, own words) */
.form .callout {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
	border: 1px solid #f3c9b3;
	border-radius: 10px;
	background: #fdf4ee;
}

.checks {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
}

.check {
	flex: 1 1 220px;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	font-size: 15px;
	font-weight: 400;
	cursor: pointer;
}

.check input {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	accent-color: var(--accent);
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form__submit {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.btn--submit {
	min-height: 54px;
	font-size: 17px;
}

.form__note {
	text-align: center;
}



/* ── Form messages ──────────────────────────────────────────── */

.form-message {
	padding: 20px;
	border: 1px solid;
	border-radius: 10px;
	line-height: 1.5;
}

.form-message h3 {
	margin-bottom: 6px;
	font-size: 18px;
}

.form-message p + p {
	margin-top: 8px;
}

.form-message--success {
	border-color: #b7dcc2;
	background: #eef8f1;
}

.form-message--success h3 {
	color: var(--success);
}

.form-message--error {
	border-color: #f1b9b0;
	background: #fdeeec;
}

.form-message--error h3 {
	color: #b42318;
}

.btn--submit:disabled {
	opacity: 0.7;
	cursor: progress;
}

/* Turnstile widget: reserve its space so the page doesn't jump when it loads */
.cf-turnstile {
	min-height: 65px;
}

/* Buttons under the thank-you message */
.form-message__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
}