/*
 * The homepage and thank-you page. See inc/home-page.php.
 * Design: Gianluca's XDs of 2026-11-05 (desktop artboard 1920 wide, mobile 393).
 * Sizes are the XD's; desktop values apply from 768px up.
 */

@font-face {
	font-family: "Hubot Sans";
	font-weight: 400;
	font-display: swap;
	src: url("fonts/HubotSans-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "Hubot Sans";
	font-weight: 500;
	font-display: swap;
	src: url("fonts/HubotSans-Medium.woff2") format("woff2");
}

@font-face {
	font-family: "Brown Mono";
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/BrownMonoLLWeb-Regular.woff2") format("woff2");
}

:root {
	--blue: #4149c2;
	--red: #611417;
	--cream: #f5f1eb;
	--white: #fff;
	--sans: "Hubot Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "Brown Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--red);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--red);
	color: var(--cream);
	font-family: var(--sans);
	font-size: 12px;
	line-height: 1.6;
	text-align: center;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	display: block;
	max-width: 100%;
}

p {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
.photos:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.u {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- the two worlds ---------- */

.world {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 0 23px;
	overflow: hidden;
}

.world--cafe {
	background: var(--blue);
}

.world--restaurant {
	background: var(--red);
	padding: 68px 0 0;
}

.logo--cafe {
	width: 98px;
	height: auto;
}

.intro {
	max-width: 222px;
	margin-top: 36px;
	line-height: 19px;
}

.tagline {
	width: 280px;
	height: auto;
	margin-top: 40px;
}

.links {
	display: flex;
	justify-content: center;
	gap: 21.5px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	line-height: 17px;
}

.world--cafe .links {
	margin-top: 35px;
}

/* Photos: a row that scrolls sideways on phones, three columns on desktop.
   The mobile XD starts the café row 13px in (3px gaps) and the restaurant
   row flush left (4px gaps). */
.photos {
	display: flex;
	gap: 3px;
	width: 100%;
	margin-top: 16px;
	padding: 0 13px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 13px;
	scrollbar-width: none;
}

.photos::-webkit-scrollbar {
	display: none;
}

.photos picture {
	flex: 0 0 225px;
	height: 340px;
	scroll-snap-align: start;
}

.photos img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.star {
	width: 20px;
	height: 20px;
	margin: 0 auto;
}

.logo--restaurant {
	width: 103px;
	height: auto;
	margin-top: 43px;
}

.copy {
	position: relative;
	width: 100%;
	margin-top: 50px;
	line-height: 24px;
}

.copy p {
	max-width: 216px;
	margin: 0 auto;
}

.copy p + p {
	margin-top: 24px;
}

/* Phone widths that reproduce the mobile XD's line breaks, paragraph by paragraph. */
.copy p:nth-of-type(1) {
	max-width: 178px;
}

.copy p:nth-of-type(2) {
	max-width: 212.5px;
}

.copy p:nth-of-type(3) {
	max-width: 198px;
}

.copy .star {
	position: absolute;
	top: 50%;
	margin-top: -10px;
}

.star--left {
	left: 26px;
}

.star--right {
	right: 21.5px;
}

/* ---------- signup (Gravity Form 1) ---------- */

.signup {
	width: 290px;
	margin-top: 47.5px;
}

.signup .gform_fields {
	display: grid;
	gap: 33px;
}

.signup .gfield {
	margin: 0;
	padding: 0;
	border: 0;
}

.signup .gfield_label,
.signup .hidden_label .gfield_label,
.signup .gform_required_legend {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.signup .gform_validation_container,
.signup .gfield--type-honeypot,
.signup .gform_hidden,
.signup .gfield_visibility_hidden {
	display: none !important;
}

.signup input[type="text"],
.signup input[type="email"] {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0 0 12px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 0;
	background: transparent;
	color: var(--cream);
	font: inherit;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
	-webkit-appearance: none;
	appearance: none;
}

.signup input::placeholder {
	color: var(--cream);
	opacity: 1;
}

.signup input[type="text"]:focus,
.signup input[type="email"]:focus {
	outline: none;
	border-bottom-color: var(--cream);
}

.signup input:focus::placeholder {
	opacity: 0.5;
}

.signup .gform_footer {
	margin-top: 16px;
}

.signup .gform_button {
	margin: 0;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: var(--cream);
	font: 500 12px/20px var(--sans);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.signup .gform_button:hover {
	text-decoration-thickness: 2px;
}

.signup .gform-loader,
.signup .gform_ajax_spinner {
	display: block;
	margin: 12px auto 0;
}

.signup .validation_message,
.signup .gform_validation_errors {
	margin-top: 8px;
	font-size: 12px;
	line-height: 18px;
}

.signup .gform_validation_errors {
	margin: 0 0 18px;
}

.signup .gform_validation_errors h2 {
	margin: 0;
	font: inherit;
}

.signup .gform_confirmation_message {
	line-height: 24px;
}

.world--restaurant .links {
	margin-top: 60px;
}

.world--restaurant .photos {
	gap: 4px;
	margin-top: 39px;
	padding-left: 0;
	scroll-padding-left: 0;
}

/* ---------- footer ---------- */

.footer {
	padding: 34px 20px 110px;
	background: var(--red);
}

.home-page:not(.is-thanks) .footer .star {
	display: none;
}

.footer__legal {
	font-family: var(--mono);
	font-size: 9px;
	line-height: 12px;
}

.footer .star + .footer__legal {
	margin-top: 32px;
}

.home-page:not(.is-thanks) .footer .star + .footer__legal {
	margin-top: 0;
}

/* ---------- the pinned Café & Bar / Restaurant switch ---------- */

.switch {
	position: fixed;
	z-index: 10;
	left: 50%;
	bottom: max(20px, env(safe-area-inset-bottom));
	display: grid;
	grid-template-columns: 126px 1fr;
	width: 258px;
	height: 52px;
	padding: 7px 9px;
	border-radius: 26px;
	background: var(--white);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
	transform: translateX(-50%);
}

.switch::before {
	content: "";
	position: absolute;
	top: 7px;
	bottom: 7px;
	left: 9px;
	width: 126px;
	border-radius: 19px;
	background: var(--blue);
	transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.35s cubic-bezier(0.3, 0.7, 0.2, 1), background-color 0.35s;
}

.switch.is-restaurant::before {
	width: calc(100% - 18px - 126px);
	transform: translateX(126px);
	background: var(--red);
}

.switch__item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 19px;
	color: var(--red);
	font-size: 13px;
	line-height: 1;
	text-decoration: none;
	transition: color 0.35s;
}

.switch__item:first-child {
	color: var(--blue);
}

.switch__item.is-active {
	color: var(--cream);
}

.switch__item:focus-visible {
	outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
	.switch::before,
	.switch__item {
		transition: none;
	}
}

/* ---------- thank-you page ---------- */

.is-thanks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

/* Positions from the XDs, as a share of the screen height (mobile 660 tall
   below the browser bars, desktop 1080): text at 27% / 38%, footer at the bottom. */
.thanks {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	padding: max(60px, 27svh) 20px 60px;
}

.thanks__text {
	line-height: 24px;
}

.thanks .links {
	margin-top: 52px;
}

.is-thanks .footer {
	padding: 0 20px 54px;
}

.is-thanks .footer .star + .footer__legal {
	margin-top: 39px;
}

/* ---------- desktop ---------- */

@media (min-width: 768px) {
	body {
		font-size: 16px;
		line-height: 24px;
	}

	.world--cafe {
		padding: 120px 0 137px;
	}

	.logo--cafe {
		width: 143px;
	}

	.intro {
		max-width: 445px;
		margin-top: 64px;
		line-height: 24px;
	}

	.tagline {
		width: 271px;
		margin-top: 50px;
	}

	.world--cafe .links {
		margin-top: 38px;
	}

	.photos {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
		max-width: 1640px;
		width: calc(100% - 2 * clamp(24px, 7.3vw, 140px));
		margin-top: 97px;
		padding: 0;
		overflow: visible;
	}

	.photos picture {
		height: auto;
	}

	.photos img {
		height: auto;
		aspect-ratio: 536 / 805;
	}

	.world--restaurant {
		padding-top: 135px;
	}

	.logo--restaurant {
		width: 143px;
		margin-top: 74px;
	}

	.copy {
		margin-top: 73px;
	}

	.copy p,
	.copy p:nth-of-type(n) {
		max-width: 500px;
	}

	.copy .star {
		margin-top: -7px;
	}

	.star--left {
		left: calc(50% - 410px);
	}

	/* The XD has the right star 14px further out than the left one. */
	.star--right {
		right: calc(50% - 424px);
	}

	.signup {
		width: 298px;
		margin-top: 61px;
	}

	.signup .gform_fields {
		gap: 35px;
	}

	.signup input[type="text"],
	.signup input[type="email"] {
		padding-bottom: 8px;
		font-size: 16px;
		line-height: 22px;
	}

	.signup .gform_footer {
		margin-top: 41px;
	}

	.signup .gform_button {
		font-size: 16px;
		line-height: 22px;
	}

	.world--restaurant .links {
		margin-top: 69px;
	}

	.world--restaurant .photos {
		gap: 16px;
		margin-top: 40px;
		padding-left: 0;
	}

	.home-page:not(.is-thanks) .footer .star {
		display: block;
	}

	.footer {
		padding: 72px 20px 140px;
	}

	.footer .star + .footer__legal,
	.home-page:not(.is-thanks) .footer .star + .footer__legal {
		margin-top: 38px;
	}

	.switch {
		bottom: clamp(20px, 5.4vh, 58px);
		grid-template-columns: 143px 1fr;
		width: 291px;
		height: 58px;
		padding: 9px 11px;
		border-radius: 29px;
	}

	.switch::before {
		top: 9px;
		bottom: 9px;
		left: 11px;
		width: 143px;
		border-radius: 20px;
	}

	.switch.is-restaurant::before {
		width: calc(100% - 22px - 143px);
		transform: translateX(143px);
	}

	.switch__item {
		border-radius: 20px;
		font-size: 14px;
	}

	.thanks {
		padding-top: max(80px, calc(38vh + 4px));
	}

	.thanks .links {
		margin-top: 83px;
	}

	.is-thanks .footer {
		padding: 0 20px 62px;
	}

	.is-thanks .footer .star + .footer__legal {
		margin-top: 38px;
	}
}

/* Narrow desktop: the side stars (400px either side of the centre) move in to the edges. */
@media (min-width: 768px) and (max-width: 1000px) {
	.star--left {
		left: 24px;
	}

	.star--right {
		right: 24px;
	}
}
