/*
 * The shop dressed like cmothr.com: the same paper, type, header, footer and orange button,
 * so going from the site to the cart doesn't feel like arriving somewhere else.
 * Colours and type are copied from astro/src/styles/global.css; change them there and here.
 * Loaded after style.css (see functions.php).
 */
@font-face {
	font-family: 'Montserrat';
	src: url('../fonts/cmothr/montserrat.woff2') format('woff2');
	font-weight: 500 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Literata';
	src: url('../fonts/cmothr/literata.woff2') format('woff2');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Literata';
	src: url('../fonts/cmothr/literata-italic.woff2') format('woff2');
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

:root {
	--cm-orange: #db7124;
	--cm-ink: #1f1b17;
	--cm-ink-soft: #6b635a;
	--cm-paper: #fbf8f3;
	--cm-paper-deep: #f2ece2;
	--cm-display: 'Montserrat', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
	--cm-text: 'Literata', Georgia, 'Times New Roman', serif;
	--cm-gutter: clamp(1rem, 4vw, 2.5rem);
	--cm-wide: 72rem;
}

body {
	background: var(--cm-paper);
	color: var(--cm-ink);
	font-family: var(--cm-text);
}
a {
	color: inherit;
}
main h1,
main .wp-block-post-title,
.wp-block-woocommerce-coming-soon h1 {
	font-family: var(--cm-display);
	font-weight: 800;
	font-variant-caps: small-caps;
	letter-spacing: -0.01em;
	line-height: 0.95;
	color: var(--cm-orange);
	font-size: clamp(2.6rem, 7vw, 4rem);
}
main h2,
main h3 {
	font-family: var(--cm-display);
	font-weight: 800;
}

/* ---- header (the same as on cmothr.com) */
.cm-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: var(--cm-wide);
	margin: 0 auto;
	padding: 1.1rem var(--cm-gutter);
}
.cm-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--cm-ink);
	text-decoration: none;
	font-family: var(--cm-display);
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: 0.02em;
}
.cm-brand img {
	width: 2.6rem;
	height: auto;
	transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cm-brand:hover img {
	transform: rotate(-24deg);
}
.cm-head ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.4rem;
	margin: 0;
	padding: 0;
}
.cm-head li a,
.cm-secure {
	font-family: var(--cm-display);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--cm-ink);
	padding: 0.3rem 0;
	background-image: linear-gradient(var(--cm-orange), var(--cm-orange));
	background-size: 0 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.35s ease;
}
.cm-head li a:hover,
.cm-head li a[aria-current='page'] {
	background-size: 100% 2px;
}
.cm-secure {
	color: var(--cm-ink-soft);
	background: none;
}
@media (max-width: 34rem) {
	.cm-head {
		flex-direction: column;
		align-items: flex-start;
	}
	.cm-head ul {
		gap: 0.2rem 1.1rem;
	}
}

/* "← Continue shopping" above the cart */
.cm-back {
	max-width: var(--cm-wide);
	margin: 0 auto;
	padding: 0 var(--cm-gutter);
	font-family: var(--cm-display);
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cm-ink-soft);
}
main .cm-back {
	padding: 0;
	margin-bottom: 0;
}
.cm-back a {
	color: var(--cm-ink-soft);
}
.cm-back a:hover {
	color: var(--cm-orange);
}

/* ---- footer (the same as on cmothr.com) */
.cm-foot {
	max-width: var(--cm-wide);
	margin: clamp(4rem, 10vw, 8rem) auto 0;
	padding: 0 var(--cm-gutter) 3rem;
}
.cm-dash {
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--cm-orange) 0 14px, transparent 14px 20px, var(--cm-orange) 20px 23px, transparent 23px 29px);
}
.cm-foot-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.4rem 2rem;
	margin-top: 2.4rem;
}
.cm-lockup {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	text-decoration: none;
	color: var(--cm-ink);
}
.cm-lockup img {
	width: 3.6rem;
	height: auto;
}
.cm-words {
	display: grid;
	gap: 0.3rem;
}
.cm-wordmark {
	font-family: var(--cm-display);
	font-weight: 900;
	font-size: 2.6rem;
	line-height: 0.85;
	letter-spacing: -0.02em;
}
.cm-long {
	font-family: var(--cm-display);
	font-weight: 700;
	font-variant-caps: small-caps;
	font-size: 0.7rem;
	white-space: nowrap;
}
.cm-meta {
	margin: 0;
	font-family: var(--cm-display);
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--cm-ink-soft);
}
.cm-meta a {
	color: var(--cm-ink-soft);
}

/* ---- WooCommerce cart and checkout */
.wc-block-cart,
.wc-block-checkout {
	font-family: var(--cm-text);
}
.wc-block-cart-items__header,
.wc-block-cart__totals-title,
.wc-block-components-checkout-step__title,
.wc-block-components-title,
.wc-block-components-order-summary__button-text {
	font-family: var(--cm-display) !important;
	font-weight: 700 !important;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 0.78rem !important;
	color: var(--cm-ink-soft) !important;
}
.wc-block-components-checkout-step__title {
	color: var(--cm-ink) !important;
	font-size: 0.9rem !important;
}
.wc-block-components-product-name {
	font-family: var(--cm-display);
	font-weight: 700;
	font-size: 1rem;
	color: var(--cm-ink);
	text-decoration: none;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--cm-display);
	font-weight: 800;
}
.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	background: var(--cm-paper-deep);
}
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained,
.wp-element-button,
.wp-block-button__link {
	background: var(--cm-orange) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-family: var(--cm-display) !important;
	font-weight: 700 !important;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.contained:hover {
	background: var(--cm-ink) !important;
}
/* Form fields and choices sit on white, like cards on the paper. */
.wc-block-components-text-input input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-select select,
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option,
.wc-block-components-address-card,
.wc-block-checkout__shipping-option .wc-block-components-radio-control__option,
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-order-summary {
	background-color: #fff;
}
