/* ============================================================
   Welcome back (templates/welcome-back.php), in Kate's order:
   register (the heading and a few words, then the form in a shadowed
   card; side by side from 961px), the rebooking offer on navy (gold
   accents, the navy rule in main.css) with its code in a dashed
   "voucher", the benefits on sand, and the goodbye. The form's fields
   and messages are the enquiry form's (enquiry.css).
   ============================================================ */

/* ---------- Register ---------- */

.register__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 36px;
}

.register__title {
	font-size: var(--size-h2);
	line-height: 1.08;
}

.register__subline {
	margin-top: 16px;
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.register__text {
	max-width: 480px;
	margin-top: 20px;
	font-size: 15px;
	line-height: 1.8;
}

.register__text p + p {
	margin-top: 1em;
}

.register__card {
	min-width: 0;
	padding: 28px 20px 36px;
	background: var(--color-bg);
	box-shadow: var(--shadow-box);
}

.register__form {
	position: relative;
	display: grid;
	gap: 22px;
}

/* "How did you book your current stay?": the answers as boxes the height
   of the fields; the chosen one gets a firmer navy edge. */
.field--choices {
	margin: 0;
	padding: 0;
	border: 0;
}

.field--choices > legend {
	margin-bottom: 4px;
	padding: 0;
}

.choices {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

.choice {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--color-field-border);
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.choice input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--color-text);
}

.choice:has(input:checked) {
	border-color: var(--color-text);
	box-shadow: 0 0 0 1px var(--color-text);
}

.choice:has(input:focus-visible) {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.choice input:focus-visible {
	outline: none;
}

.field--choices.is-invalid .choice {
	border-color: var(--color-text);
}

/* "Keep me in the loop": its own sand panel inside the form, as Kate set
   it apart. */
.register__loop {
	display: grid;
	gap: 12px;
	min-width: 0;
	margin: 6px 0 0;
	padding: 22px 20px 20px;
	border: 0;
	background: var(--color-surface-light);
}

/* A legend is no grid item: floated full width, it sits in the flow. */
.register__loop-title {
	float: left;
	width: 100%;
	padding: 0;
	font-family: var(--font-display);
	font-size: 30px;
	font-synthesis: none;
	font-variant-ligatures: common-ligatures;
	line-height: 1.1;
}

.register__loop-text {
	font-size: 14px;
	line-height: 1.6;
}

.register__loop-small {
	font-size: 13px;
	line-height: 1.6;
}

.register__note {
	font-size: 13px;
	line-height: 1.7;
}

/* Registered: the thank-you in place of the form, with the code. */
.register__done {
	display: grid;
	justify-items: start;
	gap: 20px;
	padding: 32px 20px;
	background: var(--color-surface-light);
}

.register__done:focus {
	outline: none;
}

.register__done-title {
	font-size: clamp(36px, 4.4vw, 52px);
	line-height: 1.05;
}

.register__done-text {
	font-size: 15px;
	line-height: 1.8;
}

.register__code {
	display: grid;
	justify-items: stretch;
	gap: 10px;
	width: 100%;
}

/* On phones the code takes the box's full width, so WELCOMEBACK stays on
   one line down to 320px. */
.register__code .voucher {
	padding-inline: 12px;
	border-color: var(--color-text);
}

.register__code-note {
	font-size: 13px;
}

/* Full width on phones, like the form's button (enquiry.css). */
.register__book {
	justify-self: stretch;
}

/* ---------- The voucher: a code in a dashed box ---------- */

.voucher {
	display: grid;
	justify-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 14px clamp(18px, 6vw, 32px) 16px;
	border: 1.5px dashed var(--color-accent);
	text-align: center;
}

.voucher__label {
	font-size: var(--size-label);
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* Sized to the screen; only a code too long for any screen wraps, rather
   than widening the page. */
.voucher__value {
	font-size: clamp(16px, 5vw, 22px);
	font-weight: 700;
	letter-spacing: 0.14em;
	/* The trailing letter-spacing would push the word off centre. */
	margin-right: -0.14em;
	overflow-wrap: anywhere;
}

.voucher__lock {
	color: inherit;
	font-size: 14px;
	line-height: 1.6;
}

/* ---------- The rebooking offer (navy) ---------- */

.offer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	gap: 20px;
	max-width: calc(680px + var(--gutter-l) + var(--gutter-r));
	text-align: center;
}

.offer__label {
	color: var(--color-on-dark-soft);
	font-size: var(--size-label);
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.offer__title {
	font-size: var(--size-h2);
	line-height: 1.08;
}

.offer__text {
	max-width: 560px;
	color: var(--color-on-dark-strong);
	font-size: 15px;
	line-height: 1.8;
}

.offer__text p + p {
	margin-top: 0.8em;
}

.offer__highlight {
	font-size: clamp(22px, 6vw, 34px);
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.25;
	text-transform: uppercase;
	/* "10% OFF YOUR / NEXT STAY", never "STAY" alone. */
	text-wrap: balance;
}

.offer__small {
	max-width: 520px;
	color: var(--color-on-dark-muted);
	font-size: 14px;
	line-height: 1.7;
}

.offer__code {
	margin-top: 8px;
}

.offer__code .voucher__label {
	color: var(--color-on-dark-soft);
}

.offer__until {
	color: var(--color-on-dark-muted);
	font-size: 13px;
}

.offer__btn {
	margin-top: 8px;
}

.offer__note {
	max-width: 560px;
	margin-top: 20px;
	padding-top: 32px;
	border-top: 1px solid var(--color-on-dark-rule);
	color: var(--color-on-dark-strong);
	font-size: 15px;
	line-height: 1.8;
}

/* ---------- The benefits (sand) ---------- */

.benefits__inner {
	display: grid;
	gap: 52px;
}

.benefits__head {
	display: grid;
	justify-items: center;
	gap: 18px;
	text-align: center;
}

.benefits__title {
	max-width: 760px;
	font-size: var(--size-h2);
	line-height: 1.08;
}

.benefits__intro {
	max-width: 560px;
	font-size: 15px;
	line-height: 1.8;
}

/* Centred rows, so a short last row sits in the middle (seven: 4 + 3 on a
   computer). */
.benefits__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 44px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.benefits__item {
	display: grid;
	flex: 0 1 100%;
	justify-items: center;
	align-content: start;
	gap: 14px;
	text-align: center;
}

.benefits__item .icon {
	margin-bottom: 4px;
	color: var(--color-accent);
	transition: transform 0.5s var(--ease);
}

@media (hover: hover) {
	.benefits__item:hover .icon {
		transform: translateY(-4px);
	}
}

.benefits__name {
	text-wrap: balance;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.6;
	text-transform: uppercase;
}

.benefits__text {
	max-width: 300px;
	font-size: 15px;
	line-height: 1.8;
}

.benefits__best {
	display: grid;
	justify-items: center;
	gap: 12px;
	text-align: center;
}

.benefits__best-label {
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.benefits__best-text {
	max-width: 720px;
	text-wrap: balance;
	font-family: var(--font-display);
	font-size: clamp(30px, 3.6vw, 42px);
	font-synthesis: none;
	font-variant-ligatures: common-ligatures;
	line-height: 1.2;
}

/* ---------- The goodbye ---------- */

.farewell__inner {
	display: grid;
	justify-items: center;
	gap: 20px;
	max-width: calc(680px + var(--gutter-l) + var(--gutter-r));
	text-align: center;
}

.farewell__title {
	font-size: var(--size-h2);
	line-height: 1.08;
}

.farewell__text {
	max-width: 560px;
	font-size: 15px;
	line-height: 1.8;
}

.farewell__sign {
	display: grid;
	justify-items: center;
	gap: 4px;
	margin-top: 12px;
}

.farewell__signoff {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.farewell__signoff .icon {
	color: var(--color-accent);
}

.farewell__name {
	font-family: var(--font-display);
	font-size: clamp(40px, 4.4vw, 52px);
	font-synthesis: none;
	font-variant-ligatures: common-ligatures;
	line-height: 1.1;
}

/* ---------- Wider screens ---------- */

@media (min-width: 481px) {
	.choices {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.register__loop {
		padding: 26px 28px 24px;
	}

	.benefits__item {
		flex-basis: calc((100% - 32px) / 2);
	}

	.register__code {
		justify-items: start;
		width: auto;
	}

	.register__code .voucher {
		padding-inline: clamp(18px, 6vw, 32px);
	}

	.register__book {
		justify-self: start;
	}

	.voucher__value {
		letter-spacing: 0.18em;
		margin-right: -0.18em;
	}
}

@media (min-width: 761px) {
	.register__text,
	.offer__text,
	.benefits__intro,
	.farewell__text {
		font-size: 16px;
	}

	.register__card {
		padding: clamp(32px, 4.5vw, 56px);
	}

	.register__done {
		padding: 48px 40px;
	}

	.voucher__value {
		font-size: 26px;
	}
}

@media (min-width: 961px) {
	.register__inner {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
		align-items: start;
		gap: clamp(48px, 6vw, 96px);
	}

	.benefits__list {
		gap: 52px 40px;
	}

	.benefits__item {
		flex-basis: calc((100% - 80px) / 3);
	}
}

@media (min-width: 1181px) {
	.benefits__item {
		flex-basis: calc((100% - 120px) / 4);
	}
}
