/*
Theme Name: Café by ZIVA
Theme URI: https://cafebyziva.com
Author: Fairground Digital
Description: Custom block theme for Café by ZIVA, the morning side of ZIVA. Cream and terracotta palette, IM Fell English headlines, Montserrat body, and ready-made homepage and page patterns built from the approved website design.
Version: 1.6.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: cafe-by-ziva
*/

[hidden] { display: none !important; }

/* ---------- shared ---------- */
.zv-label {
	font-size: var(--wp--preset--font-size--label);
	font-weight: 500;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--bronze);
	margin-bottom: 0;
}
.zv-script {
	font-family: var(--wp--preset--font-family--script);
	color: var(--wp--preset--color--terracotta);
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.2;
	margin-top: 0;
}
.zv-lede { font-size: 1.0625rem; line-height: 1.7; max-width: 560px; margin-left: auto; margin-right: auto; }
.zv-center { text-align: center; }
.zv-rule { width: 72px; height: 1.5px; background: var(--wp--preset--color--bronze); border: 0; margin: 2rem auto 0; opacity: 1; }
.wp-block-image.zv-fill, .wp-block-image.zv-fill img { width: 100%; height: 100%; }
.wp-block-image img { object-fit: cover; border-radius: 2px; }
.wp-block-image.zv-wide-photo img { width: 100%; aspect-ratio: 21 / 9; }
.zv-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }

/* ---------- header ---------- */
.zv-header { border-bottom: 1px solid rgba(171, 136, 70, 0.35); padding: 1.25rem var(--wp--style--root--padding-right, clamp(1rem, 5vw, 4.5rem)) 1.25rem var(--wp--style--root--padding-left, clamp(1rem, 5vw, 4.5rem)); }
.zv-logo { margin: 0; }
.zv-logo img { height: 68px; width: auto; display: block; }
.zv-logo-footer img { height: 120px; margin: 0 auto; }
.zv-header .wp-block-button__link { padding: 0.85rem 1.4rem; }

/* ---------- hero ---------- */
.zv-hero {
	position: relative;
	overflow: hidden;
	text-align: center;
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: 0;
	background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--wp--preset--color--paper) 95%, transparent) 0%, transparent 45%), linear-gradient(180deg, var(--wp--preset--color--cream) 0%, var(--wp--preset--color--butter) 100%);
}
.zv-hero h1 { margin-top: 1.25rem; margin-bottom: 1.5rem; }
.zv-hero .wp-block-buttons { justify-content: center; }
.zv-collage {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	justify-content: center;
	margin-top: 4.5rem !important;
	max-width: 1300px;
	margin-left: auto !important;
	margin-right: auto !important;
}
.zv-collage > .wp-block-image { flex: 1 1 0; margin: 0; }
.zv-collage > .wp-block-image img { width: 100%; height: 280px; display: block; }
.zv-collage > .wp-block-image:nth-child(1) img { height: 220px; }
.zv-collage > .wp-block-image:nth-child(2) img { height: 300px; }
.zv-collage > .wp-block-image:nth-child(3) img { height: 260px; }
.zv-collage > .wp-block-image:nth-child(4) img { height: 340px; }
.zv-collage > .wp-block-image:nth-child(5) img { height: 280px; }
.zv-collage > .wp-block-image:nth-child(6) img { height: 330px; }
.zv-collage > .wp-block-image:nth-child(7) img { height: 290px; }
.zv-collage > .wp-block-image:nth-child(8) img { height: 240px; }
.zv-collage > .wp-block-image:nth-child(9) img { height: 300px; }

/* ---------- brand line ---------- */
.zv-brandline h2 { font-style: italic; font-size: clamp(2.25rem, 4vw, 3.125rem); margin-bottom: 0.25rem; }

/* ---------- story ---------- */
.zv-story { background: var(--wp--preset--color--paper); }
.zv-story .wp-block-columns { gap: clamp(2rem, 6vw, 5.5rem); align-items: center !important; }
.zv-story .wp-block-image img { aspect-ratio: 4 / 5; width: 100%; }

/* ---------- menu ---------- */
.zv-menu-wrap { background: var(--wp--preset--color--butter); }
.zv-menu {
	background: var(--wp--preset--color--cream);
	border: 1px solid rgba(171, 136, 70, 0.4);
	padding: clamp(2rem, 6vw, 5rem);
	text-align: center;
}
.zv-tablist { justify-content: center; gap: 0 !important; margin: 2.5rem 0 3rem; }
.zv-tablist .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--espresso);
	border: 1.5px solid var(--wp--preset--color--espresso);
	margin-left: -1.5px;
	padding: 0.95rem 1.75rem;
	white-space: nowrap;
}
.zv-tablist .is-active .wp-block-button__link,
.zv-tablist .wp-block-button__link:hover { background: var(--wp--preset--color--espresso); color: var(--wp--preset--color--cream); }
.zv-menu:not(.zv-tabs-ready) .zv-panel + .zv-panel { margin-top: 3rem; }
.zv-panel { text-align: left; }
.zv-panel > .wp-block-columns { gap: clamp(2rem, 5vw, 4rem); }
.zv-panel .wp-block-image img { width: 100%; aspect-ratio: 3 / 4; }
.zv-items { columns: 2; column-gap: 3.5rem; }
.zv-item { break-inside: avoid; padding: 0.9rem 0; border-bottom: 1px dotted rgba(82, 40, 18, 0.35); margin: 0 !important; }
.zv-item-row { gap: 1rem; align-items: baseline !important; }
.zv-item-name { font-family: var(--wp--preset--font-family--serif); font-size: 1.5rem; line-height: 1.25; margin: 0; }
.zv-item-price { font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--terracotta); white-space: nowrap; margin: 0; }
.zv-item-desc { font-size: 0.8125rem; line-height: 1.55; opacity: 0.8; margin: 0.25rem 0 0; }
.zv-menu-note { font-size: 0.8125rem; opacity: 0.75; text-align: left; }

/* ---------- signature matcha ---------- */
.zv-cards .wp-block-image img { width: 100%; aspect-ratio: 4 / 5; }
.zv-card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1.25rem; margin-bottom: 0.4rem; }
.zv-price { font-family: var(--wp--preset--font-family--sans); font-size: 0.9375rem; font-weight: 600; color: var(--wp--preset--color--terracotta); }

/* ---------- gallery ---------- */
.zv-gallery { background: var(--wp--preset--color--paper); }
.zv-gallery h2 a { color: inherit; text-decoration: none; }
.zv-strip { display: grid !important; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.zv-strip > .wp-block-image { margin: 0; }
.zv-strip > .wp-block-image img { width: 100%; height: 300px; }

/* ---------- visit ---------- */
.zv-hours { list-style: none; padding: 0; max-width: 440px; }
.zv-hours li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(171, 136, 70, 0.35); padding: 0.45rem 0; }
.zv-visit .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; }
.zv-map { position: relative; width: 100%; aspect-ratio: 4 / 3; border: 1px solid rgba(171, 136, 70, 0.5); background: var(--wp--preset--color--paper); overflow: hidden; }
.zv-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- morning list ---------- */
.zv-morning { background: var(--wp--preset--color--terracotta); color: #F7EED3; text-align: center; }
.zv-morning h2, .zv-morning p { color: #F7EED3; }
.zv-morning .zv-script { color: var(--wp--preset--color--butter); margin-bottom: 0; }
.zv-morning .wp-block-buttons { justify-content: center; }
.zv-morning .wp-block-button__link { background: #F7EED3; color: var(--wp--preset--color--terracotta); border-color: #F7EED3; }

/* ---------- logo intro (sunrise) ---------- */
@property --zv-sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.zv-intro {
	position: fixed; inset: 0; z-index: 100000;
	display: grid; place-items: center;
	background: radial-gradient(circle at 50% 42%, #F7EED3 0%, #F2E6C0 45%, #EDDA98 100%);
	animation: zvIntroOut 0.7s cubic-bezier(0.6, 0, 0.3, 1) 2.4s forwards;
	cursor: pointer;
}
.no-intro .zv-intro, .zv-intro.is-done { display: none; }
.zv-intro-logo { display: grid; width: min(340px, 68vw); }
.zv-intro-logo img { grid-area: 1 / 1; width: 100%; height: auto; }
.zv-intro-sun {
	--zv-sweep: 0deg;
	-webkit-mask-image: conic-gradient(from 270deg at 50% 37%, #000 var(--zv-sweep), transparent 0);
	mask-image: conic-gradient(from 270deg at 50% 37%, #000 var(--zv-sweep), transparent 0);
	animation: zvSunrise 1.3s cubic-bezier(0.45, 0.05, 0.25, 1) 0.15s forwards;
}
.zv-intro-word { clip-path: inset(0 100% 0 0); animation: zvWordIn 0.9s cubic-bezier(0.3, 0.7, 0.2, 1) 1.15s forwards; }
@keyframes zvSunrise { to { --zv-sweep: 360deg; } }
@keyframes zvWordIn { to { clip-path: inset(0 0 0 0); } }
@keyframes zvIntroOut { to { opacity: 0; visibility: hidden; transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .zv-intro { display: none; } }

/* ---------- morning list pop-up ---------- */
.zv-dialog {
	width: min(460px, calc(100vw - 32px));
	padding: clamp(2rem, 6vw, 3rem);
	border: 1px solid rgba(171, 136, 70, 0.5);
	border-radius: 2px;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--espresso);
	text-align: center;
}
.zv-dialog::backdrop { background: rgba(46, 22, 9, 0.6); }
.zv-dialog h2 { font-size: clamp(1.9rem, 5vw, 2.4rem); margin: 0 0 0.75rem; }
.zv-dialog .zv-script { margin-bottom: 0.25rem; }
.zv-dialog-copy { font-size: 0.9375rem; line-height: 1.6; margin: 0 0 1.5rem; }
.zv-dialog-close {
	position: absolute; top: 8px; right: 10px;
	width: 36px; height: 36px;
	border: 0; background: transparent; cursor: pointer;
	font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--espresso);
}
.zv-dialog form { text-align: left; }
.zv-dialog form .zv-label { display: block; margin-bottom: 0.4rem; color: var(--wp--preset--color--espresso); }
.zv-dialog input[type="email"] {
	width: 100%; box-sizing: border-box;
	padding: 0.85rem 1rem; margin-bottom: 0.75rem;
	border: 1.5px solid var(--wp--preset--color--espresso); border-radius: 0;
	background: var(--wp--preset--color--paper); color: inherit;
	font: inherit; font-size: 1rem;
}
.zv-dialog button.wp-element-button { width: 100%; cursor: pointer; }
.zv-dialog button.wp-element-button:disabled { opacity: 0.6; cursor: wait; }
.zv-form-status { min-height: 1.4em; margin: 0.6rem 0 0; font-size: 0.8125rem; color: var(--wp--preset--color--terracotta); text-align: center; }
.zv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.zv-footer { background: #522812; color: #F2E6C0; padding-top: 5rem; padding-bottom: 2.5rem; }
.zv-footer a { color: #F2E6C0; text-decoration: none; }
.zv-footer .zv-label { color: #F2E6C0; opacity: 0.85; line-height: 2.4; }
.zv-footer .wp-block-site-title a { color: #F2E6C0; }
.zv-footer-bottom { border-top: 1px solid rgba(242, 230, 192, 0.25); margin-top: 3.5rem !important; padding-top: 1.5rem; font-size: 0.6875rem; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.75; }

/* ---------- inner page banner ---------- */
.zv-banner { text-align: center; padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--50); }

/* ---------- mobile order bar ---------- */
.zv-mobile-bar { display: none !important; }

@media (max-width: 781px) {
	.zv-header .wp-block-buttons { display: none; }
	.zv-logo img { height: 52px; }
	.zv-logo-footer img { height: 96px; }
	.zv-collage { flex-wrap: wrap; gap: 6px; margin-top: 2.5rem !important; }
	.zv-collage > .wp-block-image { flex: 0 0 calc(33.333% - 4px); }
	.zv-collage > .wp-block-image img,
	.zv-collage > .wp-block-image:nth-child(n) img { height: 150px; }
	.zv-collage > .wp-block-image:nth-child(n+7) { display: none; }
	.zv-hero .wp-block-buttons { flex-direction: column; }
	.zv-hero .wp-block-button, .zv-hero .wp-block-button__link { width: 100%; }
	.zv-items { columns: 1; }
	.zv-tablist { flex-wrap: nowrap !important; overflow-x: auto; justify-content: flex-start; margin: 1.5rem -1rem 2rem; padding: 0 1rem; }
	.zv-tablist .wp-block-button__link { padding: 0.8rem 1rem; font-size: 0.625rem; white-space: nowrap; }
	.zv-strip { grid-template-columns: repeat(2, 1fr); }
	.zv-strip > .wp-block-image img { height: 170px; }
	.zv-mobile-bar {
		display: flex !important;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		gap: 10px; padding: 12px 16px 18px;
		background: var(--wp--preset--color--cream);
		border-top: 1px solid rgba(171, 136, 70, 0.4);
	}
	.zv-mobile-bar .wp-block-button { flex: 1; }
	.zv-mobile-bar .wp-block-button__link { width: 100%; padding: 0.9rem 0.5rem; font-size: 0.6875rem; }
	body { padding-bottom: 76px; }
}
