/*
Theme Name: The Specularium
Description: Parchment and letterpress theme for personalised ex libris bookplates, with a live name preview.
Version: 0.1.0
Requires PHP: 7.4
Text Domain: specularium
WPVibe: yes
*/

:root {
	--vellum: #F3EAD3;
	--vellum-deep: #E7DABA;
	--paper: #F2E6C6;
	--ink: #2B2119;
	--ink-soft: #5B4A3B;
	--leather: #2C4535;
	--leather-deep: #1D3024;
	--gilt: #A68548;
	--gilt-light: #CDB27A;
	--rule: #C9B791;
	--oxblood: #6B1E23;

	--display: 'IM Fell English', 'Iowan Old Style', Georgia, serif;
	--display-sc: 'IM Fell English SC', 'IM Fell English', Georgia, serif;
	--text: 'EB Garamond', 'Iowan Old Style', Georgia, serif;

	--measure: 36rem;
	--wide: 72rem;
	--gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	color: var(--ink);
	font-family: var(--text);
	font-size: 1.1875rem;
	line-height: 1.6;
	font-variant-numeric: oldstyle-nums;
	background-color: var(--vellum);
	background-image:
		radial-gradient(ellipse at 15% 0%, rgba(255, 251, 238, .75), transparent 55%),
		radial-gradient(ellipse at 100% 100%, rgba(150, 110, 50, .14), transparent 60%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .31 0 0 0 0 .16 0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-attachment: fixed, fixed, scroll;
}

img, svg { max-width: 100%; }
a { color: var(--leather); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; }

h1, h2, h3, h4 {
	font-family: var(--display);
	font-weight: 400;
	line-height: 1.12;
	margin: 0 0 .5em;
	color: var(--ink);
	text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--leather); color: var(--vellum); padding: .5em 1em; z-index: 10; }
.skip-link:focus { left: 1rem; }

/* ---------- Ornaments ---------- */

.ornament { display: flex; justify-content: center; color: var(--gilt); margin: 0 auto 1.5rem; }
.ornament svg { display: block; }
.ornament__img { display: block; width: min(21rem, 100%); aspect-ratio: 1400 / 152; background-color: currentColor; -webkit-mask: var(--orn-url) center / contain no-repeat; mask: var(--orn-url) center / contain no-repeat; } /* the oak and acorn divider: a transparent PNG used as a mask, so it takes the gilt of .ornament */
.ornament--light { color: var(--gilt-light); }

/* ---------- Header ---------- */

.site-header { padding: 1.25rem var(--gutter) 0; }
.site-header__inner { max-width: var(--wide); margin: 0 auto; position: relative; text-align: center; }

.wordmark { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.wordmark:hover { color: var(--ink); }
.wordmark__the { font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--ink-soft); }
.wordmark__name { font-family: var(--display-sc); font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: .05em; margin: .1em 0 .15em; }
.wordmark__sub { font-family: var(--display); font-style: italic; font-size: 1rem; color: var(--ink-soft); }
/* The sun emblem: a black-on-transparent PNG used as a mask, so it takes the text colour around it. */
.sun-mark { display: block; flex: none; width: var(--sun-size, 3rem); aspect-ratio: 1; background-color: currentColor; -webkit-mask: var(--sun-url) center / contain no-repeat; mask: var(--sun-url) center / contain no-repeat; }
.wordmark .sun-mark { --sun-size: 5.8rem; position: absolute; left: 0; top: 0; margin: 0; color: var(--ink); } /* out of the flow: sits at the left edge, as tall as the wordmark, adds no header height */
.site-footer .sun-mark { --sun-size: 4.25rem; margin: 0 0 .9rem; color: var(--vellum); opacity: .8; }

.site-nav { margin-top: 1.25rem; border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); }
.site-nav .menu { list-style: none; margin: 0; padding: .55rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 2.25rem; }
.site-nav a { font-family: var(--display); font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item a { color: var(--leather); text-decoration: underline; }

/* "The designs" opens to Traditional and Modern: a dropdown on hover or keyboard focus, shown inline on touch screens and phones */
.site-nav .menu > li { position: relative; }
.site-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .38em; height: .38em; margin: 0 0 .22em .5em; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.site-nav .sub-menu { list-style: none; margin: 0; padding: .45rem 0; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); min-width: 13rem; background: var(--vellum); border: 1px solid var(--rule); border-top: 3px double var(--rule); box-shadow: 0 .6rem 1.2rem rgba(43, 33, 25, .12); z-index: 20; opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s; text-align: center; }
.site-nav .sub-menu a { display: block; padding: .4rem 1.25rem; font-size: 1.05rem; white-space: nowrap; }
.site-nav .menu-item-has-children:hover > .sub-menu, .site-nav .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.site-nav .menu-note { font-style: italic; color: var(--ink-soft); font-size: .9em; }
@media (hover: none), (max-width: 640px) {
	.site-nav .menu-item-has-children > a::after { display: none; }
	.site-nav .sub-menu { position: static; transform: none; opacity: 1; visibility: visible; min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; display: flex; justify-content: center; gap: .2rem 1rem; }
	.site-nav .sub-menu a { padding: .1rem 0; font-size: .95rem; color: var(--ink-soft); }
}

.nav-toggle, .sub-menu-toggle { display: none; }
.nav-toggle { align-items: center; gap: .55rem; min-height: 44px; padding: .35rem .65rem; background: transparent; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); font-family: var(--display); font-size: 1.1rem; cursor: pointer; }
.nav-toggle svg { display: block; }
.basket-link { position: absolute; right: 0; top: .25rem; font-family: var(--display); font-size: 1.05rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: .35em; }
.basket-link svg { display: block; flex: none; width: 1.55rem; height: 1.55rem; }
.basket-link__label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.basket-count { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .35em; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--text); font-size: .85rem; font-variant-numeric: lining-nums; }

/* ---------- Layout ---------- */

.site-main { display: block; }
.section { max-width: var(--wide); margin: 0 auto; padding: clamp(1.75rem, 4vw, 3rem) var(--gutter); }
.section__head { max-width: var(--measure); margin: 0 auto 2rem; text-align: center; }
.section__head p { color: var(--ink-soft); }
.section__head--left { text-align: left; margin: 0; }

/* ---------- Buttons ---------- */

.button--leather,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce-page .wc-block-components-button {
	display: inline-block;
	background: var(--leather);
	color: var(--vellum);
	font-family: var(--display-sc);
	font-size: 1.1rem;
	font-weight: 400;
	letter-spacing: .06em;
	line-height: 1.2;
	padding: .85em 1.7em;
	border: 1px solid var(--leather-deep);
	border-radius: 2px;
	box-shadow: inset 0 0 0 3px var(--leather), inset 0 0 0 4px var(--gilt);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease;
}
.button--leather:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover {
	background: var(--leather-deep);
	color: var(--vellum);
	box-shadow: inset 0 0 0 3px var(--leather-deep), inset 0 0 0 4px var(--gilt-light);
}
.woocommerce button.button.alt.disabled, .woocommerce button.button.alt:disabled { background: var(--leather); color: var(--vellum); opacity: .55; }
/* Buttons waiting to be used (e.g. "Update basket" before anything changes): an outlined
   button in the leather colour, so the words stay easy to read. */
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled],
.woocommerce button.button.disabled, .woocommerce input.button:disabled, .woocommerce input.button:disabled[disabled] {
	background: transparent !important;
	color: var(--leather-deep) !important;
	border: 1.5px solid var(--leather) !important;
	box-shadow: none !important;
	opacity: 1 !important;
	padding: .85em 1.7em !important;
	cursor: default;
}
.woocommerce button.button:disabled:hover, .woocommerce button.button.disabled:hover { background: transparent !important; color: var(--leather-deep) !important; }
.woocommerce button.button[name="update_cart"]:not(:disabled) { background: var(--leather); color: var(--vellum); }

.text-link { font-family: var(--display); font-style: italic; font-size: 1.15rem; }

/* ---------- Bookplates ---------- */

.bp { display: block; width: 100%; height: auto; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* The PROOF mark stays hidden on screen and appears only if the page is printed. */
.bp-proof { display: none; }
@media print { .bp-proof { display: inline; } .plate-note { display: none; } }
.plate-note {
	position: fixed; z-index: 50; max-width: 17rem; padding: .6rem .85rem;
	background: var(--paper); color: var(--ink);
	border: 1px solid rgba(43, 33, 25, .25); box-shadow: 0 6px 18px rgba(43, 33, 25, .18);
	font-family: var(--text); font-style: italic; font-size: .95rem; line-height: 1.35;
	pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.plate-note.is-on { opacity: 1; }

/* Browse by tag: small letterpress-style labels */
.tag-filter { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: .4rem; margin: 1.1rem auto 0; padding: .15rem 0 .45rem; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tag-filter__tag {
	display: inline-block; flex: 0 0 auto; white-space: nowrap; padding: .3em .75em; border: 1px solid var(--rule); border-radius: 2px;
	font-family: var(--display); font-size: 1rem; letter-spacing: 0;
	color: var(--ink-soft); text-decoration: none; background: transparent; transition: background .2s, color .2s;
}
.tag-filter__tag:hover, .tag-filter__tag:focus-visible { background: rgba(43, 33, 25, .07); color: var(--ink); }
.tag-filter__tag.is-current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Design search: a ruled box, faded examples inside it, suggestions beneath */
.design-search { position: relative; max-width: 27rem; margin: 1.4rem auto 0; }
.design-search__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.design-search__input {
	display: block; width: 100%; height: 3rem; margin: 0; padding: 0 3rem 0 1rem;
	font-family: var(--display); font-size: 1.15rem; line-height: normal; text-align: left;
	color: var(--ink); background: rgba(255, 255, 255, .28); border: 1px solid var(--rule); border-radius: 2px;
	-webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s;
}
.design-search__input::-webkit-search-cancel-button, .design-search__input::-webkit-search-decoration { -webkit-appearance: none; }
.design-search__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.design-search__hint {
	position: absolute; left: 1px; right: 1px; top: 1px; height: calc(3rem - 2px); padding: 0 3rem 0 1rem; overflow: hidden;
	font-family: var(--display); font-size: 1.15rem; line-height: calc(3rem - 2px); font-style: italic; text-align: left;
	white-space: nowrap; text-overflow: ellipsis; color: var(--ink-soft); opacity: .5; pointer-events: none; transition: opacity .25s;
}
.design-search__input:not(:placeholder-shown) ~ .design-search__hint { opacity: 0; }
.design-search__lead-short { display: none; }
.design-search__go {
	position: absolute; top: 0; right: 0; bottom: 0; width: 3rem; display: flex; align-items: center; justify-content: center;
	padding: 0; color: var(--ink-soft); background: transparent; border: 0; cursor: pointer; transition: color .2s;
}
.design-search__go:hover, .design-search__go:focus-visible { color: var(--ink); }
.design-search__suggest {
	position: absolute; left: 0; right: 0; top: calc(100% - 1px); z-index: 30; margin: 0; padding: .25rem 0; list-style: none; text-align: left;
	background: var(--vellum); border: 1px solid var(--ink); border-top-color: var(--rule); border-radius: 0 0 2px 2px; box-shadow: 0 .7rem 1.2rem rgba(43, 33, 25, .14);
}
.design-search__opt a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .5rem 1rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.1rem; }
.design-search__opt small { flex: 0 0 auto; color: var(--ink-soft); font-family: var(--text); font-size: .85rem; }
.design-search__opt a:hover, .design-search__opt.is-active a { background: rgba(43, 33, 25, .08); }
.design-search__back { margin: .7rem 0 0; font-size: 1rem; }
/* The designs page: the name box and the design search side by side, one under the other on a phone */
.finder { display: flex; gap: 1rem; justify-content: center; align-items: flex-start; max-width: 55rem; margin: 1.4rem auto 0; }
.finder > .name-try, .finder > .design-search { flex: 1 1 0; min-width: 0; max-width: 27rem; margin: 0; }
.name-try { position: relative; }
.name-try .design-search__input { padding-right: 1rem; }
.name-try .design-search__hint { padding-right: 1rem; }
@media (max-width: 640px) { .finder { flex-direction: column; align-items: stretch; gap: .7rem; } .finder > .name-try, .finder > .design-search { max-width: none; } }
.design-search__back a { color: var(--ink-soft); }
@media (max-width: 30rem) {
	.design-search__lead { display: none; }
	.design-search__lead-short { display: inline; }
	.design-search__eg--3 { display: none; }
}

/* ---------- Hero ---------- */

.hero {
	max-width: var(--wide);
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(1.25rem, 3vw, 2rem);
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}
.hero__title { max-width: 12em; }
.hero__lede { font-size: 1.3rem; color: var(--ink-soft); max-width: 30em; }

.try { margin: 2rem 0 1.75rem; max-width: 26rem; }
.try__label { display: block; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin-bottom: .2rem; }
.try .try__input {
	width: 100%;
	font-family: var(--display);
	font-style: italic;
	font-size: 1.75rem;
	color: var(--ink);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--ink);
	padding: .15em 0 .25em;
	border-radius: 0;
}
.try .try__input::placeholder { color: rgba(43, 33, 25, .38); }
.try .try__input:focus { outline: none; border-bottom: 2px solid var(--leather); margin-bottom: -1px; }
.try__designs { display: flex; align-items: stretch; gap: .4rem; margin-top: 1rem; overflow-x: auto; scrollbar-width: none; }
.try__designs::-webkit-scrollbar, .try__strip::-webkit-scrollbar { display: none; }
.try__strip { position: relative; display: flex; gap: .4rem; flex: 1 1 auto; min-width: 0; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.try__design {
	font-family: var(--display);
	font-size: 1rem;
	color: var(--ink-soft);
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: 2px;
	padding: .3em .75em;
	cursor: pointer;
}
.try__design:hover { border-color: var(--ink-soft); color: var(--ink); }
.try__design { flex: 0 0 auto; white-space: nowrap; }
.try__arrow { flex: 0 0 auto; width: 2.1rem; padding: 0 0 .12em; font-family: var(--display); font-size: 1.35rem; line-height: 1; color: var(--ink-soft); background: transparent; border: 1px solid var(--rule); border-radius: 2px; cursor: pointer; }
.try__arrow[hidden] { display: none; }
.try__arrow:hover:not(:disabled) { border-color: var(--ink-soft); color: var(--ink); }
.try__arrow:disabled { opacity: .35; cursor: default; }
.try__design[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--vellum); }

/* The board: a cloth-bound book cover with a gilt fillet, the plate pasted on. */
.hero__board, .plate-board {
	position: relative;
	padding: clamp(2rem, 5vw, 3.75rem);
	background-color: var(--leather);
	background-image:
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
		repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 3px),
		radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .08), transparent 60%);
	border-radius: 3px 6px 6px 3px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 18px 40px -18px rgba(29, 48, 36, .7);
}
.hero__board::before, .plate-board::before {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid rgba(205, 178, 122, .55);
	box-shadow: inset 0 0 0 3px var(--leather), inset 0 0 0 4px rgba(205, 178, 122, .3);
	pointer-events: none;
}
.hero__plate, .plate-board .bp {
	position: relative;
	max-width: 22rem;
	margin: 0 auto;
	transform: rotate(-1.2deg);
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)) drop-shadow(0 6px 10px rgba(0, 0, 0, .25));
}
.hero__plate[hidden] { display: none; }
.hero__plate-link { display: block; text-decoration: none; cursor: pointer; }
.hero__plate-link:focus-visible { outline: 3px solid var(--gilt-light); outline-offset: 5px; }
.hero__preview-note { margin: .7rem 0 0; font-family: var(--display); font-style: italic; color: var(--ink-soft); }
.hero__preview-note[hidden] { display: none; }
.hero__plate:has(.bp--tall), .plate-board .bp--tall { max-width: 18.5rem; }
.plates__img:has(.bp--tall), .woocommerce ul.products li.product .plate-thumb:has(.bp--tall) { max-width: 15rem; }

@media (prefers-reduced-motion: no-preference) {
	.hero__plate:not([hidden]) { animation: plate-settle .9s cubic-bezier(.2, .7, .2, 1) both; }
	@keyframes plate-settle {
		from { opacity: 0; transform: translateY(-14px) rotate(-4deg); }
		to { opacity: 1; transform: rotate(-1.2deg); }
	}
}

/* ---------- Designs grid ---------- */

.plates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5rem 2.5rem; }
.plates__link { display: block; text-decoration: none; color: var(--ink); }
.plates__img { display: block; max-width: 18rem; margin: 0 auto 1.1rem; filter: drop-shadow(0 1px 1px rgba(43, 33, 25, .25)) drop-shadow(0 8px 14px rgba(43, 33, 25, .14)); transition: filter .2s ease; }
.plates__link:hover .plates__img { filter: drop-shadow(0 1px 1px rgba(43, 33, 25, .3)) drop-shadow(0 12px 20px rgba(43, 33, 25, .2)); }
.plates__title { display: block; text-align: center; font-family: var(--display); font-size: 1.45rem; }
.plates__link:hover .plates__title { color: var(--leather); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.plates__price { display: block; text-align: center; color: var(--ink-soft); }
.plates__blurb { text-align: center; color: var(--ink-soft); font-size: 1.05rem; max-width: 20rem; margin: .5rem auto 0; }
.designs__all { text-align: center; margin: 2.5rem 0 0; }

/* ---------- Craft ---------- */

.craft__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.craft__list { margin: 0; border-top: 1px solid var(--rule); }
.craft__list dt { font-family: var(--display); font-style: italic; font-size: 1.4rem; padding-top: 1.1rem; display: flex; align-items: center; gap: .6rem; }
.craft__list dt::before { content: ""; width: .45rem; height: .45rem; background: var(--gilt); transform: rotate(45deg); flex: none; }
.craft__list dd { margin: .2rem 0 0; padding-bottom: 1.1rem; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }

/* ---------- Steps ---------- */

.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; text-align: center; }
.steps__num { display: block; font-family: var(--display); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--gilt); margin-bottom: .6rem; }
.steps__list h3 { margin-bottom: .3em; }
.steps__list p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Savings ---------- */

.savings__inner {
	max-width: 44rem;
	margin: 0 auto;
	text-align: center;
	padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 3rem);
	background: rgba(231, 218, 186, .65);
	border: 3px double var(--ink-soft);
	outline: 1px solid var(--rule);
	outline-offset: 6px;
}
.savings__inner > p { color: var(--ink-soft); max-width: 32em; margin-left: auto; margin-right: auto; }
.savings__table { margin: 1.5rem auto 0; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; min-width: min(24rem, 100%); }
.savings__table th { font-family: var(--display); font-style: italic; font-weight: 400; color: var(--ink-soft); padding: .3rem 1.25rem; border-bottom: 1px solid var(--ink-soft); }
.savings__table td { padding: .55rem 1.25rem; border-bottom: 1px solid var(--rule); font-size: 1.2rem; }
.savings__table td:last-child { font-family: var(--display); font-size: 1.5rem; color: var(--leather); }

/* ---------- History teaser ---------- */

.history-teaser__inner { max-width: var(--measure); margin: 0 auto; text-align: center; }
.history-teaser__inner p { color: var(--ink-soft); }

/* ---------- Pages ---------- */

.page { max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) clamp(3rem, 7vw, 5rem); }
.page__head { text-align: center; margin-bottom: 2rem; }
.page__head .ornament { margin-bottom: 0; }
.page__intro { color: var(--ink-soft); font-style: italic; }
.prose { max-width: var(--measure); margin: 0 auto; }
.prose h2 { margin-top: 1.6em; font-size: 1.9rem; }
.prose h3 { margin-top: 1.4em; }
.prose > p:first-child::first-letter { font-family: var(--display); float: left; font-size: 4.1em; line-height: .82; padding: .06em .08em 0 0; color: var(--leather); }
.prose blockquote { margin: 1.5em 0; padding: 0 0 0 1.25em; border-left: 2px solid var(--gilt); font-family: var(--display); font-style: italic; font-size: 1.25rem; }
.prose figure { margin: 2em 0; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 2rem; padding: 2.5rem var(--gutter) 1.5rem; background: var(--leather-deep); color: rgba(243, 234, 211, .85); }
.site-footer .ornament { margin-bottom: 1.5rem; }
.site-footer__inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.site-footer__name { font-family: var(--display-sc); font-size: 1.5rem; color: var(--vellum); margin-bottom: .25rem; letter-spacing: .04em; }
.site-footer__about p:last-child { max-width: 26em; font-size: 1.05rem; }
.site-footer .menu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: .3rem 2.5rem; }
.site-footer a { color: var(--vellum); text-decoration-color: rgba(205, 178, 122, .6); }
.site-footer a:hover { color: var(--gilt-light); }
.site-footer__charity { margin: .5rem 0 0; font-size: .95rem; }
.site-footer__legal { max-width: var(--wide); margin: 2rem auto 0; font-size: .95rem; color: rgba(243, 234, 211, .6); }

/* ---------- Forms (global) ---------- */

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
	font: inherit;
	font-size: 1.05rem;
	color: var(--ink);
	background: #FBF6E7;
	border: 1px solid var(--rule);
	border-radius: 2px;
	padding: .55em .7em;
	max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gilt); outline-offset: 1px; border-color: var(--ink-soft); }

/* ---------- WooCommerce: catalogue ---------- */

.shop-wrap { max-width: var(--wide); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) clamp(3rem, 7vw, 5rem); }
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { font-size: 1rem; color: var(--ink-soft); }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 2.5rem; margin: 1rem 0 0; clear: both; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: auto; float: none; margin: 0; text-align: center; }
.woocommerce ul.products li.product .plate-thumb { display: block; max-width: 17rem; margin: 0 auto 1rem; filter: drop-shadow(0 1px 1px rgba(43, 33, 25, .25)) drop-shadow(0 8px 14px rgba(43, 33, 25, .14)); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--display); font-weight: 400; font-size: 1.45rem; padding: 0; }
.woocommerce ul.products li.product .price { color: var(--ink-soft); font-size: 1.05rem; }
.woocommerce ul.products li.product .button { margin-top: .75rem; font-size: 1rem; padding: .65em 1.3em; }
.woocommerce span.onsale { display: none; }

/* ---------- WooCommerce: product page ---------- */

.shop-wrap--product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.shop-wrap--product div.product .plate-stage { grid-column: 1; }
.shop-wrap--product div.product div.summary { grid-column: 2; float: none; width: auto; margin: 0; }
.shop-wrap--product div.product .product-notes, .shop-wrap--product div.product .related, .shop-wrap--product div.product .upsells { grid-column: 1 / -1; }
.plate-caption { text-align: center; font-style: italic; color: var(--ink-soft); font-size: 1rem; margin-top: 1rem; }

.woocommerce div.product .product_title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin-bottom: .2em; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink); font-size: 1.4rem; font-variant-numeric: lining-nums; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--ink-soft); }
.woocommerce .product_meta { display: none; }

.plate-fields { border: 0; border-top: 1px solid var(--rule); padding: 1.25rem 0 0; margin: 1.5rem 0 1rem; }
.plate-fields legend { font-family: var(--display); font-style: italic; font-size: 1.35rem; padding: 0 .6rem 0 0; }
.plate-fields .field { margin: 0 0 1rem; }
.plate-fields label, .field__label { display: block; font-size: 1.05rem; margin-bottom: .25rem; }
.plate-fields .opt { color: var(--ink-soft); font-style: italic; }
.plate-fields input[type="text"] { width: 100%; font-size: 1.2rem; }
.inks { display: flex; flex-wrap: wrap; gap: .5rem; }
.ink { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .35em .75em .35em .45em; border: 1px solid var(--rule); border-radius: 2px; cursor: pointer; font-size: 1rem; margin: 0; }
.ink input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ink__swatch { width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ink:has(input:checked) { border-color: var(--ink); background: rgba(255, 252, 240, .7); box-shadow: inset 0 0 0 1px var(--ink); }
.ink:has(input:focus-visible) { outline: 2px solid var(--gilt); outline-offset: 2px; }
.field__note { font-size: .98rem; font-style: italic; color: var(--ink-soft); margin: 0; }
.field__hint { display: block; margin-top: .3rem; font-size: .86rem; font-style: italic; color: var(--ink-soft); opacity: .85; }

.woocommerce div.product form.cart .variations { margin-bottom: 1rem; }
.woocommerce div.product form.cart .variations th.label { font-weight: 400; font-size: 1.05rem; padding-right: 1rem; vertical-align: middle; }
.woocommerce div.product form.cart .variations select { min-width: 12rem; }
.woocommerce div.product form.cart .reset_variations { font-size: .95rem; }
.woocommerce .quantity .qty { width: 4.5em; padding: .55em .4em; text-align: center; }
.woocommerce div.product form.cart div.quantity { margin-right: .75rem; }
.woocommerce div.product .woocommerce-variation-price { margin-bottom: .75rem; }

.product-notes { max-width: 52rem; margin: 2rem auto 0; width: 100%; }
.product-notes__desc { max-width: var(--measure); margin: 0 auto 1.5rem; }
.product-notes__spec { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; max-width: var(--measure); margin: 0 auto; border-top: 1px solid var(--rule); padding-top: 1rem; }
.product-notes__spec dt { font-family: var(--display); font-style: italic; }
.product-notes__spec dd { margin: 0; color: var(--ink-soft); }
.woocommerce .related > h2 { text-align: center; margin-top: 2rem; }
/* WooCommerce sizes related and column-numbered items as percentages; our grid sizes them instead. */
.woocommerce .related ul.products li.product, .woocommerce .upsells ul.products li.product, .woocommerce ul.products[class*="columns-"] li.product, .woocommerce-page ul.products[class*="columns-"] li.product { width: auto; float: none; margin: 0; }

/* ---------- WooCommerce: basket and checkout ---------- */

.page--shop .page__content { max-width: 64rem; margin: 0 auto; }
.saving-nudge { text-align: center; font-style: italic; padding: .75rem 1rem; border: 1px solid var(--rule); background: rgba(231, 218, 186, .6); }
.woocommerce-checkout .saving-nudge { margin: 0 0 1rem; }
.woocommerce-checkout .checkout-assurance { font-size: .95rem; color: var(--ink-soft); margin: 0 0 1rem; }
.woocommerce-checkout .checkout-assurance--lead { color: var(--ink); }
.delivery-line { margin: .25rem 0 1rem; font-size: .95rem; color: var(--ink-soft); }
.charity-line { margin: 1rem 0 0; font-size: .95rem; color: var(--ink-soft); }
.woocommerce table.shop_table { border: 0; border-collapse: collapse; border-radius: 0; }
.woocommerce table.shop_table th { font-family: var(--display); font-style: italic; font-weight: 400; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-top: 1px solid var(--rule); }
.woocommerce table.cart .product-thumbnail { width: 7rem; }
.woocommerce table.cart .plate-thumb, .woocommerce-mini-cart .plate-thumb { display: block; width: 5.5rem; filter: drop-shadow(0 2px 4px rgba(43, 33, 25, .2)); }
.woocommerce table.cart td.product-name a { font-family: var(--display); font-size: 1.25rem; text-decoration: none; }
.woocommerce table.cart td.product-name dl.variation { font-size: 1rem; color: var(--ink-soft); }
.woocommerce .cart-collaterals .cart_totals h2, .woocommerce-checkout h3 { font-size: 1.6rem; }
.woocommerce form .form-row label { font-size: 1rem; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { background: #FBF6E7; }
.woocommerce-checkout #payment { background: rgba(231, 218, 186, .65); border-radius: 2px; }
.woocommerce-checkout #payment div.payment_box { background: var(--vellum); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--vellum); }

.woocommerce-message, .woocommerce-info, .woocommerce-error { background: rgba(251, 246, 231, .85); color: var(--ink); border-top-color: var(--leather); font-size: 1.05rem; }
.woocommerce-error { border-top-color: var(--oxblood); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--leather); }
.woocommerce-error::before { color: var(--oxblood); }

/* ---------- Refinements (5 Nov, evening): finish, feel and phone fit ---------- */

:root { --gilt-deep: #7D5F25; --rule-strong: #8F7B4B; } /* gilt for small gilt text (5:1 on vellum) and a border colour that reaches 3:1 for controls */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
::selection { background: rgba(166, 133, 72, .35); color: var(--ink); }
p, dd { text-wrap: pretty; }

/* the hero's two columns must be allowed to shrink: the row of design tabs was pushing the page wider than a phone */
.hero__text, .hero__board { min-width: 0; }

/* navigation: a hairline rule draws itself under the link, like a printer's rule being laid */
.site-nav .menu > li > a { padding-block: .15rem; background: linear-gradient(currentColor, currentColor) no-repeat 50% 100% / 0 1px; transition: background-size .25s ease, color .15s ease; }
.site-nav .menu > li > a:hover, .site-nav .menu > li > a:focus-visible, .site-nav .current-menu-item > a { text-decoration: none; background-size: 100% 1px; }

/* plates lift a little, as a plate does when you take it from the sheet */
.plates__img { transition: filter .2s ease, transform .3s cubic-bezier(.2, .7, .2, 1); }
.plates__link:hover .plates__img, .plates__link:focus-visible .plates__img { transform: translateY(-4px) rotate(-.4deg); }
.woocommerce ul.products li.product .plate-thumb { transition: filter .2s ease, transform .3s cubic-bezier(.2, .7, .2, 1); }
.woocommerce ul.products li.product:hover .plate-thumb { transform: translateY(-4px) rotate(-.4deg); }
@media (prefers-reduced-motion: reduce) {
	.plates__img, .woocommerce ul.products li.product .plate-thumb { transition: none; }
	.plates__link:hover .plates__img, .plates__link:focus-visible .plates__img, .woocommerce ul.products li.product:hover .plate-thumb { transform: none; }
}
.button--leather:active, .woocommerce a.button:active, .woocommerce button.button:active { transform: translateY(1px); }

/* the four steps: numerals in a double-ruled ring, the same double rule as the nav and the savings box */
.steps__num { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; margin: 0 auto .9rem; font-size: 1.85rem; color: var(--gilt-deep); border: 3px double var(--gilt); border-radius: 50%; }

/* the provenance passage: left-aligned on a book measure with an opening initial, instead of eight centred lines */
.provenance .history-teaser__inner { max-width: 35rem; }
.provenance .history-teaser__inner > p { text-align: left; hyphens: auto; }
.provenance .history-teaser__inner > p:first-of-type::first-letter { font-family: var(--display); float: left; font-size: 4.1em; line-height: .82; padding: .06em .08em 0 0; color: var(--leather); }

/* legibility: the sample name, and borders that can be seen */
.try .try__input::placeholder { color: rgba(43, 33, 25, .65); }
.try__design, .try__arrow, .nav-toggle, .tag-filter__tag { border-color: var(--rule-strong); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea { border-color: var(--rule-strong); }

/* touch: controls at least 44px, and the home page two plates across so it is not twelve screens long */
@media (pointer: coarse), (max-width: 640px) {
	.try__design, .try__arrow { min-height: 44px; }
	.try__arrow { min-width: 44px; }
	.text-link { display: inline-block; padding: .55rem 0; }
}
@media (max-width: 640px) {
	.hero .hero__board { padding: 1.1rem; }
	.hero .hero__board::before { inset: 7px; }
	.hero .hero__board .hero__plate { max-width: min(19.5rem, 88%); }   /* phones: the plate fills most of the screen width */
	/* the designs on a phone: two plates across, picture, name and price only (each plate's history is on its own page) */
	.designs .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.1rem; }
	.designs .plates__img { margin-bottom: .7rem; }
	.designs .plates__title { font-size: 1.12rem; line-height: 1.2; }
	.designs .plates__price { font-size: .9rem; margin-top: .15rem; }
	.designs .plates__link:focus-visible .plates__img { outline: 2px solid var(--leather); outline-offset: 4px; }
	.steps .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
	.steps .steps__list h3 { font-size: 1.2rem; }
	.site-header .site-nav .menu > li > a { padding: .6rem .65rem; }
	.site-header .site-nav .sub-menu a { padding: .55rem .65rem; }
}

/* the plate's story at the head of a product page: set off by the same double rule as the nav and the step numerals */
.product-story { border-left: 3px double var(--gilt); padding-left: 1rem; margin: 0 0 1.4rem; }
.product-story p { margin: 0; font-style: italic; color: var(--ink-soft); }

/* ---------- Flow and finish (9 Nov): bands of colour, quieter cards, gentle movement ---------- */

/* more air between the passages of the home page */
.section { padding-block: clamp(2.25rem, 5.5vw, 4.25rem); }

/* bands: a full-width change of ground, so the page is not one sheet of vellum from top to bottom */
.band { margin: clamp(1rem, 3vw, 2rem) 0; }
.band .section { padding-block: clamp(2.75rem, 6.5vw, 4.75rem); }
.band--leather {
	color: rgba(243, 234, 211, .86);
	background-color: var(--leather);
	background-image:
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
		repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 1px, transparent 1px 3px),
		radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .07), transparent 65%);
	box-shadow: inset 0 7px 0 var(--leather), inset 0 8px 0 rgba(205, 178, 122, .55), inset 0 -7px 0 var(--leather), inset 0 -8px 0 rgba(205, 178, 122, .55);
}
.band--leather h2, .band--leather h3 { color: var(--vellum); }
.band--leather .steps__list p { color: rgba(243, 234, 211, .8); }
.band--leather .steps__num { color: var(--gilt-light); border-color: var(--gilt-light); }
.band--leather .section__head { margin-bottom: 2.5rem; }
.band--deep { background: rgba(231, 218, 186, .62); border-block: 1px solid var(--rule); }

/* the designs: four across on a wide screen, and nothing under the plate but its name and price */
@media (min-width: 1100px) {
	.designs .plates { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3.25rem 2.25rem; }
}
.plates__title { font-size: 1.32rem; line-height: 1.2; }
.plates__price { font-size: 1rem; margin-top: .2rem; }
.plates__link { height: 100%; }
.designs__all { margin-top: 3rem; }

/* traditional and modern, side by side with a double rule between */
.provenance__grid { --prov-gap: clamp(2rem, 5vw, 4.5rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--prov-gap); max-width: 60rem; margin: 0 auto; }
.provenance__col { position: relative; }
.provenance__col + .provenance__col::before { content: ""; position: absolute; left: calc(var(--prov-gap) / -2 - 2px); top: .4rem; bottom: .4rem; border-left: 3px double var(--rule-strong); opacity: .7; }
.provenance__col h3 { font-style: italic; font-size: 1.65rem; }
.provenance__col p { color: var(--ink-soft); }
.provenance__col p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
	.provenance__grid { grid-template-columns: 1fr; }
	.provenance__col + .provenance__col::before { display: none; }
	.provenance__col + .provenance__col { padding-top: 1.75rem; border-top: 3px double var(--rule); }
}

/* plates arrive softly: a plate whose artwork is still on its way waits unseen, then fades in (plate.js loadArt); ink changes ease across */
svg.bp { transition: opacity .7s ease, color .45s ease; }
svg.bp.bp-wait { opacity: 0; }

/* passages rise into place the first time they are scrolled to (navigation.js adds .reveal only when motion is welcome) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .75s ease var(--reveal-delay, 0ms), transform .75s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
	.site-main { animation: page-in .55s ease both; }
	@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
	svg.bp { transition: none; }
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* product page: the plate stays beside you while you fill in the form, and its history follows the order button */
@media (min-width: 901px) {
	/* the stage is as tall as the order form beside it, and the plate travels only inside the stage, so it stops where the form stops and never covers the notes below */
	.shop-wrap--product div.product .plate-stage { grid-row: 1; align-self: stretch; }
	.shop-wrap--product div.product div.summary { grid-row: 1; }
	.shop-wrap--product div.product .plate-stage__pin { position: sticky; top: 1.5rem; }
}
.shop-wrap--product .product-story { margin: 2rem 0 0; padding: 1.4rem 0 0; border-left: 0; border-top: 3px double var(--rule); }
/* PayPal's "Pay Later" advert is left off the product page, where it breaks the period feel; it still shows at the basket and checkout */
.shop-wrap--product .summary .ppcp-messages { display: none; }
.shop-wrap--product .product-story__head { font-size: 1.4rem; font-style: italic; margin-bottom: .45em; }
.shop-wrap--product .product-story p { font-style: normal; }

/* a closer look: the plate opened large on dark cloth, to be pinched, double-tapped or clicked larger (assets/js/zoom.js) */
.plate-board--zoomable { cursor: zoom-in; }
.plate-zoom-open { display: flex; align-items: center; gap: .45rem; margin: 1rem auto 0; padding: .4rem .9rem; min-height: 44px; background: transparent; border: 1px solid var(--rule-strong); border-radius: 2px; color: var(--ink); font-family: var(--display); font-style: italic; font-size: 1.05rem; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.plate-zoom-open:hover { background: rgba(43, 33, 25, .06); border-color: var(--ink-soft); }
.plate-zoom-open svg { display: block; flex: none; }
.plate-zoom-open + .plate-caption { margin-top: .6rem; }
html.plate-zoom-on { overflow: hidden; }
.plate-zoom { position: fixed; inset: 0; z-index: 100000; background-color: var(--leather-deep); background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px); }
.plate-zoom__scroll { position: absolute; inset: 0; display: flex; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; cursor: zoom-out; }
.plate-zoom__sheet { flex: none; margin: auto; padding: 0; cursor: zoom-in; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)) drop-shadow(0 14px 28px rgba(0, 0, 0, .35)); }
.plate-zoom.is-zoomed .plate-zoom__sheet { cursor: zoom-out; }
.plate-zoom__sheet svg.bp { display: block; width: 100%; height: auto; opacity: 1; }
.plate-zoom__close { position: absolute; top: max(.75rem, env(safe-area-inset-top)); right: .75rem; z-index: 2; min-height: 44px; padding: .45rem 1.1rem; background: var(--vellum); color: var(--ink); border: 1px solid var(--gilt); border-radius: 2px; font-family: var(--display-sc); font-size: 1.05rem; letter-spacing: .06em; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.plate-zoom__close:hover { background: #FBF6E7; }
.plate-zoom__hint { position: absolute; left: 50%; bottom: max(.9rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; margin: 0; padding: .3rem .9rem; max-width: calc(100% - 2rem); text-align: center; background: rgba(29, 48, 36, .82); color: rgba(243, 234, 211, .9); border-radius: 2px; font-family: var(--display); font-style: italic; font-size: 1rem; pointer-events: none; transition: opacity .4s ease; }
.plate-zoom.is-zoomed .plate-zoom__hint { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
	.plate-zoom { animation: page-in .3s ease both; }
}
@media print { .plate-zoom, .plate-zoom-open { display: none; } }

/* phones: the sun sits above the name, and the plate stays in sight while a name is typed */
@media (max-width: 640px) {
	.site-header .wordmark .sun-mark { position: static; --sun-size: 3.5rem; margin: 0 auto .35rem; }
}
@media (max-width: 900px) {
	.hero:has(.try__input:focus) .hero__board { position: sticky; top: .5rem; z-index: 5; }
	.hero:has(.try__input:focus) .hero__board { padding: .9rem; }
	.hero:has(.try__input:focus) .hero__board .hero__plate { max-width: 8.5rem; }
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; }
	.hero__board { order: -1; max-width: 30rem; width: 100%; margin: 0 auto; }
	.plates, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.craft__grid { grid-template-columns: 1fr; }
	.steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.shop-wrap--product div.product { grid-template-columns: 1fr; }
	.shop-wrap--product div.product .plate-stage, .shop-wrap--product div.product div.summary { grid-column: 1; position: static; }
	.plate-board { max-width: 28rem; margin: 0 auto; }
}

@media (max-width: 640px) {
	body { font-size: 1.125rem; }
	.basket-link { position: static; grid-column: 2; grid-row: 2; justify-self: end; margin-top: .6rem; padding: .25rem; }
	.site-header__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
	.site-nav { grid-column: 1 / -1; grid-row: 3; width: 100%; margin-top: .55rem; }
	.site-header { padding-top: .75rem; }
	.wordmark { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
	.wordmark__name { font-size: clamp(2rem, 8vw, 2.6rem); }
.wordmark .sun-mark { --sun-size: clamp(2.2rem, 9vw, 4rem); }
	html.spec-nav-js .nav-toggle { display: inline-flex; grid-column: 1; grid-row: 2; justify-self: start; margin-top: .6rem; }
	html.spec-nav-js .site-nav:not(.is-open) { display: none; }
	.site-nav .menu { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: .25rem 0; }
	.site-nav .menu > li { border-bottom: 1px solid rgba(43, 33, 25, .15); text-align: left; }
	.site-nav .menu > li:last-child { border-bottom: 0; }
	.site-nav .menu > li > a { display: block; padding: .52rem .65rem; }
	.site-nav .menu-item-has-children { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
	.site-nav .menu-item-has-children > a { grid-column: 1; grid-row: 1; }
	.site-nav .menu-item-has-children > .sub-menu { grid-column: 1 / -1; grid-row: 2; display: block; position: static; transform: none; min-width: 0; visibility: visible; opacity: 1; background: none; border: 0; box-shadow: none; padding: .1rem 0 .6rem 1.2rem; text-align: left; }
	html.spec-nav-js .site-nav .menu-item-has-children > .sub-menu { display: none; }
	html.spec-nav-js .site-nav .menu-item-has-children.is-expanded > .sub-menu { display: block; }
	.site-nav .sub-menu a { display: block; padding: .35rem .65rem; font-size: 1.05rem; }
	html.spec-nav-js .sub-menu-toggle { display: inline-flex; grid-column: 2; grid-row: 1; justify-content: center; align-items: center; align-self: stretch; min-width: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
	.sub-menu-toggle svg { display: block; width: 17px; height: 17px; transition: transform .15s ease; }
	.site-nav .is-expanded > .sub-menu-toggle svg { transform: rotate(180deg); }
	.plates, .woocommerce ul.products { grid-template-columns: 1fr; }
	.steps__list { grid-template-columns: 1fr; }
	.prose > p:first-child::first-letter { font-size: 3.4em; }
}
/* Footer on a phone: everything centred and compact, the sun over the name, the links three across */
@media (max-width: 640px) {
	.site-footer { padding: 1.6rem 1rem 1.1rem; }
	.site-footer .ornament { margin-bottom: 1rem; }
	.site-footer__inner { flex-direction: column; align-items: center; text-align: center; gap: 1.1rem; }
	.site-footer .sun-mark { --sun-size: 3.4rem; margin: 0 auto .5rem; }
	.site-footer__name { font-size: 1.35rem; }
	.site-footer__about p:last-child { max-width: 22em; margin: 0 auto; font-size: 1rem; line-height: 1.45; }
	.site-footer__nav { width: 100%; }
	.site-footer .menu { grid-template-columns: repeat(3, auto); justify-content: center; gap: .55rem 1.6rem; }
	.site-footer .menu a { font-size: 1.02rem; }
	.site-footer__legal { margin-top: 1.2rem; text-align: center; font-size: .88rem; }
}

/* ---------- Phone header and hero (10 Nov) ----------
   Menu and basket sit either side of the sun, so the header is one block instead of two rows.
   On phones and tablets the plate comes first with "Try a name" straight under it, then the headline. */
@media (max-width: 640px) {
	.site-header__inner { align-items: start; }
	html.spec-nav-js .nav-toggle { grid-row: 1; margin-top: .35rem; position: relative; z-index: 2; }
	.basket-link { grid-row: 1; margin-top: .1rem; position: relative; z-index: 2; }
	.site-nav { grid-row: 2; }
}
@media (max-width: 900px) {
	.hero { padding-top: .9rem; row-gap: 0; }
	.hero__text { display: contents; }
	.hero__board { order: 1; }
	.hero .try { order: 2; margin: 1rem 0 1.1rem; max-width: none; width: 100%; }
	.hero__title { order: 3; }
	.hero__lede { order: 4; }
	#hero-choose { order: 5; justify-self: start; }
	.hero__preview-note { order: 6; }
}
/* The design picker under "Try a name" is retired: the name carries to every plate further down the page. */
.try__designs { display: none; }
/* 12 Nov: the "Look closer" button is retired; tapping the plate still opens the large view. */
.plate-zoom-open { display: none !important; }
/* 28 Nov: phones: the plate as large as the screen allows while "Type your name" stays in view under it.
   15.5rem covers the header, the cover's edge and the name box; the plate is 3:4. */
@media (max-width: 640px) {
	.hero { padding-top: .5rem; }
	.hero .hero__board { padding: .55rem; }
	.hero .hero__board::before { inset: 4px; }
	.hero .hero__board .hero__plate { max-width: min(100%, max(16rem, calc((100vh - 15.5rem) * .75))); transform: rotate(-.6deg); }
	@supports (height: 100svh) {
		.hero .hero__board .hero__plate { max-width: min(100%, max(16rem, calc((100svh - 15.5rem) * .75))); }
	}
	.hero .try { margin: .7rem 0 1rem; }
}
