/* =========================================================================
   Breadman LA — design tokens, reset and shared primitives.
   Palette and type are lifted verbatim from the existing brand:
   gold #C19D56, cream #FCF8F4, ink #232323, Marcellus + DM Sans.
   ========================================================================= */

:root {
	/* Brand */
	--gold: #c19d56;
	/* Darkened from #a8843f so gold text clears WCAG AA (4.5:1) everywhere it
	   is used: 5.6:1 on white, 5.4:1 on cream, 4.9:1 on gold-wash — and white
	   on it is 5.6:1 for the button hover state. */
	--gold-deep: #82632a;
	--gold-soft: #e6d4b3;
	--gold-wash: #f7f0e3;

	--ink: #232323;
	--ink-2: #3a3a3a;
	--ink-soft: #4d4d4d;
	/* Was #7c7c7c — 4.17:1 on white, just under AA. */
	--ink-mute: #6b6b6b;

	/* Text colour to use on a solid --gold background: white gives 2.55:1
	   there, ink gives 6.3:1, and the brand gold itself stays untouched. */
	--on-gold: #232323;

	--cream: #fcf8f4;
	--cream-2: #f6efe6;
	--white: #ffffff;

	--line: rgba(35, 35, 35, 0.1);
	--line-strong: rgba(35, 35, 35, 0.18);
	--line-light: rgba(255, 255, 255, 0.16);

	/* Type */
	--font-display: "Marcellus", "Times New Roman", serif;
	--font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	--fs-eyebrow: 0.75rem;
	--fs-body: 1rem;
	--fs-lead: 1.0625rem;

	/* Space */
	--container: 1240px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--section-y: clamp(4rem, 8vw, 7.5rem);

	/* Shape */
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 24px;
	--radius-pill: 999px;

	--shadow-sm: 0 2px 10px rgba(35, 35, 35, 0.05);
	--shadow: 0 12px 34px rgba(35, 35, 35, 0.08);
	--shadow-lg: 0 26px 70px rgba(35, 35, 35, 0.12);

	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--header-h: 96px;
}

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

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink-soft);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.nav-open {
	overflow: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.15;
	color: var(--ink);
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
	margin: 0 0 1.15em;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--gold-deep);
	text-decoration: none;
	transition: color 0.25s var(--ease);
}

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

ul,
ol {
	margin: 0;
	padding: 0;
}

li {
	list-style: none;
}

button {
	font: inherit;
	cursor: pointer;
	border: 0;
	background: none;
	color: inherit;
}

input,
textarea,
select {
	font: inherit;
	color: var(--ink);
}

/* Two-tone focus ring. A single gold ring is only 2.2:1 against white, which
   fails WCAG 1.4.11 (3:1 for non-text). Ink carries the contrast on light
   surfaces (15:1), the gold halo carries it on dark ones (6.3:1 vs ink), so
   the indicator is visible wherever it lands. */
:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--gold);
	border-radius: 4px;
}

/* On the dark footer and hero the roles swap: gold inside, ink halo. */
.site-footer :focus-visible,
.hero :focus-visible,
.auth-aside :focus-visible,
.account-dash__last :focus-visible {
	outline-color: var(--gold);
	box-shadow: 0 0 0 4px var(--ink);
}

::selection {
	background: var(--gold);
	color: var(--on-gold);
}

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

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

.section {
	position: relative;
	/* Decorative wheat marks are deliberately hung past the edges; clip them
	   here so they never widen the document. */
	overflow: hidden;
	padding-block: var(--section-y);
}

.section--cream { background: var(--cream); }
.section--dark {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.72);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--white); }

.section__footer {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	text-align: center;
}

.section__wheat {
	position: absolute;
	color: var(--gold);
	opacity: 0.1;
	pointer-events: none;
}

.section__wheat--right {
	right: -30px;
	top: 12%;
	transform: rotate(18deg);
}

/* ---------- Section heading ---------- */

.section-head {
	max-width: 62ch;
	margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

.section-head--center {
	margin-inline: auto;
	text-align: center;
}

.section-head__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.85rem;
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold-deep);
}

.section-head--dark .section-head__eyebrow {
	color: var(--gold);
}

.eyebrow-mark {
	width: 26px;
	height: 1px;
	background: currentColor;
	flex: none;
}

.section-head__title {
	margin: 0;
}

.section-head__text {
	margin: 1rem 0 0;
	font-size: var(--fs-lead);
	color: var(--ink-mute);
}

.section-head--dark .section-head__text {
	color: rgba(255, 255, 255, 0.62);
}

.section-head-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
	margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem);
}

.section-head-row .section-head {
	margin-bottom: 0;
	flex: 1 1 420px;
}

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

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	padding: 0.85rem 1.6rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
	transition: background 0.25s var(--ease), color 0.25s var(--ease),
		border-color 0.25s var(--ease), transform 0.25s var(--ease),
		box-shadow 0.25s var(--ease);
}

.btn:hover {
	transform: translateY(-2px);
}

.btn .icon {
	transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
	transform: translateX(3px);
}

.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.75rem; }
.btn--lg { padding: 1.05rem 2rem; font-size: 0.9375rem; }

.btn--gold {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--on-gold);
	box-shadow: 0 10px 24px rgba(193, 157, 86, 0.28);
}

.btn--gold:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--white);
	box-shadow: 0 14px 30px rgba(35, 35, 35, 0.22);
}

.btn--dark {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--white);
}

.btn--dark:hover {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--on-gold);
}

.btn--ghost {
	border-color: var(--line-strong);
	color: var(--ink);
}

.btn--ghost:hover {
	border-color: var(--gold);
	background: var(--gold);
	color: var(--on-gold);
}

.btn--ghost-light {
	border-color: var(--line-light);
	color: var(--white);
}

.btn--ghost-light:hover {
	background: var(--white);
	border-color: var(--white);
	color: var(--ink);
}

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink);
	border-bottom: 1px solid var(--gold);
	padding-bottom: 3px;
}

.link-arrow .icon {
	transition: transform 0.25s var(--ease);
}

.link-arrow:hover {
	color: var(--gold-deep);
}

.link-arrow:hover .icon {
	transform: translateX(4px);
}

.slider-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	color: var(--ink);
	background: var(--white);
	transition: background 0.25s var(--ease), color 0.25s var(--ease),
		border-color 0.25s var(--ease);
}

.slider-btn:hover {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--on-gold);
}

.slider-btn[data-testimonial-prev] .icon {
	transform: rotate(180deg);
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.5rem, 7vw, 6rem);
	background: var(--cream);
	text-align: center;
}

.page-hero__title {
	margin: 0.65rem 0 0;
	font-size: clamp(2.25rem, 4.6vw, 3.5rem);
}

.page-hero__text {
	max-width: 58ch;
	margin: 1rem auto 0;
	color: var(--ink-mute);
}

.page-hero__wheat {
	position: absolute;
	top: 50%;
	color: var(--gold);
	opacity: 0.14;
	pointer-events: none;
}

.page-hero__wheat--left { left: -30px; transform: translateY(-50%) rotate(-20deg); }
.page-hero__wheat--right { right: -30px; transform: translateY(-50%) rotate(20deg); }

.breadcrumbs {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

.breadcrumbs a { color: var(--ink-mute); }
.breadcrumbs a:hover { color: var(--gold-deep); }
.breadcrumbs__sep { color: var(--gold); }

/* ---------- Misc ---------- */

.empty-state {
	text-align: center;
	padding-block: 3rem;
	display: grid;
	gap: 1.5rem;
	justify-items: center;
}

.entry-content > * + * {
	margin-top: 1.15rem;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2em;
}

.entry-content img {
	border-radius: var(--radius);
}

.entry-content blockquote {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	border-left: 3px solid var(--gold);
	background: var(--cream);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-family: var(--font-display);
	font-size: 1.2rem;
	color: var(--ink);
}

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

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75rem 1.25rem;
	background: var(--ink);
	color: var(--white);
	border-radius: var(--radius-sm);
}

.scroll-top {
	position: fixed;
	right: clamp(1rem, 3vw, 2rem);
	bottom: clamp(1rem, 3vw, 2rem);
	z-index: 60;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--gold);
	color: var(--on-gold);
	box-shadow: var(--shadow);
	transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.scroll-top:hover {
	background: var(--ink);
	transform: translateY(-3px);
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* ---------- Scroll reveal (added by main.js) ---------- */

.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Stagger the category tiles as the rail comes into view. */
.cat-rail__item.reveal .cat-tile { transition-delay: calc(var(--i, 0) * 45ms); }
.cat-rail__item.reveal { transition-delay: calc(var(--i, 0) * 45ms); }
