/**
 * Meldon Estates – brand details Kadence's Customizer can't set.
 *
 * Loaded on the front end (after kadence-global) and inside the block editor.
 * Colours use Kadence's global palette variables so Customize → Colors still
 * drives them: palette1 maroon, palette2 maroon dark, palette4 navy,
 * palette5 slate, palette8 blush light, palette10 blush.
 *
 * Sizes that scale with the window (clamp) are set here on low-specificity
 * class selectors, so a size picked in a Kadence block's own controls still
 * wins.
 */

:root {
	--meldon-serif: 'Cormorant Garamond', Georgia, serif;
	--meldon-sans: 'Hanken Grotesk', system-ui, sans-serif;
	--meldon-maroon-deep: #3a0d18;
	--meldon-navy-dark: #1d252d;
	--meldon-mist: #c3cad1;
	--meldon-grey: #8e979f;
	--meldon-stripes-light: repeating-linear-gradient(135deg, #efeced 0 12px, #f5f3f4 12px 24px);
	--meldon-stripes-maroon: repeating-linear-gradient(135deg, #641829 0 14px, #6b1a2e 14px 28px);
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
 * Header: 4px maroon rule, text wordmark, nav
 * ----------------------------------------------------------------------- */

#masthead {
	border-bottom: 4px solid var(--global-palette1);
}

.site-branding a.brand.meldon-wordmark,
.meldon-wordmark {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	color: var(--global-palette1);
	text-decoration: none;
}

.meldon-wordmark:hover {
	color: var(--global-palette1);
}

.meldon-wordmark__name {
	font-family: var(--meldon-serif);
	font-weight: 600;
	font-size: 30px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	line-height: 1;
}

.meldon-wordmark__sub {
	font-family: var(--meldon-sans);
	font-size: 11px;
	letter-spacing: 0.42em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--global-palette4);
}

@media (max-width: 767px) {
	.meldon-wordmark__name {
		font-size: 24px;
	}

	.meldon-wordmark__sub {
		font-size: 9px;
		letter-spacing: 0.32em;
	}
}

/* Last menu item lines up with the container edge. */
.header-navigation .primary-menu-container > ul > li.menu-item:last-child > a {
	padding-right: 0;
}

/* --------------------------------------------------------------------------
 * Shared section pieces
 * ----------------------------------------------------------------------- */

.meldon-section-title {
	font-size: clamp(34px, 3.6vw, 48px);
	line-height: 1.1;
}

.meldon-lead {
	font-size: clamp(26px, 2.8vw, 36px);
	line-height: 1.35;
	text-wrap: balance;
}

.meldon-eyebrow {
	line-height: 1.4;
}

/* "All businesses →", "Woodland & sustainability →" etc.: navy → maroon.
   (On a linked Advanced Heading, Kadence puts the extra class on the <a>.) */
.kb-advanced-heading-link {
	text-decoration: none;
}

.kb-advanced-heading-link.meldon-more-link:hover > .wp-block-kadence-advancedheading,
.kb-advanced-heading-link.meldon-text-link:hover > .wp-block-kadence-advancedheading {
	color: var(--global-palette1);
}

.kb-advanced-heading-link.meldon-text-link-light:hover > .wp-block-kadence-advancedheading {
	color: var(--global-palette9);
}

/* --------------------------------------------------------------------------
 * Hero
 * ----------------------------------------------------------------------- */

.meldon-hero {
	position: relative;
	overflow: hidden;
}

/* Striped placeholder until a background image is set on the row
   (Kadence's own background rule is more specific and replaces it). */
:where(.meldon-hero) {
	background-image: var(--meldon-stripes-maroon);
}

.meldon-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(180deg, #3a0d18cc 0%, #3a0d1800 30%, #3a0d1800 55%, #3a0d18e6 100%);
}

.wp-block-kadence-rowlayout.meldon-hero > .kt-row-column-wrap {
	position: relative;
	z-index: 1;
	min-height: min(92vh, 860px);
}

.meldon-hero-title {
	font-size: clamp(46px, 6.4vw, 92px);
	line-height: 0.98;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.meldon-hero-title em {
	font-style: italic;
	color: var(--global-palette10);
}

.meldon-hero-side .kb-buttons-wrap {
	flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
 * Business cards
 * ----------------------------------------------------------------------- */

.meldon-card {
	transition: opacity 0.15s ease;
}

.meldon-card:hover {
	opacity: 0.92;
}

.meldon-card > .kt-inside-inner-col {
	position: relative;
}

.meldon-card .meldon-tag {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	line-height: 1.2;
}

.meldon-card-img,
.meldon-story-img {
	margin: 0;
}

.meldon-card-img .kb-is-ratio-image,
.meldon-story-img .kb-is-ratio-image {
	background: var(--meldon-stripes-light);
}

.meldon-card-img img,
.meldon-story-img img {
	object-fit: cover;
}

/* --------------------------------------------------------------------------
 * Our story
 * ----------------------------------------------------------------------- */

.meldon-story-img .kb-is-ratio-image {
	height: auto;
	padding-bottom: 0;
	aspect-ratio: 4 / 5;
	max-height: 620px;
	background: var(--meldon-stripes-maroon);
}

.meldon-year {
	font-size: clamp(80px, 10vw, 140px);
	line-height: 0.85;
}

.meldon-story-title {
	font-size: clamp(30px, 3.2vw, 42px);
	line-height: 1.15;
	text-wrap: balance;
}

/* --------------------------------------------------------------------------
 * Forest → Saw mill → Logs
 * ----------------------------------------------------------------------- */

@media (max-width: 767px) {
	.meldon-steps .meldon-step + .meldon-step {
		border-top-width: 0 !important;
	}
}

/* --------------------------------------------------------------------------
 * News (Kadence Posts block)
 * ----------------------------------------------------------------------- */

.meldon-news-posts.kb-posts {
	column-gap: 32px;
	row-gap: 48px;
}

.meldon-news-posts .loop-entry {
	box-shadow: none;
	background: transparent;
	border-radius: 0;
}

.meldon-news-posts .loop-entry .entry-content-wrap {
	padding: 0;
}

.meldon-news-posts .post-thumbnail {
	margin-bottom: 16px;
	border-radius: 0;
}

.meldon-news-posts .post-thumbnail.kadence-thumbnail-ratio-3-2 {
	padding-bottom: 62.5%; /* 16:10 */
}

/* Striped placeholder when a post has no featured image. */
.meldon-news-posts .loop-entry:not(:has(.post-thumbnail)) .entry-content-wrap::before {
	content: "";
	display: block;
	aspect-ratio: 16 / 10;
	margin-bottom: 16px;
	background: var(--meldon-stripes-light);
}

.meldon-news-posts .entry-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
}

/* "{Category} · {Date}" above the title. */
.meldon-news-posts .entry-meta {
	order: -1;
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--global-palette1);
}

.meldon-news-posts .entry-meta > * {
	margin: 0;
}

.meldon-news-posts .entry-meta > *::after {
	display: none;
}

.meldon-news-posts .entry-meta .category-links {
	order: -1;
}

.meldon-news-posts .entry-meta .category-links::after {
	content: "·";
	display: inline;
	margin: 0 0.5em;
	opacity: 1;
	background: none;
	width: auto;
	height: auto;
}

.meldon-news-posts .entry-meta a,
.meldon-news-posts .entry-meta time {
	color: inherit;
	text-decoration: none;
}

.meldon-news-posts .entry-title {
	margin: 0;
	font-weight: 600;
	text-wrap: pretty;
}

.meldon-news-posts .entry-title a {
	color: var(--global-palette4);
	text-decoration: none;
}

.meldon-news-posts .entry-footer {
	display: none;
}

/* --------------------------------------------------------------------------
 * Footer (Kadence footer builder + the starter block widgets)
 * ----------------------------------------------------------------------- */

#colophon {
	color: var(--meldon-mist);
}

#colophon a {
	color: var(--meldon-mist);
	text-decoration: none;
}

#colophon a:hover {
	color: var(--global-palette9);
}

#colophon .widget {
	margin-bottom: 0;
}

#colophon .meldon-footer-brand {
	margin: 0 0 14px;
	font-family: var(--meldon-serif);
	font-weight: 600;
	font-size: 26px;
	line-height: 1;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--global-palette9);
}

#colophon .meldon-footer-address {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
}

#colophon .meldon-footer-heading {
	margin: 0 0 16px;
	font-family: var(--meldon-sans);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--global-palette10);
}

#colophon .meldon-footer-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	line-height: 1.5;
}

#colophon .meldon-footer-links li {
	margin: 0;
}

#colophon .site-bottom-footer-inner-wrap {
	min-height: 0;
	padding: 20px 0 36px;
	border-top: 1px solid #ffffff1a;
}

#colophon .site-bottom-footer-inner-wrap .footer-html {
	margin: 0;
	text-align: left;
}

#colophon .site-bottom-footer-inner-wrap .site-footer-section {
	justify-content: flex-start;
}

/* --------------------------------------------------------------------------
 * Inner pages and posts
 * ----------------------------------------------------------------------- */

.entry-hero .entry-meta,
.single .entry-header .entry-meta {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--global-palette1);
}
