/*
 * Hang Tag theme styles. Tokens live in tokens.css.
 * Sections: base · layout · type · buttons and chips · info strip · header ·
 * sheets · footer · content · utilities.
 */

/* ---------- Base ---------- */

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

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

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	background: var(--paper);
	color: var(--ink-2);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--ink);
	text-underline-offset: 3px;
	transition: color var(--ease);
}

a:hover {
	color: var(--cobalt);
}

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

h1,
h2,
h3,
h4,
.h1,
.h2,
.h3 {
	margin: 0 0 var(--space-4);
	color: var(--ink);
	font-family: var(--font-serif);
	font-weight: 400;
}

p {
	margin: 0 0 var(--space-4);
}

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

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(760px + 2 * var(--gutter));
}

.site-main {
	flex: 1;
	padding-block: var(--space-7) var(--section-pad);
}

.section {
	padding-block: var(--section-pad);
}

/* ---------- Type ---------- */

.display-xl {
	font-family: var(--font-serif);
	font-size: var(--fs-display-xl);
	line-height: var(--lh-display-xl);
}

.display {
	font-family: var(--font-serif);
	font-size: var(--fs-display);
	line-height: var(--lh-display);
}

h1,
.h1 {
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
}

h2,
.h2 {
	font-size: var(--fs-h2);
	line-height: var(--lh-h2);
}

h3,
.h3 {
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
}

.quote {
	font-family: var(--font-serif);
	font-size: var(--fs-quote);
	font-style: italic;
	line-height: var(--lh-quote);
	color: var(--ink);
}

.body-l {
	font-size: var(--fs-body-l);
}

.small {
	font-size: var(--fs-small);
	line-height: var(--lh-small);
}

/* Every fact on a tag is spaced caps in Inter Tight (spec section 3). */
.tag-label,
.eyebrow,
.tag-line {
	font-family: var(--font-sans);
	font-size: var(--fs-tag-label);
	font-weight: 600;
	letter-spacing: var(--tracking-tag);
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--muted);
}

.eyebrow {
	margin-bottom: var(--space-3);
}

/* ---------- Buttons and chips ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 52px;
	padding: 0 var(--space-5);
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.btn--sm {
	min-height: 44px;
	padding: 0 var(--space-4);
	font-size: var(--fs-small);
}

.btn--lg {
	min-height: 56px;
}

.btn--primary {
	background: var(--ink);
	color: var(--paper);
}

.btn--primary:hover {
	background: var(--ink-2);
	color: var(--paper);
}

.btn--secondary {
	border-color: var(--ink);
	background: transparent;
	color: var(--ink);
}

.btn--secondary:hover {
	background: var(--tag);
	color: var(--ink);
}

.btn--pay {
	background: var(--cobalt);
	color: #fff;
}

.btn--pay:hover {
	background: var(--cobalt-hover);
	color: #fff;
}

.btn--on-ink {
	background: var(--paper);
	color: var(--ink);
}

.btn--on-ink:hover {
	background: var(--tag);
	color: var(--ink);
}

/* Second button on an ink band. */
.btn--ghost-ink {
	border-color: var(--paper);
	background: transparent;
	color: var(--paper);
}

.btn--ghost-ink:hover {
	background: var(--ink-2);
	color: var(--paper);
}

.btn:disabled,
.btn[aria-disabled="true"] {
	background: var(--linen-2);
	border-color: transparent;
	color: var(--muted);
	cursor: not-allowed;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: background-color var(--ease);
}

.icon-btn:hover {
	background: var(--tag);
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--tag);
	color: var(--ink);
	font-size: var(--fs-tag-label);
	font-weight: 500;
	line-height: 1.5;
}

.chip--timestamp {
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	text-decoration: none;
}

.chip--timestamp:hover {
	color: var(--paper);
	background: var(--ink-2);
}

/* The chip is 26px tall; the invisible ring makes it a 44px tap target
   (spec section 8) without changing how it looks. */
.chip--timestamp {
	position: relative;
}

.chip--timestamp::before {
	content: "";
	position: absolute;
	inset: -9px -4px;
}

.chip--filter {
	min-height: 44px;
	padding-inline: var(--space-4);
	border: 1px solid var(--rule-strong);
	background: transparent;
	font-size: var(--fs-small);
}

.chip--filter[aria-pressed="true"],
.chip--filter[aria-current="true"] {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--paper);
}

/* ---------- Info strip ---------- */

.info-strip {
	background: var(--ink);
	color: var(--paper);
}

.info-strip__items {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-1) 0;
	margin: 0;
	padding: var(--space-2) var(--gutter);
	font-size: var(--fs-tag-label);
	font-weight: 600;
	letter-spacing: var(--tracking-tag);
	line-height: 1.4;
	text-align: center;
	text-transform: uppercase;
}

/* Narrow screens: one item per line, no separators (a wrapped line would
   otherwise start with a dot). Wider: one line with " · " between items. */
.info-strip__items span {
	flex-basis: 100%;
}

@media (min-width: 700px) {
	.info-strip__items span {
		flex-basis: auto;
	}

	.info-strip__items span + span::before {
		content: "·";
		padding-inline: var(--space-3);
	}
}

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

.site-header {
	border-bottom: var(--line);
	background: var(--paper);
}

/* Phone: menu · wordmark · Bag, with the wordmark truly centered. */
.site-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--space-3);
	min-height: 64px;
}

.site-header__actions {
	justify-self: end;
}

.wordmark {
	font-family: var(--font-serif);
	font-size: 26px;
	line-height: 1;
	color: var(--ink);
	text-decoration: none;
	white-space: nowrap;
}

.site-header .wordmark {
	justify-self: center;
	padding-block: 9px; /* 44px tap target. */
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.site-nav,
.site-header__search {
	display: none;
}

.site-nav__list,
.sheet-nav__list,
.site-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 900px) {
	.site-header__inner {
		grid-template-columns: auto 1fr auto;
		gap: var(--space-6);
		min-height: 76px;
	}

	.site-header__menu {
		display: none;
	}

	.site-header .wordmark {
		justify-self: start;
		font-size: 30px;
	}

	.site-nav,
	.site-header__search {
		display: block;
	}

	.site-header__search {
		display: inline-flex;
	}

	.site-nav__list {
		display: flex;
		justify-content: center;
		gap: var(--space-6);
	}

	.site-nav__list a {
		font-size: 15px;
		font-weight: 500;
		text-decoration: none;
		text-underline-offset: 6px;
	}

	.site-nav__list a:hover,
	.site-nav__list [aria-current="page"],
	.site-nav__list .current-menu-item > a {
		text-decoration: underline;
		text-decoration-thickness: 1px;
	}
}

/* ---------- Sheets (phone menu, search) ---------- */

.sheet {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--paper);
	color: var(--ink-2);
}

.sheet::backdrop {
	background: rgba(27, 26, 23, 0.4);
}

.sheet--menu {
	height: 100%;
	max-height: none;
	padding: 0 var(--gutter) var(--space-6);
}

.sheet--menu[open] {
	display: flex;
	flex-direction: column;
	gap: var(--space-5);
}

.sheet--search {
	max-height: none;
	padding-block: var(--space-3);
	border-bottom: var(--line);
}

.sheet__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 64px;
}

.sheet--search .sheet__bar .search-form {
	flex: 1;
}

.sheet-nav__list a {
	display: block;
	padding-block: var(--space-3);
	border-bottom: var(--line);
	font-family: var(--font-serif);
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	text-decoration: none;
}

.sheet-nav__list [aria-current="page"] {
	text-decoration: underline;
	text-underline-offset: 6px;
}

.sheet__cta {
	align-self: stretch;
}

.sheet .info-strip {
	margin-top: auto;
	border-radius: var(--radius-photo);
}

/* ---------- Search form ---------- */

.search-form {
	display: flex;
	gap: var(--space-2);
}

.search-form label {
	flex: 1;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="password"],
input[type="number"],
select,
textarea {
	width: 100%;
	min-height: 48px;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-input);
	background: var(--tag);
	color: var(--ink);
	font: inherit;
	transition: border-color var(--ease);
}

.search-field:focus,
input:focus,
select:focus,
textarea:focus {
	border-color: var(--cobalt);
	outline: none;
	box-shadow: 0 0 0 2px rgba(36, 65, 201, 0.25);
}

.search-submit {
	min-height: 48px;
	padding: 0 var(--space-5);
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--ink);
	color: var(--paper);
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

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

.site-footer {
	background: var(--ink);
	color: var(--linen);
}

.site-footer__inner {
	display: grid;
	gap: var(--space-5);
	padding-block: var(--space-8);
}

.wordmark--footer {
	justify-self: start;
	padding-block: 6px; /* 44px tap target. */
	color: var(--paper);
	font-size: var(--fs-h2);
}

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

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

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3) var(--space-5);
}

.site-footer__links a {
	display: inline-block;
	padding-block: 10px; /* 44px tap target. */
	text-decoration: none;
}

.site-footer__links a:hover {
	text-decoration: underline;
}

.site-footer__fine {
	margin: 0;
	font-size: var(--fs-small);
	color: var(--linen-2);
}

@media (min-width: 900px) {
	.site-footer__inner {
		grid-template-columns: auto 1fr auto;
		align-items: center;
	}

	.site-footer__links {
		justify-content: center;
	}
}

/* ---------- Content ---------- */

.page-head {
	margin-bottom: var(--space-7);
}

.entry + .entry {
	margin-top: var(--space-7);
	padding-top: var(--space-7);
	border-top: var(--line);
}

.entry__title a {
	text-decoration: none;
}

.entry__content > * + * {
	margin-top: var(--space-4);
}

.entry__content img {
	border-radius: var(--radius-photo);
}

/* ---------- WooCommerce notices (its own CSS is off on shop and product pages) ---------- */

.woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	margin: 0 0 var(--space-5);
	padding: var(--space-4);
	border: var(--line);
	border-radius: var(--radius-input);
	background: var(--tag);
	color: var(--ink);
	list-style: none;
}

.woocommerce-error {
	border-color: var(--error);
	color: var(--error);
}

.woocommerce-message .button,
.woocommerce-info .button {
	order: 2;
	color: var(--ink);
	font-weight: 500;
}

/* ---------- Utilities ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 100;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-pill);
	background: var(--ink);
	color: var(--paper);
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
	color: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
