/*
Theme Name: Ndovi Studio
Theme URI: https://ndovi.com/
Author: Ndovi
Author URI: https://ndovi.com/
Description: Lean block theme for done-for-you business websites on Ndovi Hosting. It reproduces the BuniNow studio and plain layouts: six palettes as style variations, system fonts, no external requests, 44px tap targets.
Version: 1.0.0
Requires at least: 6.6
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: ndovi-studio
*/

/* Everything below reads the palette through the preset variables, so a style
   variation (Appearance > Editor > Styles) recolours the whole site. */
:root {
	--nd-brand: var(--wp--preset--color--brand);
	--nd-deep: var(--wp--preset--color--deep);
	--nd-wash: var(--wp--preset--color--wash);
	--nd-ink: var(--wp--preset--color--ink);
	--nd-line: var(--wp--preset--color--line);
	--nd-surface: var(--wp--preset--color--surface);
	--nd-radius: 14px;
	--nd-icon-wa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 14.4c-.3-.2-1.7-.9-2-1s-.5-.2-.7.1-.8 1-.9 1.2-.3.2-.6.1a8 8 0 0 1-2.4-1.5 9 9 0 0 1-1.6-2c-.2-.3 0-.5.1-.6l.5-.6.3-.5v-.5l-1-2.3c-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4a3 3 0 0 0-1 2.2 5.2 5.2 0 0 0 1.1 2.8 12 12 0 0 0 4.6 4c.6.3 1.1.4 1.5.6.6.2 1.2.2 1.6.1.5-.1 1.7-.7 2-1.4.2-.7.2-1.2.1-1.4z'/%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15L2 22l5.2-1.4A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-3-.2-.3A8.2 8.2 0 1 1 12 20.2z'/%3E%3C/svg%3E");
	--nd-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.2.4 2.4.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1z'/%3E%3C/svg%3E");
	--nd-icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}

body { -webkit-text-size-adjust: 100%; }
h1, h2, h3 { text-wrap: balance; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2.5px solid var(--nd-brand);
	outline-offset: 2px;
}
body .wp-site-blocks > * { margin-block: 0; }
body .nd-sections > * { margin-block: 0; }

/* ------------------------------------------------------------ buttons */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	text-decoration: none;
}
.nd-wa .wp-block-button__link::before,
.nd-ask .wp-block-button__link::before,
.nd-call .wp-block-button__link::before,
.nd-maplink .wp-block-button__link::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--nd-icon-wa) center / contain no-repeat;
	mask: var(--nd-icon-wa) center / contain no-repeat;
}
.nd-ask .wp-block-button__link::before { width: 14px; height: 14px; }
.nd-call .wp-block-button__link::before {
	width: 15px;
	height: 15px;
	background: var(--nd-brand);
	-webkit-mask-image: var(--nd-icon-phone);
	mask-image: var(--nd-icon-phone);
}
.nd-maplink .wp-block-button__link::before {
	width: 15px;
	height: 15px;
	-webkit-mask-image: var(--nd-icon-pin);
	mask-image: var(--nd-icon-pin);
}
body .wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--nd-surface);
	color: var(--nd-ink);
	border: 1px solid var(--nd-line);
	padding: 0.85rem 1.4rem;
}
body .nd-ask > .wp-block-button__link {
	background: var(--nd-wash);
	color: var(--nd-deep);
	padding: 0.45rem 0.85rem;
	font-size: 0.82rem;
	white-space: nowrap;
}
body .nd-maplink > .wp-block-button__link {
	background: none;
	color: var(--nd-deep);
	padding: 0;
	font-size: 0.9rem;
}
@media (prefers-reduced-motion: no-preference) {
	.wp-block-button__link { transition: transform 0.15s ease, filter 0.15s ease; }
	.wp-block-button__link:hover { transform: translateY(-1px); filter: brightness(1.04); }
}

/* ------------------------------------------------------------- header */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--nd-line);
}
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 0; position: relative; } }
body .nd-header > * { margin-block: 0; }
body .nd-bar { padding-block: 0.85rem; gap: 1rem; }
body .nd-brand { gap: 0.6rem; min-width: 0; }
.nd-brand .wp-block-site-logo img { max-height: 44px; width: auto; border-radius: 8px; }
.nd-brand .wp-block-site-title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 750;
	letter-spacing: -0.01em;
	color: var(--nd-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.nd-brand .wp-block-site-title a {
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
}
.nd-mark {
	width: 38px;
	height: 38px;
	flex: none;
	border-radius: 10px;
	display: inline-grid;
	place-items: center;
	background: var(--nd-brand);
	color: #fff;
	font-weight: 800;
	font-size: 0.95rem;
	letter-spacing: -0.02em;
}
body .nd-call > .wp-block-button__link {
	background: var(--nd-surface);
	color: var(--nd-ink);
	border: 1px solid var(--nd-line);
	padding: 0.5rem 0.9rem;
	font-size: 0.85rem;
	font-weight: 650;
	gap: 0.4rem;
	white-space: nowrap;
}
body .nd-nav { padding-bottom: 0.4rem; color: var(--nd-ink); }
.nd-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
	flex-wrap: nowrap;
	gap: 1.2rem;
	overflow-x: auto;
	scrollbar-width: none;
	width: 100%;
}
.nd-nav .wp-block-navigation__container::-webkit-scrollbar { display: none; }
.nd-nav .wp-block-navigation-item { flex: none; }
body .nd-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--nd-ink) !important;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
}
body .nd-nav .wp-block-navigation-item__content:hover { color: var(--nd-brand); }
.nd-nav-right .nd-nav .wp-block-navigation__container > li:first-child,
.nd-nav-center .nd-nav .wp-block-navigation__container > li:first-child { margin-left: auto; }
.nd-nav-center .nd-nav .wp-block-navigation__container > li:last-child { margin-right: auto; }

/* Phone menu (under 600px): WordPress's own menu button sits in the bar beside
   Call, and the links open as a full-screen list instead of a sideways row. */
@media (max-width: 599px) {
	body .nd-header { display: flex; align-items: center; gap: 0.5rem; }
	body .nd-header > .nd-bar { flex: 1; min-width: 0; margin-inline: 0 !important; }
	body .nd-nav { flex: none; padding-bottom: 0; }
}
/* The header's blur makes it the box a fixed element is placed in, which would
   squeeze the open menu into the header: drop the blur while the menu is open. */
.has-modal-open header.wp-block-template-part,
header.wp-block-template-part:has(.is-menu-open) {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	background: var(--nd-surface);
}
.nd-nav .wp-block-navigation__responsive-container-open,
.nd-nav .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	color: var(--nd-ink);
}
.nd-nav .wp-block-navigation__responsive-container-open {
	border: 1px solid var(--nd-line);
	background: var(--nd-surface);
}
.nd-nav .wp-block-navigation__responsive-container-close { top: 0.85rem; right: 1rem; }
body .nd-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--nd-surface) !important;
	color: var(--nd-ink) !important;
	padding: 0.85rem 1.25rem 2rem;
}
body .nd-nav .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 4rem;
	align-items: stretch;
}
body .nd-nav .is-menu-open .wp-block-navigation__container { gap: 0; width: 100%; align-items: stretch; }
body .nd-nav .is-menu-open .wp-block-navigation-item { border-bottom: 1px solid var(--nd-line); width: 100%; }
body .nd-nav .is-menu-open .wp-block-navigation-item__content {
	font-size: 1.15rem;
	min-height: 56px;
	width: 100%;
}

/* --------------------------------------------------------------- hero */
body .nd-hero {
	background: radial-gradient(120% 90% at 88% 8%, var(--nd-wash) 0%, transparent 62%), linear-gradient(180deg, #fff 0%, #fbfbfc 100%);
	border-bottom: 1px solid var(--nd-line);
	padding-block: clamp(2.6rem, 7vw, 4.4rem);
}
body .nd-hero-in { display: grid; gap: 1.15rem; max-width: 760px; }
body .nd-hero-in > *, body .nd-ht > * { margin: 0; }
.nd-hero h1 { margin: 0; }
.nd-lede { font-size: clamp(1.02rem, 2.4vw, 1.18rem); max-width: 56ch; }
body .nd-cta { gap: 0.7rem; margin-top: 0.4rem; }
.nd-hero-img { margin: 0; }
.nd-hero-img img { border-radius: var(--nd-radius); width: 100%; height: auto; display: block; }
.nd-ht { display: grid; gap: 1.15rem; }
/* On a phone the words dissolve into the grid so the place, the photo and the
   headline keep the draft's order: place, photo, words. */
@media (max-width: 899px) {
	.nd-hs > .nd-ht { display: contents; }
	.nd-hs > .nd-hero-img { order: 1; }
	.nd-hs > .nd-ht > * { order: 2; }
	.nd-hs > .nd-ht > .nd-eyebrow { order: 0; }
}
@media (min-width: 900px) {
	body .nd-hero-in { max-width: var(--wp--style--global--content-size); }
	body .nd-hs {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		column-gap: clamp(2rem, 4vw, 4rem);
		align-items: center;
	}
	.nd-hs > .nd-ht { align-content: center; }
}

/* ----------------------------------------------------------- sections */
body .nd-sec { padding-block: clamp(2.6rem, 7vw, 4.4rem); }
body .nd-sec > *, body .nd-in > *, body .nd-sh > *, body .nd-sb > * { margin-block: 0; }
.nd-eyebrow {
	font-size: 0.7rem;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nd-brand);
	margin: 0 0 0.7rem;
}
body .nd-sec .nd-eyebrow { margin-bottom: 0.7rem; }
body .nd-sec .nd-intro { margin-top: 0.6rem; max-width: 65ch; }
body .nd-sec .nd-more { margin-top: 1.4rem; }
@media (min-width: 900px) {
	body .nd-split > .nd-in {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
		column-gap: clamp(2rem, 5vw, 5rem);
		align-items: start;
	}
	body .nd-sb > .nd-intro:first-child { margin-top: 0; }
}

/* A list of services, dishes or rooms: one card per line. */
body .nd-items { display: grid; gap: 0.7rem; margin-top: 1.6rem; }
body .nd-items > *, body .nd-item > *, body .nd-item-txt > * { margin: 0; }
body .nd-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	border: 1px solid var(--nd-line);
	border-radius: var(--nd-radius);
	padding: 1.05rem 1.2rem;
	background: var(--nd-surface);
}
.nd-icon {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: inline-grid;
	place-items: center;
	background: var(--nd-wash);
	color: var(--nd-brand);
}
.nd-icon svg { width: 22px; height: 22px; }
body .nd-item-txt { flex: 1 1 0; min-width: 0; }
body .nd-item-txt p { font-size: 0.9rem; margin-top: 0.2rem; }
body .nd-item-end { display: flex; align-items: center; gap: 0.85rem; margin-left: auto; }
.nd-price {
	font-weight: 800;
	color: var(--nd-ink);
	font-size: 1.02rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	margin: 0;
}
@media (max-width: 30rem) {
	body .nd-item-end { width: 100%; margin-left: 0; justify-content: space-between; }
	.nd-price { white-space: normal; min-width: 0; }
}
body .nd-groups > h3 {
	margin: 1.6rem 0 0.2rem;
	color: var(--nd-deep);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.78rem;
}

/* Questions or steps. */
body .nd-steps { margin-top: 1.2rem; }
body .nd-sb > .nd-steps:first-child { margin-top: 0; }
body .nd-steps > *, body .nd-step > * { margin: 0; }
body .nd-step + .nd-step { margin-top: 1rem; }
body .nd-step h3 { font-size: 1rem; font-weight: 650; }
body .nd-step p { margin-top: 0.25rem; }

/* Cards: partners, kinds of customer, events, products. */
body .nd-grid {
	display: grid;
	gap: 0.8rem;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	margin-top: 1.2rem;
}
body .nd-grid.nd-wide { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
body .nd-grid > *, body .nd-card > * { margin: 0; }
body .nd-card {
	display: grid;
	gap: 0.35rem;
	align-content: start;
	padding: 0.9rem;
	border: 1px solid var(--nd-line);
	border-radius: var(--nd-radius);
	background: var(--nd-surface);
}
body .nd-card h3 { font-size: 1rem; font-weight: 650; }
body .nd-card p { font-size: 0.92rem; opacity: 0.85; }
body .nd-card ul { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; }
.nd-card .wp-block-image { margin: 0; }
.nd-card .wp-block-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; }
.nd-card .nd-logo img { aspect-ratio: auto; max-height: 3.5rem; width: auto; object-fit: contain; }

/* Opening hours. */
body .nd-hours { margin-top: 1.2rem; max-width: 34rem; border: 1px solid var(--nd-line); border-radius: var(--nd-radius); padding: 0.6rem 1.4rem; background: var(--nd-surface); }
body .nd-sb > .nd-hours:first-child { margin-top: 0; }
body .nd-hours > * { margin: 0; }
body .nd-hr { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--nd-line); font-size: 0.92rem; }
body .nd-hr:last-child { border-bottom: 0; }
body .nd-hr > * { margin: 0; }
.nd-hr p:first-child { color: var(--nd-ink); font-weight: 600; }
.nd-hr p:last-child { font-variant-numeric: tabular-nums; }

/* Photos, and the empty slots a customer fills with their own. */
body .nd-gallery { margin-top: 1.2rem; }
.nd-gallery.wp-block-gallery img { border-radius: 10px; }
.nd-photo { margin: 1.2rem 0 0; }
.nd-photo img { border-radius: var(--nd-radius); width: 100%; height: auto; display: block; }

body .nd-contact-cta { margin-top: 1.2rem; gap: 0.7rem; }
body .nd-sb > .wp-block-buttons { margin-top: 1rem; }

/* ------------------------------------------------------------- footer */
.nd-footer { border-top: 1px solid var(--nd-line); padding-block: 2.2rem 5rem; font-size: 0.86rem; }
body .nd-footer > *, body .nd-foot > * { margin: 0; }
body .nd-foot { gap: 1rem 2rem; align-items: center; }
.nd-foot .wp-block-site-title { font-size: 0.86rem; font-weight: 700; color: var(--nd-ink); margin: 0; }
.nd-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--nd-deep); }
body .nd-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; margin: 0; }
body .nd-float .wp-block-button__link {
	font-weight: 750;
	font-size: 0.9rem;
	padding: 0.8rem 1.15rem;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
}

/* -------------------------------------------------------------- plain
   The second BuniNow layout: narrower, washed header and hero, brand-coloured
   buttons, rows instead of cards. Chosen per site (setup.php sets the class). */
body.nd-plain { --wp--style--global--content-size: 52rem; }
.nd-plain header.wp-block-template-part { background: var(--nd-wash); position: relative; border-bottom: 0; }
body.nd-plain .nd-hero { background: var(--nd-wash); border-bottom: 0; padding-block: 2.25rem 2rem; }
body.nd-plain .nd-hs { grid-template-columns: 1fr; }
.nd-plain .nd-hs > .nd-ht { display: contents; }
.nd-plain .nd-hs > .nd-hero-img { order: -1; }
.nd-plain .nd-hs > .nd-ht > * { order: 0; }
body.nd-plain .nd-hero-in { max-width: var(--wp--style--global--content-size); }
.nd-plain .nd-hero h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.12; }
.nd-plain .nd-eyebrow { display: none; }
body.nd-plain .nd-sec { padding-block: 2rem; border-top: 1px solid var(--nd-line); }
body.nd-plain .nd-split > .nd-in { display: block; }
body.nd-plain .nd-sb > :first-child { margin-top: 0.875rem; }
.nd-plain h2 { font-size: 1.3rem; }
body.nd-plain .nd-item { padding: 0.75rem 0.9rem; border-radius: 12px; }
.nd-plain .wp-element-button,
.nd-plain .wp-block-button__link { background: var(--nd-brand); color: #fff; }
body.nd-plain .nd-float .wp-block-button__link { background: var(--wp--preset--color--wa); color: #fff; }
.nd-plain .nd-price { color: var(--nd-brand); font-weight: 700; }
/* Plain has no per-line Ask button; its map link is a filled button. */
.nd-plain .nd-item .nd-ask { display: none; }
body.nd-plain .nd-maplink > .wp-block-button__link {
	background: var(--nd-brand);
	color: #fff;
	padding: 0.8rem 1.35rem;
	font-size: 1rem;
}
.nd-plain .nd-maplink .wp-block-button__link::before { display: none; }
