/*
Theme Name: Mycosomatic Magic
Theme URI: https://mycosomaticmagic.com
Author: Mycosomatic Magic
Description: Block theme for Mycosomatic Magic, rebuilt from the Canva site.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
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: mycosomatic
*/

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--tan); color: var(--wp--preset--color--ink); }
a:focus-visible, .wp-block-button__link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
sup { font-size: 0.68em; line-height: 0; }
.wp-site-blocks > * { margin-block-start: 0 !important; }

/* Header */
.mm-site-header { position: sticky; top: 0; z-index: 100; background: var(--wp--preset--color--ivory); box-shadow: 0 1px 0 rgba(36, 28, 16, 0.08), 0 10px 26px -20px rgba(36, 28, 16, 0.55); }
.admin-bar .mm-site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.mm-header { padding: 0.7rem var(--wp--style--root--padding-right) 0.7rem var(--wp--style--root--padding-left); gap: 1.5rem; }
.mm-header .wp-block-site-title a { color: var(--wp--preset--color--umber); }
.mm-nav .wp-block-navigation__container { gap: clamp(1rem, 2.2vw, 2.1rem); }
.mm-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--umber); padding: 0.3rem 0.1rem; border-bottom: 2px solid transparent; transition: border-color 0.2s ease; }
.mm-nav .wp-block-navigation-item__content:hover { border-bottom-color: var(--wp--preset--color--tan); }
.mm-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--umber); padding: 2rem 1.5rem; }
.mm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; }
.mm-nav .wp-block-navigation__responsive-container-open, .mm-nav .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--umber); }

/* Full-width bands sit flush against each other */
.wp-block-post-content > .mm-hero, .wp-block-post-content > .mm-section { margin-top: 0; margin-bottom: 0; }
.mm-section { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--70); }

/* Hero */
.mm-hero { background-color: var(--wp--preset--color--forest); background-size: cover; background-position: center; }
.mm-hero .wp-block-cover__inner-container { width: min(44rem, 100%); }
.mm-hero h1 { color: var(--wp--preset--color--ivory); text-align: center; margin: 0; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4); }
.mm-tagline { font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--ivory); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.65); margin-top: 0.6rem !important; }
.mm-hero .wp-block-buttons { margin-top: 1.75rem !important; }
.mm-hero .wp-block-button__link { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--ink); }
.mm-hero .wp-block-button__link:hover { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--ink); }
@media (max-width: 781px) {
	.mm-hero.is-position-center-right { align-items: flex-end; justify-content: center; padding-bottom: 3.5rem; }
}

/* Section titles flanked by small illustrations */
.mm-titlerow { margin-bottom: var(--wp--preset--spacing--50) !important; }
.mm-titlerow h2 { margin: 0; }
.mm-subtitle { font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: var(--wp--preset--font-size--large); line-height: 1.3; margin-top: 0.5rem !important; }
.mm-deco .wp-block-image { margin: 0 auto; }
.mm-deco img { display: block; width: auto; max-width: 100%; max-height: 150px; margin: 0 auto; }
.mm-figs { gap: 0.75rem; justify-content: center; }
.mm-figs .wp-block-image { margin: 0; }
.mm-figs img { display: block; max-height: 130px; width: auto; }

/* Text and artwork rows */
.mm-section .wp-block-columns { gap: clamp(2rem, 5vw, 4.5rem); }
.mm-row { margin-top: var(--wp--preset--spacing--60) !important; }
.mm-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 30px rgba(36, 28, 16, 0.28)); }
.mm-art figcaption { font-family: var(--wp--preset--font-family--serif); font-style: italic; text-align: center; margin-top: 0.9rem; }
.mm-def { border-top: 1px solid currentColor; padding-top: 1rem; margin-top: 1.25rem !important; }
.mm-def > * + * { margin-block-start: 0.35rem !important; }
.mm-def h3 { margin: 0; }
.mm-def p { font-style: italic; font-size: var(--wp--preset--font-size--small); line-height: 1.6; margin: 0; }
.mm-inline-deco img { display: block; max-width: 150px; height: auto; }

/* Footnotes */
.mm-notes { margin-top: var(--wp--preset--spacing--60) !important; padding-top: 1.5rem; border-top: 1px solid currentColor; font-size: var(--wp--preset--font-size--x-small); line-height: 1.6; }
.mm-notes > * + * { margin-block-start: 0.55rem !important; }

/* Team */
.mm-person { margin-top: var(--wp--preset--spacing--60) !important; }
.mm-person h3 { margin-bottom: 0.25rem; }
.mm-photo img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.65); }
@media (max-width: 781px) { .mm-photo-right > .wp-block-column:last-child { order: -1; } }
.mm-experience-head { margin-top: var(--wp--preset--spacing--70) !important; }

/* Logos */
.mm-logo-row { margin-top: var(--wp--preset--spacing--60) !important; }
.mm-northstar img { display: block; max-width: 300px; width: 100%; height: auto; margin: 0 auto; }
.mm-logos { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: center; justify-items: center; margin-top: 1.25rem !important; }
.mm-logos > * { margin: 0 !important; }
.mm-logos img { display: block; max-height: 96px; width: auto; max-width: 100%; border-radius: 6px; }

/* Testimonials */
.mm-videos, .mm-quotes { gap: clamp(1.25rem, 3vw, 2rem) !important; }
.mm-videos { margin-top: var(--wp--preset--spacing--50) !important; }
.mm-quotes { margin-top: clamp(1.25rem, 3vw, 2rem) !important; }
.mm-card { border-radius: 16px; padding: clamp(1.1rem, 2.5vw, 1.6rem) !important; box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.7); }
.mm-card > * + * { margin-block-start: 0.9rem !important; }
.mm-card h3 { font-size: 1.3rem; line-height: 1.25; }
.mm-quote-text { font-family: var(--wp--preset--font-family--sans); font-size: 1.04rem; line-height: 1.65; }
.mm-cite { font-family: var(--wp--preset--font-family--serif); font-style: italic; font-weight: 600; }
.mm-video { margin: 0; }
.mm-video a { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.mm-video img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.mm-video a::after { content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(28, 34, 22, 0.82) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFFCF0' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 56% 50% / 30px no-repeat; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); transition: transform 0.25s ease; }
.mm-video a:hover img { transform: scale(1.03); }
.mm-video a:hover::after { transform: scale(1.08); }

/* Contact */
.mm-contact-row { gap: 1rem !important; margin-top: 1.4rem !important; }
.mm-contact-row > .wp-block-image { flex: 0 0 auto; margin: 0; }
.mm-icon img { display: block; width: 30px; height: auto; margin-top: 0.2rem; }
.mm-icon-wa img { width: 38px; background: var(--wp--preset--color--tan); border-radius: 50%; padding: 6px; margin-top: 0; }
.mm-contact-text { font-family: var(--wp--preset--font-family--sans); line-height: 1.5; }
.mm-contact-text > * { margin: 0 !important; }
.mm-contact-label { font-family: var(--wp--preset--font-family--serif); font-weight: 650; }
.mm-line-art img { display: block; max-width: 340px; width: 100%; height: auto; }
.mm-getting-here { margin-top: var(--wp--preset--spacing--70) !important; }

/* Inner pages */
.mm-page { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--70); }

/* Footer */
.mm-footer { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.mm-footer > * + * { margin-block-start: 0.6rem !important; }
.mm-footer a { color: inherit; }
.mm-footer-title { font-family: var(--wp--preset--font-family--display); font-size: 1.7rem; line-height: 1.1; }
.mm-footer-tagline { font-family: var(--wp--preset--font-family--serif); font-weight: 600; }
.mm-small { font-size: var(--wp--preset--font-size--x-small); opacity: 0.8; }

/* Additions */
.has-bark-background-color .wp-block-button__link { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--ink); }
.has-bark-background-color .wp-block-button__link:hover { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--ink); }
.mm-quotes { column-width: 21rem; column-gap: clamp(1.25rem, 3vw, 2rem); }
.mm-quotes > .mm-card { display: inline-block; width: 100%; break-inside: avoid; margin: 0 0 clamp(1.25rem, 3vw, 2rem) !important; }
.mm-videos > .mm-card { margin: 0 !important; }
.mm-cite { margin-block-start: 0.75rem !important; }
.mm-row .wp-block-column > * + * { margin-block-start: 1.25rem; }

/* Fixes after first preview */
.mm-deco img[src$=".svg"] { width: 100%; max-width: 190px; height: auto; max-height: 150px; }
.mm-titlerow > .wp-block-column.mm-deco { flex-basis: 15% !important; }
.mm-titlerow > .wp-block-column:not(.mm-deco) { flex-basis: 70% !important; }
.mm-quotes { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); column-width: auto; }
.mm-quotes > .mm-card { display: block; margin: 0 !important; }
.mm-quotes > .mm-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 781px) { .mm-quotes { grid-template-columns: 1fr; } }
.mm-deco .wp-block-image a { display: block; }

/* Revision 2: justified text, wider text, subpages */
.mm-section p:not(.has-text-align-center):not(.mm-cite):not(.mm-contact-label), .mm-page p { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.mm-contact-text p { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
.mm-notes a { overflow-wrap: anywhere; }
.mm-section h1.wp-block-heading { font-size: var(--wp--preset--font-size--xx-large); margin-top: 0; }
.mm-nav .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--tan); }
.mm-photo img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Revision 3: keep the title illustrations on small screens */
@media (max-width: 781px) {
	.mm-titlerow.wp-block-columns { flex-wrap: nowrap !important; align-items: center !important; gap: 0.75rem; }
	.mm-titlerow > .wp-block-column.mm-deco { display: block; flex-basis: 20% !important; flex-grow: 0; min-width: 0; }
	.mm-titlerow > .wp-block-column:not(.mm-deco) { flex-basis: 60% !important; flex-grow: 1; min-width: 0; }
	.mm-deco img, .mm-deco img[src$=".svg"] { max-height: 80px; width: auto; max-width: 100%; }
	.mm-figs { gap: 0.3rem; }
	.mm-figs img { max-height: 64px; }
	.mm-titlerow h1, .mm-titlerow h2 { font-size: clamp(1.6rem, 7vw, 2.3rem); }
	.mm-titlerow .mm-subtitle { font-size: 1rem; }
}
/* Revision 3b: section titles never break mid-word */
.mm-titlerow h1, .mm-titlerow h2 { overflow-wrap: normal; word-break: normal; -webkit-hyphens: manual; hyphens: manual; }
@media (max-width: 781px) {
	.mm-titlerow > .wp-block-column.mm-deco { flex-basis: 16% !important; }
	.mm-section .mm-titlerow h1.wp-block-heading, .mm-section .mm-titlerow h2.wp-block-heading { font-size: clamp(1.4rem, 7vw, 2.3rem); }
}
/* Revision 4 */
.mm-inline-deco { text-align: center; }
.mm-inline-deco img { margin-left: auto; margin-right: auto; }
.wp-block-buttons.mm-secondary { margin-top: 0.75rem !important; }
.has-bark-background-color .is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--ivory); border: 2px solid currentColor; padding: calc(0.95em - 2px) calc(2em - 2px); }
.has-bark-background-color .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--ivory); color: var(--wp--preset--color--ink); }
.mm-after-row { margin-top: 1.5rem !important; }
