/*
Theme Name: CAIA
Theme URI: https://caia.co.za
Author: CAIA
Author URI: https://caia.co.za
Description: A warm, calm, intentional block theme for CAIA — a lifestyle brand that happens to serve exceptional food. Built around three pillars: Home, Wholesome Living, and Beautiful Simplicity. Terracotta and cream palette, elegant Fraunces headings, generous negative space, organic shapes and gentle fade animations. Fully responsive (mobile + desktop) and edited entirely in the WordPress Site Editor.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caia
Tags: block-theme, full-site-editing, restaurant, food-and-drink, lifestyle, one-column, custom-colors, custom-logo, editor-style, wide-blocks, block-styles, blog
*/

/* =========================================================
   CAIA — supplementary styles
   Most design lives in theme.json. This file adds the
   organic touches, gentle animations and responsive polish.
   ========================================================= */

:root {
	--caia-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html { scroll-behavior: smooth; }

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

/* Subtle paper texture on the whole page (very light) */
body.caia-paper::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.04;
	background-image: radial-gradient(rgba(51,48,43,0.5) 0.5px, transparent 0.5px);
	background-size: 4px 4px;
}
.wp-site-blocks { position: relative; z-index: 1; }

/* ---------- Gentle fade-in on scroll ---------- */
.caia-reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 1s var(--caia-ease), transform 1s var(--caia-ease);
	will-change: opacity, transform;
}
.caia-reveal.is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.caia-reveal { opacity: 1 !important; transform: none !important; transition: none; }
	html { scroll-behavior: auto; }
}

/* ---------- Full-screen "chapter" helper ---------- */
.caia-chapter {
	min-height: 92vh;
	display: flex;
	align-items: center;
}
.caia-chapter-tall { min-height: 100vh; }
@media (max-width: 781px) {
	.caia-chapter, .caia-chapter-tall { min-height: auto; }
}

/* ---------- Organic shapes ---------- */
/* Soft arch top on images: add block style "Arch" (is-style-caia-arch) */
.is-style-caia-arch img,
.is-style-caia-arch .wp-block-cover__image-background,
figure.is-style-caia-arch img {
	border-top-left-radius: 50% 22%;
	border-top-right-radius: 50% 22%;
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
	overflow: hidden;
}
.wp-block-cover.is-style-caia-arch,
.wp-block-image.is-style-caia-arch,
.wp-block-image.is-style-caia-arch img {
	border-top-left-radius: 50% 22%;
	border-top-right-radius: 50% 22%;
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
	overflow: hidden;
}

/* Fully rounded image: block style "Soft Circle" */
.wp-block-image.is-style-caia-circle img,
figure.is-style-caia-circle img { border-radius: 999px; }

/* ---------- Rounded cards that echo the logo curves ---------- */
.caia-card {
	border-radius: 22px;
	overflow: hidden;
	background: var(--wp--preset--color--warm-white);
	transition: transform 0.6s var(--caia-ease), box-shadow 0.6s var(--caia-ease);
}
.caia-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 26px 60px -30px rgba(51,48,43,0.4);
}
.caia-card img { transition: transform 1.2s var(--caia-ease); }
.caia-card:hover img { transform: scale(1.05); }

/* Image zoom-on-hover for any cover/image with the class */
.caia-zoom { overflow: hidden; }
.caia-zoom img,
.caia-zoom .wp-block-cover__image-background {
	transition: transform 1.4s var(--caia-ease);
}
.caia-zoom:hover img,
.caia-zoom:hover .wp-block-cover__image-background { transform: scale(1.06); }

/* ---------- Olive-branch bullets in lists ---------- */
.caia-olive-list ul { list-style: none; padding-left: 0; }
.caia-olive-list li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.9rem;
}
.caia-olive-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.2rem;
	height: 1.2rem;
	background: no-repeat center/contain;
	background-image: url("assets/svg/olive-branch.svg");
	opacity: 0.9;
}

/* ---------- Fine-line face / arch dividers ---------- */
.caia-divider-face,
.caia-divider-arch {
	display: block;
	margin-inline: auto;
	opacity: 0.7;
}
.caia-divider-face { width: 64px; height: 64px; }
.caia-divider-arch { width: 200px; height: 44px; }

/* ---------- Small caps eyebrow label ---------- */
.caia-eyebrow {
	font-family: var(--wp--preset--font-family--body) !important;
	text-transform: uppercase;
	letter-spacing: 0.28em;
	font-size: 0.8rem !important;
	color: var(--wp--preset--color--olive);
}

/* ---------- Header / navigation ---------- */
.wp-block-navigation .wp-block-navigation-item__label { transition: color 0.4s var(--caia-ease); }

/* Make sure the hamburger toggle is always visible and tappable */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--charcoal);
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg { fill: currentColor; }

/* Mobile hamburger — make the overlay feel calm & full of air */
@media (max-width: 781px) {
	/* Keep the header on one tidy row: logo + title shrink, hamburger never does */
	.caia-header-sticky .wp-block-site-title {
		font-size: 1rem;
		letter-spacing: 0.18em;
		white-space: nowrap;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.caia-header-sticky .wp-block-navigation { flex: 0 0 auto; }

	/* The open overlay must sit ABOVE the sticky header (which is z-index:50) */
	.wp-block-navigation__responsive-container.is-menu-open {
		z-index: 100;
		background-color: var(--wp--preset--color--cream) !important;
		padding-top: 4rem;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		gap: 1.4rem;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label {
		font-family: var(--wp--preset--font-family--heading);
		font-size: 2rem;
		letter-spacing: 0.02em;
		text-transform: none;
	}
	/* The close (X) button, top-right of the open overlay */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		color: var(--wp--preset--color--charcoal);
	}
}

/* Sticky, softly translucent header */
.caia-header-sticky {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(120%) blur(6px);
	background-color: rgba(246,240,232,0.82);
}

/* ---------- Menu item rows ---------- */
.caia-menu-item {
	border-bottom: 1px solid rgba(51,48,43,0.12);
	transition: background-color 0.4s var(--caia-ease);
}
.caia-menu-item:hover { background-color: rgba(234,223,206,0.5); }
.caia-price {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--terracotta);
	white-space: nowrap;
}

/* ---------- Buttons: subtle lift ---------- */
.wp-block-button__link { transition: background-color 0.4s var(--caia-ease), transform 0.4s var(--caia-ease); }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* Outline button variant (block style: Outline) */
.wp-block-button.is-style-caia-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--charcoal);
	border: 1px solid var(--wp--preset--color--charcoal);
}
.wp-block-button.is-style-caia-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--cream);
}

/* ---------- Nice max-width for readable prose ---------- */
.caia-prose p { max-width: 60ch; }

/* ---------- Footer ---------- */
.caia-footer a { text-decoration: none; }
.caia-footer a:hover { text-decoration: underline; }

/* ---------- Journal / post cards ---------- */
.caia-journal-tile { position: relative; overflow: hidden; border-radius: 20px; }
.caia-journal-tile .wp-block-cover__image-background { transition: transform 1.4s var(--caia-ease); }
.caia-journal-tile:hover .wp-block-cover__image-background { transform: scale(1.06); }
