/*
Theme Name: When Unicorns Don't Fly
Theme URI: https://whenunicornsdontfly.com
Author: Rooh
Description: A calm, book-like theme for the memoir and guide "When Unicorns Don't Fly" by Rooh. Watercolour lavender palette, Cormorant Garamond and Karla type, a help line on every page, and layouts for the home page, trilogy, parent guide, podcast, talks and blog. Pair with the "WUDF Site Kit" plugin, which creates the pages and runs the forms.
Version: 1.0.0
Requires at least: 6.5
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: wudf
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #D9D1EE; color: #2B2840; }
img { max-width: 100%; height: auto; }
.wudf-main { padding-bottom: 0; }
.wudf-plain { padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.wudf-designed > .wp-block-post-content > *:first-child { margin-top: 0; }
.wudf-designed > .wp-block-post-content > .alignfull + .alignfull { margin-top: 0; }
.wudf-designed { margin-top: 0 !important; }
.wudf-main + footer, header + .wudf-main { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
strong { font-weight: 700; }

/* ---------- Help bar + header ---------- */
.wudf-helpbar { background: #2B2840; color: #F7F3EC; font-size: 0.86rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.wudf-helpbar p { margin: 0; text-align: center; line-height: 1.5; }
.wudf-helpbar a { color: #F7F3EC; text-decoration-color: rgba(247,243,236,.5); text-underline-offset: 3px; }
.wudf-helpbar a:hover { color: #fff; }

.wudf-header { padding-top: 1.1rem; padding-bottom: 1.1rem; background: rgba(247,243,236,0.92); border-bottom: 1px solid #E6DFEE; position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(8px); -webkit-backdrop-filter: saturate(140%) blur(8px); }
body.admin-bar .wudf-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wudf-header { top: 0; position: relative; } }
.wudf-brand .wp-block-site-title { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.wudf-byline { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.05rem; color: #4E4388; line-height: 1.1; }
.wudf-nav .wp-block-navigation-item__content { text-decoration: none; color: #2B2840; padding: 0.3rem 0; border-bottom: 2px solid transparent; transition: border-color .15s, color .15s; }
.wudf-nav .wp-block-navigation-item__content:hover,
.wudf-nav .current-menu-item > .wp-block-navigation-item__content { color: #4E4388; border-bottom-color: #B9AEDB; }
.wudf-nav .wp-block-navigation__container { gap: 1.4rem; }
.wudf-nav .wudf-nav-help > .wp-block-navigation-item__content { border: 1.5px solid #4E4388; border-radius: 999px; padding: 0.4rem 1rem; color: #4E4388; font-weight: 600; }
.wudf-nav .wudf-nav-help > .wp-block-navigation-item__content:hover { background: #4E4388; color: #FFFDF8; }
.wp-block-navigation__responsive-container.is-menu-open { background: #F7F3EC !important; padding: 2rem 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem; font-size: 1.2rem; }
.wudf-header-minimal { position: relative; }

/* ---------- Type helpers ---------- */
.wudf-eyebrow, .wudf-eyebrow a { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: #4E4388; text-decoration: none; }
.wudf-eyebrow { margin-bottom: 0.4rem !important; }
.wudf-lede { font-size: clamp(1.12rem, 1.6vw, 1.3rem); line-height: 1.6; color: #3E3A57; }
.wudf-small { font-size: 0.9rem; color: #5C567A; line-height: 1.55; }
.wudf-center { text-align: center; }
.wudf-serif-italic { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; }
.wudf-meta { gap: 0.6rem; color: #5C567A; font-size: 0.95rem; }
.wudf-meta p { margin: 0; }
.wudf-meta > * + *::before { content: "·"; margin-right: 0.6rem; }
.wudf-page-title { margin-bottom: 1.5rem; }

/* ---------- Sections ---------- */
.wudf-section { padding-top: clamp(3.5rem, 9vw, 6.5rem); padding-bottom: clamp(3.5rem, 9vw, 6.5rem); position: relative; }
.wudf-section.is-tight { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.wudf-bg-paper { background: #FFFDF8; }
.wudf-bg-lavender { background: #EEEAF6; }
.wudf-bg-blush { background: #F7ECEF; }
.wudf-bg-indigo { background: #2F2A55; color: #F1ECF8; }
.wudf-bg-indigo h2, .wudf-bg-indigo h3, .wudf-bg-indigo .wudf-eyebrow { color: #F7F3EC; }
.wudf-bg-indigo a { color: #E6DDFB; }
.wudf-bg-indigo .wp-block-button__link { background: #F7F3EC; color: #2B2840; }
.wudf-bg-indigo .wp-block-button__link:hover { background: #fff; color: #2B2840; }
.wudf-section > h2:first-child, .wudf-section > .wudf-eyebrow:first-child { margin-top: 0; }

/* Watercolour blooms behind heroes */
.wudf-hero { overflow: hidden; padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3.5rem, 9vw, 6.5rem); background:
	radial-gradient(38rem 26rem at 88% 18%, rgba(185,174,219,.42), transparent 70%),
	radial-gradient(30rem 22rem at 6% 92%, rgba(147,168,210,.28), transparent 70%),
	radial-gradient(18rem 14rem at 70% 96%, rgba(226,179,195,.30), transparent 70%),
	#F7F3EC; }
.wudf-hero h1 { margin-top: 0.4rem; font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1.04; color: #2F2A55; }
.wudf-hero .wp-block-columns { align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.wudf-hero-art img { border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(60,55,102,.45); aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.wudf-hero-art { margin: 0; }
.wudf-page-hero { padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.wudf-page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.06; color: #2F2A55; max-width: 20ch; }
.wudf-page-hero.wudf-center h1 { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .15s, color .15s, transform .15s; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid #4E4388; color: #4E4388; background: transparent; padding: calc(0.85rem - 1.5px) calc(1.6rem - 1.5px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #4E4388; color: #FFFDF8; }
.wudf-bg-indigo .wp-block-button.is-style-outline > .wp-block-button__link { border-color: #F7F3EC; color: #F7F3EC; }

/* ---------- Cards ---------- */
.wudf-cards { gap: 1.25rem !important; }
.wudf-card { background: #FFFDF8; border: 1px solid #E6DFEE; border-radius: 22px; padding: clamp(1.4rem, 3vw, 2rem); height: 100%; box-sizing: border-box; }
.wudf-card > *:first-child { margin-top: 0; }
.wudf-card h3 { font-size: 1.5rem; margin: 0.2rem 0 0.6rem; }
.wudf-card p { margin: 0.4rem 0; }
.wudf-card .wudf-num { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.6rem; line-height: 1; color: #B9AEDB; font-weight: 600; margin: 0 0 .4rem; }
.wudf-postgrid .wudf-card .wp-block-post-title { font-size: 1.45rem; }
.wudf-postgrid .wudf-card .wp-block-post-title a { text-decoration: none; }
.wudf-postgrid .wudf-card .wp-block-post-title a:hover { color: #4E4388; }
.wudf-postgrid .wp-block-post-excerpt { font-size: 0.98rem; color: #3E3A57; }
.wudf-postgrid .wp-block-post-excerpt__more-link { font-weight: 600; }
.wudf-date { font-size: 0.85rem; color: #5C567A; }
.wudf-postgrid .wp-block-post-template { gap: 1.25rem; }
@media (max-width: 900px) { .wudf-postgrid .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .wudf-postgrid .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; } }

.wudf-panel { background: #EEEAF6; border-radius: 28px; padding: clamp(1.6rem, 4vw, 3rem); }
.wudf-panel > *:first-child { margin-top: 0; }
.wudf-post-cta { margin-top: 3rem !important; }
.wudf-alert { background: #FFFDF8; border: 1.5px solid #C9BDE6; border-left: 6px solid #4E4388; border-radius: 18px; padding: clamp(1.3rem, 3vw, 2rem); }
.wudf-alert > *:first-child { margin-top: 0; }
.wudf-note { background: #F7ECEF; border-radius: 18px; padding: 1.2rem 1.4rem; font-size: 0.98rem; }

/* ---------- Quote band ---------- */
.wudf-quote-band .wp-block-quote { border: 0; padding: 0; margin: 0 auto; max-width: 34ch; text-align: center; color: #F7F3EC; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.3; }
.wudf-quote-band .wp-block-quote cite { display: block; margin-top: 1.4rem; font-family: Karla, sans-serif; font-style: normal; font-size: 0.85rem; letter-spacing: .16em; text-transform: uppercase; color: #CFC6EA; }
.wudf-quote-band .wp-block-quote::before { content: "“"; display: block; font-size: 5rem; line-height: .6; color: #D9A441; margin-bottom: .8rem; }

/* ---------- Books ---------- */
.wudf-books { gap: 1.5rem !important; }
.wudf-book { background: #FFFDF8; border: 1px solid #E6DFEE; border-radius: 24px; padding: 1.4rem 1.4rem 1.8rem; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.wudf-book .wp-block-buttons { margin-top: auto; padding-top: 0.6rem; }
.wudf-cover { border-radius: 14px 18px 18px 14px; aspect-ratio: 3 / 4; padding: 1.4rem 1.2rem !important; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; box-shadow: inset 10px 0 14px -10px rgba(0,0,0,.35), 0 18px 36px -22px rgba(43,40,64,.55); margin-bottom: 1.2rem; }
.wudf-cover p { margin: 0; }
.wudf-cover .wudf-cover-num { font-size: 0.75rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.wudf-cover .wudf-cover-title { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.05; }
.wudf-cover .wudf-cover-author { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.15rem; }
.wudf-cover-1 { background: linear-gradient(160deg, #EAE3F5 0%, #C9BDE6 100%); color: #2F2A55; }
.wudf-cover-2 { background: linear-gradient(160deg, #8E83C4 0%, #4E4388 100%); color: #FBF8F2; }
.wudf-cover-3 { background: linear-gradient(160deg, #3C3766 0%, #211D40 100%); color: #F3E6C4; }
.wudf-book h3 { margin: 0.2rem 0 0; font-size: 1.7rem; }
.wudf-ages { font-style: italic; color: #5C567A; margin-top: 0.2rem !important; }

/* ---------- Tables ---------- */
.wp-block-table table { border-collapse: separate; border-spacing: 0; width: 100%; background: #FFFDF8; border: 1px solid #DDD6E8; border-radius: 16px; overflow: hidden; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid #E6DFEE; padding: 0.85rem 1rem; text-align: left; vertical-align: top; line-height: 1.5; }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table thead { border: 0; }
.wp-block-table thead th { background: #EEEAF6; color: #2F2A55; font-weight: 700; font-size: 0.86rem; letter-spacing: .06em; text-transform: uppercase; }
.wp-block-table td:first-child { font-weight: 600; }
.wudf-say-table td:first-child { color: #7A6F8E; text-decoration: line-through; text-decoration-color: rgba(122,111,142,.45); font-weight: 400; }
.wudf-say-table td:last-child { color: #2F2A55; font-weight: 600; }
.wudf-help-table td:nth-child(2) { white-space: nowrap; font-weight: 700; color: #4E4388; }
.wudf-help-table td:nth-child(2) a { text-decoration: none; }
.wudf-plain-first td:first-child { font-weight: 400; }
@media (max-width: 640px) {
	.wp-block-table { overflow-x: auto; }
	.wp-block-table table { min-width: 560px; }
	.wudf-say-table table, .wudf-help-table table { min-width: 0; }
	.wudf-say-table tr, .wudf-help-table tr { display: grid; }
	.wudf-say-table thead, .wudf-help-table thead { display: none; }
	.wudf-say-table td, .wudf-help-table td { border-bottom: 0; padding: .35rem 1rem; }
	.wudf-say-table tr, .wudf-help-table tr { border-bottom: 1px solid #E6DFEE; padding: .6rem 0; }
	.wudf-help-table td:nth-child(2) { white-space: normal; }
}

/* ---------- Lists ---------- */
.wudf-ticks { list-style: none; padding-left: 0; }
.wudf-ticks li { position: relative; padding-left: 1.9rem; margin: 0.55rem 0; }
.wudf-ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #D9CFF0, #8C7FBF); }
.wudf-urgent li::before { background: radial-gradient(circle at 35% 35%, #F3C9D3, #B5476A); }

/* ---------- Pills ---------- */
.wudf-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 2.5rem; }
.wudf-pills a { display: inline-block; padding: 0.45rem 0.95rem; border-radius: 999px; background: #FFFDF8; border: 1px solid #DDD6E8; font-size: 0.88rem; text-decoration: none; color: #3C3766; }
.wudf-pills a:hover { background: #EEEAF6; border-color: #B9AEDB; }

/* ---------- Forms (WUDF Site Kit) ---------- */
.wudf-form { margin: 1.2rem 0 0.4rem; }
.wudf-form .wudf-fields { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.wudf-form .wudf-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1 1 220px; }
.wudf-form .wudf-field.is-full { flex-basis: 100%; }
.wudf-form label { font-size: 0.88rem; font-weight: 600; color: #3C3766; }
.wudf-form input[type="text"], .wudf-form input[type="email"], .wudf-form input[type="tel"], .wudf-form select, .wudf-form textarea {
	font: inherit; font-size: 1rem; color: #2B2840; background: #FFFDF8; border: 1.5px solid #CFC6E2; border-radius: 14px; padding: 0.8rem 1rem; width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.wudf-form textarea { min-height: 150px; resize: vertical; }
.wudf-form input:focus, .wudf-form select:focus, .wudf-form textarea:focus { outline: none; border-color: #4E4388; box-shadow: 0 0 0 3px rgba(78,67,136,.18); }
.wudf-form .wudf-submit { font: inherit; font-weight: 600; font-size: 1rem; background: #4E4388; color: #FFFDF8; border: 0; border-radius: 999px; padding: 0.9rem 1.7rem; cursor: pointer; align-self: flex-end; transition: background-color .15s, transform .15s; }
.wudf-form .wudf-submit:hover { background: #2B2840; transform: translateY(-1px); }
.wudf-form .wudf-submit:focus-visible { outline: 2px solid #2B2840; outline-offset: 3px; }
.wudf-form .wudf-inline { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.wudf-form .wudf-inline .wudf-field { flex: 1 1 200px; }
.wudf-form .wudf-consent { font-size: 0.85rem; color: #5C567A; margin: 0.7rem 0 0; line-height: 1.5; }
.wudf-form .wudf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.wudf-form-msg { border-radius: 14px; padding: 0.9rem 1.1rem; margin: 1rem 0; font-weight: 600; }
.wudf-form-msg.is-ok { background: #E7F3EC; color: #1F5A3A; border: 1px solid #B7DCC6; }
.wudf-form-msg.is-err { background: #FBEAEE; color: #8A2343; border: 1px solid #EBC0CC; }
.wudf-bg-indigo .wudf-form label { color: #E6DDFB; }
.wudf-bg-indigo .wudf-form .wudf-consent { color: #CFC6EA; }
.wudf-bg-indigo .wudf-form .wudf-submit { background: #F7F3EC; color: #2B2840; }

/* ---------- Landing page ---------- */
.wudf-landing .wudf-hero { padding-top: clamp(2rem, 6vw, 4rem); }
.wudf-landing-card { background: #FFFDF8; border: 1px solid #E6DFEE; border-radius: 28px; padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: 0 30px 60px -40px rgba(60,55,102,.5); }
.wudf-landing-card > *:first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.wudf-footer { background: #2B2840; color: #E6E1F0; padding-top: clamp(3rem, 7vw, 4.5rem); padding-bottom: 2rem; font-size: 0.98rem; }
.wudf-footer a { color: #F7F3EC; text-underline-offset: 3px; text-decoration-color: rgba(247,243,236,.4); }
.wudf-footer a:hover { color: #fff; text-decoration-color: #fff; }
.wudf-footer-title { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.9rem; font-weight: 600; color: #F7F3EC; margin: 0; line-height: 1.1; }
.wudf-footer-head { font-size: 0.78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #B9AEDB; margin-bottom: 0.4rem; }
.wudf-footer-links { list-style: none; padding: 0; margin: 0; }
.wudf-footer-links li { margin: 0.45rem 0; }
.wudf-footer-links a { text-decoration: none; }
.wudf-footer-links a:hover { text-decoration: underline; }
.wudf-footer-help { background: rgba(247,243,236,.07); border: 1px solid rgba(247,243,236,.14); border-radius: 14px; padding: 0.9rem 1rem; font-size: 0.93rem; }
.wudf-footer-legal { border-top: 1px solid rgba(247,243,236,.14); margin-top: 2.5rem !important; padding-top: 1.4rem; font-size: 0.85rem; color: #B8B1CB; }
.wudf-footer-legal p { margin: 0; }
.wudf-footer-minimal { padding-top: 1.6rem; padding-bottom: 1.6rem; font-size: 0.88rem; }
.wudf-footer-minimal p { margin: 0; }

/* ---------- Post content ---------- */
.wudf-single .wp-block-post-title { font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1.08; margin-top: 0.3rem; }
.wudf-single .wp-block-post-content { font-size: 1.12rem; }
.wudf-single .wp-block-post-content h2 { margin-top: 2.6rem; }
.wudf-tags { font-size: 0.9rem; color: #5C567A; margin-top: 2rem; }
.wudf-postnav { font-size: 0.95rem; }
.wudf-postnav a { text-decoration: none; }

/* ---------- Details (FAQ) ---------- */
.wp-block-details { background: #FFFDF8; border: 1px solid #E6DFEE; border-radius: 16px; padding: 1rem 1.2rem; }
.wp-block-details summary { font-weight: 700; cursor: pointer; color: #2F2A55; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
	.wp-block-button__link:hover, .wudf-form .wudf-submit:hover { transform: none; }
}

/* Stacked form inside the landing card */
.wudf-landing-card .wudf-form .wudf-inline { flex-direction: column; align-items: stretch; }
.wudf-landing-card .wudf-form .wudf-inline .wudf-field { flex: 0 0 auto; }
.wudf-landing-card .wudf-form .wudf-submit { align-self: stretch; }
@media (max-width: 600px) { .wudf-form .wudf-inline { flex-direction: column; align-items: stretch; } .wudf-form .wudf-inline .wudf-field { flex: 0 0 auto; } .wudf-form .wudf-submit { align-self: stretch; } }
