/*
 * The landing page (templates/landing/page.html). It shares the design system with the rest of the site - the
 * template loads /aura/aura.css and /css/aura-theme.css, and css/static-page.css carries the chrome - and
 * builds the page from what those two give it: the framed hero with its asymmetric radius, the serif italic
 * accent line, the pill actions and the organic shape behind the artwork. The how-it-works block below the hero
 * repeats that card and that shape, with the four steps drawn on top of it.
 *
 * The layout reacts to its own width (container query), never to the window: the page is inset on a wide
 * screen and reads as a single column on a phone.
 */

.staticLanding {
	--landing-secondary: var(--app-secondary);
	--landing-paper: var(--app-surface);
	--landing-wash: var(--app-surface-secondary);
	--landing-line: var(--app-border);
	--landing-serif: Georgia, "Times New Roman", serif;

	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	/* A definite width: the page is a size container (below), and a size contained element that is only
	   centred by auto margins collapses to its content. */
	width: 100%;
	max-width: var(--static-max-width);
	margin-inline: auto;
	box-sizing: border-box;
	/* no masthead above the hero, so the page gives itself the room it needs to the top */
	padding: 2rem var(--vaadin-padding-l) 3rem;
	container-type: inline-size;
}

/* ==========================================================================
   The top bar: the language of the page and the way in
   ========================================================================== */

.staticTopBar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: var(--vaadin-gap-m);
}

.staticLanguageSwitch {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

/* A flag per language. The language being read is at full strength and the others are dimmed, so nothing has
   to separate or frame them: a hairline around each flag reads as a divider between them. */
.staticLanguage {
	display: inline-flex;
	padding: 0.25rem;
	border-radius: var(--vaadin-radius-m);
	opacity: 0.45;
	transition: opacity 0.12s ease;
	text-decoration: none;
}

.staticLanguage:hover,
.staticLanguage[aria-current="true"] {
	opacity: 1;
}

/* The flag itself is a `fi fi-<country>` span, styled by the flag-icons stylesheet the application's FlagIcon
   and CountryComboBox load (see LandingController.landingHead); nothing local to size or draw it. */

.staticLogin {
	color: var(--landing-secondary);
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.staticLogin:hover {
	color: var(--app-highlight);
}

/* ==========================================================================
   The hero card
   ========================================================================== */

.landingHero {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	align-items: center;
	gap: 1.5rem;
	overflow: hidden;
	padding: clamp(1.5rem, 4cqi, 3.5rem);
	border: 1px solid var(--landing-line);
	border-radius: 2rem 2rem 5rem 2rem;
	background: var(--landing-paper);
}

.landingHeroCopy {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.landingEyebrow {
	display: block;
	margin: 0;
	color: var(--landing-secondary);
	font-size: 0.8125rem;
	font-weight: 750;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.landingHero h1 {
	margin: 1.5rem 0;
	color: var(--app-ink);
	font-size: clamp(2.5rem, 5.5cqi, 4.5rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.045em;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/* The second line of the heading: the accent, in the serif the application uses for it. */
.landingAccent {
	display: block;
	margin-top: 0.12em;
	color: var(--landing-secondary);
	font-family: var(--landing-serif);
	font-size: 0.9em;
	font-style: italic;
	font-weight: 500;
	letter-spacing: -0.04em;
}

.landingIntro {
	max-width: 39ch;
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.7;
}

.landingActions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-top: 2.5rem;
}

.landingAction {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.5rem 1.5rem;
	border: 1px solid var(--landing-secondary);
	border-radius: 999px;
	color: var(--landing-secondary);
	font-weight: 650;
	text-align: center;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landingActionPrimary {
	border-color: var(--app-highlight);
	background: var(--app-highlight);
	color: var(--app-cta-text);
}

.landingAction:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 0 var(--landing-line);
}

/* The artwork: the logo on a soft, hand drawn looking shape, like the application's landing page. */
.landingArtwork {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 0;
}

.landingArtwork::before {
	content: "";
	position: absolute;
	inset: 7% -5% 5%;
	z-index: -1;
	border-radius: 48% 52% 36% 64% / 55% 35% 65% 45%;
	background: var(--landing-wash);
	transform: rotate(-9deg);
}

.landingArtwork::after {
	content: "";
	position: absolute;
	inset: 4% 0 0 -6%;
	z-index: -1;
	border: 1px dashed var(--app-accent);
	border-radius: 50%;
	transform: rotate(16deg);
}

.landingHeroLogo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	transform: rotate(-3deg);
}

/* ==========================================================================
   How it works: the four steps, drawn as the timeline beside the copy
   ========================================================================== */

/* The same card as the two heroes and the same rhythm: the copy on the left, the picture on the right - only the
   picture here is the sequence itself. Its corner differs from both heroes so the page does not repeat one
   silhouette three times. */
.landingHow {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	align-items: center;
	gap: 0px; /*clamp(1.5rem, 4cqi, 3rem);*/
	overflow: hidden;
	padding: clamp(1.5rem, 4cqi, 3rem);
	border: 1px solid var(--landing-line);
	border-radius: 2rem 5rem 2rem 2rem;
	background: var(--landing-paper);
}

.landingHowHeading {
	min-width: 0;
	max-width: 46ch;
}

.landingHow h2 {
	margin: 0.5rem 0 1rem;
	font-family: var(--landing-serif);
	font-size: clamp(1.8rem, 3.5cqi, 2.5rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.landingHowCta {
	margin-top: 2rem;
}

/* The artwork of the hero, reused as the ground of the timeline: the soft shape, nothing dashed across the text. */
.landingHowSteps {
	position: relative;
	min-width: 0;
	padding-block: clamp(0.5rem, 1.5cqi, 1.25rem);
}

.landingHowSteps::before {
	content: "";
	position: absolute;
	/* inside the card, so the card's overflow does not cut the shape into a panel with a straight edge */
	inset: 3% -3% 4% -5%;
	z-index: -1;
	border-radius: 52% 48% 42% 58% / 55% 45% 60% 40%;
	background: var(--landing-wash);
	transform: rotate(-2deg);
}

.landingStepList {
	position: relative;
	display: grid;
	gap: 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The dashed line through the numbers: from the centre of the first circle to the centre of the last, so it
   ends at the payoff instead of running past it. The circles hide it where they sit. */
.landingStepList::before {
	content: "";
	position: absolute;
	top: 1.375rem;
	bottom: 1.375rem;
	left: 1.375rem;
	z-index: 0;
	border-left: 1px dashed var(--app-accent);
}

/* A step: the number in the margin, its title and its text beside it. */
.landingStep {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	column-gap: 1rem;
	align-items: start;
}

.landingStep h3 {
	grid-column: 2;
	grid-row: 1;
	margin: 0.15rem 0 0.25rem;
	font-size: 1.0625rem;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.landingStep p {
	grid-column: 2;
	grid-row: 2;
	margin: 0;
	color: var(--landing-secondary);
	font-size: 0.95rem;
	line-height: 1.6;
}

/* The number in the serif of the accent line, inside a dashed ring: the order is drawn rather than labelled, and
   the list itself already tells a screen reader the sequence (the number is aria-hidden). */
.landingStepNumber {
	grid-column: 1;
	grid-row: 1 / span 2;
	display: grid;
	place-items: center;
	align-self: start;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px dashed var(--app-accent);
	border-radius: 50%;
	background: var(--landing-paper);
	color: var(--landing-secondary);
	font-family: var(--landing-serif);
	font-size: 1.35rem;
	font-style: italic;
	line-height: 1;
}

/* The payoff: the last step is not another task, it is what happens once the first three are done. */
.landingStep:last-child .landingStepNumber {
	border: 1px solid var(--app-highlight);
	background: var(--app-highlight);
	color: var(--app-cta-text);
}

.landingStep:last-child h3 {
	color: var(--app-highlight);
}

/* The one thing under the steps that is not a step: the search can run on its own and mail the dancer when a new
   match turns up. It spans the whole card, because it belongs to the search step but is the reason to come back. */
.landingHowNote {
	grid-column: 1 / -1;
	margin-top: 1rem;
	padding-top: 1.25rem;
	border-top: 1px dashed var(--app-border);
}

/* The same register as the eyebrow of the page, in the highlight: a label, not another heading. */
.landingHowNoteLead {
	margin: 0 0 0.35rem;
	color: var(--app-highlight);
	font-size: 0.8125rem;
	font-weight: 750;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.landingHowNote p:last-child {
	margin: 0;
	color: var(--landing-secondary);
	line-height: 1.6;
}

/* ==========================================================================
   Quick searches: the combinations that start a search without the drawer
   ========================================================================== */

/* A slim band, not another card: the hero and the how-it-works block are the two large surfaces, and the quick
   searches belong to the search step just above them. Only the heading and the chips take part in the rhythm. */
.landingQuick {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.125rem 0.25rem;
}

.landingQuickHeading {
	margin: 0;
	color: var(--app-ink);
	font-family: var(--landing-serif);
	font-size: clamp(1.4rem, 2.5cqi, 1.8rem);
	font-weight: 500;
	letter-spacing: -0.02em;
}

.landingQuickDescription {
	margin: 0;
	color: var(--landing-secondary);
	line-height: 1.6;
}

/* A wrapped row rather than a grid: every combination is a pill of its own words, and the row finds its own
   lines on a phone. The whole pill is the tap target. */
.landingQuickList {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.35rem;
}

.landingQuickLink {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.35rem 0.9rem;
	border: 1px solid var(--landing-line);
	border-radius: 999px;
	background: var(--landing-paper);
	color: var(--landing-secondary);
	font-size: 0.95rem;
	font-weight: 550;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landingQuickLink:hover {
	border-color: var(--landing-secondary);
	box-shadow: 0 2px 0 var(--landing-line);
}

/* ==========================================================================
   The newest members
   ========================================================================== */

.landingSectionHeading {
	padding: 1rem 0.25rem 0;
}

.landingSectionHeading h2 {
	margin: 0.5rem 0;
	font-family: var(--landing-serif);
	font-size: clamp(1.8rem, 3.5cqi, 2.5rem);
	font-weight: 500;
	letter-spacing: -0.025em;
}

.landingSectionHeading p:not(.landingEyebrow) {
	margin: 0;
	color: var(--landing-secondary);
	line-height: 1.6;
}

.landingMemberList {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1rem;
	margin: 1.5rem 0 1rem;
	padding: 0;
	list-style: none;
}

/* The whole card is the link to the profile: one tap target, no dangling "view profile" in the corner. */
.landingMember {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem 1rem;
	padding: 1rem;
	border: 1px solid var(--landing-line);
	border-radius: 1rem;
	background: var(--landing-paper);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landingMember:hover {
	border-color: var(--landing-secondary);
	box-shadow: 0 2px 0 var(--landing-line);
}

.landingMemberAvatar {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: 1px solid var(--landing-line);
	border-radius: 50%;
	background: var(--landing-wash);
	color: var(--landing-secondary);
	font-weight: 600;
}

/* The real photo, in the same circle as the initials it replaces (MugshotController serves it). */
.landingMemberPhoto {
	display: block;
	object-fit: cover;
}

.landingMemberText {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.landingMemberName {
	font-weight: 600;
}

.landingMemberCity {
	color: var(--landing-secondary);
	font-size: 0.9rem;
}

.landingMemberStyles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-top: 0.3rem;
}

.landingStyle {
	padding: 0.1rem 0.5rem;
	border: 1px solid var(--landing-line);
	border-radius: 999px;
	background: var(--landing-wash);
	color: var(--landing-secondary);
	font-size: 0.8rem;
}

/* ==========================================================================
   The events subsite: mirrored, with a calmer surface
   ========================================================================== */

.landingWhere {
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.25fr);
	border-radius: 5rem 2rem 2rem 2rem;
	background: var(--landing-wash);
}

.landingWhere h2 {
	margin: 1rem 0;
	font-family: var(--landing-serif);
	font-size: clamp(1.8rem, 3.5cqi, 2.5rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.landingWhere .landingArtwork::before {
	inset: 5% -6% 7%;
	border-radius: 52% 48% 60% 40% / 45% 55% 45% 55%;
	transform: rotate(7deg);
}

.landingWhere .landingArtwork::after {
	inset: 3% -4% 0 2%;
	border-style: solid;
	border-color: var(--landing-line);
	transform: rotate(-12deg);
}

.landingWhereLogo {
	display: block;
	width: 100%;
	max-width: 320px;
	height: auto;
}

/* ==========================================================================
   Narrow: everything becomes one column
   ========================================================================== */

@container (max-width: 40rem) {
	.landingHero,
	.landingWhere,
	.landingHow {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 1.5rem 1.5rem 3rem 1.5rem;
	}

	.landingWhere {
		border-radius: 3rem 1.5rem 1.5rem 1.5rem;
	}

	/* The same corner as the hero on a phone: one column, the copy above the timeline. */
	.landingHow {
		border-radius: 1.5rem 3rem 1.5rem 1.5rem;
	}

	/* The way to the explanation is a full width pill here, like the actions of the hero. */
	.landingHowCta {
		display: flex;
	}

	.landingArtwork {
		width: min(75%, 270px);
		justify-self: center;
	}

	.landingWhere .landingArtwork {
		width: min(60%, 200px);
	}

	.landingHero h1 {
		font-size: clamp(2rem, 9cqi, 3rem);
	}

	.landingActions {
		gap: 0.5rem;
	}

	.landingAction {
		flex: 1 1 100%;
	}

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

@media (prefers-reduced-motion: reduce) {
	.landingAction {
		transition: none;
	}

	.landingAction:hover {
		transform: none;
	}
}
