/*
Theme Name: Golden Marzipan
Theme URI: https://goldenmarzipan.co.uk/
Author: James Parkin
Author URI: https://zeyo.co.uk/
Description: Custom theme for Golden Marzipan.
Version: 1.6.21
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: golden-marzipan
Tags: one-column, custom-colors, editor-style, featured-images, translation-ready
*/

/* The home page design lives in assets/css/site.css (identical to the approved static site).
   This file adds what WordPress needs: admin bar offset, articles, pages, lists and core classes. */

/* WordPress admin bar */
.admin-bar .header{top:32px}
html:has(body.admin-bar){scroll-padding-top:142px}
@media (max-width:782px){.admin-bar .header{top:46px}}
@media (max-width:600px){.admin-bar .header{top:0}}

/* Core helpers */
.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}
.screen-reader-text:focus{position:static!important;width:auto;height:auto;clip:auto;overflow:visible;white-space:normal}
.nav a[aria-current="page"],.nav .current-menu-item a{color:var(--ink)}

/* Page and article headers */
.page-head{padding-top:clamp(56px,7vw,96px)}
.page-head.center{text-align:center}
.page-head .crumb{display:inline-flex;align-items:center;gap:8px;font-size:15px;color:var(--muted);transition:color .2s}
.page-head .crumb:hover{color:var(--ink)}
.page-head .crumb svg{width:12px;height:12px;transform:rotate(-135deg)}
.page-head .cat{margin-top:28px;font-size:14px;font-weight:500;color:#8a5a00}
.page-head .cat a:hover{text-decoration:underline}
.page-head h1{margin-top:12px;font-size:clamp(34px,4.2vw,56px);font-weight:500;line-height:1.08;letter-spacing:-.03em;color:var(--ink);text-wrap:balance}
.page-head.center h1{max-width:15em;margin-inline:auto}
.page-head .meta{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:20px;font-size:15px;color:var(--muted)}
.page-head .meta span+span::before{content:"·";margin-right:18px;color:var(--line)}
.page-head .lede{margin-top:20px;font-size:18px;color:var(--text);max-width:34em}
.page-head.center .lede{margin-inline:auto}
.narrow{max-width:calc(760px + var(--pad) * 2)}

.feature-img{margin-top:clamp(36px,5vw,56px)}
.feature-img .panel{box-shadow:var(--sh-lg)}
.feature-img img{width:100%;max-height:620px;object-fit:cover}

/* Article and page body */
.prose{margin-top:clamp(36px,5vw,56px);font-size:18px;line-height:1.7;color:var(--text)}
.prose>*+*{margin-top:1.15em}
.prose h2,.prose h3,.prose h4{color:var(--ink);font-weight:500;letter-spacing:-.02em;line-height:1.25}
.prose h2{margin-top:2em;font-size:clamp(24px,2.2vw,30px)}
.prose h3{margin-top:1.8em;font-size:clamp(20px,1.8vw,23px)}
.prose h4{margin-top:1.6em;font-size:19px}
.prose h2+*,.prose h3+*,.prose h4+*{margin-top:.6em}
.prose strong,.prose b{color:var(--ink);font-weight:500}
.prose a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:3px;transition:text-decoration-color .2s}
.prose a:hover{text-decoration-color:var(--ink)}
.prose ul,.prose ol{padding-left:1.3em}
.prose ul{list-style:disc}
.prose ol{list-style:decimal}
.prose li+li{margin-top:.45em}
.prose li::marker{color:var(--muted)}
.prose blockquote{margin-inline:0;padding:4px 0 4px 22px;border-left:3px solid var(--gold);font-weight:500;font-size:1.15em;line-height:1.5;color:var(--ink)}
.prose blockquote cite{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:15px;color:var(--muted)}
.prose img{border-radius:14px}
.prose figure{margin-inline:0}
.prose figcaption,.prose .wp-caption-text{margin-top:10px;font-size:14px;color:var(--muted);text-align:center}
.prose hr{height:1px;border:0;background:var(--line);margin-block:2.4em}
.prose table{width:100%;border-collapse:collapse;font-size:16px}
.prose th,.prose td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.prose th{color:var(--ink);font-weight:500}
.prose code{padding:2px 6px;border-radius:6px;background:var(--bg-2);font-size:.9em}
.prose pre{overflow:auto;padding:18px 20px;border-radius:14px;background:var(--bg-2);font-size:15px}
.prose iframe,.prose video{max-width:100%;border-radius:14px}
.prose .alignleft{float:left;margin:.4em 1.6em 1em 0;max-width:50%}
.prose .alignright{float:right;margin:.4em 0 1em 1.6em;max-width:50%}
.prose .aligncenter{margin-inline:auto}
.prose .alignwide{margin-inline:calc(50% - min(48vw,560px));max-width:none}
.prose .alignfull{margin-inline:calc(50% - 50vw);max-width:100vw;border-radius:0}
.prose .wp-block-button__link{display:inline-flex;align-items:center;height:48px;padding:0 22px;border-radius:10px;background:var(--gold);color:var(--ink);font-weight:500;text-decoration:none}
.prose::after{content:"";display:table;clear:both}
.prose .alert{padding:18px 22px;border-radius:14px;background:linear-gradient(135deg,#fdf3dc,#f7ecdc);font-size:17px;line-height:1.6;color:var(--ink)}
.prose .alert strong{font-weight:500}
.article-end{margin-top:48px}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:40px}
.tags a{padding:6px 12px;border-radius:999px;background:#fff;box-shadow:var(--sh-sm);font-size:14px;color:var(--text)}
.tags a:hover{color:var(--ink)}

/* Align the article header, featured image and body in a single column. */
.article .wrap.narrow {
	max-width: calc(1000px + 2 * var(--pad));
}
.article .page-head {
	padding-top: clamp(24px, 4vw, 48px);
}
.article .page-head .cat {
	margin-top: 16px;
}
.article .meta {
	margin-top: 12px;
	gap: 4px 10px;
}
.article .meta span + span::before {
	margin-right: 10px;
}
.article .feature-img {
	margin-top: clamp(20px, 3vw, 32px);
}
.article .prose {
	margin-top: clamp(24px, 3vw, 36px);
}
.article .prose > :is(h2, h3, h4) {
	margin-top: 1.35em;
}
.article .prose > :first-child {
	margin-top: 0;
}

/* Insights lists */
.archive-photo { overflow: hidden; }

/* A non-modal prompt keeps the page available while visitors decide. */
.gm-cookie[hidden], .gm-cookie-settings[hidden], .gm-cookie-current[hidden] { display: none; }
.gm-cookie {
	position: fixed;
	z-index: 1000;
	bottom: max(18px, env(safe-area-inset-bottom));
	right: max(18px, env(safe-area-inset-right));
	width: min(430px, calc(100% - 36px));
	max-height: calc(100vh - 36px);
	max-height: calc(100dvh - 36px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: clamp(18px, 3vw, 26px);
	border: 1px solid var(--line);
	border-top: 4px solid var(--gold);
	border-radius: var(--r-card);
	background: #fff;
	box-shadow: 0 10px 40px rgba(29,29,27,.17);
	color: var(--text);
	font-size: 15px;
	line-height: 1.45;
}
.gm-cookie h2 { margin-bottom: 7px; font-size: 24px; line-height: 1.15; font-weight: 600; color: var(--ink); }
.gm-cookie details { margin: 2px 0; }
.gm-cookie summary { cursor: pointer; width: fit-content; padding: 10px 0; color: var(--ink); font-weight: 500; }
.gm-cookie details p { margin-bottom: 7px; }
.gm-cookie details a { display: inline-block; padding: 4px 0 10px; text-decoration: underline; color: var(--ink); }
.gm-cookie-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.gm-cookie-actions button { min-height: 44px; padding: 8px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: white; font: inherit; font-weight: 500; cursor: pointer; }
.gm-cookie-actions button:hover { background: var(--slate); border-color: var(--slate); }
.gm-cookie-current { margin-top: 9px; font-size: 13px; }
.footer .gm-cookie-settings { padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 599px) {
	.gm-cookie {
		bottom: max(10px, env(safe-area-inset-bottom));
		right: max(10px, env(safe-area-inset-right));
		width: min(430px, calc(100% - max(10px, env(safe-area-inset-left)) - max(10px, env(safe-area-inset-right))));
		padding: 16px;
	}
	.gm-cookie h2 { font-size: 22px; }
}
.post img.archive-thumbnail {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.list-section{padding-top:clamp(40px,5vw,56px)}
.insight-tools {
  position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0,1fr) minmax(14rem,31%);
  align-items: stretch; gap: 8px; width: min(100%, 54rem); margin: clamp(26px,4vw,46px) auto 0;
  padding: 7px; border: 1px solid #e1dbcf; border-radius: 18px; background: #fff;
  box-shadow: 0 8px 25px -18px rgba(63,46,20,.35); text-align: left;
}
.insight-search { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px 4px 4px 16px; }
.insight-search input {
  width: 100%; min-width: 0; height: 44px; padding: 0 3px; border: 0; border-radius: 4px;
  background: transparent; color: var(--ink); font: 400 17px/1.3 var(--sans);
}
.insight-search input::placeholder { color: #64625e; opacity: 1; }
.insight-search button {
  min-height: 44px; padding: 8px 20px; border: 0; border-radius: 10px;
  color: var(--ink); background: var(--gold); cursor: pointer; font: 600 15px/1.2 var(--sans);
}
.insight-search button:hover { background: var(--gold-hover); }
.insight-lens { position: relative; flex: none; width: 15px; height: 15px; margin: 0 3px 3px 0; border: 2px solid #5d5344; border-radius: 50%; }
.insight-lens::after { content: ''; position: absolute; top: 10px; left: 10px; width: 8px; height: 2px; background: #5d5344; transform: rotate(45deg); transform-origin: left; }
.insight-filters { position: relative; min-width: 0; }
.insight-filters summary {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 7px 15px; border-radius: 12px;
  color: var(--ink); background: #f4f0e8; cursor: pointer; list-style: none;
}
.insight-filters summary::-webkit-details-marker { display: none; }
.insight-filters summary::after { content: ''; width: 8px; height: 8px; flex: none; margin: 0 2px 4px auto; border: solid currentColor; border-width: 0 1.7px 1.7px 0; transform: rotate(45deg); }
.insight-filters details[open] summary::after { transform: translateY(3px) rotate(225deg); }
.filter-value { display: grid; min-width: 0; gap: 2px; }
.filter-value small { color: #665f54; font-size: 12px; line-height: 1.1; }
.filter-value strong { color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.2; }
.filter-symbol {
  flex: none; width: 18px; height: 18px;
  background: radial-gradient(circle at 6px 5px,#514a3f 2.5px,transparent 2.8px),
    radial-gradient(circle at 12px 13px,#514a3f 2.5px,transparent 2.8px),
    linear-gradient(#514a3f,#514a3f) left 4px / 18px 2px no-repeat,
    linear-gradient(#514a3f,#514a3f) left 12px / 18px 2px no-repeat;
}
.insight-filters ul {
  position: absolute; top: calc(100% + 9px); right: 0; width: max(100%,16rem); max-width: calc(100vw - 40px);
  max-height: min(26rem,57vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; margin: 0;
  border: 1px solid #ded8ca; border-radius: 14px; background: #fff; box-shadow: var(--sh-md); list-style: none;
}
.insight-filters a { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 44px; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: 15px; line-height: 1.3; text-decoration: none; }
.insight-filters a:hover { background: #f6f4ef; }
.insight-filters a[aria-current] { background: #fff0cf; font-weight: 600; }
.insight-filters a[aria-current]::after { content: ''; width: 7px; height: 12px; margin-right: 3px; border: solid #79541c; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.insight-tools :is(a,button,input,summary):focus-visible,.insight-clear:focus-visible { outline: 2px solid #6f5019; outline-offset: 1px; }
.insight-result-line { display: flex; align-items: center; gap: 14px; min-height: 44px; margin: clamp(20px,3vw,35px) 0 10px; text-align: left; }
.insight-result-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.insight-count { color: #625e56; font-size: 15px; overflow-wrap: anywhere; }
.insight-clear { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 15px; text-underline-offset: 3px; text-decoration: underline; white-space: nowrap; }
.insight-results .posts { margin-top: 0; }
.insight-results .empty { margin: 0; padding: 48px 20px; border-radius: var(--r-card); background: #fff; color: var(--text); }
@media (max-width: 660px) {
  .insight-tools { grid-template-columns: minmax(0,1fr); gap: 3px; padding: 6px; border-radius: 15px; }
  .insight-search { gap: 9px; padding-left: 11px; }
  .insight-search button { padding-inline: 15px; }
  .insight-filters summary { min-height: 44px; padding: 8px 12px; }
  .filter-value { display: flex; align-items: baseline; gap: 8px; }
  .insight-filters ul { right: 0; width: 100%; max-height: 45vh; }
}
@media (prefers-reduced-motion: no-preference) {
  .insight-filters details[open] ul { animation: gm-menu-in .19s var(--ease) both; }
  .insight-filters summary::after,.insight-search button { transition: transform .2s var(--ease), background-color .2s; }
  .insight-search button:active { transform: scale(.97); }
  .hero .hero-panel { animation: gm-panel-in .65s var(--ease) .08s backwards; }
  .hero > .wrap > .btn, .article .meta { animation: gm-arrive .45s var(--ease) .13s backwards; }
  .article .prose :is(h2,figure,blockquote).in, .page .prose h2.in { animation: gm-panel-in .48s var(--ease) backwards; }
}
@keyframes gm-menu-in { from { opacity: 0; transform: translateY(-5px); } }
@keyframes gm-panel-in { from { opacity: .35; transform: translateY(14px); } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature .visual.photo img, .contact-card a { transition: transform .45s var(--ease); }
  .feature .visual.photo:hover img { transform: scale(1.025); }
  .contact-card a:hover { transform: translateX(3px); }
}
.post .excerpt{margin-top:10px;font-size:15px;line-height:1.55;color:var(--text)}
.post .src img{max-height:40px;width:auto}

@media (max-width: 599px) and (min-height: 540px) and (prefers-reduced-motion: no-preference) {
  body { overflow-x: clip; }
  .posts { display: flex; flex-direction: column; gap: 22px; isolation: isolate; }
  .posts > .post {
    position: sticky;
    top: calc(88px + min(var(--card-order, 0), 10) * 6px);
    border-top: 3px solid #f5c56b;
    box-shadow: 0 0 0 1px rgba(57,42,22,.09), 0 -5px 20px -12px rgba(48,34,18,.42);
    background: #fff; animation: none; transform: none;
  }
  .posts > .post:nth-child(3n+2) { border-top-color: #eb9e79; }
  .posts > .post:nth-child(3n) { border-top-color: #df7770; }
  .posts > .post :is(.archive-photo img, .cover) {
    width: 100%; height: clamp(140px,25svh,225px); object-fit: cover;
  }
  .posts > .post .body { padding: 16px 20px; }
  .posts > .post .foot { padding-top: 12px; }
  .posts:has(> .post:focus-visible) > .post { position: relative; top: auto; }
}

.article .prose a.elementor-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 9px 19px; border: 0; border-radius: 10px; background: var(--gold);
  color: var(--ink); font: inherit; font-weight: 500; line-height: 1.35; text-decoration: none;
}
.article .prose a.elementor-button:hover { background: var(--gold-hover); }
.empty{margin-top:40px;text-align:center;color:var(--muted)}
.pager{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:40px}
.pager .page-numbers{display:inline-grid;place-items:center;min-width:44px;height:44px;padding:0 14px;border-radius:10px;background:#fff;box-shadow:var(--sh-sm);font-size:15px;font-weight:500;color:var(--ink);transition:transform .2s var(--ease)}
.pager a.page-numbers:hover{transform:translateY(-1px)}
.pager .current{background:var(--gold)}
.pager .dots{background:none;box-shadow:none}

/* Search form (404) */
.search-form{display:flex;gap:8px;max-width:440px;margin:28px auto 0}
.search-form label{flex:1}
.search-form .search-field{width:100%;height:48px;padding:0 16px;border:1px solid var(--line);border-radius:10px;background:#fff;font:inherit;font-size:16px;color:var(--ink)}
.search-form .search-submit{height:48px;padding:0 20px;border:0;border-radius:10px;background:#262624;color:#fff;font-weight:500;cursor:pointer}

/* Comments are not used; hide any theme-agnostic leftovers */
.comments-area{display:none}

@media (max-width: 599px) {
	.prose table { overflow-wrap: anywhere; }
	.prose :is(th, td) { padding-inline: 6px; }
}

/* The contact panel shares the same paper, charcoal and gold as the article cards. */
.cta-with-form {
	grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
	grid-template-areas: "intro form" "links form";
	grid-template-rows: auto 1fr;
	align-items: start;
	row-gap: 28px;
	padding: clamp(24px, 4.6vw, 64px);
}
.cta-with-form .contact-intro { grid-area: intro; }
.cta-with-form .contact-card { grid-area: links; }
.enquiry-card {
	grid-area: form;
	min-width: 0;
	padding: clamp(22px, 3vw, 40px);
	border: 1px solid rgba(65,49,23,.14);
	border-radius: 22px;
	background: #fffdf9;
	color: var(--ink);
	box-shadow: 0 12px 32px rgba(70,49,15,.08);
}
.enquiry-card h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; font-weight: 500; letter-spacing: -.025em; }
.enquiry-note { margin: 8px 0 24px; font-size: 15px; line-height: 1.5; color: #534e45; }
.enquiry-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#gm-enquiry form { margin: 0; }
#gm-enquiry .gm-field { display: block; margin: 0 0 17px; }
#gm-enquiry .gm-field:last-child { margin-bottom: 0; }
#gm-enquiry label { display: block; margin: 0 0 6px; color: var(--ink); font: 500 16px/1.4 var(--sans); }
#gm-enquiry :is(input:not([type=hidden]), textarea) {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 10px 13px;
	border: 1px solid #898274;
	border-radius: 9px;
	background: white;
	color: var(--ink);
	font: 400 16px/1.5 var(--sans);
}
#gm-enquiry textarea { height: 112px; resize: vertical; }
#gm-enquiry :is(input, textarea, button, a):focus-visible {
	outline: 3px solid #6f4b04;
	outline-offset: 3px;
}
#gm-enquiry button[type=submit] {
	min-height: 48px;
	padding: 12px 25px;
	border: 1px solid #272522;
	border-radius: 10px;
	background: #272522;
	color: white;
	font: 500 16px/1.4 var(--sans);
	cursor: pointer;
}
#gm-enquiry button[type=submit]:hover { background: #4a4030; }
#gm-enquiry [aria-invalid=true] { border-color: #982f22; }
#gm-enquiry .gm-notice { margin-bottom: 18px; padding: 14px 16px; border-radius: 9px; line-height: 1.5; }
#gm-enquiry .gm-notice.error { background: #fae9e4; color: #702515; }
#gm-enquiry .gm-notice.success { background: #e7f0e5; color: #26482e; }
#gm-enquiry .gm-trap { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
@media (max-width: 820px) {
	.cta-with-form { grid-template-columns: minmax(0,1fr); grid-template-areas: "intro" "form" "links"; grid-template-rows: auto; }
}
@media (max-width: 480px) {
	.cta-with-form { padding: 25px 14px 14px; gap: 20px; }
	.cta-with-form .contact-intro { padding-inline: 6px; }
	.enquiry-card { padding: 20px 16px; border-radius: 15px; }
	#gm-enquiry button[type=submit] { width: 100%; }
}

@media (max-width: 767px) {
  .home .hero {
    overflow-x: clip;
  }
}
