/*
 * Elham Christmas Market — site design.
 *
 * Loaded after Elara's own stylesheet (see functions.php, which has to enqueue
 * the parent by hand). Colours and type are the Virtual Market's, so the site
 * and the market read as one event: cream paper, deep forest green, Christmas
 * red, Playfair Display over Nunito.
 *
 * Selectors are kept at a weight that beats Elara's own without resorting to
 * !important, except where noted.
 *
 * Sizes are in px, not rem: Elara bundles Bootstrap, which sets
 * `html { font-size: 10px }`, so rem values here would come out at 62.5% of
 * their intended size.
 */

:root {
	/* Paper */
	--elham-paper: #faf6ea;
	--elham-panel: #f7f0da;
	--elham-panel-warm: #efe3c2;

	/* Ink */
	--elham-ink: #27352e;
	--elham-ink-soft: #566159;

	/* Green */
	--elham-green-deep: #0d2e23;
	--elham-green: #143f31;
	--elham-green-mid: #1b5241;

	/* Red */
	--elham-red: #b0242b;
	--elham-red-deep: #8d1a20;

	/* Type */
	--elham-display: "Playfair Display", "Hoefler Text", Georgia, serif;
	--elham-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--elham-serif-caps: "Cormorant Garamond", "Hoefler Text", Georgia, serif;
}

/* ------------------------------------------------------------- the page -- */

body {
	font-family: var(--elham-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--elham-ink);
	background: var(--elham-paper);
}

.default-background-color,
body.custom-background {
	background: var(--elham-paper);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--elham-display);
	color: var(--elham-green);
	font-weight: 700;
}

/*
 * Set for comfortable reading rather than for looks. A good proportion of the
 * people reading this are older, and the stock size was too small.
 */
.entry-content p,
.entry-content li,
.entry-content td {
	font-family: var(--elham-body);
	color: var(--elham-ink);
	font-size: 18.4px;
	line-height: 1.78;
}

.entry-content h2 {
	font-size: clamp(27.2px, 3vw, 35.2px);
	margin-top: 1.4em;
}

.entry-content h3 {
	font-size: clamp(21.6px, 2.2vw, 26.4px);
	margin-top: 1.3em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.widget,
.widget p,
.widget li,
.widget a {
	font-size: 16.32px;
	line-height: 1.65;
}

/*
 * Elara gives the first paragraph of the content a 64px floating drop cap.
 * It reads as dated here, and it was mangling the first line of anything
 * placed in a container — including the market's own heading.
 */
.entry-singular .entry-content p:first-child:first-letter,
.entry-content p:first-child:first-letter {
	font-size: inherit;
	line-height: inherit;
	float: none;
	padding: 0;
}

/* Poppins is no longer loaded; everything it was used for becomes Nunito. */
.tagline,
.btn-default,
#main-menu .menu > li,
.menu-container .menu > li,
.box-caption--excerpt,
.box-caption--readmore a,
.single .entry-meta li,
.widget-title {
	font-family: var(--elham-body);
}

/* --------------------------------------------------------------- links -- */

.entry-content a,
.single .entry-content a,
.page .entry-content a {
	color: var(--elham-red);
	text-decoration: none;
	box-shadow: inset 0 -1px 0 rgba(176, 36, 43, 0.35);
	transition: color 140ms ease, box-shadow 140ms ease;
}

.entry-content a:hover,
.single .entry-content a:hover,
.page .entry-content a:hover,
.entry-content a:focus,
.single .entry-content a:focus,
.page .entry-content a:focus {
	color: var(--elham-red-deep);
	text-decoration: none;
	box-shadow: inset 0 -2px 0 var(--elham-red);
}

/* ------------------------------------------------------------- buttons -- */

.btn,
.btn-primary,
.btn-default,
input[type="submit"],
button[type="submit"] {
	font-family: var(--elham-body);
	font-size: 13.12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-indent: 0.14em;
	text-transform: uppercase;
	padding: 13px 26px;
	border: 0;
	border-radius: 2px;
	color: #fdf8e9;
	background: linear-gradient(180deg, var(--elham-red), var(--elham-red-deep));
	box-shadow: 0 5px 14px rgba(141, 26, 32, 0.3);
	transition: filter 140ms ease, transform 140ms ease;
}

.btn:hover,
.btn-primary:hover,
.btn-default:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.btn:focus,
.btn-primary:focus,
.btn-default:focus {
	color: #fdf8e9;
	filter: brightness(1.08);
	transform: translateY(-1px);
}

/* -------------------------------------------------------------- header -- */

.header {
	background: var(--elham-green);
	border-bottom: 3px solid var(--elham-green-deep);
}

/*
 * Elara wraps the site identity and the navigation in its own
 * .default-background-color and .navbar-header blocks, each painting itself
 * light. They have to be repainted individually or the green header shows
 * only as a sliver. .default-background-color is also the page background,
 * hence the .header scope.
 */
.header .default-background-color,
.header .navbar-header,
.header .wrapper-nav,
.header .wrapper-nav .menu,
.header .menu.navbar-nav,
.header .navbar,
.header .navbar-collapse {
	background: transparent;
	background-color: transparent;
	border-color: rgba(247, 240, 218, 0.16);
}

.header .widget-area-header {
	background: var(--elham-green-deep);
	padding: 6px 0;
}

.header .widget-area-header .widget {
	margin: 0;
	padding: 0;
	border: 0;
}

.header .widget-area-header .sidebar-top {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: 40px;
}

/* The search box: one slim field with a compact button, not a red slab. */
.header .search-form {
	display: flex;
	align-items: stretch;
	gap: 0;
	max-width: 290px;
	width: 100%;
}

.header .search-form .search-field {
	flex: 1 1 auto;
	min-width: 0;
	height: 38px;
	padding: 0 12px;
	font-size: 15.2px;
	background: rgba(247, 240, 218, 0.1);
	border: 1px solid rgba(247, 240, 218, 0.28);
	border-right: 0;
	border-radius: 2px 0 0 2px;
	color: #fdf8e9;
}

.header .search-form .search-field:focus {
	outline: 2px solid rgba(247, 240, 218, 0.6);
	outline-offset: -2px;
}

.header .search-form .search-submit {
	flex: 0 0 auto;
	height: 38px;
	padding: 0 16px;
	font-family: var(--elham-body);
	font-size: 11.84px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fdf8e9;
	background: linear-gradient(180deg, var(--elham-red), var(--elham-red-deep));
	border: 0;
	border-radius: 0 2px 2px 0;
	box-shadow: none;
}

.header .search-form .search-submit:hover,
.header .search-form .search-submit:focus {
	filter: brightness(1.08);
	transform: none;
}

/*
 * Elara shows an icon-font glyph here and hides the word. The glyph renders as
 * an empty square, so the word is brought back instead.
 */
.header .search-form .search-submit .fa,
.header .search-form .search-submit i {
	display: none;
}

.header .search-form .search-submit span {
	display: inline;
	position: static;
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	overflow: visible;
	white-space: nowrap;
}

/* The collapse arrow Elara puts under the bar has nothing left to collapse. */
.header .header-toggle {
	display: none;
}

.header,
.header .header-logo-text,
.header .header-logo-text a,
.header .logo .header-logo-text a,
.header .logo .header-logo-text a:hover,
.header .logo .header-logo-text a:focus,
.header a {
	color: #fdf8e9;
}

.header .header-logo-text,
.header .header-logo-text a {
	font-family: var(--elham-display);
}

.header a:hover,
.header a:focus {
	color: #fff;
}

.header .header-toggle {
	background-color: var(--elham-green-mid);
	color: #fdf8e9;
}

.header .icon-bar {
	background-color: #fdf8e9;
}

.header .site-title a,
.header .site-title,
.header h1 a,
.header .tagline {
	color: #fdf8e9;
}

.header .tagline {
	font-family: var(--elham-serif-caps);
	font-weight: 600;
	letter-spacing: 0.26em;
	text-indent: 0.26em;
	text-transform: uppercase;
	opacity: 0.9;
}

#main-menu .menu > li > a,
.menu-container .menu > li > a {
	color: #f3ead1;
	font-weight: 600;
	letter-spacing: 0.02em;
}

#main-menu .menu > li > a:hover,
#main-menu .menu > li > a:focus,
#main-menu .menu > li.current-menu-item > a,
#main-menu .menu > li.current_page_item > a {
	color: #fdf8e9;
	box-shadow: inset 0 -3px 0 var(--elham-red);
}

#main-menu .dropdown-menu {
	background: var(--elham-green-mid);
	border: 0;
	border-radius: 2px;
}

#main-menu .dropdown-menu > li > a {
	color: #f3ead1;
}

#main-menu .dropdown-menu > li > a:hover,
#main-menu .dropdown-menu > li > a:focus {
	background: var(--elham-green-deep);
	color: #fdf8e9;
}

.header input[type="search"],
.header input[type="text"] {
	background: rgba(247, 240, 218, 0.1);
	border: 1px solid rgba(247, 240, 218, 0.28);
	color: #fdf8e9;
}

.header input::placeholder {
	color: rgba(253, 248, 233, 0.6);
}

/* -------------------------------------------------------------- footer -- */

.footer {
	background: var(--elham-green-deep);
	color: #e6dcc0;
	margin-top: 0;
}

.footer .default-background-color {
	background: transparent;
}

.footer a {
	color: #f3ead1;
}

.footer a:hover,
.footer a:focus {
	color: #fff;
}

.footer-copyrights {
	border-top: 1px solid rgba(247, 240, 218, 0.16);
	padding-top: 18px;
	font-size: 13.76px;
	color: rgba(230, 220, 192, 0.8);
}

/* ---------------------------------------------------------------- hero -- */

.elham-hero {
	/*
	 * The greenery is the market plugin's artwork, which takes its colours
	 * from these custom properties. They are declared on .ecm-market inside
	 * the plugin, so the hero has to declare them for itself.
	 */
	--ecm-leaf: #3f7b3e;
	--ecm-leaf-dark: #2b5a30;
	--ecm-leaf-light: #7fa855;
	--ecm-berry: #c9302c;
	--ecm-red: #b0242b;

	position: relative;
	overflow: hidden;
	margin: 0 0 clamp(28px, 4vw, 52px);
	padding: clamp(54px, 7vw, 86px) 20px clamp(46px, 6vw, 74px);
	text-align: center;
	background:
		radial-gradient(120% 86% at 50% 36%, var(--elham-green-mid) 0%, var(--elham-green) 46%, var(--elham-green-deep) 100%);
	box-shadow: inset 0 -3px 0 rgba(13, 46, 35, 0.5);
}

/* A photograph, when one is set, sits behind and is darkened to keep the
   wording readable. */
.elham-hero.has-photo::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--elham-hero-photo);
	background-size: cover;
	background-position: center;
	opacity: 0.4;
}

/* A printed keyline, the same motif as the market's tables and cards. */
.elham-hero::after {
	content: "";
	position: absolute;
	inset: clamp(14px, 1.8vw, 24px);
	border: 1px solid rgba(247, 240, 218, 0.22);
	border-radius: 2px;
	pointer-events: none;
	z-index: 2;
	background: none;
}

.elham-hero.has-photo::after {
	inset: 0;
	border: 0;
	border-radius: 0;
	background: linear-gradient(180deg, rgba(13, 46, 35, 0.55), rgba(13, 46, 35, 0.8));
}

.elham-hero__sprigs {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 3;
}

.elham-hero__sprig {
	position: absolute;
	top: clamp(10px, 1.4vw, 20px);
	width: clamp(84px, 11vw, 156px);
	height: auto;
	aspect-ratio: 104 / 92;
	filter: drop-shadow(0 4px 7px rgba(9, 32, 24, 0.45));
}

.elham-hero__sprig--left {
	left: clamp(8px, 1.2vw, 18px);
}

.elham-hero__sprig--right {
	right: clamp(8px, 1.2vw, 18px);
	transform: scaleX(-1);
}

.elham-hero__inner {
	position: relative;
	z-index: 3;
	max-width: 760px;
	margin: 0 auto;
}

.elham-hero__kicker {
	margin: 0;
	font-family: var(--elham-serif-caps);
	font-weight: 600;
	font-size: clamp(13.76px, 1.6vw, 17.6px);
	letter-spacing: 0.46em;
	text-indent: 0.46em;
	text-transform: uppercase;
	color: #efe3c2;
}

.elham-hero__heading {
	margin: 0.14em 0 0;
	font-family: var(--elham-display);
	font-weight: 700;
	font-size: clamp(32px, 5vw, 54.4px);
	line-height: 1.1;
	color: #fdf8e9;
	text-shadow: 0 2px 0 rgba(13, 46, 35, 0.4);
}

.elham-hero__intro {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(10px, 1.6vw, 18px);
	margin: clamp(10px, 1.7vw, 17px) 0 0;
	font-family: var(--elham-serif-caps);
	font-weight: 600;
	font-size: clamp(12.8px, 1.45vw, 16px);
	letter-spacing: 0.26em;
	text-indent: 0.26em;
	text-transform: uppercase;
	color: #f7f0da;
	opacity: 0.86;
}

.elham-hero__rule {
	display: block;
	width: clamp(26px, 7vw, 74px);
	height: 1px;
	background: linear-gradient(90deg, transparent, #efe3c2);
	opacity: 0.8;
}

.elham-hero__intro .elham-hero__rule:last-child {
	background: linear-gradient(270deg, transparent, #efe3c2);
}

.elham-hero__text {
	margin: clamp(18px, 2.4vw, 26px) auto 0;
	max-width: 36em;
	font-family: var(--elham-body);
	font-size: clamp(17.28px, 1.6vw, 19.52px);
	line-height: 1.65;
	color: #f2e9d3;
}

.elham-hero__actions {
	margin: clamp(22px, 3vw, 32px) 0 0;
}

.elham-hero__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 34px;
	font-family: var(--elham-body);
	font-size: 13.76px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-indent: 0.16em;
	text-transform: uppercase;
	color: #fdf8e9;
	background: linear-gradient(180deg, var(--elham-red), var(--elham-red-deep));
	border-radius: 2px;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(9, 32, 24, 0.45);
	transition: filter 140ms ease, transform 140ms ease;
}

.elham-hero__button:hover,
.elham-hero__button:focus {
	color: #fdf8e9;
	text-decoration: none;
	filter: brightness(1.09);
	transform: translateY(-1px);
}

.elham-hero__button:focus-visible {
	outline: 3px solid #fdf8e9;
	outline-offset: 3px;
}

/* Elara pads the top of <main>, which left a cream strip between the header
   and the hero. On the homepage the hero should sit flush beneath it. */
.home .main {
	padding-top: 0;
}

/* And break out of the wrapper's side padding, so the hero is edge to edge at
   every width rather than full-bleed on a desktop and inset on a phone. */
.main > .wrapper > .elham-hero {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
}

/* ------------------------------------------------------- posts & pages -- */

.entry-singular .entry-title,
.entry .entry-title,
.archive-header h1 {
	font-family: var(--elham-display);
	color: var(--elham-green);
}

.single .entry-meta li,
.entry-meta a {
	color: var(--elham-ink-soft);
	font-size: 13.76px;
}

/* Trader posts and category listings read as cards, like the market tables. */
.entry.post,
.archive .entry,
.search .entry {
	background: var(--elham-panel);
	border-radius: 3px;
	padding: clamp(20px, 3vw, 34px);
	margin-bottom: clamp(18px, 2.6vw, 30px);
	box-shadow:
		inset 0 0 0 1px rgba(20, 63, 49, 0.14),
		0 6px 18px rgba(9, 32, 24, 0.07);
}

blockquote,
.entry-singular .entry-content blockquote {
	font-family: var(--elham-display);
	color: var(--elham-green);
	border-left: 3px solid var(--elham-red);
	padding-left: clamp(16px, 2.4vw, 28px);
	font-size: clamp(19.2px, 2.2vw, 25.6px);
	line-height: 1.4;
}

hr {
	border: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(20, 63, 49, 0.3), transparent);
	margin: clamp(26px, 4vw, 44px) 0;
}

/* ------------------------------------------------------------- sidebar -- */

/*
 * One search box is enough, and it lives in the header. This removes the
 * duplicate from the page sidebar without touching anything else there —
 * the JustGiving widget and the rest stay exactly as they are.
 */
.widget-area-sidebar .widget_search,
.widget-area-sidebar .wp-block-search,
.widget-area-footer .widget_search {
	display: none;
}


.widget-title {
	font-family: var(--elham-serif-caps);
	font-weight: 600;
	letter-spacing: 0.2em;
	text-indent: 0.2em;
	text-transform: uppercase;
	color: var(--elham-green);
}

/* ---------------------------------------------------------- preferences -- */

@media (prefers-reduced-motion: reduce) {
	.btn,
	.elham-hero__button,
	.entry-content a {
		transition-duration: 0.01ms;
	}

	.btn:hover,
	.elham-hero__button:hover {
		transform: none;
	}
}
