/* LuxeBeauty salon tour. Loaded after main.css, front page only.
 *
 * Default state = a static, fully readable stacked layout (no JS, reduced motion, short landscape screens).
 * luxe-tour.js adds .tour-3d to #tour, which turns it into the scroll-driven camera walk.
 * Everything is scoped to .luxe-tour so no other part of the site is affected.
 * Fonts are the self-hosted files from /uploads/fonts (own family names, the site's other fonts stay as they are).
 */

@font-face {
	font-family: "LuxeTour Vazir";
	src: url("../../../../uploads/fonts/Vazirmatnwght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "LuxeTour Estedad";
	src: url("../../../../uploads/fonts/Estedad-Regular.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "LuxeTour Estedad";
	src: url("../../../../uploads/fonts/Estedad-Bold.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: "LuxeTour Estedad";
	src: url("../../../../uploads/fonts/Estedad-Black.woff2") format("woff2");
	font-weight: 900;
	font-display: swap;
}

.luxe-tour {
	--tour-font: "LuxeTour Vazir", "Vazirmatn", system-ui, sans-serif;
	--tour-display: "LuxeTour Estedad", "LuxeTour Vazir", "Vazirmatn", system-ui, sans-serif;
	--tour-len: 880svh;
	position: relative;
	font-family: var(--tour-font);
}

/* ---------- shared: card content ---------- */
.set-card {
	padding: 1.5rem 1.6rem 1.6rem;
	border-radius: 1rem;
	border: 1px solid color-mix(in oklch, var(--gold) 38%, transparent);
	background: linear-gradient(160deg, color-mix(in oklch, var(--card) 96%, transparent), color-mix(in oklch, var(--background) 96%, transparent));
	box-shadow: 0 30px 60px -28px rgb(0 0 0 / 0.85);
}
.card-kicker { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; color: var(--gold); }
.card-title {
	margin-top: 0.3rem;
	font-family: var(--tour-display);
	font-weight: 900;
	font-size: clamp(1.5rem, 2.1vw, 2.05rem);
	line-height: 1.3;
	color: var(--foreground);
}
.card-script { margin-top: 0.1rem; font-family: "Great Vibes", cursive; font-size: 1.5rem; line-height: 1.3; color: var(--gold); direction: ltr; text-align: right; }
.card-text { margin-top: 0.8rem; font-size: 0.95rem; line-height: 2; color: color-mix(in oklch, var(--foreground) 82%, transparent); }
.card-chips { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; }
.card-chips li {
	padding: 0.25rem 0.8rem;
	border-radius: 9999px;
	border: 1px solid var(--border-gold);
	font-size: 0.75rem;
	color: var(--gold-soft);
	background: color-mix(in oklch, var(--gold) 6%, transparent);
}

/* ---------- static layout (default) ---------- */
.tour-head { padding-block: 6rem 1rem; }
.tour-world { display: grid; gap: 3.5rem; max-width: 80rem; margin-inline: auto; padding: 2rem 1.25rem 6rem; }
.tour-station { position: relative; display: grid; gap: 1.25rem; }
.set-frame { position: relative; margin: 0; overflow: hidden; border-radius: 1rem; border: 1px solid var(--border-gold); }
.set-frame img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* 3D-only parts stay out of the static layout */
.tour-recep, .tour-pillar, .tour-bg, .tour-vignette, .tour-live, .tour-hud, .set-plate, .set-num, .set-shade, .set-floor { display: none; }

@media (min-width: 900px) {
	.tour-station { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 2.5rem; }
	.tour-station[data-side="l"] .set-frame { order: 2; }
}

/* ---------- 3D mode ---------- */
.luxe-tour.tour-3d { height: calc(100svh + var(--tour-len)); }

/* The heading stays for screen readers and search engines. */
.tour-3d .tour-head { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.tour-3d .tour-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }

/* Translucent charcoal: the site's gold silk (WebGL) stays faintly visible behind the rooms. */
.tour-3d .tour-bg {
	display: block;
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 50% 62%, oklch(0.78 0.09 75 / 0.10), transparent 70%),
		linear-gradient(to bottom, color-mix(in oklch, var(--background) 78%, transparent), color-mix(in oklch, var(--background) 58%, transparent));
}
.tour-3d .tour-vignette {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
	background: radial-gradient(ellipse 78% 70% at 50% 48%, transparent 52%, oklch(0.1 0.01 260 / 0.7) 100%);
}

.tour-3d .tour-camera { position: absolute; inset: 0 0 7svh 0; }
.tour-3d .tour-world {
	position: absolute;
	inset: 0;
	display: block;
	max-width: none;
	margin: 0;
	padding: 0;
	transform-style: preserve-3d;
	transform-origin: 50% 50%;
	will-change: transform;
}

/* Every room is anchored by its top-left corner at the world's centre; JS places it on the ring. */
.tour-3d .tour-set {
	position: absolute;
	left: 50%;
	top: 50%;
	width: var(--S, 1100px);
	display: block;
	transform-origin: 0 0;
	transform-style: preserve-3d;
	backface-visibility: hidden;
}

/* Light strips between rooms: cheap, but they give a strong sense of turning. */
.tour-3d .tour-pillar {
	display: block;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 2px;
	height: calc(var(--S, 1100px) * 0.95);
	transform-origin: 0 0;
	background: linear-gradient(to bottom, transparent, oklch(0.9 0.05 78 / 0.55) 22%, oklch(0.78 0.09 75 / 0.3) 78%, transparent);
	box-shadow: 0 0 26px oklch(0.78 0.09 75 / 0.45);
}

/* ----- station room ----- */
.tour-3d .tour-station { height: calc(var(--S) * 0.5); }
.tour-3d .set-frame {
	position: absolute;
	top: 50%;
	width: 72%;
	transform: translateY(-50%);
	border-radius: 1rem;
	border: 1px solid color-mix(in oklch, var(--gold) 40%, transparent);
	box-shadow: 0 50px 90px -34px rgb(0 0 0 / 0.9), 0 0 60px -20px oklch(0.78 0.09 75 / 0.35);
}
.tour-3d .set-frame img { transform-origin: 50% 50%; will-change: transform; }
.tour-3d .set-shade { display: block; position: absolute; inset: 0; background: oklch(0.14 0.01 260); opacity: var(--shade, 0); pointer-events: none; }
.tour-3d .tour-station[data-side="r"] .set-frame { left: 0; }
.tour-3d .tour-station[data-side="l"] .set-frame { right: 0; }

/* a gold outline floating behind the photo gives the room real depth */
.tour-3d .set-plate {
	display: block;
	position: absolute;
	top: 50%;
	width: 72%;
	aspect-ratio: 3 / 2;
	border: 1px solid color-mix(in oklch, var(--gold) 55%, transparent);
	border-radius: 1rem;
	transform: translate3d(0, calc(-50% + var(--S) * 0.028), calc(var(--S) * -0.07));
}
.tour-3d .tour-station[data-side="r"] .set-plate { left: -2.2%; }
.tour-3d .tour-station[data-side="l"] .set-plate { right: -2.2%; }

/* huge outlined numeral, sits behind everything */
.tour-3d .set-num {
	display: block;
	position: absolute;
	top: 50%;
	font-family: var(--tour-display);
	font-weight: 900;
	font-size: calc(var(--S) * 0.24);
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px color-mix(in oklch, var(--gold) 45%, transparent);
	pointer-events: none;
	transform: translate3d(0, -50%, calc(var(--S) * -0.16));
}
.tour-3d .tour-station[data-side="r"] .set-num { right: calc(var(--S) * -0.05); }
.tour-3d .tour-station[data-side="l"] .set-num { left: calc(var(--S) * -0.05); }

/* warm pool of light on the floor in front of the room */
.tour-3d .set-floor {
	display: block;
	position: absolute;
	top: 100%;
	left: -8%;
	width: 116%;
	height: calc(var(--S) * 0.55);
	transform-origin: 50% 0;
	transform: translateZ(0) rotateX(90deg);
	pointer-events: none;
	background:
		radial-gradient(ellipse 55% 85% at 50% 0%, oklch(0.8 0.08 76 / 0.32), transparent 72%),
		repeating-linear-gradient(to right, oklch(0.78 0.09 75 / 0.07) 0 1px, transparent 1px 64px);
	-webkit-mask-image: linear-gradient(to bottom, #000, transparent);
	mask-image: linear-gradient(to bottom, #000, transparent);
}

.tour-3d .set-card {
	position: absolute;
	top: 50%;
	width: 38%;
	transform: translate3d(0, -50%, calc(var(--S) * 0.05));
}
.tour-3d .tour-station[data-side="r"] .set-card { right: 3%; }
.tour-3d .tour-station[data-side="l"] .set-card { left: 3%; }

/* ----- reception: an arched doorway, echoing the arched mirrors in the photos ----- */
.tour-3d .tour-recep { display: block; width: calc(var(--S) * 0.42); height: calc(var(--S) * 0.5); }
.recep-arch {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: 999px 999px 0.6rem 0.6rem;
	border: 1px solid color-mix(in oklch, var(--gold) 60%, transparent);
	box-shadow: var(--shadow-gold), 0 0 90px -20px oklch(0.78 0.09 75 / 0.45);
	background: var(--background);
}
.arch-glow {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 60% at 50% 78%, oklch(0.88 0.07 78 / 0.55), oklch(0.78 0.09 75 / 0.12) 55%, transparent 80%),
		linear-gradient(to top, oklch(0.3 0.035 72), oklch(0.19 0.01 260));
}
.arch-door {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50.6%;
	background: linear-gradient(180deg, oklch(0.23 0.012 260), oklch(0.17 0.008 260));
	box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--gold) 30%, transparent);
	will-change: transform;
}
.arch-door::before {
	content: "";
	position: absolute;
	inset: 8% 10% 5%;
	border: 1px solid color-mix(in oklch, var(--gold) 28%, transparent);
	border-radius: 999px 999px 0.3rem 0.3rem;
}
.arch-door-r { right: 0; transform-origin: 100% 50%; }
.arch-door-l { left: 0; transform-origin: 0 50%; }
.arch-door-r::before { border-inline-width: 1px; }

.recep-copy {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20% 9% 9%;
	text-align: center;
	transform: translateZ(calc(var(--S) * 0.05));
}
.recep-intro, .recep-outro { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; }
.recep-script { font-family: "Great Vibes", cursive; font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.2; color: var(--gold); direction: ltr; }
.recep-title { margin-top: 0.3rem; font-family: var(--tour-display); font-weight: 900; font-size: clamp(1.6rem, 2.7vw, 2.5rem); line-height: 1.3; color: var(--foreground); }
.recep-sub { margin-top: 0.9rem; font-size: 0.9rem; line-height: 2; color: color-mix(in oklch, var(--foreground) 80%, transparent); }
.recep-hint { margin-top: 1.4rem; display: inline-flex; flex-direction: column; align-items: center; gap: 0.3rem; font-size: 0.75rem; letter-spacing: 0.05em; color: var(--gold); }
.recep-hint svg { animation: tour-nudge 1.8s ease-in-out infinite; }
.recep-actions { margin-top: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.recep-actions .btn-book, .recep-actions .btn-outline-gold { justify-content: center; min-width: 11rem; text-align: center; }
.recep-actions button.btn-outline-gold { background: none; font-family: inherit; cursor: pointer; }

@keyframes tour-nudge {
	0%, 100% { transform: translateY(0); opacity: 0.55; }
	50% { transform: translateY(6px); opacity: 1; }
}

/* ----- screen-space HUD ----- */
.tour-3d .tour-live {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	position: absolute;
	top: 5.2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	font-size: 0.95rem;
	letter-spacing: 0.14em;
	color: var(--gold-soft);
	pointer-events: none;
	white-space: nowrap;
}
.tour-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: tour-pulse 2s ease-in-out infinite; }
@keyframes tour-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.tour-3d .tour-hud {
	display: flex;
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 6;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 0 1.5rem 1rem;
	pointer-events: none;
}
.tour-hud > * { pointer-events: auto; }

.tour-count { min-width: 8rem; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.count-line { display: flex; align-items: baseline; gap: 0.35rem; height: 2.4rem; opacity: 0; transition: opacity 0.4s; }
.is-station .count-line { opacity: 1; }
.count-now { font-family: var(--tour-display); font-weight: 900; font-size: 2rem; color: var(--gold); }
.count-all { font-size: 0.8rem; color: var(--muted-foreground); }
.count-name { font-size: 0.85rem; font-weight: 500; color: var(--foreground); }

.tour-rail { position: relative; flex: 1; max-width: 33rem; display: flex; justify-content: space-between; padding-top: 0.25rem; }
.tour-rail::before, .tour-rail::after { content: ""; position: absolute; top: 1.35rem; inset-inline: 1.1rem; height: 1px; }
.tour-rail::before { background: var(--border-gold); }
.tour-rail::after { background: var(--gold); transform: scaleX(var(--rs, 0)); transform-origin: 100% 50%; box-shadow: 0 0 10px oklch(0.78 0.09 75 / 0.6); }
.rail-dot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; font-family: var(--tour-font); color: var(--muted-foreground); }
.rail-dot .dot {
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	border: 1px solid var(--border-gold);
	background: var(--background);
	font-size: 0.8rem;
	transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.rail-dot .lbl { font-size: 0.68rem; white-space: nowrap; transition: color 0.3s; }
.rail-dot:hover .dot { border-color: var(--gold); }
.rail-dot.is-done .dot { border-color: color-mix(in oklch, var(--gold) 70%, transparent); color: var(--gold); }
.rail-dot.is-active .dot { background-image: var(--gradient-gold); color: oklch(0.2 0.02 60); border-color: transparent; transform: scale(1.12); box-shadow: var(--shadow-gold); }
.rail-dot.is-active .lbl { color: var(--gold); }
.rail-dot:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 0.5rem; }

.tour-map { width: 7.2rem; height: 7.2rem; flex: none; }
.tour-map svg { display: block; width: 100%; height: 100%; overflow: visible; }
.map-ring { fill: none; stroke: var(--border-gold); stroke-width: 1; stroke-dasharray: 2 4; }
.map-core { fill: none; stroke: var(--border-gold); stroke-width: 1; }
.map-room rect { fill: color-mix(in oklch, var(--background) 80%, transparent); stroke: color-mix(in oklch, var(--gold) 35%, transparent); stroke-width: 1; transition: fill 0.3s, stroke 0.3s; }
.map-room text { font-family: var(--tour-font); font-size: 11px; fill: var(--muted-foreground); text-anchor: middle; dominant-baseline: central; transition: fill 0.3s; }
.map-room.is-done rect { stroke: var(--gold); }
.map-room.is-done text { fill: var(--gold); }
.map-room.is-active rect { fill: var(--gold); stroke: var(--gold); }
.map-room.is-active text { fill: oklch(0.2 0.02 60); }
.map-door { fill: none; stroke: var(--gold); stroke-width: 1.4; }
.map-cone path { fill: oklch(0.88 0.05 78 / 0.28); }
.map-me circle { fill: var(--gold-soft); stroke: var(--background); stroke-width: 1.5; }
.map-me .halo { fill: none; stroke: var(--gold); stroke-width: 1; opacity: 0.6; animation: tour-halo 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tour-halo { from { transform: scale(0.6); opacity: 0.8; } to { transform: scale(2.2); opacity: 0; } }

/* ---------- tablet and phone: stacked room (photo above, card overlapping) ---------- */
@media (max-width: 980px) {
	.tour-3d .tour-station { height: auto; }
	.tour-3d .set-frame { position: relative; top: auto; width: 100%; transform: none; }
	.tour-3d .set-frame img { aspect-ratio: 3 / 2; }
	.tour-3d .tour-station[data-side] .set-frame { left: auto; right: auto; }
	.tour-3d .set-plate { width: 100%; top: 0; transform: translate3d(0, calc(var(--S) * 0.03), calc(var(--S) * -0.07)); }
	.tour-3d .tour-station[data-side] .set-plate { left: -2%; right: auto; }
	.tour-3d .set-card {
		position: relative;
		top: auto;
		width: 94%;
		margin: -2.4rem auto 0;
		transform: translate3d(0, 0, calc(var(--S) * 0.07));
		padding: 1.1rem 1.2rem 1.25rem;
	}
	.tour-3d .tour-station[data-side] .set-card { left: auto; right: auto; }
	.tour-3d .set-num { top: -0.4em; font-size: calc(var(--S) * 0.3); transform: translate3d(0, 0, calc(var(--S) * -0.1)); }
	.tour-3d .tour-station[data-side="r"] .set-num { right: 2%; }
	.tour-3d .tour-station[data-side="l"] .set-num { left: 2%; }
	.card-title { font-size: 1.35rem; }
	.card-script { font-size: 1.25rem; }
	.card-text { font-size: 0.85rem; line-height: 1.9; margin-top: 0.55rem; }
	.card-chips { margin-top: 0.7rem; }
	.tour-3d .tour-recep { width: calc(var(--S) * 0.78); height: calc(var(--S) * 1.3); }
	.recep-copy { padding: 26% 8% 10%; }
	.recep-sub { font-size: 0.8rem; line-height: 1.85; margin-top: 0.6rem; }
	.tour-3d .tour-live { top: 4.6rem; }
	.tour-3d .tour-hud { padding-inline: 0.9rem; gap: 0.6rem; padding-bottom: 0.8rem; }
	.tour-map { display: none; }
	.tour-count { min-width: 3.6rem; }
	.count-name { display: none; }
	.rail-dot .lbl { display: none; }
	.rail-dot .dot { width: 2rem; height: 2rem; }
	.tour-rail::before, .tour-rail::after { top: 1.25rem; inset-inline: 1rem; }
}

@media (min-width: 981px) and (max-height: 760px) {
	.tour-map { width: 5.6rem; height: 5.6rem; }
	.card-text { font-size: 0.88rem; line-height: 1.85; }
}

@media (prefers-reduced-motion: reduce) {
	.recep-hint svg, .tour-live i, .map-me .halo { animation: none; }
}
