/*
Theme Name: Crystelle Pereira
Theme URI: https://crystelle.futsalify.com
Author: Absolute Zero
Description: Custom block theme for Crystelle Pereira, cook, baker and author of Flavour Kitchen. Warm editorial design with Fraunces and Manrope, recipe post type, and ready-made pages for About, Services, Recipes, Media, Blog and Contact.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crystelle
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }
h1 em, h2 em, h3 em, .cp-logo em { font-style: italic; font-weight: 400; color: var(--wp--preset--color--chilli); }
.cp-dark { color: var(--wp--preset--color--cream); }
.cp-dark :where(h1, h2, h3, h4, a:not(.wp-element-button)) { color: inherit; }
.cp-dark h1 em, .cp-dark h2 em, .cp-dark h3 em, .cp-dark .eyebrow, .cp-dark .cp-logo em { color: var(--wp--preset--color--saffron); }
.cp-dark .cp-muted { color: #E9E1D4; }
img { height: auto; max-width: 100%; }

.eyebrow {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--chilli);
}
.cp-lede { font-size: clamp(18px, 1.6vw, 20px); color: #3D332C; max-width: 34em; }
.cp-muted { color: var(--wp--preset--color--muted); }
.cp-section { padding-block: clamp(72px, 9vw, 112px); }
.cp-section-top { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(40px, 5vw, 64px); }
.cp-bordered { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }

/* Grids built from groups */
.cp-split { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: clamp(40px, 5vw, 64px); align-items: center; }
.cp-split > * { margin: 0 !important; }
.cp-stack { display: flex; flex-direction: column; gap: 24px; }
.cp-stack > * { margin: 0 !important; }
.cp-cards { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.cp-cards.cp-cards-4 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.cp-cards > * { margin: 0 !important; }
.cp-row { display: flex !important; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.cp-row > * { margin: 0 !important; }

/* Links with arrows */
.cp-more { margin: 0; }
.cp-more a { font-weight: 700; color: var(--wp--preset--color--cardamom); display: inline-flex; align-items: center; min-height: 44px; }
.cp-more a::after { content: "\2192"; margin-left: 8px; text-decoration: none; display: inline-block; }
.cp-dark .cp-more a { color: var(--wp--preset--color--cream); }

/* ---------- Header ---------- */
.cp-header { border-bottom: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--cream); }
.cp-header-inner { padding-block: 18px; gap: 20px; }
.cp-logo { margin: 0; font-family: var(--wp--preset--font-family--fraunces); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.cp-logo a { text-decoration: none; color: var(--wp--preset--color--cardamom); }
.cp-header-right { gap: 28px; }
.cp-nav { font-size: 15px; font-weight: 600; gap: 8px 28px; }
.cp-nav a { text-decoration: none; }
.cp-nav a:hover, .cp-nav .current-menu-item > a { color: var(--wp--preset--color--chilli); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.cp-nav .wp-block-navigation__responsive-container-open { width: 48px; height: 48px; border-radius: 50%; border: 1px solid #D6C8B4; align-items: center; justify-content: center; color: var(--wp--preset--color--cardamom); }
@media (max-width: 599px) { .cp-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: inline-flex; } }
.cp-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--cream); padding: 32px; }
.cp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--fraunces); font-size: 32px; font-weight: 600; }
.cp-header-cta .wp-block-button__link { padding: 12px 22px; font-size: 15px; }
@media (max-width: 760px) {
	.cp-header-cta { display: none !important; }
	.cp-hero-art::before { right: 0; }
	.cp-hero-art { padding: 0 24px 40px 32px; }
}

/* ---------- Hero ---------- */
.cp-hero-art { position: relative; margin: 0 !important; padding: 0 40px 48px 48px; }
.cp-hero-art::before { content: ""; position: absolute; right: -24px; top: 24px; width: min(380px, 80%); aspect-ratio: 1; border-radius: 50%; background: var(--wp--preset--color--saffron); }
.cp-hero-art::after { content: ""; position: absolute; left: 0; bottom: 0; width: 180px; height: 180px; border-radius: 24px; }
.cp-hero-art::after, .cp-tiles { background-color: var(--wp--preset--color--cardamom); background-image: radial-gradient(circle at 50% 50%, #E8A33D 0 3px, transparent 3.5px), radial-gradient(circle at 0 0, rgba(251,246,238,.18) 0 6px, transparent 6.5px), radial-gradient(circle at 100% 100%, rgba(251,246,238,.18) 0 6px, transparent 6.5px); background-size: 28px 28px; }
.cp-hero-art img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 280px 280px 24px 24px; border: 6px solid var(--wp--preset--color--cream); box-sizing: border-box; display: block; }
.cp-tiles { margin: 0 !important; background-color: #24392C; }

.cp-photo { margin: 0 !important; }
.cp-photo img { width: 100%; border-radius: 24px; display: block; object-fit: cover; }
.cp-photo.is-square img { aspect-ratio: 730 / 714; }
.cp-photo.is-portrait img { aspect-ratio: 4 / 5; object-position: 50% 20%; }

/* ---------- Credentials ---------- */
.cp-creds { list-style: none; margin: 0; padding: 44px 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 28px 40px; }
.cp-creds li { font-family: var(--wp--preset--font-family--fraunces); font-size: 22px; line-height: 1.3; }
.cp-creds strong { display: block; margin-bottom: 4px; font-family: var(--wp--preset--font-family--manrope); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--saffron); }

/* ---------- Cards ---------- */
.cp-card { background: var(--wp--preset--color--cream); border: 1px solid #E0D3C0; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.cp-card > * { margin: 0 !important; }
.cp-card h3 { font-size: 25px; line-height: 1.15; }
.cp-card h3 a { text-decoration: none; color: inherit; }
.cp-card .cp-grow { flex-grow: 1; color: #4A3F37; font-size: 16px; line-height: 1.55; }
.cp-card.is-tall { min-height: 300px; box-sizing: border-box; }
.cp-num { margin: 0; font-family: var(--wp--preset--font-family--fraunces); font-style: italic; font-size: 20px; color: var(--wp--preset--color--chilli); }

/* Chips */
.cp-chips { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.cp-chips li { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--cardamom); border: 1px solid #CDBFA9; border-radius: 999px; padding: 6px 14px; margin: 0; }
.cp-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-pills a, .wp-block-tag-cloud.cp-pills a { font-size: 15px !important; font-weight: 700; text-decoration: none; color: var(--wp--preset--color--cardamom); border: 1px solid #CDBFA9; border-radius: 999px; padding: 10px 18px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; margin: 0; }
.cp-pills a:hover { background: var(--wp--preset--color--cardamom); color: var(--wp--preset--color--cream); }

/* ---------- Book ---------- */
.cp-book-art { background: var(--wp--preset--color--saffron); border-radius: 28px; min-height: 480px; display: flex !important; align-items: center; justify-content: center; padding: 48px; box-sizing: border-box; }
.cp-book-art figure { margin: 0 !important; }
.cp-book-art img, .cp-cover img { width: 300px; max-width: 100%; border-radius: 6px; box-shadow: 0 30px 50px -20px rgba(42,33,28,.45); display: block; }
.cp-cover { margin: 0 !important; flex: 0 0 auto; }
.cp-cover img { width: 220px; }

/* ---------- Recipe + post cards ---------- */
.cp-recipe-card { display: flex; flex-direction: column; gap: 12px; }
.cp-recipe-card > * { margin: 0 !important; }
.cp-recipe-card img, .cp-ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; display: block; }
.cp-recipe-card .wp-block-post-title, .cp-recipe-card h3 { font-family: var(--wp--preset--font-family--fraunces); font-size: 26px; font-weight: 400; line-height: 1.2; letter-spacing: 0; }
.cp-recipe-card .wp-block-post-title a, .cp-recipe-card h3 a { text-decoration: none; }
.cp-recipe-card .wp-block-post-terms, .cp-tag { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--chilli); }
.cp-recipe-card .wp-block-post-terms a { text-decoration: none; color: inherit; }
.cp-dark .cp-recipe-card .wp-block-post-terms, .cp-dark .cp-tag { color: var(--wp--preset--color--saffron); }
.cp-ph { background-color: #EADFCF; background-image: repeating-linear-gradient(45deg, rgba(47,74,58,.07) 0 12px, transparent 12px 24px); display: flex !important; align-items: flex-end; padding: 20px; box-sizing: border-box; }
.cp-dark .cp-ph { background-color: #24392C; background-image: repeating-linear-gradient(45deg, rgba(251,246,238,.06) 0 12px, transparent 12px 24px); }
.cp-ph p { margin: 0; font-size: 13px; font-weight: 600; opacity: .8; }

.cp-post-card { display: flex; flex-direction: column; gap: 12px; }
.cp-post-card > * { margin: 0 !important; }
.cp-post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }
.cp-post-card .wp-block-post-title { font-size: 28px; font-weight: 400; line-height: 1.2; letter-spacing: 0; }
.cp-post-card .wp-block-post-title a { text-decoration: none; }
.cp-post-card .wp-block-post-date { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--muted); }
.cp-featured .wp-block-post-template > li { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 32px 56px; align-items: center; padding-top: 40px; border-top: 1px solid var(--wp--preset--color--line); }
.cp-featured .wp-block-post-template > li > * { margin: 0 !important; }
.cp-featured img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; }
.cp-featured .wp-block-post-title { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.08; }
.cp-featured .wp-block-post-title a { text-decoration: none; }
.cp-featured-text { display: flex; flex-direction: column; gap: 16px; }
.cp-featured-text > * { margin: 0 !important; }

/* Post list rows (homepage blog) */
.cp-postlist .wp-block-post-template { gap: 0 !important; }
.cp-postlist .wp-block-post-template > li { border-top: 1px solid #DCCFBC; padding: 28px 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cp-postlist .wp-block-post-template > li:last-child { border-bottom: 1px solid #DCCFBC; }
.cp-postlist .wp-block-post-template > li > * { margin: 0; }
.cp-postlist .wp-block-post-date { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--muted); }
.cp-postlist .wp-block-post-title { font-size: 28px; font-weight: 400; line-height: 1.2; letter-spacing: 0; }
.cp-postlist .wp-block-post-title a { text-decoration: none; }

/* Timeline + credits lists */
.cp-timeline { list-style: none; margin: 0; padding: 0 !important; }
.cp-timeline > li { display: flex; flex-wrap: wrap; gap: 12px 48px; padding: 32px 0; border-top: 1px solid #DCCFBC; margin: 0; }
.cp-timeline > li:last-child { border-bottom: 1px solid #DCCFBC; }
.cp-timeline .cp-year { flex: 0 0 200px; font-family: var(--wp--preset--font-family--fraunces); font-style: italic; font-size: 40px; line-height: 1; color: var(--wp--preset--color--chilli); }
.cp-timeline .cp-entry { flex: 1 1 420px; min-width: 0; }
.cp-timeline .cp-entry strong { display: block; font-family: var(--wp--preset--font-family--fraunces); font-size: 26px; line-height: 1.2; color: var(--wp--preset--color--cardamom); margin-bottom: 8px; }
.cp-credits { list-style: none; margin: 0; padding: 0 !important; border-top: 2px solid var(--wp--preset--color--cardamom); }
.cp-credits > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid #DCCFBC; margin: 0; }
.cp-credits strong { flex: 1 1 340px; font-family: var(--wp--preset--font-family--fraunces); font-size: 24px; color: var(--wp--preset--color--cardamom); }
.cp-credits .cp-role { flex: 1 1 260px; color: #3D332C; }
.cp-credits .cp-net { flex: 0 1 160px; font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.cp-press > li a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; text-decoration: none; color: inherit; width: 100%; }
.cp-press .cp-pub { flex: 0 1 240px; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--chilli); }
.cp-press .cp-title { flex: 1 1 420px; font-family: var(--wp--preset--font-family--fraunces); font-size: 24px; line-height: 1.25; color: var(--wp--preset--color--cardamom); }
.cp-press .cp-date { font-size: 15px; font-weight: 600; color: var(--wp--preset--color--muted); }

/* Service rows */
.cp-service-list { list-style: none; margin: 0; padding: 0 !important; }
.cp-service-list > li { display: flex; flex-wrap: wrap; gap: 20px 56px; padding: 56px 0; border-bottom: 1px solid #DCCFBC; margin: 0; }
.cp-service-list .cp-big-num { flex: 0 0 120px; font-family: var(--wp--preset--font-family--fraunces); font-style: italic; font-size: 56px; line-height: 1; color: var(--wp--preset--color--chilli); }
.cp-service-list .cp-service-body { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cp-service-list .cp-service-body strong { font-family: var(--wp--preset--font-family--fraunces); font-size: clamp(32px, 3.4vw, 44px); font-weight: 600; line-height: 1.1; color: var(--wp--preset--color--cardamom); }
.cp-service-list .cp-service-body span { font-size: 18px; color: #3D332C; max-width: 40em; }
.cp-service-list .cp-service-link { flex: 0 0 auto; align-self: center; font-weight: 700; }
.cp-service-list .cp-service-link::after { content: " \2192"; }
.cp-seen { display: flex !important; flex-wrap: wrap; align-items: center; gap: 12px 36px; padding-block: 28px; }
.cp-seen > * { margin: 0 !important; }
.cp-seen .cp-seen-item { font-family: var(--wp--preset--font-family--fraunces); font-size: 20px; color: var(--wp--preset--color--cardamom); }

/* Quote */
.cp-quote { border: 0 !important; padding: 0 !important; margin: 0 !important; }
.cp-quote p { font-family: var(--wp--preset--font-family--fraunces); font-size: clamp(32px, 4vw, 52px); line-height: 1.12; letter-spacing: -0.015em; color: var(--wp--preset--color--cardamom); }
.cp-quote p::before { content: "\201C"; display: block; font-size: 120px; line-height: .6; height: 56px; color: var(--wp--preset--color--saffron); }
.cp-quote cite { font-style: normal; font-size: 15px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wp--preset--color--muted); }

/* Showreel / video placeholder */
.cp-video { border-radius: 28px; aspect-ratio: 16 / 9; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--wp--preset--color--cream); background-color: #24392C; background-image: repeating-linear-gradient(45deg, rgba(251,246,238,.06) 0 12px, transparent 12px 24px); padding: 24px; box-sizing: border-box; }
.cp-video > * { margin: 0 !important; }

/* Newsletter */
.cp-newsletter { background: var(--wp--preset--color--saffron); border-radius: 28px; padding: 64px clamp(28px, 5vw, 72px) !important; color: var(--wp--preset--color--forest); }
.cp-newsletter :where(h2) { color: var(--wp--preset--color--forest); font-size: clamp(34px, 3.6vw, 48px); }
.cp-newsletter .wp-block-button__link { background: var(--wp--preset--color--forest); color: var(--wp--preset--color--cream); }

/* Recognition */
.cp-recog { background: var(--wp--preset--color--forest); border-radius: 28px; padding: 56px clamp(28px, 5vw, 64px) !important; }

/* Contact */
.cp-form-box { background: var(--wp--preset--color--sand); border: 1px solid #E0D3C0; border-radius: 28px; padding: clamp(24px, 4vw, 44px) !important; }
.cp-contact-email a { font-family: var(--wp--preset--font-family--fraunces); font-size: clamp(20px, 5.4vw, 26px); overflow-wrap: anywhere; }
.cp-label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--muted); }

/* Single post / recipe content */
.cp-entry-content > * { max-width: 760px; }
.cp-entry-content img { border-radius: 16px; }
.cp-breadcrumb { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--muted); }

/* Search + pagination */
.wp-block-search.cp-search .wp-block-search__input { min-height: 54px; border: 2px solid var(--wp--preset--color--cardamom); border-radius: 999px; padding: 0 20px; background: #fff; font-size: 16px; }
.wp-block-search.cp-search .wp-block-search__button { border-radius: 999px; padding: 0 28px; min-height: 54px; margin-left: 10px; }
.wp-block-search.cp-search .wp-block-search__inside-wrapper { border: 0; padding: 0; }
.wp-block-search.cp-search .wp-block-search__label { font-weight: 700; color: var(--wp--preset--color--cardamom); }
.wp-block-query-pagination { gap: 16px; font-weight: 700; }

/* ---------- Footer ---------- */
.cp-footer { background: var(--wp--preset--color--forest); color: #E9E1D4; font-size: 15px; }
.cp-footer a { color: #E9E1D4; text-decoration: none; }
.cp-footer a:hover { color: var(--wp--preset--color--saffron); }
.cp-footer .cp-logo a { color: var(--wp--preset--color--cream); font-size: 28px; }
.cp-footer .cp-logo em { color: var(--wp--preset--color--saffron); }
.cp-footer-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 40px; padding-top: 72px; }
.cp-footer-grid > * { margin: 0 !important; }
.cp-footer h2 { font-family: var(--wp--preset--font-family--manrope); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--saffron); margin: 0 0 12px; }
.cp-footer ul:not(.wp-block-social-links) { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cp-footer .cp-muted { color: #CFC5B6; }
.cp-footer .cp-email a { text-decoration: underline; }
.cp-footer-bottom { border-top: 1px solid #3A4A3E; padding: 24px 0 40px; margin-top: 56px !important; display: flex !important; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #CFC5B6; font-size: 14px; }
.cp-footer-bottom > * { margin: 0 !important; }
.cp-footer-bottom a { color: #CFC5B6; text-decoration: underline; }
.cp-social .wp-social-link { background: transparent !important; color: var(--wp--preset--color--cream) !important; border: 1px solid #4A5A4E; }
.cp-social .wp-block-social-link-anchor { padding: 11px !important; }

/* Focus visibility */
:where(a, button, input, .wp-element-button):focus-visible { outline: 3px solid var(--wp--preset--color--saffron); outline-offset: 3px; }

/* ---------- Layout helpers ---------- */
.wp-site-blocks > * { margin-block-start: 0 !important; }
main.wp-block-group > * { margin-block: 0 !important; }
.cp-section-bottom { padding-bottom: clamp(72px, 9vw, 104px); }
.cp-section-bottom-sm { padding-bottom: 40px; }
.cp-align-start { align-items: start !important; }
.cp-center { align-items: center; text-align: center; }
.cp-center h2 { max-width: 14em; }
.cp-center-buttons { justify-content: center; }
.cp-center-text { margin: 0; }
.cp-saffron-buttons .wp-block-button__link { background: var(--wp--preset--color--saffron); color: var(--wp--preset--color--forest); }
.cp-saffron-buttons .wp-block-button__link:hover { background: #F2B85E; color: var(--wp--preset--color--forest); }
.cp-grow-col { flex: 1 1 420px; }
.cp-book-row { align-items: center !important; justify-content: flex-start !important; gap: 48px 72px !important; }
.cp-video-title { font-family: var(--wp--preset--font-family--fraunces); font-size: 28px; }
.cp-video-note a { color: var(--wp--preset--color--saffron) !important; font-weight: 700; }
p.cp-pills { margin: 0; }
.cp-breadcrumb a { color: var(--wp--preset--color--cardamom); }
.cp-recog .cp-creds { padding: 0 !important; }
.cp-recog h3 { color: var(--wp--preset--color--cream); }
.cp-contact-email { margin: 0; font-family: var(--wp--preset--font-family--fraunces); font-size: clamp(20px, 5.4vw, 26px); color: var(--wp--preset--color--cardamom); }
.cp-stack > .cp-label { margin-top: 12px !important; }
.wp-block-post-featured-image img { border-radius: 20px; }
.wp-block-post-excerpt__more-link { font-weight: 700; }

@media (max-width: 760px) {
	.cp-hero-art::before { right: 0; }
	.cp-hero-art { padding: 0 24px 40px 32px; }
}
.cp-nav .wp-block-navigation__responsive-container.is-menu-open { background-color: var(--wp--preset--color--cream) !important; }
.cp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.cp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }
