/*
 * The public site at lodgeline.fr. Colours come from theme.css, which the build
 * copies from the app, and only the names in the design system's vocabulary
 * are used here. See docs/product/design-system.md.
 *
 * The type is larger than the app's (16px body against 13px): the app is a
 * dense tool read all day, this page is read once.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Clears the 64px sticky header for anchors and for keyboard focus (2.4.11). */
	scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--background);
	color: var(--text);
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
		Arial, sans-serif;
	font-size: 16px;
	line-height: 24px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 {
	font-size: 40px;
	line-height: 48px;
	letter-spacing: -0.02em;
}

h2 {
	font-size: 28px;
	line-height: 36px;
}

h3 {
	font-size: 18px;
	line-height: 24px;
}

@media (max-width: 640px) {
	h1 {
		font-size: 32px;
		line-height: 40px;
	}
	h2 {
		font-size: 24px;
		line-height: 32px;
	}
}

p {
	margin: 0;
	text-wrap: pretty;
}

a {
	color: var(--accent-strong);
	text-underline-offset: 3px;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm, 4px);
}

.tabular {
	font-variant-numeric: tabular-nums;
}

.wrap {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 16px;
}

@media (min-width: 1024px) {
	.wrap {
		padding-inline: 24px;
	}
}

.subtle {
	color: var(--text-subtle);
}

.eyebrow {
	color: var(--accent-strong);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
}

.lead {
	color: var(--text-subtle);
	font-size: 18px;
	line-height: 28px;
}

/* Skip link: visible only when focused. */
.skip {
	position: absolute;
	left: 16px;
	top: -48px;
	z-index: 10;
	padding: 8px 12px;
	background: var(--background-raised);
	border: 1px solid var(--border-strong);
	border-radius: 6px;
}

.skip:focus-visible {
	top: 8px;
}

/* The mark: the roof is `text`, the line is `accent`, as in the app's rail. */
.mark {
	width: 32px;
	height: auto;
	flex: none;
}

.mark-roof {
	fill: var(--text);
	stroke: var(--text);
}

.mark-line {
	fill: var(--accent);
	stroke: var(--accent);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-decoration: none;
}

.brand-sm {
	font-size: 16px;
}

.brand-sm .mark {
	width: 24px;
}

/* Buttons: two of the app's four variants. */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: 6px;
	font: inherit;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color var(--dur-press) var(--ease-out),
		border-color var(--dur-press) var(--ease-out),
		transform var(--dur-press) var(--ease-out);
}

.button:active {
	transform: scale(0.97);
}

.button-sm {
	min-height: 32px;
	padding: 0 12px;
	font-size: 14px;
}

.button-accent {
	background: var(--accent);
	color: var(--accent-fg);
}

.button-neutral {
	background: var(--background-raised);
	border-color: var(--border);
	color: var(--text);
}

@media (hover: hover) and (pointer: fine) {
	.button-accent:hover {
		background: var(--accent-strong);
	}
	.button-neutral:hover {
		background: var(--background-sunken);
		border-color: var(--border-strong);
	}
	.site-nav a:hover,
	.link-subtle:hover {
		color: var(--text);
	}
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Screenshots: a hairline frame, no shadow — elevation is borders here. */
.shot img {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--background-sunken);
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--background);
	border-bottom: 1px solid var(--border);
}

.site-header-row {
	display: flex;
	align-items: center;
	gap: 24px;
	height: 64px;
}

.site-nav {
	display: flex;
	gap: 24px;
	margin-inline-start: 24px;
}

.site-nav a,
.link-subtle {
	color: var(--text-subtle);
	font-size: 14px;
	text-decoration: none;
	transition: color var(--dur-press) var(--ease-out);
}

/* The links are padded to at least 24px tall (WCAG 2.5.8). */
.site-nav a,
.link-subtle,
.site-footer a {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

.site-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-inline-start: auto;
}

@media (max-width: 767px) {
	.site-nav {
		display: none;
	}
}

/* Below 400px the language link leaves the header; the footer still has it. */
@media (max-width: 399px) {
	.site-header-actions .link-subtle {
		display: none;
	}
}

/* Footer */
.site-footer {
	border-top: 1px solid var(--border);
	color: var(--text-subtle);
	font-size: 14px;
}

.site-footer-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding-block: 32px;
}

.site-footer-row .brand {
	margin-inline-end: auto;
}

.site-footer a {
	color: var(--text-subtle);
}

/* Hero: the mark drawn large and quiet behind the heading, as on the app's
   sign-in page ("Horizon" in design-system.md), and the timeline in a window. */
.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: 64px 48px;
	background: linear-gradient(
		to bottom,
		var(--background),
		var(--background-sunken)
	);
	border-bottom: 1px solid var(--border);
}

.horizon {
	position: absolute;
	z-index: -1;
	left: 50%;
	top: 96px;
	width: clamp(560px, 100vw, 1200px);
	transform: translateX(-50%);
	pointer-events: none;
	user-select: none;
}

.horizon .mark {
	width: 100%;
}

.horizon .mark-roof {
	fill: var(--neutral-bg);
	stroke: var(--neutral-bg);
}

.horizon .mark-line {
	fill: var(--accent-bg);
	stroke: var(--accent-bg);
}

.hero-text {
	display: grid;
	justify-items: center;
	gap: 16px;
	margin-bottom: 48px;
	text-align: center;
}

.hero-text h1 {
	max-width: 18ch;
}

.hero-text .lead {
	max-width: 52ch;
}

.hero-text .actions {
	justify-content: center;
	margin-top: 8px;
}

@media (min-width: 960px) {
	.hero {
		padding-top: 96px;
	}
	.hero-text h1 {
		font-size: 48px;
		line-height: 56px;
	}
}

.note {
	margin-top: 16px;
	color: var(--text-subtle);
	font-size: 14px;
	text-align: center;
}

/* A screenshot sits in a raised frame, like a window on the page. */
.window {
	padding: 8px;
	background: var(--background-raised);
	border: 1px solid var(--border);
	border-radius: 16px;
}

.window .shot img {
	border-radius: 8px;
}

/* On a phone the full timeline would be too small to read, so the window
   shows its top-left corner: the lodgings and the first days. */
@media (max-width: 640px) {
	.window-hero .shot img {
		aspect-ratio: 3 / 4;
		object-fit: cover;
		object-position: left top;
	}
}

/* Sections */
.section {
	padding-block: 64px;
}

@media (min-width: 960px) {
	.section {
		padding-block: 96px;
	}
}

.section + .section {
	border-top: 1px solid var(--border);
}

.section-lead {
	max-width: 60ch;
	margin-top: 16px;
}

.facts {
	display: grid;
	gap: 24px;
	margin: 48px 0 0;
	padding: 0;
	list-style: none;
}

.facts li {
	padding-top: 16px;
	border-top: 2px solid var(--accent);
}

@media (min-width: 768px) {
	.facts {
		grid-template-columns: repeat(3, 1fr);
		gap: 32px;
	}
}

.feature-row {
	display: grid;
	gap: 32px;
	align-items: center;
}

.feature-text {
	display: grid;
	gap: 16px;
	align-content: start;
}

@media (min-width: 960px) {
	.feature-row {
		grid-template-columns: 4fr 7fr;
		gap: 48px;
	}
	.feature-flip .feature-text {
		order: 2;
	}
	.feature-flip .feature-row {
		grid-template-columns: 7fr 4fr;
	}
}

/* The phone band */
.band {
	padding-block: 64px;
	background: var(--background-sunken);
	border-block: 1px solid var(--border);
}

@media (min-width: 960px) {
	.band {
		padding-block: 96px;
	}
}

.phones {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	width: 100%;
	max-width: 520px;
	margin-inline: auto;
	padding-bottom: 32px;
}

.phone {
	padding: 6px;
	background: var(--background-raised);
	border: 1px solid var(--border-strong);
	border-radius: 32px;
}

.phone .shot img {
	border: 0;
	border-radius: 26px;
}

/* The second phone sits lower, so the pair does not read as a grid. */
.phone + .phone {
	transform: translateY(32px);
}

/* Contact */
.contact-card {
	display: grid;
	justify-items: center;
	gap: 16px;
	max-width: 720px;
	margin-inline: auto;
	padding: 48px 24px;
	background: var(--background-raised);
	border: 1px solid var(--border);
	border-radius: 16px;
	text-align: center;
}

.contact-card > .mark {
	width: 48px;
	margin-bottom: 8px;
}

.contact-card .button {
	margin-block: 8px;
}

/* Facts beside a screenshot stay in one column, whatever the width. */
.facts.facts-stacked {
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 8px;
}
