/*
 * M Macarons — the few things theme.json can't express.
 * Colours, type and spacing come from theme.json presets.
 */

:root {
	--mm-ease: cubic-bezier(.2, .7, .2, 1);
	--mm-line: var(--wp--preset--color--blush-deep);
}

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

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

::selection { background: var(--wp--preset--color--blush); color: var(--wp--preset--color--contrast); }

:where(a) { text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* Script headings sit visually small for their size: give them a touch of air. */
:where(h1, h2).wp-block-heading:not(.is-style-caps, .is-style-eyebrow),
.wp-block-post-title { padding-block: .05em; }

.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; width: 1px; word-wrap: normal !important;
}

/* Editor only: on landing pages the post title is the SEO title (the visible
   H1 lives in the content), so show it as a quiet label instead of a headline. */
.editor-post-title.wp-block-post-title {
	font-family: var(--wp--preset--font-family--caps) !important;
	font-size: 1rem !important; letter-spacing: var(--wp--custom--tracking--wide);
	text-transform: uppercase; text-align: center; color: var(--wp--preset--color--muted);
	padding-block: 1.5rem; border-bottom: 1px dashed var(--mm-line);
}

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

.wp-site-blocks > header { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header { top: var(--wp-admin--admin-bar--height, 32px); }

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile menu panel. */
.mm-header { position: relative; border-bottom: 1px solid transparent; transition: border-color .3s; }
.mm-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.is-scrolled .mm-header { border-bottom-color: var(--mm-line); }

.mm-nav { display: flex; align-items: center; }

.mm-nav__panel { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }

.mm-nav__list, .mm-lang { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.mm-nav__list { gap: clamp(1rem, 2.2vw, 2rem); }

.mm-nav a { text-decoration: none; color: var(--wp--preset--color--contrast); }

.mm-nav__list a,
.mm-lang a,
.mm-nav__cta {
	font-family: var(--wp--preset--font-family--caps);
	font-size: .78rem;
	letter-spacing: var(--wp--custom--tracking--wide);
	text-transform: uppercase;
}

.mm-nav__list a { position: relative; padding-block: .4rem; }
.mm-nav__list a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
	background: currentColor; transform: scaleX(0); transform-origin: left;
	transition: transform .35s var(--mm-ease);
}
.mm-nav__list a:hover::after,
.mm-nav__list .current-menu-item > a::after,
.mm-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.mm-lang { gap: .15rem; }
.mm-lang li + li::before { content: "/"; color: var(--mm-line); margin-inline: .15rem; }
.mm-lang a { color: var(--wp--preset--color--muted); padding: .3rem .15rem; }
.mm-lang a[aria-current="true"] { color: var(--wp--preset--color--contrast); }
.mm-lang a:hover { color: var(--wp--preset--color--rose); }

.mm-nav__cta {
	display: inline-block;
	padding: .7em 1.4em;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--pill);
	transition: background-color .25s, color .25s;
}
.mm-nav a.mm-nav__cta:hover { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }

.mm-nav__toggle {
	display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
	color: var(--wp--preset--color--contrast); position: relative; z-index: 2;
}
.mm-nav__toggle-bars,
.mm-nav__toggle-bars::before {
	position: absolute; left: 11px; right: 11px; height: 1px; background: currentColor; content: "";
	transition: transform .3s var(--mm-ease), top .3s var(--mm-ease);
}
.mm-nav__toggle-bars { top: 18px; }
.mm-nav__toggle-bars::before { left: 0; right: 0; top: 7px; }
.mm-nav__toggle[aria-expanded="true"] .mm-nav__toggle-bars { top: 22px; transform: rotate(45deg); }
.mm-nav__toggle[aria-expanded="true"] .mm-nav__toggle-bars::before { top: 0; transform: rotate(-90deg); }

@media (max-width: 899px) {
	.mm-nav__toggle { display: block; }
	.mm-nav__panel {
		position: fixed; inset: 0; z-index: 1;
		flex-direction: column; justify-content: center; gap: 2.5rem;
		background: var(--wp--preset--color--base);
		opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
	}
	.mm-nav.is-open .mm-nav__panel { opacity: 1; visibility: visible; }
	.mm-nav__list { flex-direction: column; gap: 1.5rem; }
	.mm-nav__list a { font-size: 1rem; }
	.admin-bar .mm-nav__panel { top: var(--wp-admin--admin-bar--height, 46px); }
	html.mm-menu-open { overflow: hidden; }
}

/* ---------- Hero composition: one large circle, two small ones (as in the folder). ---------- */

.mm-orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; margin-inline: auto; }
.mm-orbit > .wp-block-image { margin: 0; position: absolute; }
.mm-orbit > .wp-block-image img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.mm-orbit__main { inset: 6% 6% 6% 6%; }
.mm-orbit__a, .mm-orbit__b { width: 34%; }
.mm-orbit__a { top: -2%; right: -4%; }
.mm-orbit__b { bottom: -2%; left: -4%; }
.mm-orbit__a img, .mm-orbit__b img {
	border: clamp(5px, 1vw, 9px) solid var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--soft);
}

.mm-circle img { aspect-ratio: 1; object-fit: cover; border-radius: 50% !important; }

/* ---------- Ticker band ---------- */

.mm-ticker p { margin: 0; }
.mm-ticker .mm-dotlist { justify-content: center; }

/* Inline list separated by middots — used for flavour menus and the ticker. */
.mm-dotlist {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-wrap: wrap; justify-content: center; row-gap: .35em;
}
.mm-dotlist li { display: inline; }
.mm-dotlist li:not(:last-child)::after {
	content: "·"; color: var(--wp--preset--color--rose); margin-inline: .55em; font-weight: 600;
}

.mm-flavors .mm-dotlist { font-size: 1rem; line-height: 1.75; max-width: 34rem; margin-inline: auto; }
.mm-dotlist--start { justify-content: flex-start; }

/* Full-width bands sit flush against each other. */
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + * { margin-block-start: 0; }
.wp-block-post-content > :first-child { margin-block-start: 0; }

.mm-panel { padding-inline: clamp(1.25rem, 4vw, 3.5rem) !important; }

.mm-hero-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.mm-banner img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.mm-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- Image tiles with tracked-caps captions ---------- */

.mm-tiles .wp-block-image { margin: 0; overflow: hidden; border-radius: var(--wp--custom--radius--card); }
.mm-tiles .wp-block-image img {
	width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
	transition: transform .8s var(--mm-ease);
}
.mm-tiles .wp-block-image:hover img { transform: scale(1.04); }
.mm-tiles .wp-block-image figcaption {
	margin: .9rem 0 0; text-align: center;
	font-family: var(--wp--preset--font-family--caps);
	font-size: .72rem; letter-spacing: var(--wp--custom--tracking--caps); text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
}
.mm-tiles .wp-block-image:has(figcaption) { overflow: visible; }
.mm-tiles .wp-block-image:has(figcaption) img { border-radius: var(--wp--custom--radius--card); }
.mm-tiles .wp-block-image:has(figcaption):hover img { transform: none; filter: saturate(1.08); }

.mm-tiles--tall .wp-block-image img { aspect-ratio: 4 / 5; }

/* Mosaic: one tall image beside two stacked. */
.mm-mosaic {
	display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr;
	gap: clamp(.75rem, 1.5vw, 1.25rem); aspect-ratio: 1 / 1;
}
.mm-mosaic > .wp-block-image { margin: 0; min-height: 0; height: 100%; }
.mm-mosaic > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-mosaic > .wp-block-image:first-child { grid-row: span 2; }

/* Dot lists styled as tracked capitals (ticker, short lists). */
.mm-dotlist.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--caps); font-size: .78rem;
	letter-spacing: var(--wp--custom--tracking--wide); text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Steps ---------- */

.mm-steps .mm-step__no {
	font-family: var(--wp--preset--font-family--caps);
	font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1; color: var(--wp--preset--color--blush-deep);
	margin-bottom: .75rem;
}
.mm-steps .wp-block-column { border-top: 1px solid var(--mm-line); padding-top: 1.5rem; }

/* ---------- Collection cards (home) ---------- */

.mm-collections > .wp-block-group {
	border-top: 1px solid var(--mm-line);
	padding-top: 1.25rem;
}
.mm-collections p { margin-top: .4rem; }

/* ---------- Contact list ---------- */

.mm-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.mm-contact-list li { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.mm-contact-list__k {
	font-family: var(--wp--preset--font-family--caps); font-size: .72rem;
	letter-spacing: var(--wp--custom--tracking--caps); text-transform: uppercase;
	color: var(--wp--preset--color--muted); min-width: 4.5rem;
}
.mm-contact-list a {
	font-family: var(--wp--preset--font-family--caps); letter-spacing: .12em;
	color: var(--wp--preset--color--contrast); text-decoration: none; border-bottom: 1px solid var(--mm-line);
}
.mm-contact-list a:hover { border-color: currentColor; }

.mm-contact-list--large a { font-size: clamp(1.05rem, 2vw, 1.35rem); }

.mm-link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.mm-link-list a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.mm-link-list a:hover { color: var(--wp--preset--color--rose); }

/* ---------- FAQ ---------- */

.wp-block-details summary {
	cursor: pointer; list-style: none; position: relative; padding-right: 2.5rem;
	font-weight: 500; font-size: 1.075rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: .35rem; top: .5em; width: 10px; height: 10px;
	border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
	transform: rotate(45deg); transition: transform .3s var(--mm-ease);
}
.wp-block-details[open] summary::after { transform: rotate(-135deg); top: .75em; }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); margin-top: .75rem; }

/* ---------- Dark band adjustments ---------- */

.is-style-section-ganache .is-style-eyebrow { color: var(--wp--preset--color--blush-deep); }

/* ---------- Form ---------- */

.mmf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.mmf__field { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.mmf__field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .mmf__grid { grid-template-columns: 1fr; } }

.mmf label {
	font-family: var(--wp--preset--font-family--caps); font-size: .72rem;
	letter-spacing: var(--wp--custom--tracking--wide); text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
}
.mmf__opt { text-transform: none; letter-spacing: 0; font-family: var(--wp--preset--font-family--body); color: var(--wp--preset--color--muted); font-size: .8rem; }
.mmf__req { color: var(--wp--preset--color--rose); }

.mmf input:not([type="checkbox"]),
.mmf select,
.mmf textarea {
	font: inherit; font-size: 1rem; color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--mm-line); border-radius: 12px;
	padding: .8rem 1rem; width: 100%; box-sizing: border-box;
	transition: border-color .2s, box-shadow .2s;
	appearance: none;
}
.mmf select {
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
	background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem;
}
.mmf textarea { resize: vertical; min-height: 8rem; }
.mmf input:focus, .mmf select:focus, .mmf textarea:focus {
	outline: none; border-color: var(--wp--preset--color--rose);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--rose) 18%, transparent);
}
.mmf__form.was-validated :invalid { border-color: #b3261e; }

.mmf__hint { font-size: .85rem; color: var(--wp--preset--color--muted); }

.mmf__consent { display: flex; gap: .75rem; align-items: flex-start; margin: 1.4rem 0 0; }
.mmf__consent input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--wp--preset--color--rose); flex: none; }
.mmf__consent label { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--wp--preset--color--muted); }

.mmf__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.mmf__submit { cursor: pointer; }
.mmf__submit:disabled { opacity: .6; cursor: progress; }
.mmf__status { margin: 0; font-size: .95rem; }
.mmf__status.is-success { color: #2f6b4a; }
.mmf__status.is-error { color: #b3261e; }
.mmf__form.is-sent .mmf__grid,
.mmf__form.is-sent .mmf__consent { opacity: .5; }

.mmf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Motion: gentle reveal on scroll (JS adds .mm-reveal). ---------- */

@media (prefers-reduced-motion: no-preference) {
	.mm-reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--mm-ease), transform .9s var(--mm-ease); }
	.mm-reveal.is-in { opacity: 1; transform: none; }
}

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

.wp-site-blocks > footer { margin-block-start: 0; }
.mm-footer .wp-block-heading.has-xx-large-font-size { margin-top: .25rem; }
.mm-footer .mm-contact-list { gap: .9rem; }
.mm-footer .mm-contact-list li { flex-direction: column; gap: .15rem; }
.mm-footer__base p { margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
	.mm-tiles.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .9rem; }
	.mm-tiles .wp-block-image figcaption { font-size: .62rem; letter-spacing: .2em; }
}

@media (max-width: 781px) {
	.mm-hero .wp-block-column:last-child { order: -1; }
	.mm-orbit { max-width: 420px; }
	.mm-mosaic { aspect-ratio: auto; grid-template-rows: auto; }
	.mm-mosaic > .wp-block-image:first-child { grid-column: 1 / -1; grid-row: auto; }
	.mm-mosaic > .wp-block-image img { aspect-ratio: 1; }
	.mm-mosaic > .wp-block-image:first-child img { aspect-ratio: 4 / 3; }
}
