/*
 * The front page (front-page.php, template-parts/*): the hero, the one bold thing on the site, then quiet sections.
 * Loaded on the front page only (inc/assets.php), after layout.css.
 *
 * Hero stacking: the header (pt-header--over) is absolute at z-index 45, above the hero and the action bar (40); its
 * drawer (60) and backdrop (50) live inside it, so they stack inside the header's context and still cover everything.
 * Inside the hero (isolation: isolate): photos 0, gradient 1, text 2.
 */

/* ---------- Header over the hero ---------- */
/*
 * Logged in, WordPress's admin bar takes the top of the screen (html gets a margin, so the hero is already below it,
 * but the absolute header is not): 32px from 783px up, 46px below (absolute, not fixed, under 600px; still at the top).
 */
:root { --pt-adminbar: 0px; }
.admin-bar { --pt-adminbar: 32px; }
@media (max-width: 782px) {
	.admin-bar { --pt-adminbar: 46px; }
}

.pt-header--over {
	position: absolute;
	top: var(--pt-adminbar);
	left: 0;
	right: 0;
	z-index: 45;
	background: transparent;
	border-bottom-color: transparent;
}

@media (min-width: 820px) and (max-width: 1239px) {
	.pt-header--over .pt-nav { border-top-color: rgba(239, 233, 228, .16); }
}
@media (max-width: 819px) {
	.no-js .pt-header--over .pt-nav { border-top-color: rgba(239, 233, 228, .16); }
}

/* ---------- Hero ---------- */
.pt-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--pt-adminbar));
	min-height: calc(100svh - var(--pt-adminbar));
	padding-top: calc(var(--header-h) + 32px);
	overflow: hidden;
	background: var(--wine);
}

.pt-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.pt-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 40%;
	transform-origin: 50% 40%;
	opacity: 0;
	transition: opacity 1.8s ease;
}
.pt-hero__img.is-on {
	z-index: 2;
	opacity: 1;
	/* 7 s on screen plus the 1.8 s fade: the slow settle from 1.08 to 1 lasts the photo's whole turn. */
	animation: pt-hero-settle 9s cubic-bezier(.25, .6, .3, 1) both;
}
/* The photo going out stays opaque underneath while the next one fades in over it: no dip to the background. */
.pt-hero__img.was-on {
	z-index: 1;
	opacity: 1;
	transition: none;
}

@keyframes pt-hero-settle {
	from { transform: scale(1.08); }
	to { transform: scale(1); }
}

/* The wine gradient from the left over every photo, plus a shade at the top (the header) and the foot (facts, caption). */
.pt-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(42, 26, 36, .72) 0, rgba(42, 26, 36, 0) 220px),
		linear-gradient(0deg, rgba(42, 26, 36, .9) 0, rgba(42, 26, 36, .45) 22%, rgba(42, 26, 36, 0) 45%),
		linear-gradient(90deg, rgba(42, 26, 36, .94) 0%, rgba(42, 26, 36, .85) 34%, rgba(42, 26, 36, .6) 62%, rgba(42, 26, 36, .18) 100%);
}

.pt-hero__body,
.pt-hero__foot {
	position: relative;
	z-index: 2;
}

.pt-hero__body {
	flex: 1;
	display: flex;
	align-items: center;
	padding-block: 32px 56px;
}

.pt-hero__copy { max-width: 46rem; }

.pt-hero__title {
	font-size: clamp(42px, 5.8vw, 82px);
	line-height: 1.03;
	letter-spacing: -.015em;
}

.pt-hero__sub {
	margin-top: 24px;
	max-width: 44ch;
	font-size: clamp(18px, 1.7vw, 21px);
	line-height: 1.5;
	color: var(--marble-soft);
}

.pt-hero__actions { margin-top: 36px; }

.pt-hero__foot {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 48px;
	padding-bottom: 40px;
}

.pt-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 56px;
}
.pt-facts__item { max-width: 17em; font-size: 15px; line-height: 1.4; color: var(--marble-soft); }
.pt-facts__name {
	display: block;
	margin-bottom: 2px;
	font-family: var(--serif);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.25;
	color: var(--marble);
}
.pt-facts__text { display: block; }

.pt-hero__place {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	text-align: right;
}

.pt-hero__cap {
	font-size: 15px;
	line-height: 1.35;
	color: var(--marble-soft);
	text-shadow: 0 1px 10px rgba(20, 11, 17, .7);
	transition: opacity .4s ease;
}
.pt-hero__cap.is-changing { opacity: 0; }

.pt-hero__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--marble-edge);
	border-radius: 50%;
	background: rgba(42, 26, 36, .35);
	color: var(--marble);
	transition: border-color .2s var(--ease);
}
.pt-hero__toggle:hover { border-color: var(--marble); }
.pt-hero__toggle .pt-icon { width: 18px; height: 18px; }
.pt-hero__toggle[hidden] { display: none; }
/* Pause icon while the photos turn, play icon once paused (aria-pressed="true"). */
.pt-hero__i-pause, .pt-hero__i-play { display: inline-flex; }
.pt-hero__toggle:not([aria-pressed="true"]) .pt-hero__i-play,
.pt-hero__toggle[aria-pressed="true"] .pt-hero__i-pause { display: none; }

@media (prefers-reduced-motion: reduce) {
	.pt-hero__img.is-on { animation: none; }
}

/* The header takes two rows here: more room above the heading. */
@media (min-width: 820px) and (max-width: 1239px) {
	.pt-hero { padding-top: calc(var(--header-h) + 88px); }
	.pt-facts { column-gap: 36px; }
}

@media (max-width: 819px) {
	/*
	 * The fixed action bar (and the safe area under it) covers the bottom of the screen, the admin bar the top: the hero
	 * ends above the action bar, so the caption and the pause button at its foot stay in sight.
	 */
	.pt-hero {
		min-height: calc(100vh - var(--bar-h) - env(safe-area-inset-bottom, 0px) - var(--pt-adminbar));
		min-height: calc(100svh - var(--bar-h) - env(safe-area-inset-bottom, 0px) - var(--pt-adminbar));
		padding-top: calc(var(--header-h) + 16px);
	}
	.no-js .pt-hero { padding-top: calc(var(--header-h) + 64px); }
	/* The text spans the whole width on a phone: an even shade, darker at the foot. */
	.pt-hero::after {
		background: linear-gradient(180deg, rgba(42, 26, 36, .82) 0, rgba(42, 26, 36, .74) 30%, rgba(42, 26, 36, .8) 60%, rgba(42, 26, 36, .95) 100%);
	}
	.pt-hero__body { padding-block: 24px 40px; }
	.pt-hero__sub { margin-top: 18px; }
	.pt-hero__actions { margin-top: 28px; }
	.pt-hero__foot { flex-direction: column; align-items: stretch; gap: 20px; padding-bottom: 20px; }
	.pt-facts { flex-direction: column; gap: 14px; }
	.pt-facts__name { font-size: 19px; }
	.pt-hero__place { justify-content: flex-end; }
}

/* ---------- «Η δική σας διαδρομή» ---------- */
.pt-own {
	display: flex;
	align-items: center;
	gap: 24px 48px;
	padding: 40px 44px;
	background: var(--wine2);
	border-left: 3px solid var(--lamp);
}
.pt-own__title { font-size: clamp(26px, 2.6vw, 32px); font-weight: 500; }
.pt-own__text p { margin-top: 8px; max-width: 54ch; font-size: 18px; color: var(--mute); }
.pt-own__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-left: auto;
	font-size: 18px;
	font-weight: 500;
	color: var(--lamp);
	white-space: nowrap;
	text-decoration: underline;
	text-decoration-color: rgba(227, 181, 91, .5);
}
.pt-own__link:hover { text-decoration-color: currentColor; }

/* ---------- The car ---------- */
.pt-car {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: 48px 64px;
}
.pt-car--text { grid-template-columns: minmax(0, 1fr); }
.pt-car__model { margin-top: 10px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 24px; color: var(--marble-soft); }
.pt-car__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 28px;
	margin-top: 22px;
	font-size: 17px;
	color: var(--marble);
}
.pt-car__facts li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.pt-car__about { margin-top: 24px; max-width: 60ch; color: var(--mute); }
.pt-car__about > * + * { margin-top: 1em; }
.pt-car__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt-car__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pt-car__img:first-child { grid-column: 1 / -1; }
.pt-car__photos[data-count="2"] .pt-car__img:first-child { grid-column: auto; }

/* ---------- How booking works ---------- */
.pt-how__steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	margin-top: 48px;
}
.pt-how__step { padding-top: 24px; border-top: 1px solid var(--line); }
.pt-how__num {
	display: block;
	font-family: var(--serif);
	font-weight: 300;
	font-size: 60px;
	line-height: 1;
	color: var(--mute);
	font-variant-numeric: lining-nums;
}
.pt-how__title { margin-top: 16px; }
.pt-how__step p { margin-top: 8px; max-width: 34ch; color: var(--mute); }

/* ---------- Contact band (the footer follows straight on) ---------- */
.pt-band {
	margin-top: 120px;
	padding-block: 88px;
	background: var(--wine2);
	border-top: 1px solid var(--line);
}
.pt-band__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px 64px;
}
.pt-band .pt-lead { margin-top: 14px; }
.pt-band .pt-actions { margin-top: 32px; }
.pt-contact--band a { font-size: 19px; }
.home .pt-footer { margin-top: 0; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1099px) {
	.pt-car { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 819px) {
	.pt-own { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
	.pt-own__link { margin-left: 0; white-space: normal; }
	.pt-how__steps { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 36px; }
	.pt-band { margin-top: 80px; padding-block: 64px; }
	.pt-band__grid { grid-template-columns: minmax(0, 1fr); }
}
