/* Core block styling and the theme's block styles (front end and editor). */

/* --------------------------------------------------------------------------
   Page layout: a 760px reading column aligned with the 1200px wrap,
   wide blocks at 1200px, full-width sections edge to edge.
   -------------------------------------------------------------------------- */

.page .entry-content { font-size: 1.0625rem; line-height: 1.65; color: #33302A; }
@media (min-width: 768px) { .page .entry-content { font-size: 1.125rem; } }
.page .entry-content > * { max-width: 760px; margin: 0 var(--gutter) 1.25em max(var(--gutter), calc((100% - var(--wrap)) / 2)); }
.page .entry-content > .alignwide { max-width: var(--wrap); margin-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2)); }
.page .entry-content > .alignfull { max-width: none; margin: 0; }
.page .entry-content > :last-child:not(.alignfull) { margin-bottom: var(--section); }
.page .entry-content > .alignfull + :not(.alignfull) { margin-top: var(--section); }

/* Inside groups and columns the vertical rhythm comes from the block gap only. */
.entry-content :is(.wp-block-group, .wp-block-column) > :is(p, ul, ol, figure) { margin-bottom: 0; }

/* Full-width sections */
.wp-block-group.alignfull { padding: var(--section) var(--gutter); }
.wp-block-group.alignfull.has-white-background-color { padding-block: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 1023px) { .wp-block-group.alignfull.has-white-background-color { padding-block: 28px; } }

/* Colors from the palette */
.has-ink-background-color { color: var(--paper); }
.has-ink-background-color :is(h1, h2, h3, h4) { color: var(--paper); }
.has-ink-background-color a:not(.wp-block-button__link) { color: var(--saffron); }
.has-ink-background-color a:not(.wp-block-button__link):hover { color: var(--paper); }
.has-ink-background-color .is-style-fresco-eyebrow { color: var(--saffron); }
.has-ink-background-color :focus-visible { outline-color: var(--saffron); }
.has-saffron-background-color { color: var(--ink); }
.has-saffron-background-color a:not(.wp-block-button__link) { color: var(--ink); }
.has-saffron-background-color .is-style-fresco-eyebrow { color: var(--ink); }

/* --------------------------------------------------------------------------
   Typography inside content
   -------------------------------------------------------------------------- */

.entry-content h1 { font-weight: 800; font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem); line-height: 1.04; letter-spacing: -.02em; }
/* Headings in content (not inside cards rendered by dynamic blocks). */
.entry-content :is(.wp-block-heading, > h2, > h3) { margin-bottom: 0; }
.entry-content h2.wp-block-heading, .entry-content > h2 { font-weight: 800; font-size: clamp(1.875rem, 1.2rem + 2.2vw, 3rem); line-height: 1.1; letter-spacing: -.015em; }
.entry-content h3.wp-block-heading, .entry-content > h3 { font-weight: 700; font-size: 1.5rem; }
.entry-content > :is(h2, h3) { margin-top: 1.4em; margin-bottom: .5em; }
.entry-content h4 { font-weight: 700; font-size: 1.25rem; }
.entry-content :is(h1, h2, h3, h4):first-child { margin-top: 0; }
.entry-content mark { background: none !important; color: inherit; text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: .15em; text-underline-offset: 2px; text-decoration-skip-ink: none; }

.is-style-fresco-display { font-weight: 800 !important; font-size: clamp(2.75rem, 1.6rem + 4vw, 4.875rem) !important; line-height: 1.04 !important; letter-spacing: -.02em; }

.is-style-fresco-eyebrow { display: flex; align-items: center; gap: 12px; font-size: .8125rem !important; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--saffron-700); line-height: 1.4; }
.is-style-fresco-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--saffron); flex-shrink: 0; }
@media (min-width: 768px) { .is-style-fresco-eyebrow { font-size: .875rem !important; } .is-style-fresco-eyebrow::before { width: 32px; } }

.is-style-fresco-lead { font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); max-width: 580px; }
@media (min-width: 768px) { .is-style-fresco-lead { font-size: 1.25rem; } }
.has-ink-background-color .is-style-fresco-lead { color: var(--ink-200); }
.has-saffron-background-color .is-style-fresco-lead { color: var(--ink); }

.is-style-fresco-link { font-weight: 600; }
.is-style-fresco-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-underline-offset: 4px; }
.is-style-fresco-link a::after { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.wp-block-buttons { gap: 12px 16px; }
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 56px; padding: 0 28px;
	border: 2px solid var(--saffron); border-radius: 999px;
	background: var(--saffron); color: var(--ink);
	font: 600 1.0625rem/1.2 var(--font-body); text-decoration: none;
	transition: background-color .15s, border-color .15s;
}
.wp-block-button__link::after { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; flex-shrink: 0; }
.wp-block-button__link[href^="#"]::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E"); }
.wp-block-button__link:hover { background: var(--saffron-600); border-color: var(--saffron-600); color: var(--ink); }
.is-style-outline > .wp-block-button__link { background: transparent; border-color: var(--ink); color: var(--ink); padding: 0 28px; }
.is-style-outline > .wp-block-button__link:hover { background: var(--ink); color: var(--paper); }
.has-ink-background-color .is-style-outline > .wp-block-button__link { border-color: var(--paper); color: var(--paper); }
.has-ink-background-color .is-style-outline > .wp-block-button__link:hover { background: var(--paper); color: var(--ink); }
.is-style-fresco-dark > .wp-block-button__link { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.is-style-fresco-dark > .wp-block-button__link:hover { background: var(--ink-800); border-color: var(--ink-800); color: var(--paper); }
@media (max-width: 639px) {
	.wp-block-buttons { flex-direction: column; align-items: stretch !important; }
	.wp-block-button, .wp-block-button__link { width: 100%; }
}

/* --------------------------------------------------------------------------
   Block styles
   -------------------------------------------------------------------------- */

/* Group "Con pentagramma": five wavy lines behind the content */
.is-style-fresco-staff { position: relative; overflow: hidden; }
.is-style-fresco-staff::before { content: ""; position: absolute; left: 0; right: 0; top: 46%; height: 300px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none' fill='none' stroke='%23E4D9C5' stroke-width='2'%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 80C240 10 480 10 720 80S1200 150 1440 80'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 116C240 46 480 46 720 116S1200 186 1440 116'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 152C240 82 480 82 720 152S1200 222 1440 152'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 188C240 118 480 118 720 188S1200 258 1440 188'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 224C240 154 480 154 720 224S1200 294 1440 224'/%3E%3C/svg%3E") center / 100% 100% no-repeat; pointer-events: none; }
.has-saffron-background-color.is-style-fresco-staff::before { top: 12%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none' fill='none' stroke='%23D26D41' stroke-width='2'%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 80C240 10 480 10 720 80S1200 150 1440 80'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 116C240 46 480 46 720 116S1200 186 1440 116'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 152C240 82 480 82 720 152S1200 222 1440 152'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 188C240 118 480 118 720 188S1200 258 1440 188'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 224C240 154 480 154 720 224S1200 294 1440 224'/%3E%3C/svg%3E"); }
.is-style-fresco-staff > * { position: relative; }

/* Image "Arco": the curve of the logo wing; the caption becomes a floating card */
.is-style-fresco-arch { position: relative; max-width: 440px; margin-left: auto; padding-bottom: 40px; }
.is-style-fresco-arch img { width: 100%; aspect-ratio: 11 / 13; object-fit: cover; border-radius: 150px 150px var(--radius) var(--radius); }
@media (min-width: 1024px) { .is-style-fresco-arch img { border-radius: 220px 220px var(--radius-lg) var(--radius-lg); } }
.is-style-fresco-arch figcaption {
	position: absolute; left: -24px; bottom: 0; margin: 0; max-width: 260px; text-align: left;
	background: var(--white); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow);
	font: 700 1.0625rem/1.25 var(--font-display); color: var(--ink);
}
@media (max-width: 1023px) { .is-style-fresco-arch figcaption { left: 0; } }
.is-style-fresco-arch figcaption strong { display: block; margin-bottom: 2px; font: 600 .75rem/1.4 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--saffron-700); }

.is-style-fresco-rounded img { width: 100%; border-radius: var(--radius); object-fit: cover; }
@media (min-width: 1024px) { .is-style-fresco-rounded img { border-radius: var(--radius-lg); } }

/* List "Elenco numerato": 01, 02, 03 in Bitter */
.is-style-fresco-numbered { list-style: none; padding: 0 !important; margin-bottom: 0; counter-reset: fresco; display: flex; flex-direction: column; gap: 20px; }
.is-style-fresco-numbered li { counter-increment: fresco; position: relative; padding-left: 48px; margin: 0; }
.is-style-fresco-numbered li::before { content: counter(fresco, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 800 1.125rem/1.55 var(--font-display); color: var(--saffron-700); }
.is-style-fresco-numbered li strong { display: block; font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.has-ink-background-color .is-style-fresco-numbered li { color: var(--ink-200); }
.has-ink-background-color .is-style-fresco-numbered li::before { color: var(--saffron); }
.has-ink-background-color .is-style-fresco-numbered li strong { color: var(--paper); }
@media (min-width: 1024px) { .is-style-fresco-numbered li strong { font-size: 1.1875rem; } }

/* Columns "Numeri in evidenza": a figure plus a short line in each column */
.wp-block-columns.is-style-fresco-stats { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.is-style-fresco-stats .wp-block-column > * { margin: 0; }
.is-style-fresco-stats .wp-block-column > p:first-child { font: 800 1.875rem/1.1 var(--font-display); color: var(--ink); }
.is-style-fresco-stats .wp-block-column > p:first-child.has-large-font-size { font-size: 1.0625rem !important; font-weight: 700; line-height: 1.25; }
.is-style-fresco-stats .wp-block-column > p + p { font-size: .875rem; line-height: 1.4; color: var(--muted); margin-top: 2px; }
@media (min-width: 1024px) {
	.wp-block-columns.is-style-fresco-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
	.is-style-fresco-stats .wp-block-column + .wp-block-column { border-left: 1px solid var(--line); padding-left: 24px; }
	.is-style-fresco-stats .wp-block-column > p:first-child { font-size: 2.5rem; }
	.is-style-fresco-stats .wp-block-column > p:first-child.has-large-font-size { font-size: 1.375rem !important; padding-top: 6px; }
	.is-style-fresco-stats .wp-block-column > p + p { font-size: .9375rem; }
}

/* --------------------------------------------------------------------------
   Other core blocks
   -------------------------------------------------------------------------- */

.wp-block-columns { margin-bottom: 0; }
.wp-block-image { margin-block: 0; }
.wp-block-image img { height: auto; }
.wp-block-image figcaption, .wp-element-caption { font-size: .875rem; color: var(--muted); }
.wp-block-quote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--saffron); font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.wp-block-embed iframe { border-radius: 16px; }
.wp-block-group.is-layout-flex > * { margin: 0; }
