/*
 * The page Conversiamo (site:contact), as the preview approved on 2026-11-22: the opening on the page's colour with a
 * crooked print, the three first lines on stone, the white sheet with the theme's form, the dark band that closes.
 * Paper is white in both themes, so its ink and its copper are turned dark again in the dark theme.
 */

.axyo-site-contact.wp-block-axyo-section.axp {
	--contact-paper: var(--color-section-dark-text);
	--contact-ink: var(--color-text);
	--contact-copper: var(--color-link);
	--contact-soft: color-mix(in srgb, var(--contact-ink) 82%, var(--contact-paper));
	--contact-shade: var(--color-section-dark-bg);
	padding: clamp(4rem, 8vw, 7.5rem) clamp(1.5rem, 4vw, 2.5rem);
	overflow-x: clip;
}

.axyo-site-contact.wp-block-axyo-section.axp:where([data-scheme="dark"] *) {
	--contact-ink: var(--color-section-dark-bg);
	--contact-copper: color-mix(in srgb, var(--color-section-dark-link) 55%, var(--color-section-dark-bg));
}

.axyo-site-contact.wp-block-axyo-section.axp:has(.contact-open, .contact-write) {
	--section-bg: var(--color-background);
	--section-fg: var(--color-text);
	--section-accent: var(--color-link);
	background-color: var(--color-background);
	color: var(--color-text);
}

.axyo-site-contact.wp-block-axyo-section.axp:has(.contact-open) { padding-top: calc(var(--axyo-top, 4rem) + clamp(3rem, 7vw, 6rem)); }

.axyo-site-contact .contact-in { container: contact / inline-size; width: 100%; max-width: 80em; margin-inline: auto; }
.axyo-site-contact :is(.contact-in, .contact-write, .contact-sheet, .contact-paper) > *,
.axyo-site-contact :is(.contact-in, .contact-write, .contact-sheet, .contact-paper) > .wp-block-group__inner-container > * { margin-block: 0; }
/* A group puts a box around what it holds: the two columns are its children. */
.axyo-site-contact .contact-write > .wp-block-group__inner-container { display: contents; }
.axyo-site-contact :is(.contact-words, .contact-side, .contact-end, .contact-aside, .contact-card) :is(h1, h2, p) { margin-block: 0; }
.axyo-site-contact figure { margin: 0; }
.axyo-site-contact .contact-muted { color: color-mix(in srgb, var(--section-fg) 78%, transparent); }
.axyo-site-contact.axp .contact-eyebrow { display: flex; align-items: center; gap: 0.9em; margin: 0; font-size: 0.75rem; font-weight: 600; line-height: 1.5; letter-spacing: 0.2em; text-transform: uppercase; color: var(--section-accent); }
.axyo-site-contact .contact-eyebrow::before { content: ""; width: 3.5em; height: 1px; background: currentColor; }
.axyo-site-contact em { font-style: normal; color: var(--section-accent); }
.axyo-site-contact a:focus-visible { outline: 2px solid currentColor; outline-offset: 0.25em; }

/* 1. The opening. */
.axyo-site-contact .contact-open { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem 6cqi; align-items: center; }
.axyo-site-contact .contact-words { min-width: 0; }
.axyo-site-contact.axp .contact-h1 { max-width: none; margin: 0.3em 0 0; font: 800 clamp(2.75rem, 8cqi, 6.5rem) / 0.95 var(--axyo-font-heading); letter-spacing: -0.05em; text-wrap: balance; color: var(--section-fg); }
.axyo-site-contact.axp .contact-lead { max-width: 34ch; margin: 1.5em 0 0; font: 500 clamp(1.125rem, 2cqi, 1.4rem) / 1.55 var(--axyo-font-heading); color: var(--section-fg); }
.axyo-site-contact.axp .contact-go { display: inline-flex; align-items: center; justify-content: center; gap: 0.6em; min-height: 3.0625em; margin-top: 2rem; padding: 10px 18px; border-radius: var(--axyo-radius-button); background: var(--color-button); color: var(--color-button-text); font-size: 1rem; font-weight: 400; line-height: 1.5; text-decoration: none; }
.axyo-site-contact .contact-print { justify-self: center; width: min(100%, 27em); padding: 0.75rem 0.75rem 0; background: var(--contact-paper); color: var(--contact-ink); font-size: 1rem; rotate: 2.5deg; box-shadow: 0 2rem 3rem -1.5rem color-mix(in srgb, var(--contact-shade) 45%, transparent); transition: rotate 0.4s; }
.axyo-site-contact .contact-print:is(:hover, :focus-within) { rotate: 0deg; }
.axyo-site-contact .contact-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0; }
.axyo-site-contact .contact-print figcaption { margin: 0; padding: 0.8rem 0.2rem 0.9rem; font: 600 0.7rem ui-monospace, monospace; letter-spacing: 0.14em; text-align: start; text-transform: uppercase; color: var(--contact-ink); }

/* 2. The first lines: crooked cards. */
.axyo-site-contact.axp .contact-title { max-width: none; margin: 0.45em 0 0; font: 800 clamp(2.15rem, 5cqi, 4rem) / 1 var(--axyo-font-heading); letter-spacing: -0.045em; color: var(--section-fg); }
.axyo-site-contact .contact-start { display: block; }
.axyo-site-contact .contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 3.5rem 0 0; padding: 0; list-style: none; }
.axyo-site-contact .contact-cards > li { --rot: -1.8deg; margin: 0; padding: 0; rotate: var(--rot); transition: rotate 0.4s, translate 0.4s; }
.axyo-site-contact .contact-cards > li:nth-child(2) { --rot: 1.2deg; }
.axyo-site-contact .contact-cards > li:nth-child(3) { --rot: -0.6deg; }
.axyo-site-contact .contact-cards > li:is(:hover, :focus-within) { rotate: 0deg; translate: 0 -0.3rem; }
.axyo-site-contact.axp .contact-card { position: relative; display: flex; flex-direction: column; gap: 1rem; height: 100%; padding: 1.75rem; background: var(--contact-paper); color: var(--contact-ink); font-size: 1rem; line-height: 1.5; box-shadow: 0 1.4rem 2.4rem -1.5rem color-mix(in srgb, var(--contact-shade) 50%, transparent); text-align: left; text-decoration: none; }
.axyo-site-contact .contact-stamp { position: absolute; top: 1.1rem; right: 1.1rem; display: grid; place-items: center; width: 4em; height: 4.625em; border: 2px dashed var(--contact-copper); color: var(--contact-copper); font: 600 0.8rem ui-monospace, monospace; rotate: 4deg; }
.axyo-site-contact .contact-card b { padding-right: 4rem; font: 800 1.65rem / 1.1 var(--axyo-font-heading); letter-spacing: -0.035em; }
.axyo-site-contact .contact-what { min-height: 4.8em; line-height: 1.6; color: var(--contact-soft); }
.axyo-site-contact .contact-first { margin-top: auto; padding-top: 0.9rem; border-top: 1px dashed color-mix(in srgb, var(--contact-ink) 30%, var(--contact-paper)); font: 600 1.05rem / 1.4 var(--axyo-font-heading); color: var(--contact-copper); }
.axyo-site-contact .contact-card[aria-current] { outline: 3px solid var(--section-accent); outline-offset: 0.3rem; }
.axyo-site-contact .contact-aside { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid color-mix(in srgb, var(--section-fg) 22%, transparent); font-size: 1rem; line-height: 1.5; }
.axyo-site-contact .contact-aside b { display: block; font: 700 1.3rem / 1.2 var(--axyo-font-heading); }
.axyo-site-contact .contact-aside p { margin-top: 0.4rem; }
.axyo-site-contact.axp .contact-link { display: inline-flex; gap: 0.6em; color: var(--section-fg); font-weight: 600; text-decoration: none; }
.axyo-site-contact .contact-link > span:first-child { padding-bottom: 0.25em; border-bottom: 1px solid var(--section-accent); }
.axyo-site-contact .contact-link > span + span { color: var(--section-accent); }

/* 3. The sheet. */
.axyo-site-contact .contact-write { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem 6cqi; align-items: start; }
.axyo-site-contact .contact-side { position: sticky; top: calc(var(--axyo-top, 4rem) + 2rem); }
.axyo-site-contact.axp .contact-side .contact-muted { max-width: 36ch; margin: 1.4rem 0 0; font-size: 1.125rem; line-height: 1.65; }
.axyo-site-contact .contact-sheet { position: relative; padding: clamp(1.75rem, 5cqi, 3.5rem); background: var(--contact-paper); color: var(--contact-ink); font-size: 1rem; line-height: 1.5; box-shadow: 0 2rem 3.5rem -2rem color-mix(in srgb, var(--contact-shade) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--contact-ink) 12%, transparent); }
/* Under the bar the sheet leaves only the room of its tape: the rest is the page's scroll padding. */
.axyo-site-contact .contact-sheet { scroll-margin-top: 1rem; }
.axyo-site-contact .contact-sheet::before { content: ""; position: absolute; top: -0.7rem; left: 50%; width: 5.5em; height: 1.35em; translate: -50% 0; rotate: -3deg; background: color-mix(in srgb, var(--contact-copper) 25%, var(--contact-paper)); }
.axyo-site-contact .contact-paper { min-width: 0; }
.axyo-site-contact.axp .contact-dear { margin: 0 0 1.8rem; font: 700 clamp(1.5rem, 3.5cqi, 2.1rem) / 1.2 var(--axyo-font-heading); letter-spacing: -0.03em; color: var(--contact-ink); }

/* The theme's form on paper: underlined fields, ruled message, no boxes. Organization and phone are not asked. */
.axyo-site-contact .axyo-contact-form {
	--color-text: var(--contact-ink);
	--color-field-text: var(--contact-ink);
	--foreground: var(--contact-ink);
	--axyo-field-line: color-mix(in srgb, var(--contact-ink) 70%, var(--contact-paper));
	/* On paper the keyboard's ring, the halo of a field and the arrow of the list are ink and copper, also in Dark. */
	--color-link: var(--contact-copper);
	--ring: var(--a11y-focus-color, var(--contact-copper));
	--color-button: var(--contact-copper);
	--muted-foreground: var(--contact-soft);
	--popover: var(--contact-paper);
	--muted: color-mix(in srgb, var(--contact-copper) 14%, var(--contact-paper));
	--popover-foreground: var(--contact-ink);
	--accent: color-mix(in srgb, var(--contact-copper) 14%, var(--contact-paper));
	--accent-foreground: var(--contact-ink);
	color: var(--contact-ink);
}

.axyo-site-contact .axyo-contact-form form { margin-top: 0; }
.axyo-site-contact .axyo-contact-form form > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.axyo-site-contact .axyo-contact-form form > .grid > :is(.col-span-full, .axyo-contact-topic) { grid-column: 1 / -1; }
.axyo-site-contact .axyo-contact-form form .field:has([name="axyo_org"], [name="axyo_phone"]) { display: none; }
.axyo-site-contact .axyo-contact-form .axyo-contact-topic { padding: 0; border: 0; border-radius: 0; background: none; }
.axyo-site-contact .axyo-contact-form .field:not([data-orientation="horizontal"]) { gap: 0.4rem; }
.axyo-site-contact .axyo-contact-form label { font-size: 0.875rem; font-weight: 600; line-height: 1.5; color: currentColor; }
.axyo-site-contact .axyo-contact-form .axyo-ui-required { color: var(--contact-copper); }

.axyo-site-contact .axyo-contact-form form .field :is(input.input:not([type="checkbox"]), select:not(.sr-only), textarea.textarea, .select:not(select) > [aria-haspopup]) {
	width: 100%;
	height: auto;
	min-height: 2.9em;
	padding: 0.55rem 0.1rem;
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, var(--contact-ink) 70%, var(--contact-paper));
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
	color: var(--contact-ink);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
}

/* The privacy notice in the consent (the user, 2026-11-22). */
.axyo-site-contact .axyo-contact-form form label a { text-decoration: underline; text-underline-offset: 0.2em; }

.axyo-site-contact .axyo-contact-form form .field select:not(.sr-only) { padding-inline-end: 2rem; }
.axyo-site-contact .axyo-contact-form form .field .select:not(select) { width: 100%; }
.axyo-site-contact .axyo-contact-form form .field option { background-color: var(--contact-paper); color: var(--contact-ink); }

.axyo-site-contact .axyo-contact-form form .field textarea.textarea.textarea {
	min-height: 10.5em;
	resize: vertical;
	background-image: repeating-linear-gradient(transparent 0 calc(1.5rem - 1px), color-mix(in srgb, var(--contact-ink) 10%, transparent) calc(1.5rem - 1px) 1.5rem);
	background-position: 0 0.55rem;
	background-attachment: local;
}

.axyo-site-contact .axyo-contact-form form .field :is(input, select, textarea, [aria-haspopup]):focus-visible { outline: 2px solid var(--contact-copper); outline-offset: 2px; }
.axyo-site-contact .axyo-contact-form form .field :is(input.input, textarea.textarea, select)[aria-invalid="true"] { border-bottom: 2px solid var(--color-danger); }
.axyo-site-contact .axyo-contact-form form .field[data-orientation="horizontal"] { gap: 0.75rem; align-items: flex-start; }
.axyo-site-contact .axyo-contact-form form .field[data-orientation="horizontal"] label { font-weight: 400; }
.axyo-site-contact .axyo-contact-form form .field input.input[type="checkbox"] { flex: none; width: 1.2em; height: 1.2em; margin-top: 0.1rem; border-color: color-mix(in srgb, var(--contact-ink) 70%, var(--contact-paper)); background-color: transparent; }
.axyo-site-contact .axyo-contact-form form .field input.input[type="checkbox"]:checked { border-color: var(--contact-copper); background-color: var(--contact-copper); }
.axyo-site-contact .axyo-contact-form form button[type="submit"] { height: auto; min-height: 3.0625em; padding: 10px 18px; border: 0; border-radius: var(--axyo-radius-button); background: var(--contact-copper); color: var(--color-section-dark-text); font-size: 1rem; font-weight: 400; line-height: 1.5; box-shadow: none; }
.axyo-site-contact .axyo-contact-form form button[type="submit"]:focus-visible { outline: 2px solid var(--contact-copper); outline-offset: 0.25em; }

/* 4. Meanwhile. */
.axyo-site-contact .contact-end { display: grid; justify-items: center; text-align: center; }
.axyo-site-contact.axp .contact-end .contact-muted { max-width: 40ch; margin: 1.4rem 0 0; font-size: 1.125rem; line-height: 1.6; }
.axyo-site-contact .contact-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 2rem; }
.axyo-site-contact.axp .contact-pair a { display: inline-flex; align-items: center; justify-content: center; min-height: 3.0625em; padding: 10px 18px; border-radius: var(--axyo-radius-button); font-size: 1rem; font-weight: 400; line-height: 1.5; text-decoration: none; }
.axyo-site-contact.axp .contact-pair a:first-child { background: var(--color-button); color: var(--color-button-text); }
.axyo-site-contact.axp .contact-pair a + a { color: var(--section-fg); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 48%, transparent); }

@container contact (max-width: 56em) {
	.axyo-site-contact .contact-open,
	.axyo-site-contact .contact-write { grid-template-columns: minmax(0, 1fr); }
	.axyo-site-contact .contact-side { position: static; }
	.axyo-site-contact .contact-cards { grid-template-columns: minmax(0, 1fr); }
	.axyo-site-contact .contact-what { min-height: 0; }
}

/* On a phone the buttons are as wide as the column (the user, 2026-11-22). */
@container contact (max-width: 30em) {
	.axyo-site-contact .axyo-contact-form form > .grid { grid-template-columns: minmax(0, 1fr); }
	.axyo-site-contact.axp .contact-go,
	.axyo-site-contact .axyo-contact-form form button[type="submit"],
	.axyo-site-contact .contact-pair,
	.axyo-site-contact.axp .contact-pair a { width: 100%; }
	.axyo-site-contact .contact-pair { flex-direction: column; }
}

/* Each piece comes in from its own side: the left, the right, the middle from below. What is linked never moves. */
@media (prefers-reduced-motion: no-preference) {
	.axyo-site-contact .contact-open > .contact-words { animation: contact-left 0.9s both; }
	.axyo-site-contact .contact-open > .contact-print { animation: contact-land 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }

	@supports (animation-timeline: view()) {
		.axyo-site-contact .contact-cards > li { animation: contact-up linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
		.axyo-site-contact .contact-cards > li:first-child { animation-name: contact-deal-left; }
		.axyo-site-contact .contact-cards > li:last-child { animation-name: contact-deal-right; }
		.axyo-site-contact .contact-side > * { animation: contact-left linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
		.axyo-site-contact .contact-paper { animation: contact-right linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
		.axyo-site-contact .contact-end { animation: contact-up linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
	}
}

@media (prefers-reduced-motion: reduce) {
	.axyo-site-contact * { animation: none; transition: none; }
}

@keyframes contact-left { from { opacity: 0; translate: -3rem 0; } }
@keyframes contact-right { from { opacity: 0; translate: 3rem 0; } }
@keyframes contact-up { from { opacity: 0; translate: 0 3rem; } }
@keyframes contact-land { from { opacity: 0; translate: 4rem 0; rotate: 10deg; } }
@keyframes contact-deal-left { from { opacity: 0; translate: -3rem 0; rotate: -9deg; } }
@keyframes contact-deal-right { from { opacity: 0; translate: 3rem 0; rotate: 9deg; } }
