/**
 * Sifnos Mi Casa
 *
 * Values here mirror the previous Astra + Elementor build 1:1:
 *  - container gutter 10px, boxed max-width 1140px, widget gap 20px
 *  - breakpoints: mobile <=767px, mobile-extra <=880px, tablet <=1024px
 */

/* -------------------------------------------------------------------------
   Tokens
   ---------------------------------------------------------------------- */

:root {
	--sm-primary: #272928;
	--sm-secondary: #54595f;
	--sm-text: #7a7a7a;
	--sm-accent: #61ce70;
	--sm-page-bg: #eeeeee;

	--sm-display: "Inconsolata", monospace;
	--sm-body: "Hanken Grotesk", sans-serif;
	--sm-meta: "Poppins", sans-serif;

	--sm-container: 1140px;
	--sm-gutter: 10px;
	--sm-gap: 20px;

	/* Astra's inherited defaults, which the old build rendered with. */
	--sm-lh-heading: 1.3;
	--sm-lh-text: 1.65;
}

/* -------------------------------------------------------------------------
   Base
   ---------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--sm-page-bg);
	color: var(--sm-primary);
	font-family: var(--sm-body);
	font-size: 16px;
	font-weight: 400;
	line-height: var(--sm-lh-text);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul {
	margin: 0;
	padding: 0;
}

ul {
	list-style: none;
}

button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

/* Headings inherit 1.3 unless the design pins an explicit line-height. */
.sm-header__title,
.sm-hero__title,
.sm-stay__title,
.sm-villas__title,
.sm-villas-mobile__title,
.sm-amenities__title,
.sm-amenities__label,
.sm-contact__title,
.sm-footer__title,
.sm-footer__credit,
.sm-entry__title {
	line-height: var(--sm-lh-heading);
}

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

.sm-skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 20px;
	clip: auto;
	clip-path: none;
	background: #fff;
	color: var(--sm-primary);
	font-size: 16px;
}

/* -------------------------------------------------------------------------
   Header — overlays the top of the hero
   ---------------------------------------------------------------------- */

/*
 * The wrapper collapses to 0 height (118px content + -121px margin), so the
 * hero still starts at y=0 and the title floats over it — same as before.
 */
.sm-header-wrap {
	position: relative;
	z-index: 10;
	display: flow-root; /* contains the negative margin instead of collapsing it out */
}

.sm-header {
	display: flex;
	justify-content: center;
	max-width: var(--sm-container);
	margin: 0 auto -121px;
	padding: 20px 0;
}

.sm-header__title {
	color: #fff;
	font-family: var(--sm-display);
	font-size: 60px;
	font-weight: 700;
	text-transform: uppercase;
}

.sm-header__title a {
	text-decoration: none;
}

/* -------------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */

.sm-hero {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: var(--sm-gap);
	min-height: 800px;
	padding: var(--sm-gutter);
	background-image: var(--sm-hero-bg);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.sm-hero__col {
	display: flex;
	flex: 0 0 49.937%;
	width: 49.937%;
	padding: var(--sm-gutter);
}

.sm-hero__col--text {
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
}

.sm-hero__col--badge {
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
}

.sm-hero__title {
	align-self: flex-end;
	color: #fff;
	font-family: var(--sm-display);
	font-size: 80px;
	font-weight: 600;
	line-height: 83px;
	text-transform: uppercase;
	-webkit-text-stroke: 1px currentColor;
}

/* Shrink-to-fit at the banner's intrinsic 730px, then 48% of that. */
.sm-hero__badge {
	width: 730px;
	max-width: 100%;
	text-align: right;
}

.sm-hero__badge img {
	display: inline-block;
	width: 48%;
}

/* -------------------------------------------------------------------------
   Stay with us
   ---------------------------------------------------------------------- */

.sm-stay {
	margin: 107px 0 186px;
	padding: var(--sm-gutter);
}

.sm-stay__inner {
	display: flex;
	flex-direction: row;
	gap: 0;
	max-width: 1032px;
	margin: 0 auto;
}

.sm-stay__col {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	width: 50%;
	gap: var(--sm-gap);
	padding: var(--sm-gutter);
}

.sm-stay__col--heading {
	align-items: flex-start;
	justify-content: center;
}

.sm-stay__title {
	font-family: var(--sm-display);
	font-size: 64px;
	font-weight: 600;
	line-height: 67px;
	text-transform: uppercase;
}

.sm-stay__text {
	color: var(--sm-primary);
	font-family: var(--sm-body);
	font-size: 20px;
	font-weight: 500;
	line-height: 28px;
	text-align: justify;
}

/* -------------------------------------------------------------------------
   Our Villas (slideshow) — desktop / tablet
   ---------------------------------------------------------------------- */

.sm-villas {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0 0 186px;
	padding: 0;
}

/*
 * The negative margins sit on the inner element, not on the flex item, so the
 * item's height clamps to 0 rather than going negative. Elementor did the same
 * thing via .elementor-widget-container; putting them on the item itself pulls
 * the slideshow 146px too high, over the section above.
 */
.sm-villas__title-box {
	align-self: flex-start;
}

.sm-villas__title {
	position: relative;
	z-index: 10;
	margin: 0 0 -250px -110px;
	transform: rotateZ(90deg) scaleX(-1) scaleY(-1);
	color: #fff;
	font-family: var(--sm-display);
	font-size: 80px;
	font-weight: 600;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Gallery: full-bleed stage with the thumbnail strip laid over its lower edge. */
.sm-gallery {
	--sm-stage-h: 801px;
	--sm-thumb-h: 100px;

	position: relative;
	margin-top: -103px;
}

.sm-gallery__stage {
	position: relative;
	height: var(--sm-stage-h);
	overflow: hidden;
}

.sm-gallery__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.sm-gallery__slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

.sm-gallery__nav {
	position: absolute;
	top: calc((var(--sm-stage-h) - var(--sm-thumb-h)) / 2);
	z-index: 3;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	color: #fff;
}

.sm-gallery__nav svg {
	width: 20px;
	height: 20px;
}

.sm-gallery__nav--prev {
	left: 10px;
}

.sm-gallery__nav--next {
	right: 10px;
}

.sm-gallery__thumbs {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	/* "safe" falls back to start-alignment once the strip overflows, so the
	   first thumbnail never becomes unreachable by scrolling. */
	justify-content: safe center;
	gap: 3px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	cursor: grab;
	-ms-overflow-style: none;
}

.sm-gallery__thumbs::-webkit-scrollbar {
	display: none;
}

.sm-gallery__thumbs.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.sm-gallery__thumb {
	flex: 0 0 auto;
	width: calc(var(--sm-thumb-h) * 4 / 3);
	opacity: 0.65;
	transition: opacity 0.25s ease;
}

.sm-gallery__thumb.is-active,
.sm-gallery__thumb:hover,
.sm-gallery__thumb:focus-visible {
	opacity: 1;
}

.sm-gallery__thumb-img {
	width: 100%;
	height: var(--sm-thumb-h);
	object-fit: cover;
	pointer-events: none; /* so drags register on the strip, not the image */
	-webkit-user-drag: none;
}

/* -------------------------------------------------------------------------
   Villas amenities
   ---------------------------------------------------------------------- */

.sm-amenities {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-around;
	gap: var(--sm-gap);
	margin: 0;
	padding: 40px 0 0;
}

.sm-amenities__heading {
	display: flex;
	flex: 0 0 30%;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	width: 30%;
	padding: var(--sm-gutter);
}

.sm-amenities__title {
	width: 67.075%;
	max-width: 67.075%;
	font-family: var(--sm-display);
	font-size: 64px;
	font-weight: 600;
	line-height: 67px;
	text-transform: uppercase;
}

.sm-amenities__cols {
	display: flex;
	flex: 0 0 50%;
	flex-direction: row;
	gap: 0;
	width: 50%;
	padding: var(--sm-gutter);
}

.sm-amenities__col {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--sm-gap);
	min-width: 0;
	padding: var(--sm-gutter);
}

.sm-amenities__item {
	display: flex;
	align-items: center;
	text-align: left;
}

.sm-amenities__icon {
	flex: 0 0 auto;
	margin-right: 11px;
	font-size: 32px;
	line-height: 1;
}

.sm-amenities__icon svg {
	width: 1em;
	height: 1em;
}

.sm-amenities__label {
	flex-grow: 1;
	margin-bottom: 4px;
	color: var(--sm-primary);
	font-family: var(--sm-body);
	font-size: 16px;
	font-weight: 400;
}

/* -------------------------------------------------------------------------
   Our Villas — mobile-only variant
   ---------------------------------------------------------------------- */

.sm-villas-mobile {
	display: none;
	flex-direction: column;
	gap: 0;
	margin: 0 0 30px;
	padding: var(--sm-gutter);
}

.sm-villas-mobile__title {
	position: relative;
	z-index: 10;
	margin: 0 0 -43px; /* clamped by .sm-villas-mobile__title-box, as above */
	color: #fff;
	font-family: var(--sm-display);
	font-size: 32px;
	font-weight: 600;
	text-transform: uppercase;
}

.sm-villas-mobile .sm-gallery {
	margin-top: 0;
}

/* -------------------------------------------------------------------------
   Contact
   ---------------------------------------------------------------------- */

.sm-contact {
	margin: 0 0 61px;
	padding: var(--sm-gutter);
}

.sm-contact__inner {
	display: flex;
	flex-direction: row;
	gap: 0;
	max-width: 1538px;
	margin: 0 auto;
}

.sm-contact__col {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	gap: var(--sm-gap);
	width: 50%;
	padding: var(--sm-gutter);
}

.sm-contact__col--form {
	align-items: flex-start;
	justify-content: center;
}

.sm-contact__title {
	font-family: var(--sm-display);
	font-size: 64px;
	font-weight: 600;
	line-height: 67px;
	text-transform: uppercase;
}

.sm-contact__image {
	width: 100%;
}

/* -------------------------------------------------------------------------
   Contact form
   ---------------------------------------------------------------------- */

/* 713px is the width the previous form resolved to; it stays fluid below that. */
.sm-form {
	width: 100%;
	max-width: 713px;
}

.sm-form__fields {
	margin: 0 -5px -30px;
}

.sm-form__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sm-form__group {
	margin-bottom: 30px;
	padding-left: 5px;
	padding-right: 5px;
}

.sm-form__field {
	width: 100%;
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-bottom: 1px solid var(--sm-primary);
	border-radius: 0;
	background-color: transparent;
	color: var(--sm-primary);
	font-family: var(--sm-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
}

.sm-form__field:focus {
	outline: 1px dotted var(--sm-primary);
	outline-offset: 4px;
}

.sm-form__field::placeholder {
	color: var(--sm-primary);
	opacity: 0.6;
}

.sm-form__field--textarea {
	display: block;
	height: auto;
	padding: 5px 14px;
	line-height: 1.4;
	resize: vertical;
}

.sm-form__button {
	width: 100%;
	padding: 16px;
	border: 1px solid var(--sm-primary);
	border-radius: 0;
	background-color: transparent;
	color: var(--sm-primary);
	font-family: var(--sm-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
}

.sm-form__message {
	margin-top: -18px;
	padding-left: 5px;
	font-family: var(--sm-body);
	font-size: 16px;
	font-weight: 400;
}

.sm-form__message--invalid,
.sm-form__message--error {
	color: #b3261e;
}

/* -------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */

.sm-footer {
	display: flex;
	flex-direction: column;
	gap: var(--sm-gap);
	padding: var(--sm-gutter);
	background-image: var(--sm-footer-bg);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.sm-footer__spacer {
	height: 50px;
}

.sm-footer__title {
	color: var(--sm-primary);
	font-family: var(--sm-display);
	font-size: 60px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
}

.sm-footer__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--sm-gap);
	width: 100%;
	max-width: 742px;
	margin: 20px auto;
	padding: var(--sm-gutter) 0;
}

.sm-footer__item {
	display: flex;
	flex-direction: row;
	gap: 0;
	justify-content: flex-start;
	padding: var(--sm-gutter);
}

/* Icon sits in its own line box, centred, at the SVG's intrinsic size. */
.sm-footer__icon {
	flex: 0 0 auto;
	width: 16.482%;
	font-size: 16px;
	line-height: var(--sm-lh-text);
	text-align: center;
}

.sm-footer__icon svg {
	display: inline-block;
	width: auto;
	max-width: 100%;
}

.sm-footer__text {
	flex: 0 0 auto;
	color: var(--sm-primary);
	font-family: var(--sm-body);
	font-size: 16px;
	font-weight: 400;
	line-height: var(--sm-lh-text);
}

.sm-footer__text--address {
	width: 86.484%;
}

.sm-footer__text--tel {
	width: 70.599%;
}

.sm-footer__text a {
	text-decoration: none;
}

.sm-footer__credit-wrap {
	padding: var(--sm-gutter);
}

.sm-footer__credit {
	margin-bottom: 30px;
	font-family: var(--sm-meta);
	font-size: 12px;
	font-weight: 400;
	text-align: center;
}

/* -------------------------------------------------------------------------
   Interior pages
   ---------------------------------------------------------------------- */

.sm-page {
	padding: 160px var(--sm-gutter) 120px;
}

.sm-page__inner {
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: var(--sm-gutter);
}

.sm-entry + .sm-entry {
	margin-top: 60px;
}

.sm-entry__title {
	margin-bottom: 24px;
	font-family: var(--sm-display);
	font-size: 64px;
	font-weight: 600;
	line-height: 67px;
	text-transform: uppercase;
}

.sm-entry__content {
	font-family: var(--sm-body);
	font-size: 20px;
	font-weight: 500;
	line-height: 28px;
}

.sm-entry__content > * + * {
	margin-top: 20px;
}

.sm-pagination {
	margin-top: 60px;
	font-family: var(--sm-body);
	font-size: 16px;
}

/* -------------------------------------------------------------------------
   Tablet (<=1024px)
   ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
	:root {
		--sm-container: 1024px;
	}

	.sm-hero {
		min-height: 666px;
	}

	.sm-gallery {
		--sm-stage-h: 500px;
		--sm-thumb-h: 84px;
	}

	.sm-amenities__heading {
		flex-basis: 308.594px;
		width: 308.594px;
	}

	.sm-contact__col--form {
		flex-basis: 406.5px;
		width: 406.5px;
	}

	.sm-contact__image {
		height: 500px;
		object-fit: cover;
	}
}

/* -------------------------------------------------------------------------
   Mobile-extra (<=880px): the hero badge column drops out
   ---------------------------------------------------------------------- */

@media (max-width: 880px) {
	.sm-hero__col--badge {
		display: none;
	}
}

/* -------------------------------------------------------------------------
   Mobile (<=767px)
   ---------------------------------------------------------------------- */

@media (max-width: 767px) {
	:root {
		--sm-container: 767px;
	}

	.sm-hero {
		flex-direction: column-reverse;
		min-height: 735px;
	}

	.sm-hero__col {
		flex: 0 0 auto;
		width: 100%;
	}

	.sm-hero__title {
		font-size: 48px;
		line-height: 50px;
	}

	.sm-stay {
		margin: 61px 0 60px;
	}

	.sm-stay__inner {
		flex-direction: column;
	}

	.sm-stay__col {
		flex: 0 0 auto;
		width: 100%;
	}

	.sm-stay__text {
		font-size: 18px;
	}

	/* The desktop villas block is replaced by its mobile-only counterpart. */
	.sm-villas {
		display: none;
	}

	.sm-villas-mobile {
		display: flex;
	}

	.sm-gallery {
		--sm-stage-h: 320px;
		--sm-thumb-h: 62px;
	}

	.sm-amenities {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding-top: 20px;
	}

	.sm-amenities__heading {
		flex: 0 0 auto;
		align-items: flex-start;
		width: 100%;
	}

	.sm-amenities__title {
		font-size: 40px;
		line-height: 41px;
	}

	.sm-amenities__cols {
		flex: 0 0 auto;
		flex-wrap: nowrap;
		justify-content: flex-start;
		width: 100%;
	}

	.sm-amenities__icon {
		margin-right: 10px;
		font-size: 22px;
	}

	.sm-amenities__label {
		font-size: 12px;
		margin-bottom: 0;
	}

	.sm-contact {
		margin-top: 52px;
	}

	.sm-contact__inner {
		flex-direction: column-reverse;
	}

	.sm-contact__col {
		flex: 0 0 auto;
		width: 100%;
	}

	.sm-page {
		padding-top: 120px;
	}

	.sm-entry__title {
		font-size: 40px;
		line-height: 41px;
	}

	.sm-footer__grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

/* -------------------------------------------------------------------------
   Scroll reveals

   Elements opt in with `.sm-reveal` and are shown once, on the way in.

   The hidden state is gated behind `.sm-js` on <html>, which an inline script
   in <head> sets before the first paint. With JavaScript off, or if the script
   fails to run, the class never appears and nothing is ever hidden — the page
   just reads as finished. Setting the flag in <head> rather than from main.js
   also matters because main.js loads in the footer: by then these sections
   have already painted, and hiding them at that point would show as a flash.

   The hero is deliberately not animated. It holds the largest-contentful-paint
   element, and fading that in would push the metric out for no real gain.
   ---------------------------------------------------------------------- */

.sm-js .sm-reveal {
	opacity: 0;
	transition:
		opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) var(--sm-reveal-delay, 0s),
		transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) var(--sm-reveal-delay, 0s);
}

.sm-js .sm-reveal.is-revealed {
	opacity: 1;
}

/*
 * The rise is scoped away from `.sm-reveal--fade` rather than being undone by
 * it. `transform` is a single property, so *any* value set here — `none`
 * included — replaces whatever the element already had. The desktop villas
 * title is stood upright by a rotation of its own, and a competing rule with
 * higher specificity drops it flat on its side. Elements that carry their own
 * transform therefore never get one from here; they only fade.
 */
.sm-js .sm-reveal:not(.sm-reveal--fade) {
	transform: translateY(24px);
}

.sm-js .sm-reveal.is-revealed:not(.sm-reveal--fade) {
	transform: none;
}

/* Groups that arrive together cascade rather than moving as one flat block. */
.sm-js .sm-amenities__item:nth-child(2) {
	--sm-reveal-delay: 0.07s;
}

.sm-js .sm-amenities__item:nth-child(3) {
	--sm-reveal-delay: 0.14s;
}

.sm-js .sm-amenities__item:nth-child(4) {
	--sm-reveal-delay: 0.21s;
}

.sm-js .sm-footer__item:nth-child(2) {
	--sm-reveal-delay: 0.09s;
}

.sm-js .sm-footer__item:nth-child(3) {
	--sm-reveal-delay: 0.18s;
}

/* Let the heading of a pair land first. */
.sm-js .sm-stay__col--text,
.sm-js .sm-contact__col--image {
	--sm-reveal-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
	.sm-js .sm-reveal,
	.sm-js .sm-reveal.is-revealed {
		opacity: 1;
		transition: none;
	}

	/* Same reasoning as above — never touch a transform we did not set. */
	.sm-js .sm-reveal:not(.sm-reveal--fade),
	.sm-js .sm-reveal.is-revealed:not(.sm-reveal--fade) {
		transform: none;
	}
}
