/*
 * Smoky Cotte — base.
 * Tokens come from theme.json (--wp--preset--*, --wp--custom--*).
 * Section colours are carried by --sc-* variables so every component
 * adapts to dark, black, light and orange sections without extra rules.
 * No @layer on purpose: WordPress global styles are unlayered and would win.
 */

:root {
	--sc-bg: var(--wp--preset--color--ink);
	--sc-fg: var(--wp--preset--color--paper);
	--sc-link: var(--wp--preset--color--accent);
	--sc-accent-text: var(--wp--preset--color--accent);
	--sc-muted: var(--wp--preset--color--muted);
	--sc-line: var(--wp--custom--line);
	--sc-header-h: 4.5rem;
	--sc-ease: var(--wp--custom--transition);
}

html {
	scroll-padding-top: calc(var(--sc-header-h) + 1rem);
	-webkit-text-size-adjust: 100%;
}

body {
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
}

[hidden] {
	display: none !important;
}

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

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

.is-style-section-accent :where(a, button, input, select, textarea, summary):focus-visible {
	outline-color: var(--wp--preset--color--ink);
}

:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
	overflow-wrap: break-word;
	hyphens: manual;
}

p {
	text-wrap: pretty;
}

/* Text measure for long reading. */
:where(.entry-content, .wp-block-post-content) > p,
:where(.entry-content, .wp-block-post-content) > ul,
:where(.entry-content, .wp-block-post-content) > ol {
	max-width: 68ch;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 1000;
	top: 0.5rem;
	left: 0.5rem;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* ---------- Text styles ---------- */

.is-style-eyebrow,
.sc-eyebrow {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--sc-accent-text);
}

.is-style-eyebrow + :is(h1, h2, h3, h4),
.sc-eyebrow + :is(h1, h2, h3, h4) {
	margin-block-start: var(--wp--preset--spacing--xs);
}

.is-style-lead {
	font-size: var(--wp--preset--font-size--body-l);
	line-height: 1.5;
	max-width: 44ch;
}

.is-style-tag,
.sc-tag {
	display: inline-block;
	width: fit-content;
	padding: 0.3em 0.7em 0.25em;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.1;
	text-transform: uppercase;
	transform: rotate(var(--wp--custom--tilt));
}

.is-style-section-accent .is-style-tag {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.has-display-xxl-font-size,
.has-display-xl-font-size {
	line-height: 0.88 !important;
	letter-spacing: -0.005em;
}

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

.wp-element-button,
.wp-block-button__link {
	transition: background-color var(--sc-ease), color var(--sc-ease), border-color var(--sc-ease);
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
	color: var(--sc-fg);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--sc-fg);
	border-color: var(--sc-fg);
	color: var(--sc-bg);
}

.wp-block-button.is-style-arrow > .wp-block-button__link,
.sc-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.25rem 0;
	background: none;
	border: 0;
	border-bottom: 2px solid var(--sc-link);
	color: var(--sc-fg);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

.wp-block-button.is-style-arrow > .wp-block-button__link::after,
.sc-link-arrow::after {
	content: "→";
	transition: transform var(--sc-ease);
}

.wp-block-button.is-style-arrow > .wp-block-button__link:hover,
.sc-link-arrow:hover {
	background: none;
	color: var(--sc-link);
}

.wp-block-button.is-style-arrow > .wp-block-button__link:hover::after,
.sc-link-arrow:hover::after {
	transform: translateX(4px);
}

/* Minimum touch target. */
.wp-block-button__link,
.wp-element-button {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Images ---------- */

.is-style-framed img {
	box-shadow: 12px 12px 0 var(--wp--preset--color--accent);
}

.is-style-section-accent .is-style-framed img {
	box-shadow: 12px 12px 0 var(--wp--preset--color--ink);
}

.wp-block-image img,
.wp-block-post-featured-image img {
	display: block;
}

/* ---------- Lists ---------- */

.is-style-plain {
	list-style: none;
	padding-left: 0;
}

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

.sc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--wp--custom--line);
}

.admin-bar .sc-header {
	top: var(--wp-admin--admin-bar--height, 0);
}

.sc-header__inner {
	min-height: var(--sc-header-h);
	gap: var(--wp--preset--spacing--s);
}

.sc-header .wp-block-site-logo img,
.sc-logo img {
	width: clamp(84px, 60px + 4vw, 124px);
	height: auto;
	margin-block: 0.5rem;
}

.sc-header__tools {
	gap: var(--wp--preset--spacing--s);
}

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

.sc-footer {
	--sc-bg: var(--wp--preset--color--black);
	background: var(--wp--preset--color--black);
	border-top: 1px solid var(--wp--custom--line);
}

.sc-footer .sc-logo-img img {
	width: clamp(160px, 120px + 10vw, 240px);
}

.sc-footer__legal {
	color: var(--sc-muted);
	font-size: var(--wp--preset--font-size--small);
}

.sc-footer__legal a {
	color: inherit;
}

.sc-footer .wp-block-social-links {
	--wp--style--block-gap: 0.75rem;
}

.sc-footer .wp-block-social-links .wp-social-link {
	color: var(--wp--preset--color--paper);
}

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

/* Sections sit edge to edge: no page-level gap between full-width blocks. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull {
	margin-block: 0 !important;
}

:where(figure) {
	margin: 0 0 1em;
}
