/*
Theme Name: Transformative Motherhood
Author: Daniel Von Krauss
Version: 1.0
Text Domain: transformativemotherhood
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}



/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

.wp-block-navigation .current-menu-item {
		padding: 12px 20px;
    outline: 1.4px solid #521461;
    border-radius: 50px;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

.frame-background-image {
	position: relative;
	overflow: visible;
}
.frame-background-image .wp-block-cover__image-background {
	object-fit: contain !important;
  position: absolute;
  z-index: -1;
}



.frame-background-image > img {
	object-fit: contain !important;
}

a:where(:not(.wp-element-button)) {
	text-decoration: none !important;
}

/* Default: visible, no animation */
.fade-in {
  opacity: 1;
}

.negative-margin-left {
	margin-left: -12px !important;
}

.negative-margin-top {
	margin-top: -22px !important;
}

.negative-margin-bottom {
	margin-bottom: -183px !important;
}

.header-fixed {
  position: fixed;
  width: 100%;
  top: 0px;
  left: 0px;
  z-index: 1;
  background-color: white;
  /* backdrop-filter: blur(20px); */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2666666667);
  transition: 0.6s ease all;
	* {
		transition: 0.6s ease all;
	}
}

.header-fixed-scrolled .wp-block-group {
  padding-top: 10px !important;
	padding-bottom: 10px !important;
	.wp-block-site-logo img {
		width: 110px;
	}
}

body:not(.block-editor-iframe__body) .wp-site-blocks::before {
  content: "";
	display: block;
  height: 174px !important;
	background: #fffcf3;
}

body.admin-bar .header-fixed {
  top: 32px;
}

/* Only apply animations if the user allows motion */
@media (prefers-reduced-motion: no-preference) {

	.frame-anim-01 .wp-block-cover__image-background {
		animation: shape_movement-1 10s ease-in-out infinite alternate;
	}

	.frame-anim-02 .wp-block-cover__image-background {
		animation-delay: 2500ms;
		animation: shape_movement-2 12s ease-in-out infinite alternate;
	}

	.frame-anim-03 .wp-block-cover__image-background {
		animation-delay: 2500ms;
		animation: shape_movement-3 15s ease-in-out infinite alternate;
	}

	@keyframes shape_movement-1 {
		0% {
			transform: rotate(-53deg);
		}
		100% {
			transform: rotate(53deg);
		}
	}

	@keyframes shape_movement-2 {
		0% {
			transform: rotate(-13deg) scaleY(1.04);
		}
		100% {
			transform: rotate(13deg) scaleX(1.04);
		}
	}

	@keyframes shape_movement-3 {
		0% {
			transform: rotate(-33deg);
		}
		100% {
			transform: rotate(33deg);
		}
	}

	body:not(.block-editor-iframe__body) .hero-header .wp-block-cover__image-background {
		z-index: -2;
	}

  body:not(.block-editor-iframe__body) .fade-in {
    opacity: 0;
		transform: none;
		position: relative;
		z-index: -1;
  }

  body:not(.block-editor-iframe__body) .fade-in.is-visible {
    animation: fadeInUp 2s ease forwards;
		animation-delay: 200ms;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

}


.email-cta {
    display: flex;
    gap: 24px;
    align-items: center;
}

.email-input {
    flex: 1;
		padding: 20px 40px;
		font-family: "Gotham Medium", sans-serif;
		font-size: 14px;
		border-radius: 10px;
    border: 2px solid white;
    background: #ffffff72;
    color: white;
}

.email-input::placeholder {
	color: inherit;
	opacity: .75;
}

.email-button {
	color: #224136;
	padding: 20px 90px;
	font-family: "Gotham Medium", sans-serif;
	border-radius: 10px;
	font-size: 14px;
	text-transform: uppercase;
	border: none;
	cursor: pointer;
	font-weight: 700;
}

/* Mailchimp signup form — Transformative Motherhood
   Scoped to the CTA cover block; the #mc_embed_shell prefix beats Mailchimp's classic-061523.css,
   which is loaded inside the embed (after this file). */
.wp-block-cover #mc_embed_shell #mc_embed_signup {
    --tm-white: #fff;
    --tm-ink: #224136;
    --tm-input-bg: rgba(255, 255, 255, 0.35);
    background: transparent;
    clear: left;
    font-family: var(--wp--preset--font-family--gotham-book), sans-serif;
    font-size: 16px;
    color: var(--tm-white);
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup form {
    padding: 0;
    margin: 0;
    text-align: center;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup #mc_embed_signup_scroll {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}

/* Headings */
.wp-block-cover #mc_embed_shell #mc_embed_signup h2 {
    flex: 0 0 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    font-family: var(--wp--preset--font-family--gotham-bold), sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: var(--tm-white);
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-subtitle {
    flex: 0 0 100%;
    margin: 0 0 32px;
    font-family: var(--wp--preset--font-family--gotham-book), sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--tm-white);
}

/* Hide Mailchimp extras not in the design */
.wp-block-cover #mc_embed_shell #mc_embed_signup .indicates-required,
.wp-block-cover #mc_embed_shell #mc_embed_signup .optionalParent .foot p {
    display: none;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Email field */
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    min-height: 0;
    padding: 0;
    display: block;
    position: relative;
    text-align: left;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 54px;
    padding: 0 52px;
    text-indent: 0;
    font-family: var(--wp--preset--font-family--gotham-medium), sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--tm-white);
    background: var(--tm-input-bg);
    border: 2px solid var(--tm-white);
    border-radius: 8px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
    -webkit-text-fill-color: var(--tm-white);
    caret-color: var(--tm-white);
    box-shadow: none;
    transition: background-color 0.2s ease;
}
/* Browser autofill paints its own background/text colours; the background can't be overridden,
   so cover it with an inset shadow tinted like the input over the photo, and pin the text colour. */
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input:-webkit-autofill,
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input:-webkit-autofill:hover,
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input:-webkit-autofill:focus,
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input:autofill {
    -webkit-text-fill-color: var(--tm-white);
    caret-color: var(--tm-white);
    box-shadow: inset 0 0 0 100px rgba(176, 148, 136, 0.92);
    transition: background-color 9999s ease-in-out 0s;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input::placeholder {
    color: var(--tm-white);
    opacity: 0.9;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input:focus {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Button */
.wp-block-cover #mc_embed_shell #mc_embed_signup .optionalParent {
    flex: 0 0 204px;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .optionalParent .foot {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .button,
.wp-block-cover #mc_embed_shell #mc_embed_signup input.button {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 24px;
    font-family: var(--wp--preset--font-family--gotham-bold), sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 54px;
    text-transform: uppercase;
    color: var(--tm-ink);
    background-color: var(--tm-white);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .button:hover,
.wp-block-cover #mc_embed_shell #mc_embed_signup input.button:hover {
    background-color: #f1ebe7;
    color: var(--tm-ink);
}
.wp-block-cover #mc_embed_shell #mc_embed_signup .button:active {
    transform: translateY(1px);
}

/* Validation / response messages */
.wp-block-cover #mc_embed_shell #mc_embed_signup #mce-responses {
    order: 10;
    flex: 0 0 100%;
    margin: 0;
    padding: 0;
    width: auto;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup #mce-responses .response {
    margin: 0;
    padding: 0;
    width: auto;
    font-size: 15px;
    font-weight: 500;
    color: var(--tm-white);
}
.wp-block-cover #mc_embed_shell #mc_embed_signup div.mce_inline_error,
.wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group div.mce_inline_error {
    margin: 8px 0 0;
    padding: 0;
    background: transparent;
    color: var(--tm-white);
    font-size: 14px;
    font-weight: 500;
}
.wp-block-cover #mc_embed_shell #mc_embed_signup input.mce_inline_error {
    border-color: #f3c4bd;
}

@media (max-width: 640px) {
    .wp-block-cover #mc_embed_shell #mc_embed_signup h2 { font-size: 26px; }
    .wp-block-cover #mc_embed_shell #mc_embed_signup .mc-subtitle { font-size: 18px; margin-bottom: 8px; }
    .wp-block-cover #mc_embed_shell #mc_embed_signup #mc_embed_signup_scroll { gap: 16px; }
    .wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group,
    .wp-block-cover #mc_embed_shell #mc_embed_signup .optionalParent { flex: 0 0 100%; }
    .wp-block-cover #mc_embed_shell #mc_embed_signup .mc-field-group input { padding: 0 24px; }
}

/* Audio player — Transformative Motherhood
   Controls built by js/audio-player.js around core Audio blocks. */
.wp-block-audio:has(.tm-audio) audio {
    display: none;
}
.tm-audio {
    --tm-audio-accent: var(--wp--preset--color--accent-3, #547772);
    --tm-audio-ink: var(--wp--preset--color--accent-2, #521461);
    --tm-audio-fill: var(--wp--preset--color--accent-5, #c1a05d);
    --tm-audio-track: rgba(193, 160, 93, 0.25);
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 24px 12px 12px;
    background: var(--wp--preset--color--custom-fffcf-3, #fffcf3);
    border: 1px solid var(--tm-audio-fill);
    border-radius: 999px;
    font-family: var(--wp--preset--font-family--gotham-book), sans-serif;
    color: var(--tm-audio-ink);
}
.tm-audio button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
}
.tm-audio button svg {
    fill: currentColor;
}
.tm-audio button:focus-visible,
.tm-audio__seek:focus-visible {
    outline: 2px solid var(--tm-audio-ink);
    outline-offset: 3px;
}
.tm-audio__play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--tm-audio-accent) !important;
    color: #fff !important;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.tm-audio__play:hover {
    transform: scale(1.06);
}
.tm-audio__play svg {
    width: 22px;
    height: 22px;
}
.tm-audio__mute {
    width: 32px;
    height: 32px;
    opacity: 0.8;
}
.tm-audio__mute:hover {
    opacity: 1;
}
.tm-audio__mute svg {
    width: 22px;
    height: 22px;
}
.tm-audio__time {
    flex: none;
    min-width: 3ch;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Seek bar: the filled part is drawn with a gradient driven by --progress */
.tm-audio__seek {
    --progress: 0%;
    flex: 1;
    min-width: 0;
    height: 20px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.tm-audio__seek::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--tm-audio-fill) var(--progress), var(--tm-audio-track) var(--progress));
}
.tm-audio__seek::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--tm-audio-fill) var(--progress), var(--tm-audio-track) var(--progress));
}
.tm-audio__seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--tm-audio-ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.tm-audio__seek::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--tm-audio-ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Locked once the media CTA is reached (see js/scroll-animations.js) */
.tm-audio {
    transition: opacity 0.4s ease;
}
.tm-audio.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tm-audio.is-disabled button,
.tm-audio.is-disabled .tm-audio__seek {
    cursor: not-allowed;
}
.tm-audio.is-disabled .tm-audio__play {
    transform: none;
}
.tm-audio.is-disabled .tm-audio__mute {
    opacity: 0.8;
}

@media (max-width: 640px) {
    .tm-audio {
        gap: 10px;
        padding: 8px 16px 8px 8px;
    }
    .tm-audio__play {
        width: 44px;
        height: 44px;
    }
    .tm-audio__time {
        font-size: 13px;
    }
}
