/*
 * Lake Residence — static site additions.
 *
 * main.css is the original design compiled from its SCSS without changes.
 * This file only (a) replaces what the CMS and GSAP used to do at runtime and
 * (b) styles the parts that are new in the static version.
 * Palette: beige #B39F86, beige-dark #958B83, dark green #294A2F, gray #D9D9D9.
 * Darker text-only shades for contrast on white: #5C4933 (beige), #675E56 (beige-dark).
 */

/* Utilities
   ========================================================================== */

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

.skip-link {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	padding: 1.2rem 2.4rem;
	border-radius: 5rem;
	background-color: #fff;
	color: #294A2F;
	font-weight: bold;
	transform: translateY(-200%);
	transition: transform 200ms ease-in-out;
}

.skip-link:focus {
	transform: none;
}

/* The design is light-only and never set a page background; pin both so
   browsers with a dark default canvas don't paint the gaps black.
   Direct #hash loads land below the fixed header (clicks are animated by main.js). */
html {
	color-scheme: light;
	background-color: #fff;
	scroll-padding-top: 120px;
}

/* The page wrapper hides the decorative overflow. "clip" (unlike "hidden") is
   not a scroll container, so focusing something near the edge can never
   scroll the whole page sideways. */
.g-wrap--main {
	overflow: hidden;
	overflow: clip;
}

/* Sections that receive focus after an in-page jump. */
[tabindex="-1"]:focus {
	outline: none;
}

/* Keyboard focus: main.css removes the outline from .btn; this two-tone ring
   stays visible on white, beige and dark green alike. */
:is(a, button, .btn, .header__nav-trigger, [role="button"]):focus-visible {
	outline: 3px solid #294A2F;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

/* slick's .slick-list clips its overflow; give the ring 6px of room around
   the gallery and team links (slick sizes slides from the content width). */
.gallery .slick-list {
	padding: 6px;
	margin: -6px;
}

.team .slick-list {
	padding: 6px 0 6px 6px;
	margin: -6px -2rem -6px -6px; /* keeps main.css's -2rem right margin */
}

/* The arrow badge stays a 55px circle when a button label wraps. */
.btn__icon-box {
	flex-shrink: 0;
}

/* Phone, e-mail and other text links: a taller invisible hit area for touch,
   without moving the text or the hover underline. */
.contacts__link,
.team__info .g-link {
	position: relative;
}

.contacts__link::before,
.team__info .g-link::before {
	content: "";
	position: absolute;
	top: -1rem;
	right: 0;
	bottom: -1rem;
	left: 0;
}

/* Images that carry width/height attributes keep their natural ratio,
   exactly like the original markup without the attributes. */
.box__img-box > img {
	height: auto;
}

.hero__img-box picture,
.sec-img__img-box picture {
	display: contents;
}


/* Intro — the original GSAP timeline (main.js) as CSS
   ========================================================================== */

/* End state first, so nothing depends on the animation running. */
.header__container {
	opacity: 1;
}

.hero__img {
	transform: none;
}

.hero__content,
.hero__list {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: no-preference) {
	/* GSAP's default ease (power1.out) is easeOutQuad. */
	.hero__img {
		animation: lake-zoom 1s cubic-bezier(.25, .46, .45, .94) both;
	}

	.header__container {
		animation: lake-fade 1s cubic-bezier(.25, .46, .45, .94) 1s both;
	}

	.hero__content {
		animation: lake-rise .5s cubic-bezier(.25, .46, .45, .94) 1.5s both;
	}

	.hero__list {
		animation: lake-slide .5s cubic-bezier(.25, .46, .45, .94) 2s both;
	}
}

@keyframes lake-zoom {
	from { transform: scale(1.5); }
	to { transform: none; }
}

@keyframes lake-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes lake-rise {
	from { opacity: 0; transform: translateY(10rem); }
	to { opacity: 1; transform: none; }
}

@keyframes lake-slide {
	from { opacity: 0; transform: translateX(25rem); }
	to { opacity: 1; transform: none; }
}


/* Header
   ========================================================================== */

/* Every button on the static page leads to another site. */
.btn__icon {
	transform: rotate(-45deg);
}

/* Original hideCtaBtn(): the header and floating CTA step aside over the footer. */
.header.-in-footer {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}


/* Hero
   ========================================================================== */

/* "Завършен дом" is 11px wider than the old "Дом като"; keep the two-line rhythm. */
.hero__row .g-max-570 {
	max-width: 60rem;
}

/* About: between 1025 and 1280px the four 17rem circles are wider than their
   half-width column and the last one ran off the screen (also in production).
   Size them to fit the column there, keeping the 1vw overlap. */
@media (min-width: 1025px) and (max-width: 1280px) {
	.circles__item {
		min-width: 0;
		width: calc((100% + 3vw) / 4);
	}

	.circles__sub-title {
		font-size: 1.4rem;
	}
}

/* Beige on white was 2.6:1; a darker shade of the same hue reads properly. */
.hero__bullet--price {
	color: #5c4933;
}


/* Architectural elements
   ========================================================================== */

/* Only one category is left, so the tab is a plain label. */
.tabs__item--label .tabs__link {
	cursor: default;
}

.tabs__item--label .tabs__link:hover {
	color: inherit;
}

/* Building image: the accent layers appear one after another, then the photo
   (the original GSAP ScrollTrigger timeline). main.js adds -reveal only when
   the block starts below the fold, and -revealed when it scrolls into view. */
.sec-img--animation.-reveal .sec-img__accent {
	opacity: 0;
	transform: translate(-50%, -50%) scale(1.5);
	transition:
		opacity .8s cubic-bezier(.25, .46, .45, .94),
		transform .8s cubic-bezier(.25, .46, .45, .94);
}

.sec-img--animation.-reveal .sec-img__accent--2 {
	transition-delay: .8s;
}

.sec-img--animation.-reveal .sec-img__accent--3 {
	transition-delay: 1.6s;
}

.sec-img--animation.-reveal .sec-img__accent--4 {
	transition-delay: 2.4s;
}

.sec-img--animation.-reveal .sec-img__img-box {
	opacity: 0;
	transition: opacity .8s cubic-bezier(.25, .46, .45, .94) 3.2s;
}

.sec-img--animation.-revealed .sec-img__accent {
	opacity: 1;
	transform: translate(-50%, -50%);
}

.sec-img--animation.-revealed .sec-img__img-box {
	opacity: 1;
}

/* The 30rem minimum height stretched the render and its cut-outs on phones
   (as in production); at their natural ratio all five layers still line up. */
.sec-img--animation,
.sec-img--animation .sec-img__img {
	min-height: 0;
}


/* Sliders before slick initialises (and without JavaScript)
   ========================================================================== */

.slider__list:not(.slick-initialized),
.box-slider--location:not(.slick-initialized),
.team__list:not(.slick-initialized) {
	display: flex;
	justify-content: flex-start;
	gap: 2rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}

.slider__list:not(.slick-initialized) > *,
.box-slider--location:not(.slick-initialized) > *,
.team__list:not(.slick-initialized) > * {
	flex: 0 0 100%;
	width: auto;
	margin-right: 0;
	scroll-snap-align: start;
}

@media (min-width: 641px) {
	.slider__list:not(.slick-initialized) > *,
	.box-slider--location:not(.slick-initialized) > *,
	.team__list:not(.slick-initialized) > * {
		flex-basis: calc((100% - 2rem) / 2);
	}
}

@media (min-width: 1025px) {
	.slider__list:not(.slick-initialized) > *,
	.box-slider--location:not(.slick-initialized) > *,
	.team__list:not(.slick-initialized) > * {
		flex-basis: calc((100% - 4rem) / 3);
	}
}

@media (min-width: 1281px) {
	.slider__list:not(.slick-initialized) > *,
	.box-slider--location:not(.slick-initialized) > *,
	.team__list:not(.slick-initialized) > * {
		flex-basis: calc((100% - 6rem) / 4);
	}
}

@media (min-width: 1281px) {
	.box-slider--location:not(.slick-initialized),
	.team__list:not(.slick-initialized) {
		justify-content: center;
	}

	.box-slider--location:not(.slick-initialized) > *,
	.team__list:not(.slick-initialized) > * {
		flex: 0 1 20vw;
	}
}

/* main.css's 500ms "transition: all" on these slides served the removed
   interior hover; here it animated slick's widths on init and resize. */
.box-slider--location .box-slider__slide {
	transition: none;
}

.gallery__slider:not(.slick-initialized) > .gallery__slide:not(:first-child) {
	display: none !important;
}


/* Gallery
   ========================================================================== */

/* The small picture previews the next slide and advances to it. */
.gallery__small-img {
	cursor: pointer;
}


/* Location card (in place of the Google Map, same box and overlap)
   ========================================================================== */

/* The map box is 35vw tall and overhangs the team section by 15vw. The
   overhang outgrew the team's top padding at 1024px and from ~1800px up (the
   "/Екип" heading ended up under the box, in production too): cap the box on
   very wide screens and let the padding always clear the overhang. */
.g-map {
	height: min(35vw, 60rem);
	margin-bottom: max(-15vw, -24rem);
}

.location + .team {
	padding-top: max(6rem, calc(15vw - 1rem));
}

@media (min-width: 1025px) {
	.location + .team {
		padding-top: max(10rem, calc(15vw - 4rem));
	}
}

@media (min-width: 1281px) {
	.location + .team {
		padding-top: max(12rem, calc(min(15vw, 24rem) - 7rem));
	}
}

.map-card {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	min-height: 40rem;
	padding: 5rem 6vw;
	border-radius: 2.5rem;
	overflow: hidden;
	background: linear-gradient(180deg, #FFFFFF 0%, #E8E6DE 100%);
	color: #294A2F;
}

/* The site's topographic artwork, drawn in beige like a map. */
.map-card::before {
	content: "";
	position: absolute;
	top: -15%;
	right: -10%;
	bottom: -15%;
	left: 35%;
	background-color: #B39F86;
	-webkit-mask: url("../img/ui/topographic.svg") center / contain no-repeat;
	mask: url("../img/ui/topographic.svg") center / contain no-repeat;
	opacity: .5;
	pointer-events: none;
}

.map-card__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2rem;
	max-width: 52rem;
}

.map-card__content .g-title--xs {
	color: #675E56;
}

.map-card__title {
	font-weight: bold;
}

.map-card__address {
	font-size: 1.8rem;
}

.map-card__content .btn,
.promo__content .btn {
	max-width: 100%;
	white-space: normal;
}

.map-card__content .btn {
	margin-top: 1rem;
}

.map-card__pin {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 66%;
	width: clamp(7.5rem, 7vw, 12rem);
	height: auto;
	transform: translate(-50%, -85%);
	filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, .2));
}

@media (max-width: 640px) {
	.map-card {
		align-items: flex-end;
		padding: 3rem 2rem;
	}

	.map-card::before {
		top: -20%;
		right: -40%;
		left: 0;
	}

	.map-card__pin {
		top: 3rem;
		left: auto;
		right: 2.5rem;
		transform: none;
	}
}


/* Footer: Uptown promo in the column the contact form used to fill
   ========================================================================== */

.promo {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 2.5rem;
	background-color: #fff;
	color: #294A2F;
}

.promo__img-box {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.promo__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms ease-in-out;
}

.promo:hover .promo__img {
	transform: scale(1.03);
}

.promo__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	padding: 3rem 3rem 3.5rem;
}

.promo__content .g-title--xs {
	color: #675E56;
}

.promo__title {
	font-weight: bold;
}

.promo__content .btn {
	margin-top: 1rem;
}

@media (min-width: 1281px) {
	.promo__img-box {
		aspect-ratio: 2 / 1;
	}
}

/* Stacked legal links: 24px+ touch targets without changing the look. */
.footer__bottom-left .footer__bottom-link {
	display: inline-block;
	padding: .35rem 0;
}

/* Keep the bottom row clear of the centred logo box (18.5vw, min 15rem). */
.footer__bottom-left,
.footer__copy {
	max-width: calc(50% - max(7.5rem, 9.25vw) - 2rem);
}

@media (max-width: 640px) {
	.footer__bottom-left,
	.footer__copy {
		max-width: none;
	}
}


/* Decorative accents pause while off-screen (main.js)
   ========================================================================== */

.accent.-paused .scale-animation,
.accent.-paused .line-animation {
	animation-play-state: paused;
}


/* Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.scale-animation,
	.line-animation,
	.sec-img__accent {
		animation: none;
	}

	.promo__img,
	.header {
		transition: none;
	}
}
