/* Éditions SLED: one page in the sled.design system (sled-theme theme.json + theme.css):
   system font stack, black on white, 600-weight headings at -0.015em, uppercase
   0.08em labels, square edges, the SLED mark. Off-black (#121215) for the dark bands. */

:root {
	--ink: #000;
	--paper: #fff;
	--off-black: #121215;
	--grey: #5b5b5b;          /* sled-theme secondary text */
	--grey-on-dark: #a3a3a8;
	--rule: #e5e5e5;
	--rule-on-dark: #2a2a2f;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* sled-theme font sizes */
	--fs-small: 0.875rem;
	--fs-medium: 1.0625rem;
	--fs-large: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
	--fs-xx-large: clamp(2rem, 1.6rem + 1.6vw, 3rem);
	--fs-display: clamp(2.75rem, 1.6rem + 5vw, 6rem);

	/* sled-theme spacing */
	--sp-30: 0.75rem;
	--sp-40: 1rem;
	--sp-50: clamp(1.25rem, 3vw, 2rem);
	--sp-60: clamp(2rem, 5vw, 3rem);
	--sp-70: clamp(3rem, 8vw, 6rem);
	--sp-80: clamp(4rem, 12vw, 9rem);

	--gutter: clamp(1rem, 3vw, 2rem);
	--wide: 80rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--fs-medium);
	line-height: 1.6;
	text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }
:where(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
	position: absolute; left: var(--gutter); top: -3rem; z-index: 50;
	background: var(--ink); color: var(--paper); padding: 0.5rem 0.75rem; font-weight: 600;
}
.skip:focus { top: 0.5rem; }

/* Header: white bar, the SLED black tile (links to sled.design) + the imprint wordmark */

.site-header {
	position: sticky; top: 0; z-index: 20;
	background: var(--paper);
	border-bottom: 1px solid var(--ink);
}
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: var(--sp-30) var(--sp-50);
	flex-wrap: wrap;
	min-height: 4.5rem; padding-block: var(--sp-30);
}
.lockup { display: flex; align-items: center; gap: 0.875rem; }
.lockup__tile {
	display: grid; place-items: center;
	width: 2.75rem; height: 2.75rem;
	background: var(--ink); color: var(--paper);
	line-height: 0;
}
.lockup__tile svg { width: 1.625rem; height: 1.625rem; }
.lockup__word {
	font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.2em;
	text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a {
	text-decoration: none; font-size: var(--fs-medium);
	display: inline-flex; align-items: center; min-height: 2.75rem;
}
.site-nav a:hover { text-decoration: underline; }

/* Below 640px the header wraps (lockup, then nav): it scrolls away instead of sticking */
@media (max-width: 639px) {
	html { scroll-padding-top: 0; }
	.site-header { position: static; }
	.site-header__inner { padding-block: var(--sp-30) 0; }
}

@media (max-width: 479px) {
	.lockup__tile { width: 2.25rem; height: 2.25rem; }
	.lockup__tile svg { width: 1.375rem; height: 1.375rem; }
	.lockup__word { font-size: 0.9375rem; letter-spacing: 0.16em; }
	.site-nav { gap: 0 1rem; }
	.site-nav a { font-size: var(--fs-small); }
}

/* Language colours: English in full ink, French dark grey, Spanish grey.
   On the dark bands the same order, inverted: white, light grey, grey. */

:root {
	--en: var(--ink);
	--fr: #444;
	--es: #6e6e6e;
}
.hero, .band--dark {
	--en: var(--paper);
	--fr: #c4c4c8;
	--es: #8e8e94;
}
[lang="en"] { color: var(--en); }
[lang="fr"]:not(html) { color: var(--fr); }
[lang="es"] { color: var(--es); }

/* The three languages side by side (FR, EN, ES), inside the same text width as
   before; stacked on phones. */

.tri {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--sp-50);
	max-width: 46rem;
	padding-top: var(--sp-40);
	border-top: 1px solid var(--rule);
}
.tri__block > p + p { margin-top: var(--sp-30); }
.tri p { font-size: 0.9375rem; line-height: 1.55; }
.tri .meta { font-size: 0.8125rem; }

@media (max-width: 639px) {
	.tri { grid-template-columns: minmax(0, 1fr); gap: var(--sp-40); }
}

/* Trilingual headings: one line that rolls through FR, EN, ES like a slot reel,
   each in its language colour. The reel ends on a copy of the French line
   (aria-hidden) so the loop restarts without a jump. All three stay in the DOM
   for screen readers. Reduced motion: the three lines stacked, no roll. */

.tri-head {
	font-size: min(var(--fs-xx-large), 6.4vw);
	margin-bottom: var(--sp-60);
	--slot-h: 1.25em;
}
.slot {
	display: inline-block;
	vertical-align: top;
	height: var(--slot-h);
	max-width: 100%;
	overflow: hidden;
}
.slot__reel {
	display: block;
	animation: slot-roll 9s infinite;
}
.slot__reel > span {
	display: block;
	height: var(--slot-h);
	line-height: var(--slot-h);
	white-space: nowrap;
}

/* Hold each language about 2.3s, then roll up with a slight overshoot */
@keyframes slot-roll {
	0%, 26% { transform: translateY(0); animation-timing-function: cubic-bezier(.3, 1.4, .55, 1); }
	33%, 59% { transform: translateY(calc(-1 * var(--slot-h))); animation-timing-function: cubic-bezier(.3, 1.4, .55, 1); }
	66%, 92% { transform: translateY(calc(-2 * var(--slot-h))); animation-timing-function: cubic-bezier(.3, 1.4, .55, 1); }
	100% { transform: translateY(calc(-3 * var(--slot-h))); }
}
@media (prefers-reduced-motion: reduce), print {
	.slot { height: auto; overflow: visible; }
	.slot__reel { animation: none; }
	.slot__reel > span { height: auto; line-height: 1.15; white-space: normal; }
	.slot__reel > span[aria-hidden="true"] { display: none; }
}

/* Bands */

.band { padding-block: var(--sp-80); }
.band--dark { background: var(--off-black); color: var(--paper); }
.band--dark .tri { border-top-color: var(--rule-on-dark); }

/* 01 / Hero: the Dark Wood plate as black line work on the off-black field, cropped
   huge and faded out by a gradient mask. */

.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--off-black);
	color: var(--paper);
	min-height: calc(100svh - 4.5rem);
	display: flex; align-items: flex-end;
	padding-block: var(--sp-80) var(--sp-70);
}
/* The plate fills the right two thirds, cropped tight on Dante and the lit path;
   it fades out toward the copy on the left and toward the bottom. */
.hero__plate {
	position: absolute; z-index: -1;
	top: 0; bottom: 0; right: 0;
	width: 68%; height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 62%;
	-webkit-mask-image:
		linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 30%, #000 60%),
		linear-gradient(to bottom, #000 60%, transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image:
		linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 30%, #000 60%),
		linear-gradient(to bottom, #000 60%, transparent 100%);
	mask-composite: intersect;
}
.hero h1 { font-size: var(--fs-display); line-height: 1.02; margin-bottom: var(--sp-60); }
.hero .tri { border-top-color: rgba(255,255,255,.18); max-width: 44rem; }

@media (max-width: 781px) {
	.hero__plate {
		width: 100%; height: 72%; bottom: auto;
		object-position: 52% 60%;
		-webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 45%, transparent 85%);
		mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 45%, transparent 85%);
	}
	.hero { align-items: flex-end; padding-top: 40svh; }
}

/* 02 / Catalogue entries: image left, text right; stacked on phones */

.book {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: var(--sp-60);
	align-items: start;
	padding-top: var(--sp-60);
	border-top: 1px solid var(--ink);
}
.book + .book { margin-top: var(--sp-70); }
.book__cover { margin: 0; background: var(--rule); }
.book__cover--plate { background: none; }
.book h3 { font-size: var(--fs-xx-large); letter-spacing: 0.01em; color: var(--ink); }
.credits { margin-top: var(--sp-30); margin-bottom: var(--sp-60); font-weight: 600; }

.meta { font-size: var(--fs-small); display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.status {
	font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem;
	border: 1px solid currentColor; padding: 0.125rem 0.5rem;
}
.meta { flex-direction: column; align-items: flex-start; }

@media (max-width: 781px) {
	.book { grid-template-columns: minmax(0, 1fr); }
	.book__cover { max-width: 28rem; }
}

/* Footer: inverted, as on sled.design */

.site-footer { background: var(--ink); color: var(--paper); padding-block: var(--sp-60); font-size: var(--fs-small); }
.site-footer__inner { display: grid; gap: var(--sp-30); }
.site-footer [lang] { color: inherit; }
.site-footer a { display: inline-flex; align-items: center; min-height: 1.5rem; }

@media print {
	.site-header { position: static; }
	.hero { min-height: 0; color: var(--ink); background: none; padding-block: var(--sp-60); }
	.hero__plate { display: none; }
	.hero .tri__block p { color: var(--ink) !important; }
	.band--dark { background: none; color: var(--ink); }
	.band { padding-block: var(--sp-60); }
	.book { break-inside: avoid; }
}
