/**
 * The Coin Shed - base layer
 * Reset, document defaults, elements, typography.
 *
 * No component styles here. No raw values - tokens only.
 */

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

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

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
fieldset, legend {
	margin: 0;
	padding: 0;
}

ul[class],
ol[class] {
	list-style: none;
	margin: 0;
	padding: 0;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
	cursor: pointer;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
	width: 100%;
}

/* ---------------------------------------------------------------------- */
/* Document                                                                */
/* ---------------------------------------------------------------------- */

body {
	background-color: var(--tcs-paper);
	color: var(--tcs-ink);
	font-family: var(--tcs-font-sans);
	font-size: var(--tcs-text-base);
	line-height: var(--tcs-leading-normal);
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Sticky footer. */
.tcs-site-main {
	flex: 1 0 auto;
}

/* ---------------------------------------------------------------------- */
/* Typography - headings                                                   */
/* ---------------------------------------------------------------------- */

/*
 * The serif carries names and editorial headings. It does not appear in UI,
 * on prices, or in specification tables - that discipline is what keeps the
 * catalogue feel from tipping into "antique dealer".
 */

h1, h2, h3,
.tcs-display {
	font-family: var(--tcs-font-serif);
	font-weight: var(--tcs-weight-regular);
	line-height: var(--tcs-leading-tight);
	letter-spacing: var(--tcs-tracking-tight);
	color: var(--tcs-ink);
	text-wrap: balance;
}

h4, h5, h6 {
	font-family: var(--tcs-font-sans);
	font-weight: var(--tcs-weight-semibold);
	line-height: var(--tcs-leading-snug);
	color: var(--tcs-ink);
}

h1 { font-size: var(--tcs-text-3xl); }
h2 { font-size: var(--tcs-text-2xl); }
h3 { font-size: var(--tcs-text-xl); }
h4 { font-size: var(--tcs-text-lg); }
h5 { font-size: var(--tcs-text-md); }
h6 { font-size: var(--tcs-text-base); }

/* ---------------------------------------------------------------------- */
/* Typography - body                                                       */
/* ---------------------------------------------------------------------- */

p {
	max-width: var(--tcs-measure);
	text-wrap: pretty;
}

p + p {
	margin-top: var(--tcs-space-md);
}

.tcs-lead {
	font-size: var(--tcs-text-md);
	line-height: var(--tcs-leading-relaxed);
	color: var(--tcs-ink-muted);
	max-width: var(--tcs-measure);
}

small,
.tcs-fine {
	font-size: var(--tcs-text-xs);
	color: var(--tcs-ink-muted);
}

strong, b { font-weight: var(--tcs-weight-semibold); }

/* ---------------------------------------------------------------------- */
/* Typography - utility classes                                            */
/* ---------------------------------------------------------------------- */

/*
 * Small-caps label. Used for mint names above product titles, spec keys and
 * section eyebrows. A catalogue convention, and it lets a card carry an extra
 * line of information without competing with the title.
 */
.tcs-label {
	font-family: var(--tcs-font-sans);
	font-size: var(--tcs-text-2xs);
	font-weight: var(--tcs-weight-semibold);
	letter-spacing: var(--tcs-tracking-label);
	text-transform: uppercase;
	color: var(--tcs-ink-faint);
	line-height: var(--tcs-leading-snug);
}

/*
 * Every number that a customer might compare against another number.
 * Tabular figures make prices, weights and mintages align down the grid.
 */
.tcs-numeric,
.tcs-price,
.woocommerce-Price-amount {
	font-family: var(--tcs-font-sans);
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	letter-spacing: var(--tcs-tracking-normal);
}

/* Catalogue double-rule. Used sparingly as a major section divider. */
.tcs-rule-double {
	border: 0;
	border-top: 1px solid var(--tcs-rule-strong);
	box-shadow: 0 3px 0 -2px var(--tcs-rule-strong);
	margin: var(--tcs-space-2xl) 0;
}

hr {
	border: 0;
	border-top: var(--tcs-border);
	margin: var(--tcs-space-xl) 0;
}

/* ---------------------------------------------------------------------- */
/* Links                                                                   */
/* ---------------------------------------------------------------------- */

a {
	color: var(--tcs-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--tcs-duration) var(--tcs-ease);
}

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

/* ---------------------------------------------------------------------- */
/* Focus - WCAG 2.2 AA                                                     */
/* ---------------------------------------------------------------------- */

:focus-visible {
	outline: var(--tcs-focus-width) solid var(--tcs-focus-color);
	outline-offset: var(--tcs-focus-offset);
	border-radius: var(--tcs-radius-sm);
}

/* Only remove the default ring where :focus-visible is supported. */
:focus:not(:focus-visible) {
	outline: none;
}

/* ---------------------------------------------------------------------- */
/* Lists (prose context)                                                   */
/* ---------------------------------------------------------------------- */

.tcs-prose ul,
.tcs-prose ol {
	max-width: var(--tcs-measure);
	padding-left: var(--tcs-space-lg);
	margin: var(--tcs-space-md) 0;
}

.tcs-prose li + li {
	margin-top: var(--tcs-space-2xs);
}

/* ---------------------------------------------------------------------- */
/* Tables                                                                  */
/* ---------------------------------------------------------------------- */

/*
 * Wide tables must scroll inside their own container, never the page body.
 * Wrap with .tcs-table-scroll.
 */
.tcs-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

th {
	text-align: left;
	font-weight: var(--tcs-weight-semibold);
}

/* ---------------------------------------------------------------------- */
/* Accessibility helpers                                                   */
/* ---------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	padding: var(--tcs-space-sm) var(--tcs-space-md);
	position: fixed;
	top: var(--tcs-space-xs);
	left: var(--tcs-space-xs);
	z-index: var(--tcs-z-skiplink);
	background: var(--tcs-surface-raised);
	color: var(--tcs-ink);
	border: var(--tcs-border-strong);
	border-radius: var(--tcs-radius);
	box-shadow: var(--tcs-shadow-overlay);
	text-decoration: none;
}

/* Skip link. */
.tcs-skip-link:focus {
	outline: var(--tcs-focus-width) solid var(--tcs-focus-color);
	outline-offset: var(--tcs-focus-offset);
}

[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------------- */
/* Selection                                                               */
/* ---------------------------------------------------------------------- */

::selection {
	background: var(--tcs-accent-tint);
	color: var(--tcs-ink);
}
