/*
Theme Name: Bevi & Margherita's
Theme URI: https://bevibars.com
Author: W Web Design & Hosting
Author URI: https://wwebdesign.co.uk
Description: Lightweight ACF-block theme for Bevi & Margherita's. Replaces the Elementor / JetEngine stack with code-registered ACF blocks. No build step.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bevibars
Tags: acf, blocks, restaurant
*/

/* ==========================================================================
   Design tokens — extracted from the Elementor kit (post 12) so the rebuild
   keeps the exact brand palette and typography.
   ========================================================================== */

:root {
	/* Brand */
	--bevi-primary: #b56000;
	--bevi-primary-dark: #8f4c00;
	--bevi-accent: #000000;

	/* Text ramp */
	--bevi-text-strongest: #1a202c;
	--bevi-text-strong: #2d3748;
	--bevi-text-medium: #4a5568;
	--bevi-text-subtle: #718096;
	--bevi-text: #7a7a7a;

	/* Surfaces */
	--bevi-bg: #ffffff;
	--bevi-bg-subtle: #edf2f7;
	--bevi-bg-lighter: #f7fafc;
	--bevi-card-bg: #ffffff;

	/* Section tints — Elementor used 6B alpha over the brand colours */
	--bevi-tint-teal: rgba(14, 156, 152, 0.42);
	--bevi-tint-orange: rgba(181, 96, 0, 0.42);

	/* Chrome */
	--bevi-topbar-bg: #b56000;
	--bevi-topbar-text: #ffffff;
	--bevi-header-bg: #ffffff;
	--bevi-footer-bg: #000000;
	--bevi-footer-text: #ffffff;

	/* Type */
	--bevi-font: "Josefin Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--bevi-fw-heading: 600;
	--bevi-fw-body: 400;
	--bevi-fw-accent: 500;

	/* Layout */
	--bevi-content-max: 1140px;
	--bevi-gutter: 20px;
	--bevi-radius: 4px;
	--bevi-header-height: 96px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--bevi-font);
	font-weight: var(--bevi-fw-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--bevi-text);
	background: var(--bevi-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--bevi-font);
	font-weight: var(--bevi-fw-heading);
	color: var(--bevi-text-strongest);
	line-height: 1.25;
	margin: 0 0 0.5em;
}

h1 {
	font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
	font-size: clamp(1.5rem, 3.2vw, 2rem);
}

h3 {
	font-size: clamp(1.25rem, 2.4vw, 1.5rem);
}

p {
	margin: 0 0 1.2em;
}

a {
	color: var(--bevi-primary);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Visible keyboard focus — the Elementor build had none. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--bevi-primary);
	outline-offset: 2px;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.bevi-container {
	width: 100%;
	max-width: var(--bevi-content-max);
	margin-inline: auto;
	padding-inline: var(--bevi-gutter);
}

.bevi-section {
	padding-block: 60px;
}

.bevi-section--tight {
	padding-block: 40px;
}

.bevi-section__title {
	text-align: center;
	margin-bottom: 32px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	padding: 12px 20px;
	background: #fff;
	color: var(--bevi-primary);
	z-index: 100000;
}

/* Skip link */
.bevi-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: #fff;
	color: var(--bevi-primary);
	padding: 12px 20px;
	font-weight: 600;
}

.bevi-skip-link:focus {
	left: 0;
}

/* ==========================================================================
   Buttons — matches the Elementor button styling
   ========================================================================== */

.bevi-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--bevi-primary);
	color: #fff;
	font-family: var(--bevi-font);
	font-weight: var(--bevi-fw-heading);
	font-size: 15px;
	line-height: 1;
	padding: 14px 26px;
	border: 0;
	border-radius: var(--bevi-radius);
	cursor: pointer;
	transition: background 0.2s ease;
	text-decoration: none;
}

.bevi-btn:hover,
.bevi-btn:focus {
	background: var(--bevi-primary-dark);
	color: #fff;
	text-decoration: none;
}

.bevi-btn--block {
	width: 100%;
	justify-content: center;
}

/* ==========================================================================
   Page templates
   ========================================================================== */

.bevi-page {
	padding-block: 60px;
}

.bevi-page__title {
	margin-bottom: 24px;
}

.bevi-entry-content > * {
	max-width: var(--bevi-content-max);
}

.bevi-entry-content h2,
.bevi-entry-content h3 {
	margin-top: 1.6em;
}

.bevi-entry-content ul,
.bevi-entry-content ol {
	padding-left: 1.4em;
}

/*
 * Gutenberg gallery inside post content (used by the artist pages).
 *
 * Do NOT turn this into a CSS grid. Core sizes each `figure.wp-block-image` with
 * `width: calc(33.33% - …)` behind a `:not(#individual-image)` selector, whose ID
 * gives it specificity (1,3,2) — hard to override cleanly. Worse, under a grid
 * that 33.33% resolves against the *grid cell* rather than the gallery, so every
 * figure collapses to a ~70px thumbnail.
 *
 * Core's own flex layout already produces the 3-across cropped gallery this
 * design wants, so we only set the gap it reads and round the corners.
 */
.bevi-entry-content .wp-block-gallery {
	--wp--style--unstable-gallery-gap: 12px;
	gap: 12px;
	margin-block: 24px;
}

/*
 * Core gives each figure `flex-grow: 1`, so a last row holding a single orphan
 * image stretches it to the full width of the gallery — one photo rendered five
 * times the size of its neighbours. Pinning flex-grow to 0 keeps every tile at
 * the 33.33% core already assigns. Selector matches core's `.has-nested-images`
 * depth so it wins on specificity rather than source order.
 */
.bevi-entry-content .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-grow: 0;
}

.bevi-entry-content .wp-block-gallery img {
	border-radius: var(--bevi-radius);
}

/*
 * Embedded iframes in post content — the artist pages carry a Spotify player
 * with `width="100%"`. Without an explicit CSS width the attribute is ignored
 * once the iframe is a flex/grid child and it collapses to its ~65px intrinsic
 * default, so set the width here rather than relying on the HTML attribute.
 */
.bevi-entry-content iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
