/*
Theme Name: Noble Crafters
Description: A storefront for printable keepsakes with a featured ebook, sample page viewer, and configurable checkout.
Author: Noble Crafters
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: noble-crafters
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--paper: #fffaf1;
	--cream: #f9f2e6;
	--ink: #322825;
	--wine: #6f2637;
	--wine-dark: #50192a;
	--muted: #63514e;
	--rose: #ecc0bc;
	--line: #dbcac1;
	--serif: Georgia, 'Times New Roman', serif;
	--sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem/1.6 var(--sans);
}
a { color: inherit; text-underline-offset: 0.23em; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.07; margin: 0; }
p { margin: 0 0 1rem; }
.shell { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.section-pad { padding-block: clamp(3.5rem, 7.8vw, 7rem); }
[id] { scroll-margin-top: 1.5rem; }

.skip-link {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 10;
	padding: 0.6rem 1rem;
	background: white;
	color: var(--wine);
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
	min-height: 92px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1.5rem;
}
.wordmark {
	display: inline-flex;
	width: max-content;
	align-items: center;
	gap: 0.6rem;
	color: var(--wine-dark);
	font-family: var(--serif);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.wordmark-tail { font-weight: 400; }
.brand-mark {
	display: grid;
	place-items: center;
	border: 1px solid currentColor;
	border-radius: 50%;
	width: 2.1rem;
	height: 2.1rem;
	font: 1.25rem/1 var(--sans);
}
.site-header nav { display: flex; align-items: center; gap: clamp(1rem, 3.7vw, 3rem); }
.site-header nav a, .header-preview, .footer-links a { font-weight: 600; font-size: 0.91rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover, .footer-links a:hover { color: var(--wine); text-decoration: underline; }
.header-preview {
	justify-self: end;
	text-decoration: none;
	border: 1px solid var(--wine);
	border-radius: 99px;
	padding: 0.55rem 1rem;
	color: var(--wine);
}
.header-preview:hover { background: var(--wine); color: white; }

.hero { padding-block: clamp(1.5rem, 3.2vw, 3.25rem); }
.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
	gap: clamp(2rem, 5vw, 5.4rem);
	align-items: center;
}
.hero-copy { padding-block: 2.5rem; }
.eyebrow {
	font-size: 0.77rem;
	font-weight: 750;
	text-transform: uppercase;
	letter-spacing: 0.17em;
	color: var(--wine);
	margin-bottom: 1rem;
}
.hero h1 {
	color: var(--wine-dark);
	font-size: clamp(3.8rem, 7.1vw, 6.7rem);
	letter-spacing: -0.08em;
	line-height: 0.96;
	margin-bottom: clamp(1.35rem, 3vw, 2rem);
}
.hero h1 em { font-weight: 400; }
.hero-description {
	max-width: 27rem;
	margin-bottom: 1.75rem;
	font-size: clamp(1rem, 1.5vw, 1.18rem);
	color: var(--muted);
}
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.85rem 1.4rem; }
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.72rem 1.35rem;
	background: var(--wine);
	color: #fffaf5;
	border: 1px solid transparent;
	border-radius: 99px;
	font-size: 0.93rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 150ms ease;
}
.button:hover { background: var(--wine-dark); }
.quiet-link { color: var(--wine); font-size: 0.93rem; font-weight: 650; }

.hero-stage {
	isolation: isolate;
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1.045;
	overflow: hidden;
	background: var(--rose);
	border-radius: 46% 46% 0.6rem 0.6rem / 44% 44% 0.6rem 0.6rem;
}
.stage-grid {
	position: absolute;
	inset: 12px;
	border: 1px solid #be7d7c;
	border-radius: inherit;
	opacity: 0.65;
}
.hero-cover, .hero-sheet {
	position: absolute;
	aspect-ratio: 17 / 22;
	width: 49.5%;
	object-fit: contain;
	border: 1px solid #bca7a0;
	box-shadow: 0 15px 30px #4c211c3b;
}
.hero-cover { z-index: 1; transform: translateX(-11%) rotate(-8deg); }
.hero-sheet { width: 43.5%; transform: translate(35%, -7%) rotate(15deg); }

.shop { border-top: 1px solid var(--line); }
.section-heading { margin-bottom: clamp(1.5rem, 3.2vw, 2.6rem); }
.section-heading h2, .about h2 { color: var(--wine-dark); font-size: clamp(2.5rem, 5.2vw, 4.5rem); letter-spacing: -0.06em; }
.section-heading p { margin: 0.7rem 0 0; color: var(--muted); }
.product {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	background: var(--cream);
	border: 1px solid var(--line);
}
.product-art {
	display: grid;
	min-height: 24rem;
	place-items: center;
	padding: 2.4rem 1.6rem;
	background: #ead9d4;
}
.product-art img { width: min(60%, 23rem); box-shadow: 0 12px 26px #4c211c30; }
.product-copy { align-self: center; padding: clamp(2rem, 5vw, 4.5rem); }
.product-copy h3 {
	margin-bottom: 1rem;
	color: var(--wine-dark);
	font-size: clamp(2.4rem, 4.5vw, 4rem);
	letter-spacing: -0.06em;
}
.product-copy p:not(.eyebrow, .price) { color: var(--muted); }
.specs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.8rem 0.6rem;
	margin: 1.5rem 0;
	padding: 1rem 0;
	border-block: 1px solid var(--line);
}
.specs dt { font-size: 0.82rem; color: var(--muted); }
.specs dd { margin: 0.22rem 0 0; font-size: 0.9rem; font-weight: 700; line-height: 1.35; }
.price { font-size: 1.2rem; font-weight: 750; }

.inside { background: #f4e6df; }
.inside .section-heading { text-align: center; }
.samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 5vw, 4rem); max-width: 51rem; margin-inline: auto; }
.sample { min-width: 0; margin: 0; }
.sample-image {
	display: grid;
	place-items: center;
	position: relative;
	padding: clamp(0.8rem, 3.6vw, 2.35rem);
	background: #e6cac8;
}
.sample:nth-child(2) .sample-image { background: #dce2d7; }
.sample img { width: 100%; max-width: 17.5rem; box-shadow: 0 5px 16px #392e1a25; }
.sample-expand {
	position: absolute;
	bottom: 0.65rem;
	right: 0.65rem;
	display: grid;
	place-items: center;
	background: var(--paper);
	color: var(--wine-dark);
	border-radius: 50%;
	width: 2.1rem;
	height: 2.1rem;
	font-size: 1.4rem;
	line-height: 1;
}
.sample-image:hover .sample-expand { background: var(--wine); color: white; }
.sample figcaption { padding-top: 0.85rem; color: var(--wine-dark); font-weight: 650; }

#preview-dialog {
	max-height: 92vh;
	max-width: min(94vw, 46rem);
	padding: 0;
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 0.45rem;
	background: var(--paper);
	color: var(--wine-dark);
}
#preview-dialog::backdrop { background: #26171bd9; }
#preview-dialog img { width: 100%; height: auto; }
.preview-bar {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 1rem;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}
.preview-bar h2 { font-size: 1.2rem; }
.preview-bar form { margin: 0; }
.preview-close {
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--wine);
	border-radius: 99px;
	background: transparent;
	color: var(--wine);
	cursor: pointer;
}

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.87fr); gap: clamp(1.5rem, 6vw, 6rem); align-items: center; }
.about img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0.25rem; }
.about h2 { margin-bottom: 1rem; }
.about p { color: var(--muted); max-width: 28rem; margin-bottom: 0; }
.site-footer { border-top: 1px solid var(--line); background: var(--cream); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.footer-inner small { color: var(--muted); font-size: 0.82rem; }

.content-area { min-height: 55vh; }
.content-area h1 { margin-bottom: 1rem; color: var(--wine-dark); font-size: clamp(2.7rem, 5vw, 4.35rem); }
.content-area h2 { margin-bottom: 0.8rem; color: var(--wine-dark); }
.content-area article + article, .comments { margin-top: 2.5rem; }
.content-area input:not([type=checkbox]), .content-area textarea { max-width: 100%; }

@media (max-width: 980px) {
	.shell { width: min(100% - 64px, 1200px); }
	.hero h1 { font-size: clamp(3.45rem, 8vw, 5.3rem); }
	.product-copy { padding: 2.1rem; }
}
@media (max-width: 700px) {
	.shell { width: calc(100% - 36px); }
	.header-inner { grid-template-columns: 1fr auto; gap: 0.7rem; min-height: 69px; }
	.wordmark { font-size: 1.26rem; gap: 0.36rem; }
	.brand-mark { width: 1.75rem; height: 1.75rem; font-size: 1rem; }
	.site-header nav { gap: clamp(0.65rem, 2.8vw, 1.2rem); }
	.site-header nav a { font-size: 0.83rem; }
	.header-preview { display: none; }
	.hero-grid, .product, .about-grid { grid-template-columns: minmax(0, 1fr); }
	.hero { padding-block: 1.2rem 1.5rem; }
	.hero-grid { gap: 1.25rem; }
	.hero-copy { padding-block: 1.35rem 0.2rem; }
	.hero h1 { font-size: clamp(3.65rem, 12.5vw, 5.4rem); }
	.hero-stage { max-height: 36rem; }
	.product-copy { padding: 1.55rem 1.2rem; }
	.product-art { min-height: 0; padding-block: 1.65rem; }
	.product-art img { width: min(54%, 17rem); }
	.sample figcaption { font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}

/* Sales landing page */
.hero h1 {
	font-size: clamp(2.65rem, 5.6vw, 5.3rem);
	letter-spacing: -0.067em;
	line-height: 1.02;
}
.hero h1 em { display: inline-block; }
.hero-details { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.875rem; }
.included { padding-inline-start: 1.3rem; color: var(--muted); }
.included li { margin-bottom: 0.35rem; }
.included li::marker { color: var(--wine); }
.button:disabled { background: #e7d8d4; color: #62464b; cursor: default; }
.product-copy .checkout-status { margin: 0.7rem 0 0; font-size: 0.875rem; }
.faq-grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 2rem; }
.questions details { border-top: 1px solid var(--line); }
.questions details:last-child { border-bottom: 1px solid var(--line); }
.questions summary { min-height: 48px; padding-block: 0.85rem; font-weight: 650; color: var(--wine-dark); cursor: pointer; }
.questions p { color: var(--muted); }
.about { background: var(--cream); }

@media (max-width: 700px) {
	.hero h1 { font-size: clamp(2.75rem, 9vw, 4.7rem); }
	.faq-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

.checkout-title, .ebook-final h2 { color: var(--wine-dark); font-size: clamp(2.4rem, 5vw, 4.4rem); letter-spacing: -0.06em; }
.ebook-final { background: var(--cream); text-align: center; }
.ebook-final h2 { margin-bottom: 1.4rem; }
