/*
 * A call center's front page (mu-plugins/aws-core/call-center-front.php).
 *
 * The page is the kit's own sections in the site's own design: the kit's
 * header and footer, and the colours, type and corners the site's design
 * settings give the kit's tokens (theme.json, tenant-design.php). Nothing here
 * names a colour or a typeface of its own. What is here is the shape -- the
 * shape a2bers.com tells its story in, a headline beside a picture, three
 * promises under a rule, steps in a row -- and the two things only this page
 * has: the picture beside the headline and the screenshots of the center at
 * work.
 *
 * Gutters are 16px on a phone and grow with the window.
 */

body.aws-cc-front,
body.aws-cc-site {
	--aws-cc-gutter: clamp(16px, 4.2vw, 60px);
	--aws-cc-measure: var(--wp--style--global--wide-size, 1320px);
	--aws-cc-rule: var(--wp--preset--color--divider);
	--aws-cc-shadow: color-mix(in srgb, var(--wp--preset--color--ink) 38%, transparent);
	overflow-x: clip;
}

/*
 * The website's other pages -- the blog, About, Pricing, Contact -- the front
 * page's width: their title and every section held to the same wide measure,
 * between the same gutters, rather than the text column a page has elsewhere.
 */
.aws-cc-site:not(.aws-cc-front) .aws-page :is(.aws-grid, .has-global-padding) {
	padding-inline: var(--aws-cc-gutter);
}

.aws-cc-site:not(.aws-cc-front) .aws-page :is(.wp-block-post-title, .aws-grid > *) {
	margin-inline: auto;
	max-width: var(--aws-cc-measure);
}

.aws-cc-site:not(.aws-cc-front) .aws-page .aws-grid > * :is([class*="__inner"]) {
	max-width: none;
	padding-inline: 0;
}

/* The sections, each the page's width, their words held to the site's wide measure. */
.aws-cc-front .aws-grid > :is(.aws-hero, .aws-features, .aws-cards, .aws-cc-screens, .aws-steps, .aws-band, .aws-form) {
	box-sizing: border-box;
	padding-inline: var(--aws-cc-gutter);
}

.aws-cc-front :is(.aws-hero__inner, .aws-features__inner, .aws-cards__inner, .aws-cc-screens__inner, .aws-steps__inner, .aws-band__inner, .aws-form__inner) {
	margin-inline: auto;
	max-width: var(--aws-cc-measure);
	padding-inline: 0;
}

/* A rule between the sections that share the page's ground, as a2bers.com draws them. */
.aws-cc-front .aws-grid > :is(.aws-cards, .aws-cc-screens, .aws-steps, .aws-form) {
	border-top: 1px solid var(--aws-cc-rule);
}

/* Section headings: the site's heading face and weight, at a size the page can hold. */
.aws-cc-front :is(.aws-features__heading, .aws-cards__heading, .aws-cc-screens__heading, .aws-steps__heading, .aws-form__heading) {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: var(--wp--custom--heading-weight, 400);
	line-height: 1.1;
}

/* The opening ------------------------------------------------------------- */

.aws-cc-front .aws-hero {
	padding-block: clamp(24px, 3vw, 48px) clamp(36px, 4.5vw, 72px);
}

.aws-cc-front .aws-hero__inner {
	/* The words start where the picture does, under the header -- not centred on the picture's height, which left a gap above them. */
	align-items: start;
	gap: clamp(28px, 4vw, 72px);
	grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
}

/*
 * The headline in two even lines -- "All calls answered / around the clock" --
 * whatever the window and whichever face the site has chosen: sized to its
 * column, so the first line always fits on one, never one word on a line of
 * its own. The site's display size is the ceiling.
 */
.aws-cc-front .aws-hero__said {
	container-type: inline-size;
	padding-block-start: clamp(4px, 1.5vw, 24px);
}

.aws-cc-front .aws-hero__said > :first-child { margin-block-start: 0; }

.aws-cc-front .aws-hero__heading {
	font-size: min(var(--wp--preset--font-size--display), 10.8cqi);
	line-height: 1.02;
	max-width: none;
	text-wrap: balance;
}

.aws-cc-front .aws-hero__lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
	max-width: 56ch;
}

.aws-cc-front .aws-hero__actions {
	margin-top: var(--wp--preset--spacing--2);
}

/* The three promises: three even columns under a rule, each led by a small mark in the site's accent. */
.aws-cc-front .aws-hero__proof {
	border-top: 2px solid var(--wp--preset--color--ink);
	display: grid;
	font-size: var(--wp--preset--font-size--small);
	gap: 12px 28px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	line-height: 1.4;
	margin-top: var(--wp--preset--spacing--4);
	opacity: 1;
	padding-top: 18px;
}

.aws-cc-front .aws-hero__proof li {
	align-items: flex-start;
	display: flex;
	gap: 10px;
}

.aws-cc-front .aws-hero__proof li::before,
.aws-cc-front .aws-hero__proof li + li::before {
	background: var(--wp--preset--color--accent);
	border-radius: 2px;
	content: "";
	flex: none;
	height: 8px;
	margin: 6px 0 0;
	width: 8px;
}

/* The picture: somebody answering, with a call ringing laid over its corner. */
.aws-cc-front .aws-hero__figure.has-cc {
	align-self: center;
	margin: 0;
	max-width: none;
}

.aws-cc-hero {
	display: block;
	margin-inline: auto 0;
	max-width: 500px;
	position: relative;
}

.aws-cc-hero__photo {
	/* About as tall as the words beside it: a portrait was taller, and left a gap under them. */
	aspect-ratio: 6 / 5;
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: 0 30px 60px -24px var(--aws-cc-shadow);
	display: block;
	height: auto;
	object-fit: cover;
	object-position: 50% 15%;
	width: 100%;
}

.aws-cc-hero__card {
	background: var(--wp--preset--color--background);
	border-radius: var(--wp--custom--radius--sm);
	bottom: 9%;
	box-shadow: 0 22px 44px -12px var(--aws-cc-shadow);
	display: block;
	height: auto;
	left: -14%;
	position: absolute;
	transform: rotate(-3deg);
	width: 56%;
}

/* The pictures in a circle, turning: each a share of the way through the same cross-fade, CSS and no script. */
.aws-cc-hero__turn {
	aspect-ratio: 1;
	border-radius: 50%;
	box-shadow: 0 30px 60px -24px var(--aws-cc-shadow);
	display: block;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.aws-cc-hero__slide {
	animation: aws-cc-hero-turn calc(var(--aws-stage-many) * 5s) infinite;
	animation-delay: calc(var(--aws-stage-index) * -5s);
	display: block;
	height: 100%;
	inset: 0;
	object-fit: cover;
	/* Each cropped with its people in the middle of the circle, so all of them shows. */
	object-position: 50% 50%;
	opacity: 0;
	position: absolute;
	width: 100%;
}

.aws-cc-hero__slide.is-first {
	opacity: 1;
}

/* Each its five seconds of five pictures, then a one-second cross-fade into the next -- never two faces at once for long. */
@keyframes aws-cc-hero-turn {
	0%, 18% { opacity: 1; }
	22%, 96% { opacity: 0; }
	100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.aws-cc-hero__slide {
		animation: none;
	}
}

.aws-cc-hero.is-circle .aws-cc-hero__card {
	bottom: 6%;
	left: -10%;
	width: 52%;
}

/* Who it is for: the kit's cards, tinted with the site's accent. */
.aws-cc-front .aws-card {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 12%, var(--wp--preset--color--background));
}

/* The center at work ------------------------------------------------------ */

.aws-cc-screens {
	container-type: inline-size;
	padding-block: var(--wp--preset--spacing--8) clamp(48px, 6vw, 96px);
}

.aws-cc-screens__heading {
	margin: 0 0 var(--wp--preset--spacing--3);
	text-align: center;
}

.aws-cc-screens__lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
	margin: 0 auto clamp(28px, 4vw, 56px);
	max-width: 60ch;
	opacity: .8;
	text-align: center;
}

/* Stacked like a hand of cards: the office at the back on the left, the call
   in front on the right, the text across the foot -- each turned a little. */
.aws-cc-screens__stack {
	aspect-ratio: 16 / 10;
	margin-inline: auto;
	max-width: 1180px;
	position: relative;
}

.aws-cc-screens__window {
	background: var(--wp--preset--color--background);
	border-radius: var(--wp--custom--radius--sm);
	box-shadow: 0 30px 60px -24px var(--aws-cc-shadow), 0 0 0 1px var(--wp--preset--color--divider);
	margin: 0;
	overflow: hidden;
	position: absolute;
	width: 60%;
}

.aws-cc-screens__window img {
	display: block;
	height: auto;
	width: 100%;
}

.aws-cc-screens__bar {
	align-items: center;
	background: var(--wp--preset--color--surface);
	display: flex;
	gap: 6px;
	height: 26px;
	padding: 0 12px;
}

.aws-cc-screens__bar i {
	background: color-mix(in srgb, var(--wp--preset--color--ink) 22%, transparent);
	border-radius: 50%;
	display: block;
	height: 9px;
	width: 9px;
}

.aws-cc-screens__bar i:first-child {
	background: var(--wp--preset--color--accent);
}

.aws-cc-screens__window figcaption {
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	padding: 10px 14px;
}

.aws-cc-screens__window.is-1 {
	left: 0;
	top: 0;
	transform: rotate(-2deg);
	z-index: 1;
}

.aws-cc-screens__window.is-2 {
	right: 0;
	top: 10%;
	transform: rotate(1.5deg);
	z-index: 2;
}

.aws-cc-screens__window.is-3 {
	bottom: 0;
	left: 20%;
	transform: rotate(-.5deg);
	width: 54%;
	z-index: 3;
}

/* One or two: side by side, nothing hidden behind anything. */
.aws-cc-screens__stack:is([data-many="1"], [data-many="2"]) {
	aspect-ratio: auto;
	display: grid;
	gap: 28px;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.aws-cc-screens__stack:is([data-many="1"], [data-many="2"]) .aws-cc-screens__window {
	position: static;
	transform: none;
	width: auto;
}

/* Three steps in a row --------------------------------------------------- */

.aws-cc-front .aws-steps__heading {
	text-align: center;
}

.aws-cc-front .aws-steps__list {
	border-top: 2px solid var(--wp--preset--color--ink);
	gap: 0;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aws-cc-front .aws-steps__list .aws-step {
	align-items: start;
	border-inline-end: 1px solid var(--aws-cc-rule);
	padding: var(--wp--preset--spacing--6);
}

.aws-cc-front .aws-steps__list .aws-step:last-child {
	border-inline-end: 0;
}

/* The last ask --------------------------------------------------------- */

.aws-cc-front .aws-band__heading {
	font-family: var(--wp--preset--font-family--heading);
	font-size: min(var(--wp--preset--font-size--display), 12cqi);
	line-height: 1;
}

/* A tablet: the picture under the words, the screenshots one under another. */
@media (max-width: 900px) {
	.aws-cc-front .aws-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.aws-cc-hero {
		margin-inline: auto;
		max-width: min(440px, 82%);
	}

	.aws-cc-hero__card {
		left: -10%;
	}

	.aws-cc-screens__stack {
		aspect-ratio: auto;
		display: grid;
		gap: 20px;
		max-width: 680px;
	}

	.aws-cc-screens__window,
	.aws-cc-screens__window:is(.is-1, .is-2, .is-3) {
		position: static;
		transform: none;
		width: auto;
	}
}

/* A phone: one column, the buttons the width of it. */
@media (max-width: 640px) {
	.aws-cc-front .aws-hero__actions .aws-btn {
		width: 100%;
	}

	.aws-cc-front .aws-hero__proof,
	.aws-cc-front .aws-steps__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.aws-cc-front .aws-steps__list .aws-step {
		border-block-end: 1px solid var(--aws-cc-rule);
		border-inline-end: 0;
		padding-inline: 0;
	}

	.aws-cc-hero {
		max-width: 88%;
	}

	.aws-cc-hero__card {
		left: -6%;
		width: 64%;
	}
}

/*
 * The way in to the workspace, for somebody who is not one of its agents: a
 * card on the website's own page, between its header and footer -- whose
 * workspace, what it is for, Sign in, and the way back.
 */
.aws-cc-site .aws-cc--locked {
	background: transparent;
	display: grid;
	min-block-size: min(70vh, 640px);
	padding: clamp(32px, 6vw, 72px) var(--aws-cc-gutter);
	place-items: center;
}

.aws-cc-site .aws-cc-locked.aws-cc-gate {
	background: var(--wp--preset--color--background);
	border: 1px solid var(--aws-cc-rule);
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: 0 30px 60px -30px var(--aws-cc-shadow);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	max-inline-size: 460px;
	padding: clamp(28px, 5vw, 44px);
	text-align: center;
	width: 100%;
}

.aws-cc-gate__brand {
	align-items: center;
	display: inline-flex;
	gap: 12px;
	margin-block-end: 22px;
}

.aws-cc-gate__brand .aws-cc-logo {
	height: 3rem;
	width: 3rem;
}

.aws-cc-gate__logo img {
	display: block;
	height: auto;
	max-height: 56px;
	width: auto;
}

.aws-cc-gate__site {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
}

.aws-cc-gate__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: var(--wp--custom--heading-weight, 400);
	line-height: 1.15;
	margin: 0 0 12px;
}

.aws-cc-gate__says {
	color: var(--wp--preset--color--neutral-700, inherit);
	line-height: 1.55;
	margin: 0 0 24px;
}

.aws-cc-site .aws-cc-locked .aws-cc-btn.aws-cc-gate__go {
	background: var(--wp--preset--color--accent);
	border: 0;
	border-radius: 999px;
	box-sizing: border-box;
	color: var(--wp--preset--color--background);
	display: block;
	font-weight: 600;
	margin: 0;
	padding: 14px 20px;
	/* Not a link's underline, where the card is in a page's words (inc/app-site.php). */
	text-decoration: none;
	width: 100%;
}

.aws-cc-site .aws-cc-locked .aws-cc-btn.aws-cc-gate__go:hover,
.aws-cc-site .aws-cc-locked .aws-cc-btn.aws-cc-gate__go:focus-visible {
	filter: brightness(0.94);
}

.aws-cc-gate__back {
	font-size: 0.9rem;
	margin: 20px 0 0;
}

.aws-cc-gate__back a {
	color: var(--wp--preset--color--neutral-700, inherit);
}

