/* =========================================================
   AVEL — case study styles

   The map is drawn by the project's own renderer and styled by
   avel-map.css. This file frames the demos in the café's colours
   and fonts (cream, taupe and the brown of its header), with far
   fewer controls than the app, so the page shows the idea rather
   than every screen.
   ========================================================= */

@font-face {
	font-family: "Baloo Bhaijaan 2";
	src: url("../../fonts/BalooBhaijaan2/baloo-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Baloo Bhaijaan 2";
	src: url("../../fonts/BalooBhaijaan2/baloo-600.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Baloo Bhaijaan 2";
	src: url("../../fonts/BalooBhaijaan2/baloo-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

/* ---------- the app frame ---------- */

.rz-frame {
	position: relative;
	width: 100%;
	margin: 0;
	border-radius: 1.4rem;
	overflow: hidden;
	background: linear-gradient(180deg, #ece4da 0%, #dccdbd 100%);
	border: 1px solid rgba(66, 46, 47, 0.12);
	box-shadow: 0 2rem 4rem rgba(40, 28, 20, 0.22);
	color: #422e2f;
	font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
	text-align: right;
}

.rz-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.8rem 1rem 0.6rem;
}

.rz-logo {
	display: flex;
	direction: ltr;

	img {
		width: 2.5rem;
		height: auto;
	}
}

.rz-controls {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.rz-guests {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	padding: 0.2rem;
	border-radius: 0.8rem;
	background: rgba(255, 255, 255, 0.45);
	border: 1px solid rgba(66, 46, 47, 0.12);
}

.rz-step {
	width: 1.9rem;
	height: 1.9rem;
	border: 0;
	border-radius: 0.6rem;
	background: transparent;
	color: #3b3229;
	font: 700 1.05rem/1 system-ui, sans-serif;
	cursor: pointer;
	transition: background-color 0.2s ease, scale 0.15s ease;
}

.rz-step:hover {
	background: rgba(59, 50, 41, 0.08);
}

.rz-count {
	min-width: 2.6rem;
	text-align: center;
	font-weight: 700;
	font-size: 1rem;
}

.rz-btn {
	border: 0;
	border-radius: 0.8rem;
	padding: 0.55rem 1rem;
	background: #3b3229;
	color: #fff;
	font: 600 0.88rem/1.2 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;
	transition: background-color 0.2s ease, scale 0.15s ease;
}

.rz-btn:hover {
	background: #4d4136;
}

.rz-btn.is-press,
.rz-step.is-press,
.rz-combo.is-press {
	scale: 0.94;
}

.rz-btn:focus-visible,
.rz-step:focus-visible,
.rz-combo:focus-visible {
	outline: 2px solid #3b3229;
	outline-offset: 2px;
}

.rz-mapwrap {
	position: relative;
	margin: 0 0.7rem;
	border-radius: 1rem;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.35);
	border: 1px solid rgba(66, 46, 47, 0.1);
}

.rz-mapwrap .map-zone-tabs {
	display: flex;
	gap: 0.35rem;
	padding: 0.5rem 0.5rem 0.2rem;
	/* four tabs do not fit a phone: the row scrolls sideways */
	overflow-x: auto;
	scrollbar-width: none;

	button {
		flex: none;
	}
}

.rz-map {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 1;
	height: auto;
	touch-action: none;
}

.rz-foot {
	min-height: 5.2rem;
	padding: 0.7rem 1rem 0.9rem;
	display: grid;
	gap: 0.5rem;
	align-content: start;
}

.rz-status {
	font-size: 0.85rem;
	color: #6b5a4d;
}

.rz-combos {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.rz-combo {
	border: 1px solid rgba(66, 46, 47, 0.16);
	border-radius: 0.7rem;
	padding: 0.35rem 0.75rem;
	background: rgba(255, 255, 255, 0.5);
	color: #422e2f;
	font: 600 0.8rem/1.3 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, scale 0.15s ease;
}

.rz-combo.is-perfect {
	border-color: rgba(110, 129, 81, 0.55);
}

.rz-combo.is-on {
	background: #3b3229;
	border-color: #3b3229;
	color: #fff;
}

.rz-pick {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	font-size: 0.88rem;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.rz-pick.is-on {
	visibility: visible;
	opacity: 1;
}

.rz-hold {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.85rem;
}

.rz-clock {
	width: 3.1rem;
	height: 3.1rem;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 2px solid #3b3229;
	font-weight: 700;
	font-size: 0.85rem;
	direction: ltr;
}

/* the demo pointer */
.rz-cursor {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 20;
	width: 22px;
	height: 22px;
	pointer-events: none;
	opacity: 0;
	transform: translate(var(--cx, 50%), var(--cy, 50%));
	transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));

	&.is-on {
		opacity: 1;
	}

	svg {
		width: 100%;
		height: 100%;
		transition: scale 0.12s ease;
		transform-origin: 3px 3px;
	}

	&.is-down svg {
		scale: 0.85;
	}
}

.rz-under {
	margin-top: 1.1rem;
	min-height: 2.6rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.8rem 1.2rem;
	font-family: "Poppins", sans-serif;
	font-size: 0.85rem;
	color: var(--ink-soft);
}

.rz-hint {
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.4s ease;

	&.is-on {
		visibility: visible;
		opacity: 1;
	}
}

.rz-replay {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 999px;
	background: transparent;
	font: inherit;
	color: var(--ink-soft);
	cursor: pointer;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.4s ease, background-color 0.2s ease;

	&.is-ready {
		visibility: visible;
		opacity: 1;
	}

	&:hover {
		background: rgba(0, 0, 0, 0.05);
	}

	&:focus-visible {
		outline: 2px solid var(--ink);
		outline-offset: 4px;
	}
}

/* ---------- hero layout ---------- */

.resv-hero-stage {
	width: min(46rem, 100%);
}

/* the booking frame starts below the title, never over it */
.case-avel .case-stage {
	margin-top: 1.5rem;
}

.case-avel .case-title {
	font-size: clamp(3.6rem, 11.5vw, 11rem);
}

@media screen and (min-width: 1200px) {
	.case-avel .note-a {
		top: 10rem;
		right: calc(50% + 24rem);
	}

	.case-avel .note-b {
		top: 21rem;
		left: calc(50% + 24rem);
	}
}

@media screen and (max-width: 1199px) {
	.case-avel .note {
		position: static;
		width: auto;
	}

	.case-avel .case-stage {
		grid-template-columns: repeat(2, minmax(0, 17rem));
		justify-content: center;
	}

	.case-avel .resv-hero-stage {
		grid-column: 1 / -1;
	}
}

@media screen and (max-width: 767px) {
	.case-avel .case-stage {
		grid-template-columns: minmax(0, 1fr);
	}

	.case-avel .note {
		width: min(21rem, 100%);
		justify-self: center;
	}

	.rz-top {
		flex-wrap: wrap;
	}
}

/* ---------- feature sections ---------- */

.avel-feature {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: 2rem 4.5rem;
	align-items: center;

	&.is-flipped {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	}

	&.is-flipped .resv-copy {
		order: 2;
	}
}

.resv-copy p {
	max-width: 30rem;
	font-size: 1.05rem;
	line-height: 1.85;
	color: var(--ink-soft);
}

.resv-copy p+p {
	margin-top: 1rem;
}

.resv-stage {
	display: grid;
	justify-items: center;
	width: 100%;
}

/* legend of table states, in the app's own colours */
.legend-row {
	margin-top: 1.6rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.4rem;
	font-family: "Poppins", sans-serif;
	font-size: 0.85rem;
	color: var(--ink-soft);

	span {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
	}

	i {
		width: 0.9rem;
		height: 0.9rem;
		border-radius: 0.25rem;
		background: var(--c);
	}
}

/* ---------- editor demo ---------- */

.ed-frame .rz-mapwrap {
	margin: 0.7rem;
}

/* the main hall is a tall hall: a squarer frame fits it */
.ed-frame .rz-map {
	aspect-ratio: 1.15 / 1;
}

.ed-card {
	position: absolute;
	left: 1.2rem;
	bottom: 1.2rem;
	z-index: 3;
	width: 11.5rem;
	padding: 0.7rem 0.8rem;
	border-radius: 0.9rem;
	background: rgba(250, 246, 241, 0.94);
	border: 1px solid rgba(66, 46, 47, 0.14);
	box-shadow: 0 0.8rem 1.8rem rgba(40, 28, 20, 0.18);
	font-size: 0.8rem;
	visibility: hidden;
	opacity: 0;
	translate: 0 0.5rem;
	transition: opacity 0.35s ease, translate 0.35s ease;

	&.is-on {
		visibility: visible;
		opacity: 1;
		translate: 0 0;
	}

	h4 {
		font-size: 0.88rem;
		margin-bottom: 0.35rem;
	}

	dl {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 0.15rem 0.6rem;
	}

	dt {
		color: #7a685a;
	}

	dd {
		min-width: 2.2rem;
		padding: 0 0.35rem;
		border: 1px solid transparent;
		border-radius: 0.35rem;
		font-weight: 700;
		text-align: center;
		transition: color 0.3s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	}

	/* the value turns into a field while it is being edited */
	dd.is-editing {
		background: #fff;
		border-color: rgba(66, 46, 47, 0.35);
		box-shadow: 0 0 0 3px rgba(110, 129, 81, 0.2);
	}

	.sel {
		background: #bcd0ea;
		border-radius: 2px;
	}

	.caret {
		display: inline-block;
		width: 1px;
		height: 1em;
		margin-inline-start: 1px;
		vertical-align: -0.15em;
		background: #422e2f;
		animation: rz-caret 1s steps(1) infinite;
	}

	dd.is-changed {
		color: #6e8151;
	}
}

/* ---------- race demo ---------- */

.race {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr);
	gap: 0.9rem;
	/* both guests share one height, whatever their message's length;
	   the server sits centred between them */
	align-items: stretch;
	font-family: "Poppins", sans-serif;
}

.race-guest,
.race-server {
	position: relative;
	padding: 1rem;
	border-radius: 1.1rem;
	background: linear-gradient(180deg, #ece4da, #dccdbd);
	border: 1px solid rgba(66, 46, 47, 0.12);
	color: #422e2f;
	box-shadow: 0 1rem 2rem rgba(40, 28, 20, 0.14);
}

.race-guest {
	display: grid;
	gap: 0.6rem;
	min-height: 11rem;
	align-content: start;

	.who {
		font-size: 0.75rem;
		letter-spacing: 1.5px;
		color: #7a685a;
	}

	.what {
		font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
		font-weight: 700;
		font-size: 1rem;
	}

	.rz-btn {
		justify-self: start;
	}

	.result {
		min-height: 3.4rem;
		font-size: 0.82rem;
		line-height: 1.45;
		opacity: 0;
		transition: opacity 0.35s ease;
	}

	.result.is-on {
		opacity: 1;
	}

	.fa {
		display: block;
		font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
		font-weight: 600;
		direction: rtl;
	}

	.ok {
		color: #56693c;
	}

	.no {
		color: #9a3b2f;
	}
}

.race-server {
	align-self: center;
	display: grid;
	justify-items: center;
	gap: 0.4rem;
	text-align: center;
	font-size: 0.78rem;

	.lock {
		width: 2.4rem;
		height: 2.4rem;
		border-radius: 50%;
		display: grid;
		place-items: center;
		background: #3b3229;
		color: #fff;
		transition: scale 0.25s ease;
	}

	&.is-busy .lock {
		scale: 1.12;
	}

	code {
		font-size: 0.72rem;
		padding: 0.1rem 0.4rem;
		border-radius: 0.3rem;
		background: rgba(59, 50, 41, 0.08);
	}
}

.race-dot {
	position: absolute;
	top: 50%;
	width: 0.7rem;
	height: 0.7rem;
	margin-top: -0.35rem;
	border-radius: 50%;
	background: #6e8151;
	opacity: 0;
}

@keyframes rz-caret {
	50% {
		opacity: 0;
	}
}

@media screen and (max-width: 1024px) {

	.avel-feature,
	.avel-feature.is-flipped {
		grid-template-columns: minmax(0, 1fr);
	}

	.avel-feature.is-flipped .resv-copy {
		order: 0;
	}
}

@media screen and (max-width: 767px) {
	.race {
		grid-template-columns: minmax(0, 1fr);
	}

	.race-guest {
		min-height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {

	.rz-cursor,
	.ed-card,
	.rz-pick {
		transition: none !important;
	}
}


/* =========================================================
   OVERVIEW — numbers
   ========================================================= */

.avel-numbers {
	list-style: none;
	margin-top: 1.6rem;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.2rem 1.5rem;

	li {
		display: grid;
		gap: 0.15rem;
	}

	b {
		font-family: "Roaheregular", serif;
		font-weight: 400;
		font-size: 2.6rem;
		line-height: 1;
	}

	span {
		font-family: "Poppins", sans-serif;
		font-size: 0.8rem;
		color: var(--ink-mute);
	}
}

/* =========================================================
   THE CAFÉ'S OWN SITE — a phone and a menu item, in the café's look
   ========================================================= */

.avel-site {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2.5rem 4.5rem;
	align-items: center;
}

.avel-site-copy p {
	max-width: 32rem;
	font-size: 1.05rem;
	line-height: 1.85;
	color: var(--ink-soft);
}

.avel-site-copy p+p {
	margin-top: 1rem;
}

.avel-site-shots {
	position: relative;
	margin: 0;
	min-height: 34rem;
	font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
}

.as-phone {
	position: absolute;
	top: 0;
	right: 6%;
	width: min(17.5rem, 58%);
	aspect-ratio: 9 / 18.5;
	border-radius: 2.2rem;
	border: 0.45rem solid #1d1714;
	overflow: hidden;
	box-shadow: 0 1.8rem 3.5rem rgba(20, 12, 10, 0.32);
	background: #1f1516;

	img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}

	&::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(180deg, rgba(31, 21, 22, 0.25), rgba(31, 21, 22, 0.15) 40%, rgba(31, 21, 22, 0.75));
	}
}

.as-hero {
	position: absolute;
	inset: auto 0 12% 0;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: 0.35rem;
	padding: 0 1rem;
	text-align: center;
	color: #efeae4;
}

.as-eyebrow {
	font-size: 0.72rem;
	opacity: 0.85;
}

.as-name {
	font-size: 4.2rem;
	font-weight: 700;
	line-height: 1.05;
}

.as-sub {
	font-size: 0.82rem;
}

.as-cta {
	margin-top: 0.6rem;
	padding: 0.45rem 1.3rem;
	border-radius: 0.6rem;
	background: #efeae4;
	color: #422e2f;
	font-weight: 700;
	font-size: 0.85rem;
}

.as-card {
	position: absolute;
	left: 0;
	bottom: 2rem;
	z-index: 2;
	width: min(15.5rem, 52%);
	border-radius: 1.2rem;
	overflow: hidden;
	background: #efeae4;
	color: #1f1516;
	border: 1px solid rgba(66, 46, 47, 0.12);
	box-shadow: 0 1.4rem 3rem rgba(20, 12, 10, 0.28);

	img {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		object-fit: cover;
	}
}

.as-card-body {
	display: grid;
	gap: 0.3rem;
	padding: 0.8rem 0.9rem 0.9rem;
	font-size: 0.85rem;

	b {
		font-size: 1rem;
	}
}

.as-price {
	color: #6d5f54;
	font-weight: 600;
}

.as-addon {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.35rem 0.55rem;
	border-radius: 0.6rem;
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(66, 46, 47, 0.14);

	i {
		width: 0.9rem;
		height: 0.9rem;
		border-radius: 0.25rem;
		background: #422e2f;
		box-shadow: inset 0 0 0 2px #efeae4;
	}

	small {
		margin-right: auto;
		color: #6d5f54;
	}
}

.as-add {
	margin-top: 0.2rem;
	padding: 0.45rem;
	border-radius: 0.6rem;
	background: #422e2f;
	color: #efeae4;
	text-align: center;
	font-weight: 600;
}

@media screen and (max-width: 1024px) {
	.avel-site {
		grid-template-columns: minmax(0, 1fr);
	}

	.avel-site-shots {
		width: min(30rem, 100%);
		justify-self: center;
	}
}

@media screen and (max-width: 520px) {
	.avel-site-shots {
		min-height: 27rem;
	}

	.as-name {
		font-size: 3rem;
	}

	.as-eyebrow {
		font-size: 0.6rem;
	}

	.as-sub {
		font-size: 0.68rem;
	}
}

/* =========================================================
   PICK FOR ME — the dialog and the engine's view
   ========================================================= */

.pick-stage {
	display: grid;
	justify-items: center;
	width: 100%;
}

.pk-wrap {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
	gap: 1rem;
	align-items: stretch;
}

.pk {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 30rem;
	border-radius: 1.4rem;
	overflow: hidden;
	background: #efeae4;
	color: #1f1516;
	border: 1px solid rgba(66, 46, 47, 0.12);
	box-shadow: 0 2rem 4rem rgba(40, 28, 20, 0.22);
	font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
	text-align: right;
}

.pk-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.85rem 1.1rem;
	background: #422e2f;
	color: #efeae4;
	font-weight: 700;
}

.pk-back {
	border: 1px solid rgba(239, 234, 228, 0.35);
	border-radius: 999px;
	padding: 0.15rem 0.8rem;
	background: transparent;
	color: inherit;
	font: 600 0.8rem/1.6 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;
}

.pk-progress {
	height: 3px;
	background: rgba(66, 46, 47, 0.1);

	i {
		display: block;
		height: 100%;
		width: 0;
		margin-inline-start: 0;
		background: #6d5f54;
		transition: width 0.45s var(--ease-out);
	}
}

.pk-screen {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	padding: 1.2rem 1.1rem 1.1rem;
	animation: pk-in 0.35s var(--ease-out);
}

.pk-title {
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.4;
}

.pk-sub {
	margin-top: -0.4rem;
	font-size: 0.88rem;
	color: #6d5f54;
}

.pk-kinds {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
	gap: 0.6rem;
}

.pk-kind {
	display: grid;
	justify-items: center;
	gap: 0.3rem;
	padding: 1rem 0.5rem;
	border-radius: 1rem;
	border: 1px solid rgba(66, 46, 47, 0.14);
	background: rgba(255, 255, 255, 0.55);
	color: #1f1516;
	font: 700 1rem/1.4 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;

	svg {
		width: 2rem;
		height: 2rem;
		color: #422e2f;
	}
}

.pk-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
	gap: 0.55rem;
}

.pk-option {
	min-height: 3rem;
	padding: 0.6rem 0.8rem;
	border-radius: 1rem;
	border: 1px solid rgba(66, 46, 47, 0.14);
	background: rgba(255, 255, 255, 0.55);
	color: #1f1516;
	font: 700 0.98rem/1.5 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;
}

.pk-kind,
.pk-option,
.pk-skip,
.pk-now,
.pk-primary,
.pk-secondary {
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, scale 0.15s ease;
}

.pk-kind:hover,
.pk-option:hover {
	border-color: #422e2f;
	background: rgba(255, 255, 255, 0.85);
}

.pk-kind.is-press,
.pk-option.is-press {
	scale: 0.95;
	border-color: #422e2f;
	background: #422e2f;
	color: #efeae4;

	svg {
		color: inherit;
	}
}

.pk-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: auto;
}

.pk-skip {
	align-self: flex-start;
	border: 0;
	padding: 0.3rem 0;
	background: none;
	color: #6d5f54;
	font: 600 0.88rem/1.5 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	text-decoration: underline;
	text-underline-offset: 0.3em;
	cursor: pointer;
}

.pk-now,
.pk-primary,
.pk-secondary {
	border-radius: 0.8rem;
	padding: 0.5rem 1rem;
	font: 700 0.88rem/1.4 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;
}

.pk-now,
.pk-primary {
	border: 0;
	background: #422e2f;
	color: #efeae4;
}

.pk-secondary {
	border: 1px solid rgba(66, 46, 47, 0.25);
	background: transparent;
	color: #422e2f;
}

.pk-kind:focus-visible,
.pk-option:focus-visible,
.pk-skip:focus-visible,
.pk-now:focus-visible,
.pk-primary:focus-visible,
.pk-secondary:focus-visible,
.pk-back:focus-visible {
	outline: 2px solid #422e2f;
	outline-offset: 2px;
}

.pk-results {
	list-style: none;
	display: grid;
	gap: 0.55rem;

	li {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.6rem;
		border-radius: 1rem;
		background: rgba(255, 255, 255, 0.6);
		border: 1px solid rgba(66, 46, 47, 0.12);
		animation: pk-in 0.4s var(--ease-out) both;
		animation-delay: calc(var(--i, 0) * 90ms);
	}
}

.pk-pic {
	flex: none;
	width: 3.2rem;
	height: 3.2rem;
	display: grid;
	place-items: center;
	border-radius: 0.8rem;
	background: #c5bcad;
	color: #422e2f;

	svg {
		width: 1.6rem;
		height: 1.6rem;
	}
}

.pk-info {
	display: grid;
	gap: 0.05rem;
	min-width: 0;

	b {
		font-size: 1rem;
	}

	small {
		font-size: 0.78rem;
		color: #6d5f54;
	}

	.pk-reason {
		color: #50623d;
		font-weight: 600;
	}
}

/* the engine's side: dark glass, like the notes */
.pk-brain {
	padding: 1.2rem 1.2rem 1.3rem;
	font-family: "Poppins", sans-serif;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.pk-label {
	font-size: 0.65rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}

.pk-count {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);

	b {
		font-family: "Roaheregular", serif;
		font-weight: 400;
		font-size: 3.2rem;
		line-height: 1;
		color: var(--accent);
	}

	span {
		font-size: 0.8rem;
		color: rgba(255, 255, 255, 0.75);
	}
}

.pk-groups {
	list-style: none;
	display: grid;
	gap: 0.45rem;
}

.pk-empty {
	font-size: 0.8rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.65);
}

.pk-g {
	display: grid;
	grid-template-columns: 5.6rem minmax(0, 1fr) 5.6rem;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.82);
	transition: opacity 0.3s ease;
}

.pk-gname {
	font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
	font-size: 0.85rem;
	text-align: right;
}

.pk-gbar {
	height: 0.45rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;

	i {
		display: block;
		height: 100%;
		border-radius: inherit;
		background: rgba(255, 255, 255, 0.4);
		transition: width 0.5s var(--ease-out);
	}
}

.pk-gval {
	font-size: 0.7rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: rgba(255, 255, 255, 0.6);

	&:lang(fa) {
		font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
		font-size: 0.8rem;
		direction: rtl;
		text-align: left;
	}
}

.pk-g.is-asked {
	color: #fff;

	.pk-gbar i {
		background: var(--accent);
	}

	.pk-gval {
		color: var(--accent);
	}
}

.pk-g.is-done .pk-gval {
	color: #fff;
}

.pk-g.is-useless,
.pk-g.is-passed {
	opacity: 0.45;
}

@keyframes pk-in {
	from {
		opacity: 0;
		translate: 0 0.4rem;
	}
}

@media screen and (max-width: 1200px) and (min-width: 1025px) {
	.pk-wrap {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media screen and (max-width: 640px) {
	.pk-wrap {
		grid-template-columns: minmax(0, 1fr);
	}

	.pk {
		min-height: 26rem;
	}
}

/* =========================================================
   GAMES — connect four against the café's bot
   ========================================================= */

.game-chips {
	list-style: none;
	margin-top: 1.4rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	max-width: 30rem;

	li {
		padding: 0.2rem 0.75rem;
		border-radius: 999px;
		border: 1px solid rgba(0, 0, 0, 0.14);
		font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
		font-size: 0.9rem;
		color: var(--ink-soft);
	}
}

.c4 {
	--you: #422e2f;
	--bot: #d9a441;
	margin: 0;
	width: min(27rem, 100%);
	padding: 1rem 1rem 1.1rem;
	border-radius: 1.4rem;
	background: linear-gradient(180deg, #ece4da 0%, #dccdbd 100%);
	border: 1px solid rgba(66, 46, 47, 0.12);
	box-shadow: 0 2rem 4rem rgba(40, 28, 20, 0.22);
	color: #422e2f;
	font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif;
	display: grid;
	gap: 0.7rem;
}

.c4-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
}

.c4-name {
	font-weight: 700;
	font-size: 1.1rem;
}

.c4-levels {
	display: flex;
	padding: 0.2rem;
	border-radius: 0.8rem;
	background: rgba(255, 255, 255, 0.45);
	border: 1px solid rgba(66, 46, 47, 0.12);

	button {
		border: 0;
		border-radius: 0.6rem;
		padding: 0.25rem 0.85rem;
		background: transparent;
		color: inherit;
		font: 700 0.85rem/1.5 "Baloo Bhaijaan 2", Tahoma, sans-serif;
		cursor: pointer;
	}

	[aria-pressed="true"] {
		background: #422e2f;
		color: #efeae4;
	}
}

.c4-score {
	display: flex;
	justify-content: space-between;
	font-size: 0.9rem;

	span {
		display: inline-flex;
		align-items: center;
		gap: 0.4rem;
	}

	b {
		font-size: 1.1rem;
	}
}

.c4-dot {
	width: 0.8rem;
	height: 0.8rem;
	border-radius: 50%;

	&.is-you {
		background: var(--you);
	}

	&.is-bot {
		background: var(--bot);
	}
}

.c4-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.35rem;
	padding: 0.5rem;
	border-radius: 1rem;
	background: #6d5f54;
	box-shadow: inset 0 0.3rem 0.8rem rgba(0, 0, 0, 0.25);
}

.c4-cell {
	position: relative;
	aspect-ratio: 1;
	border: 0;
	border-radius: 50%;
	background: #efeae4;
	box-shadow: inset 0 0.2rem 0.35rem rgba(0, 0, 0, 0.22);
	cursor: pointer;
	padding: 0;
	transition: background-color 0.15s ease;

	&:disabled {
		cursor: default;
	}

	&.is-col:not(.is-you):not(.is-bot) {
		background: #f8f4ef;
	}

	&::after {
		content: "";
		position: absolute;
		inset: 8%;
		border-radius: 50%;
		scale: 0;
	}

	&.is-you::after,
	&.is-bot::after {
		scale: 1;
		box-shadow: inset 0 -0.2rem 0.3rem rgba(0, 0, 0, 0.25);
	}

	&.is-you::after {
		background: var(--you);
	}

	&.is-bot::after {
		background: var(--bot);
	}

	&.is-last::after {
		animation: c4-drop calc(0.12s + var(--fall, 1) * 0.06s) cubic-bezier(0.5, 0, 0.75, 0) both;
	}

	&.is-win::after {
		outline: 3px solid #fff;
		outline-offset: -3px;
		animation: c4-win 0.9s ease-in-out infinite alternate;
	}

	&:focus-visible {
		outline: 2px solid #422e2f;
		outline-offset: 2px;
	}
}

@keyframes c4-drop {
	from {
		translate: 0 calc(var(--fall, 1) * -118%);
	}
}

@keyframes c4-win {
	to {
		scale: 0.86;
	}
}

.c4-status {
	min-height: 1.6rem;
	font-size: 0.95rem;
	text-align: center;
}

.c4-again {
	justify-self: center;
	border: 0;
	border-radius: 0.8rem;
	padding: 0.5rem 1.2rem;
	background: #422e2f;
	color: #efeae4;
	font: 700 0.9rem/1.3 "Baloo Bhaijaan 2", Tahoma, sans-serif;
	cursor: pointer;
}

.c4-think {
	min-height: 1.4rem;
	text-align: center;
}

/* =========================================================
   A SEAT, NOT A SLOT — the booking flow
   ========================================================= */

.seat-copy {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 4.5rem;

	.case-h2 {
		grid-column: 1 / -1;
	}

	p+p {
		margin-top: 0;
	}
}

.flow {
	list-style: none;
	counter-reset: flow;
	margin-top: 2.4rem;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.6rem;

	li {
		counter-increment: flow;
		position: relative;
		display: grid;
		gap: 0.2rem;
		padding: 1rem 0.9rem 1rem;
		border-radius: 1rem;
		background: linear-gradient(180deg, #ece4da, #dccdbd);
		border: 1px solid rgba(66, 46, 47, 0.12);
		color: #422e2f;
	}

	li::before {
		content: "0" counter(flow);
		font-family: "Poppins", sans-serif;
		font-size: 0.7rem;
		color: #7a685a;
	}

	li:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 50%;
		right: -0.45rem;
		width: 0.3rem;
		height: 0.3rem;
		border-radius: 50%;
		background: #7a685a;
		z-index: 1;
	}

	b {
		font-family: "Roaheregular", serif;
		font-weight: 400;
		font-size: 1.4rem;
		line-height: 1.1;
	}

	span {
		font-family: "Poppins", sans-serif;
		font-size: 0.75rem;
		color: #6b5a4d;
	}
}

@media screen and (max-width: 1024px) {
	.seat-copy {
		grid-template-columns: minmax(0, 1fr);

		p+p {
			margin-top: 1rem;
		}
	}

	.flow {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.flow li:nth-child(3)::after {
		display: none;
	}
}

@media screen and (max-width: 520px) {
	.flow {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.flow li:nth-child(even)::after {
		display: none;
	}

	.flow li:nth-child(3)::after {
		display: block;
	}
}

/* =========================================================
   ONE PANEL, THREE ROLES
   ========================================================= */

.roles {
	width: 100%;
	padding: 0.6rem 1.2rem 0.8rem;
	border-radius: 1.4rem;
	background: linear-gradient(180deg, #ece4da, #dccdbd);
	border: 1px solid rgba(66, 46, 47, 0.12);
	box-shadow: 0 2rem 4rem rgba(40, 28, 20, 0.16);
	color: #422e2f;
	font-family: "Poppins", sans-serif;
}

.roles-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) repeat(3, 4.8rem);
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 0;
	border-top: 1px solid rgba(66, 46, 47, 0.12);
	font-size: 0.85rem;

	i {
		justify-self: center;
		width: 1.4rem;
		height: 1.4rem;
		border-radius: 50%;
	}

	.y {
		background: #422e2f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23efeae4' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
	}

	.n {
		border: 1.5px solid rgba(66, 46, 47, 0.25);
		scale: 0.55;
	}
}

.roles-head {
	border-top: 0;
	font-size: 0.7rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #7a685a;

	span {
		text-align: center;
	}
}

@media screen and (max-width: 520px) {
	.roles {
		padding-inline: 0.8rem;
	}

	.roles-row {
		grid-template-columns: minmax(0, 1fr) repeat(3, 3.6rem);
		font-size: 0.78rem;
	}

	.roles-head {
		font-size: 0.6rem;
		letter-spacing: 0;
	}
}

/* =========================================================
   BUILT TO HAND OVER
   ========================================================= */

.handover {
	list-style: none;
	margin-top: 2rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0 2rem;

	li {
		padding-top: 1rem;
		border-top: 2px solid var(--ink);
	}

	b {
		display: block;
		font-family: "Roaheregular", serif;
		font-weight: 400;
		font-size: 1.6rem;
		line-height: 1.15;
	}

	p {
		margin-top: 0.6rem;
		font-family: "Poppins", sans-serif;
		font-size: 0.88rem;
		line-height: 1.7;
		color: var(--ink-soft);
	}
}

@media screen and (max-width: 1024px) {
	.handover {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2rem;
	}
}

@media screen and (max-width: 520px) {
	.handover {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* four stack groups on a wide screen */
@media screen and (min-width: 1025px) {
	.case-avel .stack-groups {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {

	.pk-screen,
	.pk-results li,
	.c4-cell::after {
		animation: none !important;
	}
}

/* =========================================================
   THE STORY — two parts, numbered steps
   ========================================================= */

.act {
	width: min(72rem, 88%);
	display: grid;
	justify-items: center;
	gap: 0.6rem;
	padding: 3rem 0 0.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.14);
	text-align: center;
}

.act-kicker {
	font-family: "Poppins", sans-serif;
	font-size: 0.7rem;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--label);
}

.act-title {
	font-size: clamp(3rem, 7vw, 5.6rem);
	font-weight: 400;
	line-height: 1;
}

.act-lead {
	max-width: 30rem;
	font-family: "Poppins", sans-serif;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ink-soft);
}

/* the number of each step, in the café's sand */
.step {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.4rem;
	font-family: "Poppins", sans-serif;
	font-size: 0.75rem;
	letter-spacing: 2px;
	color: #8a6d4c;

	&::after {
		content: "";
		width: 2.2rem;
		height: 1px;
		background: currentColor;
	}
}

.seat-copy .step {
	grid-column: 1 / -1;
	justify-self: start;
}

.handover-lead {
	margin-top: 0.4rem;
	font-family: "Poppins", sans-serif;
	font-size: 1rem;
	color: var(--ink-soft);
}

/* the menu section sits with its copy on the right */
@media screen and (min-width: 1025px) {
	.avel-site.is-flipped .avel-site-copy {
		order: 2;
	}

	.avel-site.is-flipped .as-phone {
		right: auto;
		left: 6%;
	}

	.avel-site.is-flipped .as-card {
		left: auto;
		right: 0;
	}
}

/* the engine's panel: the café's own brown, like its header, not the portfolio's black glass */
.pk-brain {
	border-radius: 1.4rem;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(201, 167, 124, 0.16), transparent 60%),
		linear-gradient(180deg, #4a3536 0%, #2f2122 100%);
	border: 1px solid rgba(66, 46, 47, 0.4);
	box-shadow: 0 2rem 4rem rgba(40, 28, 20, 0.22);
	color: #efeae4;
}

.pk-label {
	color: rgba(239, 234, 228, 0.55);
}

.pk-count {
	border-bottom-color: rgba(239, 234, 228, 0.14);
}

.nowrap {
	white-space: nowrap;
}
