/*
Theme Name: Joy at the Beach
Theme URI: https://www.joyatthebeach.nl/
Author: Opzeker.it
Description: Modern block theme for Joy at the Beach — private studios in Zandvoort.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.4
License: GNU General Public License v2 or later
Text Domain: joyatthebeach
*/

/* ---------- Base ---------- */
:root {
	--hdr-h: 84px;
	--radius: 22px;
	--radius-sm: 14px;
	--shadow: 0 1px 2px rgba(23, 34, 56, .04), 0 12px 32px -12px rgba(23, 34, 56, .18);
	--ease: cubic-bezier(.2, .7, .2, 1);
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 12px); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
::selection { background: var(--wp--preset--color--sun); color: var(--wp--preset--color--ink); }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 300; }
h1, h2 { font-variation-settings: "opsz" 144, "SOFT" 50; text-wrap: balance; }
p { text-wrap: pretty; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
.wp-site-blocks > * + * { margin-block-start: 0; }

.eyebrow {
	font-size: .8rem !important;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--coral);
	display: flex;
	align-items: center;
	gap: .7em;
	margin-bottom: .25rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.has-text-align-center.eyebrow { justify-content: center; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(23, 34, 56, .45); }
.wp-block-button.is-style-sun .wp-block-button__link { background: var(--wp--preset--color--sun); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-sun .wp-block-button__link:hover { background: #ffcd3a; }
.wp-block-button.is-style-glass .wp-block-button__link {
	background: rgba(255, 255, 255, .14);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.wp-block-button.is-style-glass .wp-block-button__link:hover { background: rgba(255, 255, 255, .26); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
/* The frosted background lives on a pseudo-element: a backdrop-filter on the header itself
   would become the containing block for the fixed mobile menu overlay and clip it. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(247, 242, 234, .86);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	box-shadow: 0 1px 0 rgba(23, 34, 56, .07);
	transition: opacity .35s var(--ease);
}
.site-header.is-overlay { margin-bottom: calc(var(--hdr-h) * -1); }
.site-header.is-overlay:not(.is-scrolled)::before { opacity: 0; }
.header-inner {
	min-height: var(--hdr-h);
	padding-left: var(--wp--style--root--padding-left) !important;
	padding-right: var(--wp--style--root--padding-right) !important;
	max-width: calc(1240px + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
	margin-inline: auto !important;
}
.brand .wp-block-image { margin: 0; }
.brand-logo img { display: block; height: auto; }
.logo-light { display: none; }
.site-header.is-overlay:not(.is-scrolled) .logo-light { display: block; }
.site-header.is-overlay:not(.is-scrolled) .logo-dark { display: none; }
.brand-name { margin: 0; line-height: 1.1; }
.brand-name a {
	text-decoration: none;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.3rem;
	display: flex;
	flex-direction: column;
	color: var(--wp--preset--color--navy);
}
.brand-name span { font-family: var(--wp--preset--font-family--body); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-top: 3px; }
.site-header.is-overlay:not(.is-scrolled) .brand-name a { color: #fff; }
.main-nav a { text-decoration: none; }
.main-nav .wp-block-navigation__container .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); position: relative; }
.site-header.is-overlay:not(.is-scrolled) .main-nav .wp-block-navigation__container .wp-block-navigation-item__content { color: #fff; }
.main-nav .wp-block-navigation__container .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor;
	transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.main-nav .wp-block-navigation__container .wp-block-navigation-item__content:hover::after { transform: scaleX(1); }
.site-header.is-overlay:not(.is-scrolled) .wp-block-navigation__responsive-container-open { color: #fff; }
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--sand) !important;
	padding: 1.25rem clamp(1.25rem, 6vw, 2.5rem) 2rem !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	top: 1rem; right: 1rem; width: 48px; height: 48px; border-radius: 50%;
	display: grid; place-items: center; background: var(--wp--preset--color--shell); color: var(--wp--preset--color--navy);
	box-shadow: var(--shadow);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 5rem !important; align-items: flex-start !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important; gap: .25rem !important; width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--wp--preset--color--dune); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block; width: 100%; padding: .9rem 0 !important;
	font-family: var(--wp--preset--font-family--display); font-size: 2rem; line-height: 1.2; color: var(--wp--preset--color--navy) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { display: none; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	animation: rise .5s var(--ease) both;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: .05s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: .1s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: .15s; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: .2s; }
.header-cta .wp-block-button__link { padding: .7em 1.3em; font-size: .9rem; }
@media (max-width: 781px) {
	:root { --hdr-h: 70px; }
	.brand-name span { display: none; }
	.brand-name a { font-size: 1.1rem; }
	.header-actions { gap: .9rem !important; }
	.brand-logo img { width: 36px !important; }
}
@media (max-width: 420px) { .brand-name { display: none; } }

/* ---------- Hero ---------- */
.jatb-hero { padding-top: calc(var(--hdr-h) + 2rem) !important; padding-bottom: clamp(1.5rem, 4vw, 3rem) !important; }
.jatb-hero .wp-block-cover__background {
	opacity: 1 !important;
	background: linear-gradient(180deg, rgba(23, 34, 56, .55) 0%, rgba(23, 34, 56, .08) 30%, rgba(23, 34, 56, .15) 50%, rgba(23, 34, 56, .75) 100%) !important;
}
.jatb-hero .wp-block-cover__image-background { animation: heroZoom 18s var(--ease) both; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.jatb-hero { padding-left: var(--wp--style--root--padding-left) !important; padding-right: var(--wp--style--root--padding-right) !important; }
.jatb-hero .wp-block-cover__inner-container { width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }
.jatb-hero .wp-block-cover__inner-container > .alignwide { max-width: 1240px; margin-inline: auto !important; }
.jatb-hero .hero-content > * { margin-left: 0 !important; }
.jatb-hero .eyebrow { text-shadow: 0 1px 12px rgba(23, 34, 56, .35); }
@media (max-width: 781px) { .jatb-hero .eyebrow::before { display: none; } }
.hero-content > * { animation: rise 1s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: .12s; }
.hero-content > *:nth-child(3) { animation-delay: .24s; }
.hero-content > *:nth-child(4) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.jatb-hero .eyebrow { color: #fff; }
.jatb-hero .eyebrow::before { background: var(--wp--preset--color--sun); height: 2px; }
.jatb-hero h1 { margin-top: .5rem; text-shadow: 0 2px 30px rgba(23, 34, 56, .25); }
.hero-lead { max-width: 36rem; color: rgba(255, 255, 255, .92); }
.hero-facts {
	margin-top: clamp(2.5rem, 7vh, 5rem) !important;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, .28);
	gap: .75rem 2.5rem !important;
	animation: rise 1s .5s var(--ease) both;
}
.hero-facts p { margin: 0; font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hero-facts strong { color: #fff; font-weight: 600; }

/* ---------- Intro / features ---------- */
.intro-head h2, .section-head h2 { margin-top: .5rem; }
.feature-grid { gap: clamp(1rem, 2vw, 1.5rem) !important; }
.feature {
	background: var(--wp--preset--color--shell);
	border-radius: var(--radius);
	padding: 1.75rem 1.6rem 1.5rem;
	box-shadow: var(--shadow);
	transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .9s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(23, 34, 56, .04), 0 22px 44px -16px rgba(23, 34, 56, .25); }
.feature::before {
	content: ""; display: block; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 1.4rem;
	background: var(--wp--preset--color--sun) var(--ico) center / 26px no-repeat;
}
.feature h3 { margin: 0 0 .5rem; }
.feature p { margin: 0; font-size: .98rem; }
.ico-pin  { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172238' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-5.5 10.2-7.4 11.8a1 1 0 0 1-1.2 0C9.5 20.2 4 15 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.ico-bath { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172238' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4 8 6'/%3E%3Cpath d='M17 19v2'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M7 19v2'/%3E%3Cpath d='M9 5 7.6 3.6A2.1 2.1 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5'/%3E%3C/svg%3E"); }
.ico-sofa { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172238' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3'/%3E%3Cpath d='M2 16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z'/%3E%3Cpath d='M4 18v2'/%3E%3Cpath d='M20 18v2'/%3E%3C/svg%3E"); }
.ico-leaf { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172238' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.5 19 2c1 2 2 4.2 2 8 0 5.5-4.8 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.9-5.4 5.1-6C9.5 14.5 12 13 13 12'/%3E%3C/svg%3E"); }

/* ---------- Studios ---------- */
.studio-card {
	background: var(--wp--preset--color--shell);
	border-radius: calc(var(--radius) + 6px);
	padding: 12px;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
}
.studio-media { position: relative; }
.studio-media .wp-block-image { margin: 0; }
.studio-img { overflow: hidden; border-radius: var(--radius); }
.studio-img img { width: 100%; display: block; transition: transform 1.2s var(--ease); }
.studio-card:hover .studio-img img { transform: scale(1.04); }
.studio-img-inset {
	position: absolute !important; right: 18px; bottom: -34px; width: 30%; max-width: 150px;
	border: 5px solid var(--wp--preset--color--shell); border-radius: 18px; overflow: hidden;
	box-shadow: 0 14px 30px -12px rgba(23, 34, 56, .45);
}
.studio-img-inset img { display: block; width: 100%; }
.studio-size {
	position: absolute; top: 16px; left: 16px; margin: 0;
	background: rgba(255, 253, 249, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	padding: .35em .9em; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--wp--preset--color--navy);
}
.studio-body { padding: 1.75rem clamp(.75rem, 2vw, 1.5rem) 1.25rem; display: flex; flex-direction: column; flex: 1; }
.studio-body > * { margin-block: 0; }
.studio-body > * + * { margin-top: .9rem; }
.studio-tag { font-size: .8rem !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--coral); }
.studio-body h3 { margin-top: .3rem !important; }
.studio-body .wp-block-buttons { margin-top: auto !important; padding-top: 1.5rem; }

.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .55rem 1.25rem; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
	background: var(--wp--preset--color--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D446B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.checklist.is-light li::before { background-color: var(--wp--preset--color--sun); }

/* ---------- Renovated split ---------- */
.section-green { overflow: hidden; }
.split { margin: 0 !important; align-items: stretch !important; }
.split-media { min-height: 420px; position: relative; }
.split-media .wp-block-image { margin: 0; position: absolute; inset: 0; }
.split-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split-body { padding: var(--wp--preset--spacing--70) clamp(1.25rem, 6vw, 6rem) !important; }
.split-body .eyebrow { color: var(--wp--preset--color--sun); }
.split-body > p:not(.eyebrow):not(.signoff) { color: rgba(255, 255, 255, .85); }
.signoff { font-family: var(--wp--preset--font-family--display); font-style: italic; font-size: 1.25rem; color: var(--wp--preset--color--sun); margin-top: 2rem !important; }
@media (max-width: 781px) { .split-media { min-height: 62vw; } }

/* ---------- Gallery ---------- */
.jatb-gallery.wp-block-gallery.has-nested-images {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: clamp(140px, 17vw, 230px);
	grid-auto-flow: dense;
	gap: clamp(8px, 1.2vw, 14px) !important;
}
.jatb-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
	width: auto !important; margin: 0 !important; border-radius: var(--radius-sm); overflow: hidden;
}
.jatb-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 100% !important; width: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.jatb-gallery figure.wp-block-image:hover img { transform: scale(1.05); }
.jatb-gallery figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.jatb-gallery figure:nth-child(3), .jatb-gallery figure:nth-child(5), .jatb-gallery figure:nth-child(8) { grid-row: span 2; }
.jatb-gallery figure:nth-child(6), .jatb-gallery figure:nth-child(11) { grid-column: span 2; }
@media (max-width: 781px) {
	.jatb-gallery.wp-block-gallery.has-nested-images { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 38vw; }
	.jatb-gallery figure:nth-child(n) { grid-column: auto; grid-row: auto; }
	.jatb-gallery figure:nth-child(1), .jatb-gallery figure:nth-child(6) { grid-column: span 2; }
	.jatb-gallery figure:nth-child(3), .jatb-gallery figure:nth-child(8) { grid-row: span 2; }
}

/* ---------- About ---------- */
.about-media { position: relative; }
.about-media::before {
	content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
	background: var(--wp--preset--color--sun); top: -6%; left: -8%; z-index: 0; opacity: .9;
}
.about-img { position: relative; z-index: 1; margin: 0; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-img img { display: block; width: 100%; }
.about-badge {
	position: absolute; z-index: 2; right: -4%; bottom: 8%; margin: 0;
	background: var(--wp--preset--color--shell); border-radius: var(--radius-sm); padding: .9rem 1.2rem; box-shadow: var(--shadow);
	font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; color: var(--wp--preset--color--navy); line-height: 1.2;
}
.about-badge span { display: block; font-family: var(--wp--preset--font-family--body); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--coral); margin-top: 2px; }
.note { font-size: .9rem; color: var(--wp--preset--color--muted); border-left: 3px solid var(--wp--preset--color--sun); padding-left: .9rem; }
@media (max-width: 781px) { .about-badge { right: 4%; } .about-media::before { left: -4%; } }

/* ---------- Reviews ---------- */
.review-grid { gap: clamp(1rem, 2vw, 1.5rem) !important; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)) !important; }
.review {
	background: var(--wp--preset--color--shell); border-radius: var(--radius); padding: 2rem 1.9rem; box-shadow: var(--shadow);
	position: relative; overflow: hidden;
}
.review::after {
	content: "\201C"; position: absolute; right: 1.2rem; top: -1.2rem;
	font-family: var(--wp--preset--font-family--display); font-size: 9rem; line-height: 1; color: var(--wp--preset--color--dune);
}
.review > * { position: relative; z-index: 1; }
.review h3 { margin: .4rem 0 .6rem; }
.review p:last-child { margin: 0; color: var(--wp--preset--color--muted); }
.stars { color: #E9A800; letter-spacing: .15em; margin: 0; font-size: 1.05rem; }

/* ---------- Book CTA ---------- */
.jatb-book .wp-block-cover__background { opacity: 1 !important; background: linear-gradient(180deg, rgba(23, 34, 56, .35), rgba(23, 34, 56, .6)) !important; }
.jatb-book .eyebrow { color: var(--wp--preset--color--sun); }
.jatb-book p:not(.eyebrow) { color: rgba(255, 255, 255, .92); }

/* ---------- Footer ---------- */
.footer-inner a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); }
.footer-inner a:hover { color: var(--wp--preset--color--sun); }
.footer-inner p { line-height: 2; }
.footer-inner h4 { font-family: var(--wp--preset--font-family--body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.footer-tagline { color: rgba(255, 255, 255, .7); max-width: 22rem; }
.footer-legal { margin-top: var(--wp--preset--spacing--50) !important; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: rgba(255, 255, 255, .55); }

/* ---------- Inner pages ---------- */
.page-main .post-password-form { background: var(--wp--preset--color--shell); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.page-main input[type="password"], .page-main input[type="text"], .page-main input[type="email"] {
	padding: .8em 1em; border: 1px solid var(--wp--preset--color--dune); border-radius: 12px; font: inherit; background: #fff; min-width: 240px;
}
.page-main input[type="submit"] {
	background: var(--wp--preset--color--navy); color: #fff; border: 0; border-radius: 999px; padding: .85em 1.6em; font: inherit; font-weight: 600; cursor: pointer;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .feature-grid .reveal:nth-child(2), .js .review-grid .reveal:nth-child(2), .js .studio-grid .reveal:nth-child(2) { transition-delay: .1s; }
.js .feature-grid .reveal:nth-child(3), .js .review-grid .reveal:nth-child(3) { transition-delay: .2s; }
.js .feature-grid .reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}
