/*--------------------------------------------------------------
# Book a Call — Captain's Announcement
# Who's on the call, before the prices. An off-white card topped by
# the overhead panel above an airline seat (reading lights, speaker
# grille, seatbelt and wifi signs, attendant call button), with
# Owen's photo and three caption lines underneath.
--------------------------------------------------------------*/

/* ── Section ──
   Top padding only: the dark hero above keeps its padding inside the band,
   so this needs its own gap, while .bac-options below brings its own top
   padding, which becomes the gap between the two. The four steps match
   .bac-options' top padding at each breakpoint, so the rhythm holds. */
.bac-captain {
	/* The theme loads no monospace font; this is the same system stack
	   .faq-signs uses, scoped to the section. */
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

	background: var(--tpp-white);
	padding: 96px 0 0;
}

.bac-captain__container {
	width: 100%;
	max-width: var(--tpp-container-max);
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

/* Same size and weight as "How long do you need?" right below it */
.bac-captain__heading {
	text-align: center;
	font-family: var(--tpp-font-heading);
	font-size: clamp(1.9rem, 4vw + 0.5rem, 3rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0 0 48px;
}


/* ──────────────────────────────────────────────
   The card
   ────────────────────────────────────────────── */

.bac-captain__card {
	max-width: 1080px;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid var(--tpp-border-light);
	border-radius: 28px;
	background: var(--tpp-off-white);
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* .is-visible comes from the page's shared observer in js/book-a-call-hero.js */
.bac-captain.is-visible .bac-captain__card {
	opacity: 1;
	transform: translateY(0);
}


/* ──────────────────────────────────────────────
   The overhead panel
   ────────────────────────────────────────────── */

.bac-captain__panel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 16px 16px 16px 28px;
	background: linear-gradient(180deg, #262626, var(--tpp-black));
	color: var(--tpp-white);
}

/* The pool of light the reading lamp throws down onto the photo */
.bac-captain__panel::after {
	content: '';
	position: absolute;
	z-index: 1;
	left: -10px;
	top: 100%;
	width: 320px;
	height: 300px;
	background: radial-gradient(ellipse 50% 70% at 50% 0, rgba(255, 238, 186, 0.5), transparent 75%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 1.4s ease;
}

.bac-captain.is-on .bac-captain__panel::after {
	opacity: 1;
}

/* Reading lights: only the first one is switched on */
.bac-captain__lights {
	display: flex;
	gap: 12px;
}

.bac-captain__light {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(circle at 40% 35%, #4A4A4A, #161616 70%);
	box-shadow: inset 0 0 0 2px #333;
	transition: background 0.6s ease, box-shadow 0.6s ease;
}

.bac-captain.is-on .bac-captain__light:first-child {
	background: radial-gradient(circle at 50% 45%, #FFFDF2 0 28%, #F4E7B8 58%, #8F8461 100%);
	box-shadow: inset 0 0 0 2px #5A5440, 0 0 22px 4px rgba(255, 240, 190, 0.45);
}

/* Speaker grille: a dot pattern, with an orange sweep masked to the same dots
   while Owen is "speaking" */
.bac-captain__grille {
	position: relative;
	flex: none;
	width: 132px;
	height: 34px;
	overflow: hidden;
	border-radius: 17px;
	background: #121212 radial-gradient(circle, #4A4A4A 1.2px, transparent 1.7px) 0 0 / 7px 7px;
	box-shadow: inset 0 0 0 2px #2C2C2C;
}

.bac-captain__grille::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, var(--tpp-accent), transparent) -100% 0 / 60% 100% no-repeat;
	-webkit-mask: radial-gradient(circle, #000 1.2px, transparent 1.7px) 0 0 / 7px 7px;
	mask: radial-gradient(circle, #000 1.2px, transparent 1.7px) 0 0 / 7px 7px;
	opacity: 0;
	transition: opacity 0.4s;
}

.bac-captain.is-speaking .bac-captain__grille::after {
	opacity: 1;
	animation: bac-captain-grille 1.1s ease-in-out infinite;
}

@keyframes bac-captain-grille {
	from {
		background-position: -100% 0;
	}
	to {
		background-position: 250% 0;
	}
}

/* Seatbelt and wifi signs, lit orange once the panel switches on */
.bac-captain__signs {
	display: flex;
	gap: 10px;
}

.bac-captain__sign {
	display: grid;
	place-items: center;
	width: 58px;
	height: 34px;
	border-radius: 8px;
	background: #111;
	box-shadow: inset 0 0 0 2px #2C2C2C;
	color: #4D4D4D;
	transition: color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.bac-captain__sign svg {
	width: 22px;
	height: 22px;
}

.bac-captain.is-on .bac-captain__sign {
	background: #1D2110;
	box-shadow: inset 0 0 0 2px rgba(255, 153, 0, 0.35), 0 0 16px rgba(255, 153, 0, 0.22);
	color: var(--tpp-accent);
}

.bac-captain.is-on .bac-captain__sign + .bac-captain__sign {
	transition-delay: 0.3s;
}


/* ── The attendant call button (the CTA) ──
   The colour is restated for every link state because style.css sets
   :visited, :hover, :focus and :active to color: inherit. */
.bac-captain__call,
.bac-captain__call:visited,
.bac-captain__call:hover,
.bac-captain__call:focus,
.bac-captain__call:active {
	color: var(--tpp-white);
}

.bac-captain__call {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
	padding: 6px 20px 6px 6px;
	border-radius: var(--tpp-radius-pill);
	background: #111;
	box-shadow: inset 0 0 0 2px #2C2C2C;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: box-shadow 0.25s ease;
}

.bac-captain__call:hover,
.bac-captain__call:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px rgba(255, 153, 0, 0.55);
}

.bac-captain__call-btn {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #2A2A2A;
	box-shadow: inset 0 0 0 2px #3A3A3A;
	transition: background 0.25s ease, color 0.25s ease;
}

.bac-captain__call-btn svg {
	width: 18px;
	height: 18px;
}

.bac-captain__call:hover .bac-captain__call-btn,
.bac-captain__call:focus-visible .bac-captain__call-btn,
.bac-captain__call.is-ringing .bac-captain__call-btn {
	background: var(--tpp-accent);
	box-shadow: none;
	color: var(--tpp-black);
}

/* The chime: a ring that spreads out twice when the button is pressed */
.bac-captain__call-btn::after {
	content: '';
	position: absolute;
	inset: -2px;
	border: 2px solid var(--tpp-accent);
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
}

.bac-captain__call.is-ringing .bac-captain__call-btn::after {
	animation: bac-captain-ding 0.9s ease-out 2;
}

@keyframes bac-captain-ding {
	from {
		transform: scale(1);
		opacity: 0.9;
	}
	to {
		transform: scale(2.3);
		opacity: 0;
	}
}


/* ──────────────────────────────────────────────
   Photo and captions
   ────────────────────────────────────────────── */

.bac-captain__body {
	position: relative;
	display: grid;
	grid-template-columns: 340px minmax(0, 1fr);
	gap: 56px;
	align-items: center;
	padding: 48px 56px 52px;
}

.bac-captain__photo {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 20px;
	box-shadow: 0 24px 44px -26px rgba(0, 0, 0, 0.45);
}

.bac-captain__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 40%;
}

.bac-captain__tag {
	position: absolute;
	left: 14px;
	bottom: 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 9px;
	border-radius: var(--tpp-radius-pill);
	background: rgba(26, 26, 26, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--tpp-white);
	font-family: var(--mono);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* The "on air" dot: grey until Owen is speaking */
.bac-captain__tag i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #5A5A5A;
	transition: background 0.3s ease;
}

.bac-captain.is-speaking .bac-captain__tag i {
	background: var(--tpp-accent);
	animation: bac-captain-live 1.2s ease-in-out infinite;
}

@keyframes bac-captain-live {
	50% {
		box-shadow: 0 0 0 5px rgba(255, 153, 0, 0.25);
	}
}

.bac-captain__script {
	display: grid;
	gap: 14px;
}

.bac-captain__line {
	position: relative;
	margin: 0;
	padding-left: 22px;
	font-family: var(--tpp-font-heading);
	font-size: 1.3125rem;
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: -0.015em;
	color: var(--tpp-black);
	transition: opacity 0.6s ease;
}

.bac-captain__line::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.32em;
	width: 6px;
	height: 0.95em;
	border-radius: 3px;
	background: var(--tpp-border);
	transition: background 0.4s ease;
}

/* The lines only wait to be "said" once js/book-a-call-captain.js has armed
   the section. Without it they are simply all there. */
.bac-captain.is-armed .bac-captain__line {
	opacity: 0.14;
}

.bac-captain.is-armed .bac-captain__line.is-said {
	opacity: 1;
}

.bac-captain__line.is-now::before {
	background: var(--tpp-accent-dark);
}

.bac-captain__facts {
	display: grid;
	grid-template-columns: repeat(4, auto);
	justify-content: start;
	gap: 14px 36px;
	margin: 32px 0 0;
	padding: 24px 0 0;
	border-top: 1px dashed var(--tpp-border);
}

.bac-captain__fact dt {
	font-family: var(--mono);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
}

.bac-captain__fact dd {
	margin: 4px 0 0;
	font-family: var(--tpp-font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--tpp-black);
}


/* ──────────────────────────────────────────────
   Reduced motion
   Everything shows in its final state at once.
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.bac-captain__card,
	.bac-captain__panel::after,
	.bac-captain__light,
	.bac-captain__sign,
	.bac-captain__line,
	.bac-captain__line::before,
	.bac-captain__call,
	.bac-captain__call-btn,
	.bac-captain__tag i {
		transition: none;
	}

	.bac-captain.is-speaking .bac-captain__grille::after,
	.bac-captain.is-speaking .bac-captain__tag i,
	.bac-captain__call.is-ringing .bac-captain__call-btn::after {
		animation: none;
	}
}


/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Tablet (≤991px) */
@media screen and (max-width: 991px) {
	.bac-captain {
		padding-top: 80px;
	}

	.bac-captain__body {
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 36px;
		padding: 40px;
	}

	.bac-captain__facts {
		grid-template-columns: repeat(2, auto);
	}

	/* No reading lights here, so no pool of light either */
	.bac-captain__lights,
	.bac-captain__panel::after {
		display: none;
	}
}

/* Mobile (≤767px) — photo on top, landscape */
@media screen and (max-width: 767px) {
	.bac-captain {
		padding-top: 64px;
	}

	.bac-captain__heading {
		margin-bottom: 32px;
	}

	.bac-captain__card {
		border-radius: 24px;
	}

	.bac-captain__panel {
		gap: 14px;
		padding: 12px 12px 12px 18px;
	}

	.bac-captain__sign--wifi {
		display: none;
	}

	.bac-captain__body {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 28px 24px 32px;
	}

	.bac-captain__photo {
		aspect-ratio: 3 / 2;
	}

	.bac-captain__line {
		font-size: 1.125rem;
	}
}

/* Small mobile (≤480px) */
@media screen and (max-width: 480px) {
	.bac-captain {
		padding-top: 48px;
	}

	.bac-captain__grille {
		display: none;
	}

	.bac-captain__body {
		padding: 24px 18px 28px;
	}

	.bac-captain__facts {
		grid-template-columns: 1fr 1fr;
		gap: 14px 20px;
	}
}
