/* ==========================================================================
   Bungalows & Duplex: Hero
   ========================================================================== */

.ajt-bd-hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	color: #FAF8F5;
}

.ajt-bd-hero-media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ajt-highlight {
	color: #E8935F !important;
}

.ajt-bd-hero.is-visible .ajt-word {
	animation: ajtWordIn 0.6s ease forwards;
}

.ajt-bd-hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.7s ease;
}

.ajt-bd-hero-img.is-active {
	opacity: 1;
	visibility: visible;
}

.ajt-bd-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg,
		rgba(28,27,25,0.62) 0%,
		rgba(28,27,25,0.50) 30%,
		rgba(28,27,25,0.68) 60%,
		rgba(28,27,25,0.88) 100%
	);
}

.ajt-bd-hero-eyebrow,
.ajt-bd-hero-title,
.ajt-bd-hero-lead,
.ajt-bd-hero-tags li,
.ajt-bd-hero-tab {
	text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.ajt-bd-hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	padding: clamp(100px, 16vw, 160px) clamp(20px, 5vw, 32px) clamp(48px, 8vw, 80px);
	text-align: center;
}

.ajt-bd-hero-eyebrow {
	color: #E3DCD1;
}

.ajt-bd-hero-title {
	font-family: 'Fraunces', serif;
	font-size: clamp(2rem, 6vw, 3.8rem);
	line-height: 1.15;
	margin: 10px 0 clamp(28px, 5vw, 40px);
}

/* Toggle */
.ajt-bd-hero-toggle {
	position: relative;
	display: inline-flex;
	background: rgba(250,248,245,0.14);
	border: 1px solid rgba(250,248,245,0.3);
	border-radius: 999px;
	padding: 4px;
	margin-bottom: clamp(24px, 4vw, 32px);
}

.ajt-bd-hero-tab {
	position: relative;
	z-index: 1;
	border: none;
	background: none;
	color: #FAF8F5;
	font-family: 'Inter', sans-serif;
	font-size: 0.92rem;
	font-weight: 500;
	padding: 10px 26px;
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.3s ease;
}

.ajt-bd-hero-tab[aria-selected="true"] {
	color: #1C1B19;
}

.ajt-bd-hero-toggle-thumb {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 4px;
	width: calc(50% - 4px);
	background: #FAF8F5;
	border-radius: 999px;
	transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.ajt-bd-hero[data-active="duplex"] .ajt-bd-hero-toggle-thumb {
	transform: translateX(100%);
}

/* Info panel, crossfade only, no layout shift */
.ajt-bd-hero-panel {
	position: relative;
	min-height: 190px;
}

.ajt-bd-hero-info {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.ajt-bd-hero-info.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ajt-bd-hero-lead {
	max-width: 48ch;
	margin: 0 auto 18px;
	color: #F1EEE9;
	font-size: clamp(0.98rem, 1.8vw, 1.08rem);
}

.ajt-bd-gallery-card-broken {
	background: var(--color-taupe);
}
.ajt-bd-gallery-card-broken img {
	display: none;
}

.ajt-bd-hero-tags {
	list-style: none;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0 0 28px;
}

.ajt-bd-hero-tags li {
	font-size: 0.82rem;
	padding: 6px 14px;
	border: 1px solid rgba(250,248,245,0.35);
	border-radius: 999px;
	color: #F1EEE9;
}

.ajt-bd-hero-cta {
	display: inline-flex;
}

@media (max-width: 480px) {

	.ajt-bd-hero {
		min-height: 78vh !important;
	}

	.ajt-bd-hero-tags {
		display: none !important;
	}

	.ajt-bd-hero-lead {
		margin: 0 auto 50px !important;
	}

	.ajt-bd-hero-toggle {
		width: 100%;
		max-width: 320px;
	}
	.ajt-bd-hero-tab {
		flex: 1;
	}
}

/* ==========================================================================
   Bungalows & Duplex: Spec Comparison
   ========================================================================== */

.ajt-bd-specs {
	padding: clamp(64px, 9vw, 120px) 0;
	background: var(--color-bg);
}

.ajt-bd-specs-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 32px);
}

.ajt-bd-specs-intro {
	margin-bottom: clamp(36px, 5vw, 56px);
}

.ajt-bd-specs-intro .ajt-section-lead {
	max-width: 52ch;
	color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

.ajt-bd-specs-table-wrap {
	overflow-x: hidden;
	border: 1px solid var(--color-taupe);
	border-radius: 6px;
}

.ajt-bd-specs-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 0.95rem;
	box-sizing: border-box;
}

.ajt-bd-specs-table th,
.ajt-bd-specs-table td {
	box-sizing: border-box;
}

.ajt-bd-specs-table .ajt-bd-specs-label-col {
	width: 30%;
}

.ajt-bd-specs-table th:not(.ajt-bd-specs-label-col),
.ajt-bd-specs-table td {
	width: 35%;
}

.ajt-bd-specs-table thead th {
	font-family: 'Fraunces', serif;
	font-size: 1.05rem;
	font-weight: 600;
	text-align: left;
	padding: 16px 18px;
	background: var(--color-taupe);
	color: var(--color-text);
}

.ajt-bd-specs-label-col {
	position: sticky;
	left: 0;
	background: var(--color-bg);
	font-weight: 600;
	white-space: normal;
	z-index: 1;
}

thead .ajt-bd-specs-label-col {
	background: var(--color-taupe);
	z-index: 2;
}

.ajt-bd-specs-row {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.ajt-bd-specs-row.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ajt-bd-specs-row th,
.ajt-bd-specs-row td {
	padding: 16px 18px;
	border-top: 1px solid var(--color-taupe);
	color: color-mix(in srgb, var(--color-text) 85%, transparent);
	vertical-align: top;
}

.ajt-btn-cta:hover {
	color: #ffffff !important;
}

@media (hover: hover) and (pointer: fine) {
	.ajt-bd-specs-row:hover th,
	.ajt-bd-specs-row:hover td {
		background: color-mix(in srgb, var(--color-accent) 6%, var(--color-bg));
	}
}

.ajt-bd-specs-row:active th,
.ajt-bd-specs-row:active td {
	background: color-mix(in srgb, var(--color-accent) 6%, var(--color-bg));
}

.ajt-bd-specs-ctas {
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: clamp(40px, 6vw, 56px);
	flex-wrap: wrap;
}

.ajt-bd-specs-cta-alt {
	background: transparent;
	color: var(--color-text);
	border: 1px solid var(--color-text);
}

@media (max-width: 699px) {
	.ajt-bd-specs-table-wrap {
		border: none;
		overflow-x: visible;
	}

	.ajt-bd-specs-table,
	.ajt-bd-specs-table thead,
	.ajt-bd-specs-table tbody,
	.ajt-bd-specs-table tr,
	.ajt-bd-specs-table th,
	.ajt-bd-specs-table td {
		display: block;
		width: 100%;
		min-width: 0;
	}

	.ajt-bd-specs-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.ajt-bd-specs-row {
		margin-bottom: 16px;
		border: 1px solid var(--color-taupe);
		border-radius: 6px;
		overflow: hidden;
	}

	.ajt-bd-specs-row .ajt-bd-specs-label-col {
		position: static;
		background: var(--color-taupe);
		font-family: 'Fraunces', serif;
		font-size: 1rem;
		padding: 12px 16px;
	}

	.ajt-bd-specs-row td {
		padding: 12px 16px;
		border-top: 1px solid var(--color-taupe);
	}

	.ajt-bd-specs-row td::before {
		content: attr(data-label) ": ";
		font-weight: 600;
		color: var(--color-accent);
	}

	.ajt-bd-specs-ctas {
		flex-direction: column;
	}

	.ajt-bd-specs-cta,
	.ajt-bd-specs-cta-alt {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		justify-content: center;
		text-align: center;
		font-size: 0.92rem;
		padding: 14px 20px;
	}
}

/* Mobile-only Bungalow/Duplex spec toggle */
.ajt-bd-specs-mobile-toggle {
	display: none;
}

@media (max-width: 699px) {
	.ajt-bd-specs-mobile-toggle {
		position: relative;
		display: inline-flex;
		width: 100%;
		max-width: 320px;
		background: var(--color-bg);
		border: 1px solid var(--color-taupe);
		border-radius: 999px;
		padding: 4px;
		margin-bottom: 20px;
		box-sizing: border-box;
	}

	.ajt-bd-specs-mtab {
		position: relative;
		z-index: 1;
		flex: 1;
		border: none;
		background: none;
		color: var(--color-text);
		font-family: 'Inter', sans-serif;
		font-size: 0.88rem;
		font-weight: 500;
		padding: 8px 0;
		border-radius: 999px;
		cursor: pointer;
		transition: color 0.3s ease;
	}

	.ajt-bd-specs-mtab[aria-selected="true"] {
		color: #FAF8F5;
	}

	.ajt-bd-specs-mtab-thumb {
		position: absolute;
		top: 4px;
		bottom: 4px;
		left: 4px;
		width: calc(50% - 4px);
		background: var(--color-accent);
		border-radius: 999px;
		transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
	}

	/* Fixed: thumb is a sibling of the buttons, not a child of table-wrap.
	   This selector matches the button's own state directly. */
	.ajt-bd-specs-mtab[data-view="duplex"][aria-selected="true"] ~ .ajt-bd-specs-mtab-thumb {
		transform: translateX(100%);
	}

	.ajt-bd-specs-table-wrap[data-mobile-view="bungalow"] td[data-label="Duplex"] {
		display: none;
	}

	.ajt-bd-specs-table-wrap[data-mobile-view="duplex"] td[data-label="Bungalow"] {
		display: none;
	}

	.ajt-bd-specs-table-wrap td::before {
		display: none;
	}
}

/* ==========================================================================
   Bungalows & Duplex: Design & Lifestyle Gallery
   ========================================================================== */

.ajt-bd-gallery {
	padding: clamp(64px, 9vw, 120px) 0;
	background: linear-gradient(180deg, #EFEAE3 0%, #E3DCD1 55%, #D8CFC3 100%);
	border-top: 1px solid var(--color-taupe);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.ajt-bd-gallery.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ajt-bd-gallery-intro {
	max-width: 640px;
	margin: 0 auto clamp(36px, 5vw, 52px);
	padding: 0 clamp(20px, 5vw, 32px);
	text-align: center;
}

.ajt-bd-gallery-intro .ajt-section-lead {
	color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

.ajt-bd-gallery-strip {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 12px;
	scrollbar-width: none;
}

.ajt-bd-gallery-strip::-webkit-scrollbar {
	display: none;
}

.ajt-bd-gallery-spacer {
	flex: 0 0 clamp(16px, 12vw, 15vw);
	scroll-snap-align: none;
}

.ajt-bd-gallery-card {
	position: relative;
	flex: 0 0 78%;
	max-width: 420px;
	aspect-ratio: 3 / 4;
	scroll-snap-align: start;
	border-radius: 8px;
	overflow: hidden;
	margin: 0;
}

@media (max-width: 699px) {
	.ajt-bd-gallery-card {
		flex-basis: 60%;
		max-width: 250px;
	}
}

@media (min-width: 700px) {
	.ajt-bd-gallery-card {
		flex-basis: 34%;
	}
}

.ajt-bd-gallery-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: clamp(24px, 4vw, 32px);
}

.ajt-bd-gallery-arrow {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--color-taupe);
	background: var(--color-bg);
	color: var(--color-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
	.ajt-bd-gallery-arrow:hover {
		background: var(--color-accent);
		border-color: var(--color-accent);
		color: #FAF8F5;
	}
}

.ajt-bd-gallery-dots {
	display: flex;
	gap: 8px;
}

.ajt-bd-gallery-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: 1.5px solid var(--color-text);
	background: transparent;
	opacity: 0.35;
	cursor: pointer;
	padding: 0;
	transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.ajt-bd-gallery-dot.is-active {
	background: var(--color-accent);
	border-color: var(--color-accent);
	opacity: 1;
	transform: scale(1.3);
}

.ajt-bd-gallery-close {
	text-align: center;
	max-width: 480px;
	margin: clamp(40px, 6vw, 56px) auto 0;
	padding: 0 clamp(20px, 5vw, 32px);
}

.ajt-bd-gallery-close-text {
	font-family: 'Fraunces', serif;
	font-size: clamp(1.05rem, 2.4vw, 1.3rem);
	margin-bottom: 20px;
	color: var(--color-text);
}

@media (max-width: 480px) {
	.ajt-bd-gallery-arrow {
		display: none;
	}
}

/* ==========================================================================
   Bungalows & Duplex: Closing CTA (final section before footer)
   ========================================================================== */

.ajt-bd-close {
	background: var(--color-bg);
	border-top: 1px solid var(--color-taupe);
	padding: clamp(72px, 11vw, 140px) clamp(20px, 5vw, 32px);
	text-align: center;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.ajt-bd-close.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ajt-bd-close.is-visible .ajt-word {
	animation: ajtWordIn 0.6s ease forwards;
}

.ajt-bd-close.is-visible .ajt-word:nth-child(1) { animation-delay: 0.05s; }
.ajt-bd-close.is-visible .ajt-word:nth-child(2) { animation-delay: 0.12s; }
.ajt-bd-close.is-visible .ajt-word:nth-child(3) { animation-delay: 0.19s; }
.ajt-bd-close.is-visible .ajt-word:nth-child(4) { animation-delay: 0.26s; }
.ajt-bd-close.is-visible .ajt-word:nth-child(5) { animation-delay: 0.33s; }
.ajt-bd-close.is-visible .ajt-word:nth-child(6) { animation-delay: 0.40s; }
.ajt-bd-close.is-visible .ajt-word:nth-child(7) { animation-delay: 0.47s; }

.ajt-bd-close-inner {
	max-width: 680px;
	margin: 0 auto;
}

.ajt-bd-close-title {
	font-size: clamp(1.8rem, 4.5vw, 2.9rem);
	line-height: 1.25;
	margin-bottom: 20px;
}

.ajt-bd-close-lead {
	max-width: 46ch;
	margin: 0 auto clamp(32px, 5vw, 44px);
	color: color-mix(in srgb, var(--color-text) 72%, transparent);
	font-size: clamp(0.98rem, 1.6vw, 1.08rem);
}

.ajt-bd-close-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}

.ajt-bd-close-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 18px 34px;
	font-size: 1rem;
}

.ajt-bd-close-arrow {
	width: 16px;
	height: 12px;
	position: relative;
	flex-shrink: 0;
}

.ajt-bd-close-arrow::before,
.ajt-bd-close-arrow::after {
	content: '';
	position: absolute;
	background: currentColor;
}

.ajt-bd-close-arrow::before {
	width: 100%;
	height: 2px;
	top: 50%;
	transform: translateY(-50%);
}

.ajt-bd-close-arrow::after {
	width: 8px;
	height: 8px;
	right: 0;
	top: 50%;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	background: none;
	transform: translateY(-50%) rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
	.ajt-bd-close-btn:hover .ajt-bd-close-arrow,
	.ajt-bd-close-btn:focus-visible .ajt-bd-close-arrow {
		animation: ajtLpArrowNudge 0.5s ease forwards;
	}
}

.ajt-bd-close-call {
	display: inline-block;
	position: relative;
	color: var(--color-text);
	text-decoration: none;
	font-size: 0.95rem;
	padding-bottom: 2px;
}

.ajt-bd-close-call::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: var(--color-text);
	opacity: 0.35;
	transform: scaleX(1);
	transform-origin: left;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
	.ajt-bd-close-call:hover::after,
	.ajt-bd-close-call:focus-visible::after {
		opacity: 1;
		transform: scaleX(1.02);
	}
}

.ajt-bd-close-reassure {
	margin-top: 22px;
	font-size: 0.82rem;
	color: color-mix(in srgb, var(--color-text) 50%, transparent);
}

@media (max-width: 600px) {
	.ajt-bd-close-btn {
		width: 100%;
		max-width: 340px;
		justify-content: center;
		padding: 14px 20px;
		font-size: 0.95rem;
		box-sizing: border-box;
	}
}