.cp-contact {
	position: relative;
}
.cp-contact::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(40% 50% at 72% 46%, rgb(var(--channel-cta) / 0.1), transparent 70%);
}

.cp-contact__wrap {
	position: relative;
	display: grid;
	row-gap: clamp(2.75rem, 7vw, 4rem);
	padding-bottom: clamp(4rem, 10vw, 7rem);
}

.cp-contact__title { --step: 22ms; --start: 0.15s; margin-top: clamp(1.3rem, 3vw, 2.1rem); }
.cp-contact__line { display: block; }
.cp-contact__word { display: inline-block; }
.cp-contact__ch { position: relative; }
.cp-contact__ch::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 100%;
	width: 0.07em;
	height: 0.78em;
	margin-left: 0.04em;
	border-radius: 1px;
	background: var(--color-cta);
	box-shadow: 0 0 14px rgb(var(--channel-cta) / 0.75);
	opacity: 0;
	transform: translateY(-50%);
}
.cp-contact__ch.is-at::after { opacity: 1; }
.cp-contact__line:last-child .cp-contact__word:last-child .cp-contact__ch:last-child::after {
	margin-left: 0.09em;
	opacity: 1;
	transition: opacity 0.5s var(--ease-out);
}
.cp-contact.is-writing .cp-contact__line:last-child .cp-contact__word:last-child .cp-contact__ch:last-child::after { opacity: 0.16; }

.cp-contact__lead {
	margin-top: clamp(1.1rem, 2.6vw, 1.6rem);
	max-width: 44ch;
	font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.14rem);
	color: var(--color-text-soft);
}

.cp-contact__ways {
	margin-top: clamp(2rem, 5vw, 2.9rem);
	padding: 0;
	list-style: none;
	border-block: 1px solid var(--color-border);
}
.cp-contact__ways li + li { border-top: 1px solid var(--color-border); }

.cp-contact__way {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 1.1rem;
	padding-block: 0.95rem;
	color: var(--color-text);
}

.cp-contact__ico {
	display: grid;
	place-items: center;
	width: 3rem;
	aspect-ratio: 1;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.01));
	color: var(--color-cta);
	transition: border-color 0.4s var(--ease-emphasis), box-shadow 0.4s var(--ease-emphasis), transform 0.5s var(--ease-emphasis);
}
.cp-contact__ico svg { width: 1.3rem; }

.cp-contact__label {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-text-soft);
}
.cp-contact__value {
	display: block;
	margin-top: 0.2rem;
	font-size: 1.06rem;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}
.cp-contact__way .cp-arrow {
	width: 1.05rem;
	color: var(--color-text-soft);
	transition: transform 0.5s var(--ease-emphasis), color 0.4s var(--ease-emphasis);
}

.cp-letter {
	--gut: clamp(0.875rem, 3vw, 2.5rem);
	--inset: clamp(0.75rem, 2.4vw, 2.5rem);
	--pad: clamp(1.5rem, 3vw, 2.75rem);
	position: relative;
	container-type: inline-size;
	scroll-margin-top: calc(var(--rail-h) + 1.5rem);
	padding: var(--pad) var(--inset) var(--pad) calc(var(--inset) + var(--gut) + 1px);
	border-radius: var(--radius-lg);
	background: linear-gradient(180deg, var(--color-surface-2), var(--color-surface) 32%);
	box-shadow:
		inset 0 0 0 1px rgb(var(--channel-text) / 0.06),
		inset 0 1px 0 rgb(var(--channel-text) / 0.06);
}
.cp-letter::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--inset);
	width: 1px;
	background: linear-gradient(transparent, rgb(var(--channel-cta) / 0.45) var(--pad), rgb(var(--channel-cta) / 0.45) calc(100% - var(--pad)), transparent);
}

.cp-letter__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1.5rem;
}
.cp-letter__title {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	font-size: clamp(1.45rem, 1.15rem + 1vw, 1.9rem);
	letter-spacing: -0.03em;
}
.cp-letter__sketch {
	width: clamp(2.9rem, 2.5rem + 1.2vw, 3.4rem);
	overflow: visible;
	color: rgb(var(--channel-cta) / 0.85);
	transition: filter 0.6s var(--ease-out);
}
.cp-letter__dot { filter: drop-shadow(0 0 2px var(--color-cta)); }
.cp-letter__part {
	fill: currentColor;
	fill-opacity: 0;
	stroke-opacity: 0.38;
	transition: fill-opacity 0.5s var(--ease-out), stroke-opacity 0.4s var(--ease-out);
}
.cp-letter:has(.cp-letter__need input:checked) .cp-letter__part--objet,
.cp-letter:has(#cp-c-message:not(:placeholder-shown)) .cp-letter__part--message,
.cp-letter:has(#cp-c-nom:not(:placeholder-shown)):has(#cp-c-email:not(:placeholder-shown)) .cp-letter__part--qui,
.cp-letter.is-sent .cp-letter__part {
	fill-opacity: 0.3;
	stroke-opacity: 1;
}
.cp-letter.is-sent .cp-letter__sketch { filter: drop-shadow(0 0 8px rgb(var(--channel-cta) / 0.65)); }
.cp-letter__date { font-size: 0.9rem; color: var(--color-text-soft); }

.cp-letter__fold {
	display: grid;
	grid-template-rows: 1fr;
	margin-top: clamp(1.6rem, 3.5vw, 2.2rem);
}
.cp-letter__body {
	display: grid;
	gap: clamp(0.875rem, 2.4vw, 1.5rem);
	min-height: 0;
}
.cp-letter.is-sent .cp-letter__fold {
	grid-template-rows: 0fr;
	margin-top: 0;
	opacity: 0;
	visibility: hidden;
}
.cp-letter.is-sent .cp-letter__body { overflow: hidden; }

.cp-letter__alert {
	padding: 0.9rem 1.1rem;
	border: 1px solid color-mix(in srgb, var(--color-error) 45%, transparent);
	border-radius: var(--radius-md);
	background: color-mix(in srgb, var(--color-error) 7%, transparent);
	font-size: 0.92rem;
	line-height: 1.5;
}
.cp-letter__alert ul { margin-top: 0.4rem; padding-left: 1.1rem; }
.cp-letter__alert a {
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-color: var(--color-error);
}

.cp-letter__object { --row: 2.25rem; padding: 0; border: 0; }
.cp-letter__label {
	float: left;
	margin-right: 0.9rem;
	padding: 0;
	line-height: var(--row);
}
.cp-letter__needs { display: flex; flex-wrap: wrap; column-gap: 1.3rem; }
.cp-letter__need {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: var(--row);
	color: var(--color-text-soft);
	cursor: pointer;
	transition: color 0.25s var(--ease-out);
}
.cp-letter__need input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.cp-letter__box {
	position: relative;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	border: 1.5px solid var(--color-text-soft);
	border-radius: 4px;
	transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.cp-letter__box::after {
	content: "";
	position: absolute;
	left: 0.27rem;
	top: 0.07rem;
	width: 0.27rem;
	height: 0.52rem;
	border: solid var(--color-bg);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.25s var(--ease-emphasis);
}
.cp-letter__need input:checked + .cp-letter__box {
	border-color: var(--color-cta);
	background: var(--color-cta);
	box-shadow: 0 0 12px rgb(var(--channel-cta) / 0.6);
}
.cp-letter__need input:checked + .cp-letter__box::after { transform: rotate(45deg) scale(1); }
.cp-letter__need input:checked ~ .cp-letter__word { color: var(--color-text); }
.cp-letter__need input:focus-visible + .cp-letter__box { outline: 2px solid var(--color-cta); outline-offset: 3px; }

.cp-letter__site:not(.is-open) { display: none; }

.cp-letter__line { position: relative; }
.cp-letter__line::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 1px;
	pointer-events: none;
	background: linear-gradient(var(--color-cta), var(--color-cta)) 0 0 / 0 100% no-repeat, rgb(var(--channel-text) / 0.38);
	transition: background-size 0.5s var(--ease-emphasis), height 0.2s var(--ease-out);
}
.cp-letter__line:focus-within::after { height: 2px; background-size: 100% 100%, auto; }
.cp-letter__field.is-invalid .cp-letter__line::after { background: var(--color-error); }

.cp-letter__line :is(input, textarea) {
	display: block;
	width: 100%;
	padding: 1.45rem 0 0.55rem;
	line-height: 1.4;
	caret-color: var(--color-cta);
	background: none;
	border: 0;
	border-radius: 0;
	appearance: none;
}
.cp-letter__line :is(input, textarea):focus { outline: none; }
.cp-letter__line :is(input, textarea)::placeholder { color: transparent; transition: color 0.2s var(--ease-out); }
.cp-letter__line :is(input, textarea):focus::placeholder { color: var(--color-text-soft); }
.cp-letter__line input:-webkit-autofill {
	-webkit-text-fill-color: var(--color-text);
	transition: background-color 600000s 0s;
}

.cp-letter__line label {
	position: absolute;
	top: 1.05rem;
	max-width: 100%;
	line-height: 1.4;
	color: var(--color-text-soft);
	pointer-events: none;
	transform-origin: 0 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: transform 0.3s var(--ease-emphasis), color 0.25s var(--ease-out);
}
.cp-letter__line label span { color: var(--color-text-soft); }
.cp-letter__line :is(input, textarea):is(:focus, :not(:placeholder-shown)) + label { transform: translateY(-0.62rem) scale(0.74); }
.cp-letter__line :is(input, textarea):focus + label { color: var(--color-text); }

.cp-letter__field--message .cp-letter__line::after { content: none; }
.cp-letter__field--message .cp-letter__line::before {
	content: "";
	position: absolute;
	top: calc(1.75rem + 0.8em - 4.5px);
	left: calc(-1 * var(--gut) - 5px);
	width: 9px;
	height: 9px;
	border: 1.5px solid var(--color-cta);
	border-radius: 50%;
	background: var(--color-bg);
	transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.cp-letter__field--message .cp-letter__line:focus-within::before {
	background: var(--color-cta);
	box-shadow: 0 0 12px rgb(var(--channel-cta) / 0.85);
}
.cp-letter__line textarea {
	min-height: calc(3lh + 2.55rem);
	max-height: calc(12lh + 2.55rem);
	padding: 1.75rem 1rem 0.8rem;
	line-height: 1.6;
	resize: none;
	background: var(--color-bg);
	border: 1px solid rgb(var(--channel-text) / 0.38);
	border-radius: var(--radius-md);
	transition: border-color 0.25s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.cp-letter__line textarea:focus {
	border-color: var(--color-cta);
	box-shadow: 0 0 0 3px rgb(var(--channel-cta) / 0.18), 0 0 26px rgb(var(--channel-cta) / 0.12);
}
.cp-letter__field--message.is-invalid textarea { border-color: var(--color-error); }
.cp-letter__field--message label { left: 1rem; max-width: calc(100% - 2rem); }

.cp-letter__error,
.cp-letter__hint { margin-top: 0.5rem; font-size: 0.86rem; line-height: 1.45; }
.cp-letter__error { color: var(--color-error); }
.cp-letter__hint { color: var(--color-text-soft); }
.cp-letter__hint button {
	padding: 0;
	color: var(--color-text);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: rgb(var(--channel-cta) / 0.6);
	cursor: pointer;
}
.cp-letter__count {
	position: absolute;
	right: 0;
	bottom: 0.45rem;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	color: var(--color-text-soft);
}

.cp-letter__row { display: grid; gap: clamp(0.875rem, 2.4vw, 1.5rem); }
.cp-letter__send { display: grid; gap: 1rem; padding-top: 0.3rem; }
.cp-letter__legal { max-width: 42ch; font-size: 0.8rem; line-height: 1.55; color: var(--color-text-soft); }
.cp-letter__legal a {
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-color: rgb(var(--channel-cta) / 0.6);
}

.cp-letter__done {
	display: none;
	justify-items: start;
	gap: 1rem;
	padding-top: clamp(1.6rem, 3.5vw, 2.2rem);
}
.cp-letter.is-sent .cp-letter__done { display: grid; }
.cp-letter__done:focus { outline: none; }
.cp-letter__kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-text-soft);
}
.cp-letter__kicker svg { width: 1rem; color: var(--color-cta); }
.cp-letter__thanks {
	max-width: 16ch;
	font-size: var(--text-2xl);
	font-weight: var(--weight-medium);
	line-height: 1.08;
	letter-spacing: -0.03em;
	text-wrap: balance;
}
.cp-letter__note { max-width: 42ch; color: var(--color-text-soft); }
.cp-letter__note b { font-weight: var(--weight-regular); color: var(--color-text); overflow-wrap: anywhere; }
.cp-letter__sign {
	justify-self: end;
	width: min(70%, 17rem);
	margin-top: 0.4rem;
	-webkit-mask-image: linear-gradient(90deg, #000 0 36%, transparent 39.5%);
	mask-image: linear-gradient(90deg, #000 0 36%, transparent 39.5%);
	-webkit-mask-size: 300% 100%;
	mask-size: 300% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}
.cp-letter__sign-svg { width: 100%; overflow: visible; }
.cp-letter__sign-path {
	fill: var(--color-cta);
	fill-rule: evenodd;
	filter: drop-shadow(0 0 6px rgb(var(--channel-cta) / 0.35));
}

@container (min-width: 30rem) {
	.cp-letter__object { --row: 2.75rem; }
	.cp-letter__line textarea { min-height: calc(5lh + 2.55rem); }
	.cp-letter__row { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
	.cp-letter__field--half { width: calc(50% - 0.5rem); }
	.cp-letter__send { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 1.6rem; }
}

@media (hover: hover) {
	a.cp-contact__way:hover .cp-contact__ico {
		transform: scale(1.06);
		border-color: rgb(var(--channel-cta) / 0.5);
		box-shadow: 0 0 20px rgb(var(--channel-cta) / 0.15);
	}
	a.cp-contact__way:hover .cp-arrow { transform: translateX(4px); color: var(--color-cta); }
	.cp-letter__need:hover { color: var(--color-text); }
	.cp-letter__need:hover .cp-letter__box { border-color: var(--color-text); }
}

@media (min-width: 992px) {
	.cp-contact__wrap {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
		column-gap: clamp(3rem, 6vw, 6.5rem);
		align-items: start;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.cp-contact__ch { animation: cp-fade 0.14s var(--ease-out) calc(var(--start) + var(--i) * var(--step)) both; }
	.cp-contact__line:last-child .cp-contact__word:last-child .cp-contact__ch:last-child::after {
		opacity: 0;
		animation:
			cp-show 0.2s var(--ease-out) calc(var(--start) + var(--i) * var(--step)) forwards,
			cp-blink 1.15s steps(1, end) calc(var(--start) + var(--i) * var(--step) + 0.5s) infinite;
	}
	.cp-contact.is-writing .cp-contact__line:last-child .cp-contact__word:last-child .cp-contact__ch:last-child::after { animation: none; }

	.cp-contact__copy > :not(.cp-contact__title),
	.cp-contact__ways li,
	.cp-letter__head,
	.cp-letter__body > :not(.cp-letter__site) { animation: cp-rise 0.75s var(--ease-emphasis) var(--d, 0s) both; }
	.cp-contact__copy > :nth-child(3) { --d: 0.16s; }
	.cp-contact__ways li:nth-child(1) { --d: 0.3s; }
	.cp-contact__ways li:nth-child(2) { --d: 0.37s; }
	.cp-contact__ways li:nth-child(3) { --d: 0.44s; }
	.cp-letter__head { --d: 0.22s; }
	.cp-letter__body > :nth-child(1) { --d: 0.3s; }
	.cp-letter__body > :nth-child(2) { --d: 0.38s; }
	.cp-letter__body > :nth-child(3) { --d: 0.46s; }
	.cp-letter__body > :nth-child(4) { --d: 0.54s; }
	.cp-letter__body > :nth-child(5) { --d: 0.62s; }
	.cp-letter__body > :nth-child(6) { --d: 0.7s; }
	.cp-letter__body > :nth-child(n + 7) { --d: 0.78s; }
	.cp-letter__site.is-open { animation: cp-rise 0.5s var(--ease-emphasis) both; }

	.cp-letter__sketch :is(.cp-letter__stroke, .cp-letter__part) {
		stroke-dasharray: 1;
		animation: cp-trace 0.9s var(--ease-out) var(--t, 0.35s) both;
	}
	.cp-letter__sketch :nth-child(2) { --t: 0.55s; }
	.cp-letter__sketch :nth-child(3) { --t: 0.7s; }
	.cp-letter__sketch :nth-child(5) { --t: 0.8s; }
	.cp-letter__sketch :nth-child(6) { --t: 0.9s; }
	.cp-letter__sketch :nth-child(7) { --t: 1s; }
	.cp-letter__sketch :nth-child(8) { --t: 1.1s; }
	.cp-letter__dot { animation: cp-fade 0.5s var(--ease-out) 0.75s both; }

	.cp-letter__fold { transition: grid-template-rows 0.7s var(--ease-emphasis), margin-top 0.7s var(--ease-emphasis), opacity 0.35s var(--ease-out); }
	.cp-letter.is-sent .cp-letter__fold { transition: grid-template-rows 0.7s var(--ease-emphasis), margin-top 0.7s var(--ease-emphasis), opacity 0.35s var(--ease-out), visibility 0s linear 0.7s; }
	.cp-letter.is-sent .cp-letter__done > * { animation: cp-rise 0.7s var(--ease-emphasis) 0.3s both; }
	.cp-letter__sign { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
	.cp-letter.is-sent .cp-letter__sign { animation: cp-rise 0.7s var(--ease-emphasis) 0.3s both, cp-sign 2.1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards; }
}

@keyframes cp-blink { 50% { opacity: 0; } }
@keyframes cp-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes cp-sign { to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
@keyframes cp-trace { from { stroke-dashoffset: 1; } }
@keyframes cp-fade { from { opacity: 0; } }
@keyframes cp-show { to { opacity: 1; } }
