/*
Theme Name: @Dawn's Ville
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dawns-ville
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === tokens === */
:root {
	--site-bg: var( --wp--preset--color--background );
	--site-ink: var( --wp--preset--color--text );
	--site-accent: var( --wp--preset--color--primary );
	--site-deep: var( --wp--preset--color--deep );
	--site-sand: var( --wp--preset--color--sand );
	--gutter-x: clamp( 1.25rem, 5vw, 3rem );
}

/* === typography helpers === */
.eyebrow {
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	margin: 0;
	color: var( --site-accent );
}
.media-cap,
.apt-label,
.quote-cap {
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

/* === header === */
.site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
	color: var( --site-bg );
}
.site-header-inner {
	max-width: 1280px;
	margin-inline: auto;
	padding: clamp( 1.1rem, 2.5vw, 1.5rem ) var( --gutter-x );
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 2rem;
}
.site-logo {
	margin: 0;
	line-height: 0;
	padding: 0.45rem;
	background: #fffdf6;
	border: 1px solid rgba( 27, 25, 23, 0.14 );
	border-radius: 6px;
	box-shadow: 0 3px 12px rgba( 0, 0, 0, 0.12 );
}
.site-logo img {
	display: block;
	height: clamp( 5rem, 11vw, 8rem );
	width: auto;
	object-fit: contain;
}
.site-header {
	padding-block: 1.1rem;
}
.site-header-inner {
	column-gap: 2rem;
}
.site-header .wp-block-navigation a {
	color: inherit;
	text-decoration: none;
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.site-header .wp-block-navigation a:hover {
	color: var( --site-sand );
}

/* === hero === */
.hero .hero-inner {
	color: var( --site-bg );
	padding-top: clamp( 8.5rem, 22vh, 13rem );
	padding-bottom: 2rem;
}
.hero .eyebrow {
	color: var( --site-sand );
}
.hero-title {
	font-size: var( --wp--preset--font-size--display );
	line-height: 1.02;
	max-width: 15ch;
	margin: 1.1rem 0 1.4rem;
}
.hero-sub {
	max-width: 42ch;
	color: rgba( 246, 241, 231, 0.92 );
	margin-bottom: 2rem;
}

/* === bands === */
.band {
	padding-block: clamp( 4.5rem, 9vw, 8rem );
}
.band.story {
	background: var( --site-bg );
}
.story-cols {
	align-items: center;
	gap: clamp( 2rem, 6vw, 5rem );
}
.story-text .wp-block-heading {
	font-size: clamp( 2rem, 4vw, 3rem );
	margin: 1rem 0 1.4rem;
}
.story-text p {
	max-width: 46ch;
}
.framed img {
	width: 100%;
	height: auto;
	display: block;
}
.media-cap {
	color: var( --site-accent );
	margin-top: 0.9rem;
}

/* === apartments === */
.band.apartments {
	background: var( --site-deep );
	color: var( --site-bg );
}
.band.apartments .eyebrow {
	color: var( --site-sand );
}
.band.apartments .wp-block-heading {
	color: var( --site-bg );
}
.band-head {
	align-items: flex-end;
	column-gap: 2rem;
	row-gap: 1.5rem;
	margin-bottom: clamp( 2.5rem, 5vw, 4rem );
}
.band.apartments .band-head h2 {
	font-size: clamp( 2rem, 4vw, 3rem );
	margin: 0;
}
.band-note {
	margin: 0;
}
.band-note a {
	color: var( --site-sand );
	text-decoration: none;
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.apt-cards {
	gap: clamp( 1.5rem, 3vw, 2.5rem );
}
.apt-card .apt-img img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	display: block;
}
.apt-label {
	color: var( --site-sand );
	margin: 1.4rem 0 0.5rem;
}
.apt-card .wp-block-heading {
	font-size: 1.7rem;
	margin: 0 0 0.6rem;
}
.apt-card .wp-block-paragraph {
	color: rgba( 246, 241, 231, 0.82 );
}
.apt-meta {
	color: var( --site-sand ) !important;
	margin-top: 1.1rem !important;
}
.apt-meta a {
	color: var( --site-sand );
	text-decoration: none;
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.apt-meta a:hover {
	text-decoration: underline;
}
.apt-link {
	margin-top: 1.1rem !important;
}
.apt-link a {
	color: var( --site-sand );
	text-decoration: none;
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.apt-link a:hover {
	text-decoration: underline;
}

/* === photo band + quote === */
.photo-band .photo-inner {
	color: var( --site-bg );
	max-width: 880px;
}
.quote {
	font-family: var( --wp--preset--font-family--cormorant-garamond );
	font-style: italic;
	font-size: clamp( 1.7rem, 3.6vw, 2.7rem );
	line-height: 1.3;
	margin: 0 0 1.4rem;
}
.quote-cap {
	color: var( --site-sand );
}

/* === cta === */
.band.cta {
	background: var( --site-bg );
}
.cta-inner {
	max-width: 720px;
	margin-inline: auto;
	text-align: center;
}
.cta-inner h2 {
	font-size: clamp( 2rem, 4.5vw, 3.2rem );
	margin: 1rem 0 1.2rem;
}

/* === footer === */
.site-footer {
	background: var( --site-deep );
	color: var( --site-bg );
	padding-top: clamp( 4rem, 8vw, 6rem );
	padding-bottom: clamp( 2.5rem, 5vw, 3.5rem );
}
.site-footer-inner {
	padding-inline: var( --gutter-x );
}
.footer-cols {
	gap: clamp( 2rem, 5vw, 4rem );
	margin-bottom: 3rem;
}
.site-footer .wp-block-site-title {
	font-family: var( --wp--preset--font-family--cormorant-garamond );
	font-size: 1.7rem;
	font-weight: 500;
	margin: 0 0 1rem;
}
.footer-tagline {
	color: rgba( 246, 241, 231, 0.78 );
	max-width: 34ch;
}
.footer-h {
	font-family: var( --wp--preset--font-family--karla );
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var( --site-sand );
	margin: 0 0 1.2rem;
}
.footer-cols ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.footer-links li {
	margin-bottom: 0.6rem;
}
.footer-links a {
	color: rgba( 246, 241, 231, 0.85 );
	text-decoration: none;
}
.footer-links a:hover {
	color: var( --site-sand );
}
.footer-cols .wp-block-column p {
	color: rgba( 246, 241, 231, 0.85 );
	margin: 0;
}
.site-footer .wp-block-separator {
	border-color: rgba( 246, 241, 231, 0.25 );
}
.footer-note {
	color: rgba( 246, 241, 231, 0.6 );
	font-size: 0.8rem;
	margin-bottom: 0;
}

/* === outline button (cream on hero / anywhere) === */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: inherit;
}

/* === bands butt edge-to-edge === */
.wp-block-post-content > * + * {
	margin-block-start: 0;
}

/* === hero pinned lower-left === */
.hero .hero-inner {
	max-width: none;
}
.hero .hero-inner > * {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* === responsive === */
@media ( max-width: 782px ) {
	.hero-title {
		font-size: clamp( 2.4rem, 12vw, 3.4rem );
	}
	.band-head {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* === scroll reveal (progressive enhancement) ===
   Elements are fully visible by default; reveal.js adds the initial
   hidden state and reveals on scroll. Reduced-motion keeps them still. */
.reveal-init {
	opacity: 0;
	transform: translateY( 12px );
}
.reveal-init.in {
	opacity: 1;
	transform: none;
}
.reveal-init {
	transition: opacity 0.8s ease, transform 0.8s ease;
}
@media ( prefers-reduced-motion: reduce ) {
	.reveal-init {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* === stay / apartment detail pages === */
.band.apt-detail.alt {
	background: var( --wp--preset--color--surface );
}
.apt-detail-cols {
	align-items: center;
	gap: clamp( 2rem, 6vw, 5rem );
}
.apt-detail-text .wp-block-heading {
	font-size: clamp( 1.9rem, 3.5vw, 2.7rem );
	margin: 1rem 0 1.2rem;
}
.apt-detail-text > .wp-block-list {
	margin: 0 0 1.6rem;
	padding-left: 1.2rem;
}
.apt-detail-text ul li {
	margin-bottom: 0.4rem;
}
.apt-detail-media .framed img {
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	display: block;
}
.apt-detail .wp-block-gallery {
	gap: 1.25rem;
	margin-top: 2.5rem;
}
.apt-detail-text {
	margin-bottom: 0;
}
.intro-cols {
	align-items: center;
	gap: clamp( 2rem, 6vw, 5rem );
}
.intro-text .wp-block-heading {
	font-size: clamp( 1.9rem, 3.5vw, 2.7rem );
	margin: 1rem 0 1.2rem;
}
.intro-text p {
	max-width: 46ch;
}

/* === about page === */
.band.story-band.alt {
	background: var( --wp--preset--color--surface );
}
.story-inner {
	max-width: 820px;
	margin-inline: auto;
	text-align: center;
}
.big-quote {
	font-family: var( --wp--preset--font-family--cormorant-garamond );
	font-style: italic;
	font-size: clamp( 1.7rem, 3.5vw, 2.6rem );
	line-height: 1.3;
	margin: 0 0 1.4rem;
}
.band.story-band .quote-cap {
	color: var( --site-accent );
}
.fact-cols {
	gap: clamp( 1.5rem, 3vw, 2.5rem );
}
.fact-cols h3 {
	font-size: 1.5rem;
	margin: 0 0 0.8rem;
}
.fact-cols p {
	color: rgba( 27, 25, 23, 0.78 );
}

/* === gallery === */
.gallery-row {
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}
.gallery-row:last-child {
	margin-bottom: 0;
}
.gimg img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

/* === contact === */
.contact-cols {
	align-items: flex-start;
	gap: clamp( 2rem, 5vw, 4.5rem );
}
.contact-info .wp-block-heading {
	font-size: clamp( 1.9rem, 3.5vw, 2.6rem );
	margin: 1rem 0 1.2rem;
}
.contact-info p {
	margin: 0;
}
.contact-info .wp-block-separator {
	border-color: rgba( 27, 25, 23, 0.2 );
	margin: 2rem auto;
}
.contact-line {
	margin-bottom: 1.4rem;
}
.contact-line strong {
	display: block;
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var( --site-accent );
	margin-bottom: 0.3rem;
}
.contact-note {
	color: rgba( 27, 25, 23, 0.72 );
}
.wp-block-jetpack-contact-form {
	gap: 1.1rem;
}
.wp-block-jetpack-contact-form label {
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.wp-block-jetpack-contact-form input[type="text"],
.wp-block-jetpack-contact-form input[type="email"],
.wp-block-jetpack-contact-form input[type="tel"],
.wp-block-jetpack-contact-form input[type="date"],
.wp-block-jetpack-contact-form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba( 27, 25, 23, 0.3 );
	border-radius: 2px;
	background: #fff;
	padding: 0.85rem 1rem;
	font-family: var( --wp--preset--font-family--karla );
	font-size: 1rem;
	color: var( --site-ink );
}
.wp-block-jetpack-contact-form input:focus,
.wp-block-jetpack-contact-form textarea:focus {
	outline: none;
	border-color: var( --site-accent );
}
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form input[type="number"] {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba( 27, 25, 23, 0.3 );
	border-radius: 2px;
	background: #fff;
	padding: 0.85rem 1rem;
	font-family: var( --wp--preset--font-family--karla );
	font-size: 1rem;
	color: var( --site-ink );
}
.wp-block-jetpack-contact-form select:focus,
.wp-block-jetpack-contact-form input[type="number"]:focus {
	outline: none;
	border-color: var( --site-accent );
}
.contact-form__select-element-wrapper select {
	border: 1px solid rgba( 27, 25, 23, 0.3 ) !important;
	border-radius: 2px;
}

/* === apartment cards (v2) === */
.apt-guests {
	color: rgba( 246, 241, 231, 0.82 );
	margin: 0 0 0.5rem;
}
.apt-note {
	color: rgba( 246, 241, 231, 0.6 );
	font-size: 0.85rem;
	margin: 0.2rem 0 0;
}

/* === apartment detail pages (v2) === */
.fact-list .wp-block-heading {
	font-size: 1.5rem;
	margin: 0 0 0.4rem;
}
.fact-list .wp-block-heading:not( :first-child ) {
	margin-top: 1.5rem;
}
.fact-list p {
	margin: 0;
	color: rgba( 27, 25, 23, 0.8 );
}
.price-table {
	border-collapse: collapse;
	width: 100%;
	margin: 0;
}
.price-table table {
	border-collapse: collapse;
}
.price-table th,
.price-table td {
	border: 0;
	border-bottom: 1px solid rgba( 27, 25, 23, 0.15 );
	padding: 0.7rem 0;
	text-align: left;
	font-family: var( --wp--preset--font-family--karla );
	font-size: 1rem;
}
.price-table thead th {
	font-size: var( --wp--preset--font-size--label );
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --site-accent );
	border-bottom: 1px solid rgba( 27, 25, 23, 0.3 );
}
.price-table td:last-child,
.price-table th:last-child {
	text-align: right;
}
.apartment-note,
.price-table + .note {
	color: rgba( 27, 25, 23, 0.6 );
	font-size: 0.9rem;
	margin-top: 1rem;
}

/* === the stay overview (v2) === */
.stay-list {
	display: block;
}
.stay-row {
	gap: 1rem 2.5rem;
	padding: clamp( 1.6rem, 3vw, 2.2rem ) 0;
	border-bottom: 1px solid rgba( 246, 241, 231, 0.18 );
}
.stay-row:first-child {
	padding-top: 0;
}
.stay-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.stay-left {
	flex: 1 1 320px;
}
.stay-left .wp-block-heading {
	color: var( --site-bg );
	font-size: 1.9rem;
	margin: 0.3rem 0 0.5rem;
}
.stay-left p {
	color: rgba( 246, 241, 231, 0.8 );
	margin: 0;
}
.stay-right {
	flex: 0 1 auto;
	text-align: right;
}
.stay-right .apt-meta {
	margin: 0 0 0.2rem !important;
}
.stay-right .apt-note {
	margin-bottom: 0.4rem;
}
.stay-right .apt-link {
	margin-top: 0.4rem;	
text-align: right;
}
@media ( max-width: 782px ) {
	.stay-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.stay-right,
	.stay-right .apt-link {
		text-align: left;
	}
}

/* Floating WhatsApp contact button (global) */
.wa-float {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9999;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: #25D366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba( 0, 0, 0, 0.22 );
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float:hover {
	transform: translateY( -2px );
	box-shadow: 0 10px 24px rgba( 0, 0, 0, 0.28 );
}
.wa-float svg {
	display: block;
}

/* WhatsApp enquiry button on the Contact page */
.wp-block-button.wa-btn .wp-block-button__link {
	background-color: #25D366;
	border-color: #25D366;
	color: #fff;
}
.wp-block-button.wa-btn .wp-block-button__link:hover {
	background-color: #1ebe5b;
	border-color: #1ebe5b;
	color: #fff;
}

@media ( prefers-reduced-motion: reduce ) {
	.wa-float {
		transition: none;
	}
	.wa-float:hover {
		transform: none;
	}
}
