/* ===================================================
   Η κίνηση της Tesoro 40 στο υπόλοιπο site.
   Όλα ενεργοποιούνται από το motion.js με την κλάση .sw-motion, ώστε χωρίς
   JavaScript ή με "reduced motion" το περιεχόμενο να φαίνεται κανονικά
   =================================================== */

/* οι τίτλοι που περιμένουν γυρισμένοι δεν πρέπει να πλαταίνουν τη σελίδα
   (το clip, αντίθετα με το hidden, δεν χαλάει τα sticky) */
.sw-motion #sw-main { overflow-x: clip; }

/* ===== Κάδρο: η φωτογραφία ή το βίντεο "μαζεύει" από αριστερά με το scroll ===== */
.sw-motion .sw-frame { clip-path: inset(0 0 0 calc(var(--mask, 0) * var(--sw-edge))); }

/* ===== Φωτογραφία που γλιστρά μέσα στο κάδρο της ===== */
.sw-motion .sw-drift { overflow: hidden; }
.sw-motion .sw .sw-drift img,
.sw-motion .sw-drift img { transform: translate3d(0, var(--drift, 0%), 0) scale(1.14); }

/* ===== Τίτλοι: τα γράμματα ανεβαίνουν ένα ένα πίσω από μάσκα ===== */
.sw-word { display: inline-block; white-space: nowrap; }
/* ο τίτλος του VIP κεντράρεται με flex: οι λέξεις μένουν στην ίδια γραμμή */
.sw .sw-vip h1.sw-rise { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; column-gap: 0.25em; }
.sw-rise .sw-word { overflow: clip; padding: 0.14em 0.06em 0.24em; margin: -0.14em -0.06em -0.24em; vertical-align: bottom; }
.sw-rise .sw-letter {
	position: relative; top: 1.5em;
	transition: top 0.8s cubic-bezier(0.2, 0.6, 0.3, 1) calc(var(--i) * var(--step, 30ms));
}
.sw-rise.sw-in .sw-letter { top: 0; }

/* ===== Κείμενα: τα γράμματα μπαίνουν από δεξιά με fade ===== */
.sw-motion .sw-flow { overflow-x: clip; }
.sw-flow .sw-letter {
	position: relative; left: 70px; opacity: 0;
	transition:
		left 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) calc(var(--i) * var(--step, 6ms)),
		opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) calc(var(--i) * var(--step, 6ms));
}
.sw-flow.sw-in .sw-letter { left: 0; opacity: 1; }

/* ===== Υπότιτλοι: γυρίζουν προς τα εμπρός, όπως το "Gallery" ===== */
.sw-motion .sw-flip { opacity: 0; transform: perspective(400px) translateY(20px) rotateX(-80deg); transform-origin: 50% 0; }
.sw-motion .sw-flip.sw-in {
	opacity: 1; transform: perspective(400px);
	transition: opacity 1s ease 0.1s, transform 1s cubic-bezier(0.2, 0.6, 0.3, 1) 0.1s;
}

@media (min-width: 901px) {
	/* ===== Οριζόντιο gallery: μένει καρφωμένο όσο το scroll κινεί τις φωτογραφίες ===== */
	.sw-reel { position: relative; padding-block: 0; margin-block: var(--sw-space); }
	.sw-reel__stage {
		position: sticky; top: var(--sw-header);
		display: flex; flex-direction: column; justify-content: center;
		height: calc(100svh - var(--sw-header));
		overflow: clip;
	}
	.sw-reel .sw-strip__nav { display: none; }
	.sw-reel .sw-strip__list { position: relative; width: max-content; overflow: visible; scroll-snap-type: none; align-items: flex-start; gap: 30px; }
	.sw-reel .sw-strip__list li { --reel-h: max(240px, min(498px, calc(100svh - var(--sw-header) - 250px))); width: var(--reel-h); height: var(--reel-h); overflow: hidden; }
	.sw-reel .sw-strip__list li:nth-child(odd) { margin-top: min(90px, 9vh); }
	.sw-reel .sw-strip__list img { transform: translate3d(var(--slide, 0%), 0, 0) scale(1.24); }
	/* κάρτες με τίτλο: το ύψος ανήκει στη φωτογραφία */
	.sw-reel.sw-strip--cards .sw-strip__list li { --reel-h: max(240px, min(460px, calc(100svh - var(--sw-header) - 320px))); width: calc(var(--reel-h) * 0.75); height: auto; }
	.sw-reel.sw-strip--cards a > img { height: var(--reel-h); aspect-ratio: auto; transform: none; }

	/* ===== Fleet: η μάσκα της φωτογραφίας μαζεύει από δεξιά και φανερώνει τα στοιχεία ===== */
	.sw-motion .sw-boat { height: 230svh; margin-bottom: 0; }
	.sw-motion .sw-boat__stage { position: sticky; top: var(--sw-header); display: block; height: calc(100svh - var(--sw-header)); overflow: hidden; }
	.sw-motion .sw-boat figure { position: absolute; left: 0; top: 2%; height: 88%; width: calc(100% - var(--open, 0) * 40%); z-index: 1; }
	.sw-motion .sw-boat__sheet {
		position: absolute; right: 0; top: 2%; height: 88%; width: 40%;
		display: flex; flex-direction: column; justify-content: center; padding: 0 50px 0 30px;
		opacity: var(--open, 0);
	}
}

/* χαμηλές οθόνες: τα στοιχεία του σκάφους πρέπει να χωρούν */
@media (min-width: 901px) and (max-height: 760px) {
	.sw-boat h2 { margin-bottom: 20px; }
	.sw-boat dl { gap: 14px 20px; }
	.sw-boat dd { font-size: 1em; }
}

/* ===== "Create your own tour": κλείνει τη σελίδα όπως το "Book now" ===== */
.sw .sw-own { align-content: center; gap: 36px; }
.sw-own::after {
	content: ""; position: relative;
	width: 152px; height: 152px;
	border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%;
	background: url("../tesoro40/icons/book-arrow.svg") center / 45% no-repeat;
	transition: background-color 0.3s, border-color 0.3s;
}
.sw-own:hover::after { border-color: var(--sw-white); background-color: rgba(255, 255, 255, 0.1); }

/* ===== Δύο σκούρα πλαίσια στη σειρά χρειάζονται μια λωρίδα λευκού ανάμεσα ===== */
.sw-moments + .sw-cta { margin-top: 24px; }
