/* asaconsult.com — site stylesheet.
   White pages, light type, blue as the dominant colour, yellow for small details and box
   backgrounds, neutral grey footer. Built on Bootstrap 5.3: this file overrides its tokens
   and adds the site components. */
:root {
    --ac: #3E5DD1;            /* the dominant colour */
    --ac-ink: #3E5DD1;        /* colour of accent-coloured text (same as --ac when dark enough) */
    --on-ac: #FFFFFF;         /* text placed on an accent fill */
    --ac-dark: color-mix(in srgb, var(--ac) 80%, #000);
    --mark: #FCD23C;          /* yellow, only for small graphic details */
    --tint: #2F7DD9;          /* bluer than --ac: light tints of --ac itself read as violet */
    --ac-soft: #EDEDED;        /* hover states: the neutral grey of the footer */
    --box: #EDEDED;            /* background of boxes: the neutral grey of the footer */   /* pastel tint of the accent */
    --arrow: "\203A";         /* glyph that follows links and buttons */
    --r: 6px;                 /* corner radius of boxes and buttons */
    --ink: #161616;
    --muted: #525252;
    --line: #E0E0E0;
    --grey: #F4F4F4;
    --page-max: 1320px;
    --page-pad: 2rem;
    --font-text: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-title: var(--font-text);   /* typeface of page and section titles */
    --title-scale: 1;                 /* size correction for title typefaces that run small */
    --title-weight: 300;
    --bs-body-font-family: var(--font-text);
    --bs-body-color: #161616;
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.5;
    --bs-link-color-rgb: 26, 86, 219;
}

html { scroll-padding-top: 4.5rem; }
body { -webkit-font-smoothing: antialiased; }
a { color: var(--ac-ink); text-decoration: none; }
a:hover { color: var(--ac-ink); text-decoration: underline; text-decoration-color: var(--ac); }
.page { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 1030; padding: 0; }
.topbar .page { display: flex; align-items: center; flex-wrap: wrap; min-height: 3.25rem; }
.topbar .navbar-brand { padding: 0; margin: 0; display: flex; align-items: center; }
.topbar .navbar-brand img { height: 30px; width: auto; }
.topbar .nav-link { color: var(--ink); font-size: 1rem; padding: .95rem .9rem; border-bottom: 2px solid transparent; }
.topbar .nav-link:hover, .topbar .nav-link.show { color: var(--ink); background: var(--grey); text-decoration: none; }
.topbar .nav-link.active { border-bottom-color: var(--ac); }
.topbar .nav-link:focus, .topbar .nav-link:focus-visible { outline: 0; box-shadow: none; }
.topbar .nav-link:focus-visible { background: var(--ac-soft); border-bottom-color: var(--mark); }
.topbar .dropdown-toggle::after { border: 0; width: .5rem; height: .5rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-.25rem); margin-left: .6rem; vertical-align: middle; }
.topbar .dropdown-menu { border: 1px solid var(--line); border-top: 0; border-radius: 0; margin: 0; padding: .5rem 0; min-width: 16rem; box-shadow: 0 6px 12px rgba(0,0,0,.08); }
.topbar .dropdown-item { font-size: 1rem; padding: .6rem 1rem; color: var(--ink); }
.topbar .dropdown-item:hover { background: var(--ac-soft); color: var(--ac-ink); text-decoration: none; }
.icon-nav { display: flex; align-items: center; margin-left: auto; }
@media (min-width: 992px) { .topbar .navbar-collapse { justify-content: center; } }
.icon-nav a { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3.25rem; color: var(--ink); }
/* Full-width switch: desktop only */
body.is-wide { --page-max: none; --page-pad: 3rem; }
.width-toggle { display: none; align-items: center; justify-content: center; width: 3rem; height: 3.25rem; padding: 0; border: 0; background: none; color: var(--ink); }
.width-toggle:hover { background: var(--ac); color: var(--on-ac); }
.width-toggle .to-narrow, body.is-wide .width-toggle .to-wide { display: none; }
body.is-wide .width-toggle .to-narrow { display: block; }
@media (min-width: 992px) { .width-toggle { display: flex; } }
@media (max-width: 991.98px) { body.is-wide { --page-max: 1320px; --page-pad: 2rem; } }
@media (max-width: 575.98px) { body.is-wide { --page-pad: 1rem; } }
.icon-nav a:hover { background: var(--ac); color: var(--on-ac); }
.icon-nav svg, .navbar-toggler svg, .width-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.navbar-toggler { border: 0; border-radius: 0; padding: 0; width: 3rem; height: 3.25rem; color: var(--ink); }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 4rem; }
.hero h1, .hero .hero-title { color: var(--ac-ink); font-weight: var(--title-weight); font-size: calc(clamp(2.1rem, 3.6vw, 3.25rem) * var(--title-scale)); line-height: 1.17; letter-spacing: -.005em; margin: 0 0 2.5rem; text-wrap: balance; }
.hero .lead { font-size: 1.125rem; font-weight: 400; line-height: 1.5; max-width: 34rem; margin: 0 0 1.75rem; }
.hero-text { display: flex; flex-direction: column; }
.hero-text .spacer { flex: 1; min-height: 1rem; }
.hero-figure { border-radius: var(--r); background: var(--box); height: 100%; min-height: 20rem; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.hero-figure svg { width: 100%; max-width: 34rem; height: auto; }
.fig-line { fill: none; stroke: var(--ac); stroke-width: 1.5; }
.fig-box { fill: #fff; stroke: var(--ink); stroke-width: 1.25; }
.fig-fill { fill: var(--ac); }
.fig-on { fill: var(--on-ac); font-size: 13px; }
.fig-line { stroke: var(--ac-ink); }
.fig-soft { fill: #E4E4E4; }
.fig-dot { fill: var(--mark); stroke: var(--ink); stroke-width: .75; }
.fig-label { font-size: 13px; fill: var(--ink); }
.fig-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; fill: var(--muted); }

.btn-site { display: inline-flex; align-items: center; gap: .7rem; padding: .75rem 1.3rem; font-size: 1rem; line-height: 1.3; border-radius: var(--r); border: 1px solid var(--ac); background: var(--ac); color: var(--on-ac); }
button.btn-site { font-family: inherit; text-align: left; }
.btn-site::after { content: var(--arrow); font-size: 1.15rem; line-height: 1; }
.btn-site:hover { background: var(--ac-dark); border-color: var(--ac-dark); color: var(--on-ac); text-decoration: none; }
.btn-site.ghost { background: #fff; color: var(--ac-ink); border-color: var(--ac-ink); }
.btn-site.ghost:hover { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }
.btn-site.invert { background: #fff; border-color: #fff; color: var(--ink); }
.btn-site.invert:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.aside-title { font-size: .9rem; font-weight: 600; margin: 0 0 1.5rem; }
.aside-list { list-style: none; margin: 0; padding: 0; }
.aside-list li { padding: 1.1rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.aside-list li:first-child { padding-top: 0; }
.aside-list a { display: block; font-size: 1rem; line-height: 1.4; }
.aside-list a::after { content: var(--arrow); display: inline-block; margin-left: .4em; font-size: 1.1rem; line-height: 1; }

/* ---------- Sections ---------- */
.sec { padding: 0 0 4rem; }
.sec-title { font-size: .9rem; font-weight: 600; margin: 0 0 1.25rem; }
.sec h3 { font-size: 1.25rem; font-weight: 400; line-height: 1.3; margin: 0 0 .75rem; }
.sec p { color: var(--muted); }

.tile { position: relative; display: flex; flex-direction: column; height: 100%; padding: 1.25rem; border: 1px solid var(--line); transition: border-color .15s; border-radius: var(--r); background: #fff; color: var(--ink); }
.tile:hover { border-color: var(--mark); }
.tile:has(.go) { padding-bottom: 3.25rem; }
.tile p { font-size: 1rem; line-height: 1.5; margin: 0; }
.tile p + p { margin-top: .75rem; }
.tile .kicker { font-size: .78rem; color: var(--muted); margin: 0 0 .4rem; }
.tile .go { position: absolute; right: 2.9rem; bottom: 1rem; font-size: .95rem; }
.tile:has(.go)::after { content: var(--arrow); position: absolute; right: 1.25rem; bottom: .9rem; font-size: 1.1rem; line-height: 1.4; color: var(--ac-ink); }
.tile .stretched-link:hover { text-decoration: none; }

.band { border-radius: var(--r); background: var(--box); padding: 2.5rem 0; }
.band h2 { font-size: .9rem; font-weight: 600; margin: 0 0 .75rem; }
.band h3 { font-size: 1.6rem; font-weight: 300; line-height: 1.25; margin: 0 0 .75rem; }
.band p { margin: 0; max-width: 46rem; color: var(--ink); }
.band.accent { background: var(--ac); color: var(--on-ac); }
.band.accent p { color: var(--on-ac); font-size: 1.35rem; font-weight: 300; line-height: 1.35; }


.client-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.client-grid li { padding: 1.1rem 1.25rem 1.25rem; box-shadow: 1px 1px 0 var(--line); }
.client-grid strong { display: block; font-size: 1.15rem; font-weight: 400; }
.client-grid span { font-size: .9rem; color: var(--muted); }
.plain h2 { font-size: 1.6rem; font-weight: 300; line-height: 1.25; margin: 0 0 .9rem; color: var(--ink); }
.plain .col-lg-6 { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.go-link::after { content: var(--arrow); display: inline-block; margin-left: .4em; font-size: 1.1rem; line-height: 1; }

/* ---------- Footer: all black, in columns ---------- */
.site-footer { border-top: 1px solid var(--foot-line); background: var(--foot-bg); color: var(--foot-fg); padding: 3.5rem 0 2rem; font-size: .97rem; }
.site-footer img { height: 34px; width: auto; margin-bottom: 1.25rem; }
.site-footer strong { color: var(--foot-strong); font-weight: 600; }
.site-footer h2 { font-size: .97rem; font-weight: 600; color: var(--foot-strong); margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0 0 2rem; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: var(--foot-fg); }
.site-footer a:hover { color: var(--foot-strong); text-decoration-color: var(--mark); }
.foot-legal { border-top: 1px solid var(--foot-line); padding-top: 1.5rem; margin: 1rem 0 0; font-size: .88rem; color: var(--foot-fg); }

@media (max-width: 991.98px) {
        .topbar .navbar-collapse { order: 5; flex-basis: 100%; border-top: 1px solid var(--line); margin: 0 calc(var(--page-pad) * -1); padding: 0 var(--page-pad) .5rem; }
    .topbar .nav-link { padding: .85rem 0; border-bottom: 1px solid var(--line); }
    .topbar .nav-link:hover, .topbar .nav-link.show { background: none; }
    .topbar .dropdown-menu { border: 0; box-shadow: none; padding: 0 0 .5rem; }
    .topbar .dropdown-item { padding-left: 1rem; color: var(--muted); }
    .icon-nav a { width: 2.75rem; }
    .hero { padding: 2.5rem 0 3rem; }
    .hero h1, .hero .hero-title { margin-bottom: 1.5rem; }
    .hero-figure { min-height: 0; padding: 1.25rem; }
}
@media (max-width: 575.98px) {
    :root { --page-pad: 1rem; }
    .band.accent p { font-size: 1.15rem; }
}

/* Yellow details: a bar above the title, the active/hovered menu item, link hover */
.hero h1::before, .hero .hero-title::before { content: ""; display: block; width: 3.5rem; height: .5rem; background: var(--mark); margin-bottom: 1.75rem; border-radius: var(--r); }
.topbar .nav-link:hover, .topbar .nav-link.show { background: var(--ac-soft); border-bottom-color: var(--mark); }
a:hover { text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.aside-list a, .go-link, .tile .go { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .35em; }

/* Footer: neutral grey */
body { --foot-bg: #EDEDED; --foot-fg: #525252; --foot-strong: #161616; --foot-line: #C6C6C6; }

/* ---------- Inner pages ---------- */
.hero .lead + .lead { margin-top: -.5rem; }
.hero .col-lg-7 .lead { max-width: 40rem; }

/* In-page index, sticky beside the content */
.toc { list-style: none; margin: 0; padding: 0; position: sticky; top: 4.75rem; border-top: 1px solid var(--ink); }
.toc li { border-bottom: 1px solid var(--line); }
.toc a { display: block; padding: .7rem 0; font-size: 1rem; color: var(--ink); }
.toc a:hover { color: var(--ac-ink); }

/* Content blocks of an inner page */
.block { padding: 0 0 3.5rem; }
.block > h2, .band.case > h2 { font-size: 1.75rem; font-weight: 300; line-height: 1.25; margin: 0 0 1.5rem; }
.block > h2 { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.block > p { max-width: 46rem; color: var(--muted); }
.block h3 { font-size: 1.15rem; font-weight: 400; line-height: 1.3; margin: 0 0 .6rem; }
.block .tile p a, .block > p a:not(.go-link) { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }

.band.case { padding: 2rem 1.5rem 2.25rem; }
.band.case > h2 { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; }
.band.case > h3 { font-size: 1.6rem; font-weight: 300; margin-bottom: 1.5rem; }
.band.case p { font-size: 1.05rem; max-width: none; }
.band.case strong { display: block; font-weight: 600; margin-bottom: .25rem; }

/* List with a yellow dash as marker */
.dash-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.dash-list li { position: relative; padding: .7rem 0 .7rem 2rem; border-bottom: 1px solid var(--line); }
.dash-list li::before { content: ""; position: absolute; left: 0; top: 1.35rem; width: 1rem; height: .2rem; background: var(--mark); }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin-bottom: 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-size: 3rem; font-weight: 300; line-height: 1; color: var(--ac); margin-bottom: .75rem; padding-bottom: .75rem; border-bottom: .2rem solid var(--mark); }
.steps p { font-size: 1.05rem; color: var(--muted); margin: 0; }

@media (max-width: 991.98px) {
    .toc { position: static; margin-bottom: 1rem; }
    .toc-col { display: none; }
}

/* Links inside running text carry the yellow dash */
.block a:not(.go-link):not(.btn-site):not(.go), .hero .lead a, .dash-list a { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.block > p + .row, .block > p + ul, .block > p + ol, .block > ul + p, .block > .row + p, .block > ul + h3 { margin-top: 1.5rem; }
.block > h3 { font-size: 1.25rem; }

/* Screenshot or photo beside the page title, and figures in the text */
.hero-shot, .shot { margin: 0; }
.hero-shot img, .shot img { border: 1px solid var(--line); border-radius: var(--r); }
.hero-shot figcaption, .shot figcaption { font-size: .82rem; color: var(--muted); margin-top: .6rem; }
.hero .dash-list { margin-bottom: 1.75rem; }

/* Lists inside tiles */
.tile .dash-list { margin-top: .75rem; }
.tile .dash-list li { font-size: 1rem; padding: .55rem 0 .55rem 1.6rem; color: var(--muted); }
.tile .dash-list li::before { top: 1.15rem; width: .8rem; }
.tile .dash-list li:last-child { border-bottom: 0; }
.tile p + p .go-link, .tile .dash-list + p { display: inline-block; margin-top: .5rem; }
.tile .go-link { font-size: 1rem; }

/* Case studies: three columns under a yellow dash */
.case-cols h3 { font-size: .9rem; font-weight: 600; margin: 0 0 .5rem; padding-top: .75rem; border-top: .2rem solid var(--mark); }
.case-cols p { font-size: 1.05rem; color: var(--muted); margin: 0 0 .75rem; }

.steps p strong { color: var(--ink); font-weight: 600; }

/* Contact form */
.form-site { max-width: 46rem; }
.form-site .form-label { font-size: .9rem; margin-bottom: .35rem; }
.form-site .form-control, .form-site .form-select { border-radius: var(--r); border-color: #8D8D8D; padding: .7rem .85rem; font-size: 1rem; }
.form-site .form-control:focus, .form-site .form-select:focus { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac); }
.form-site .form-check-input { border-color: #8D8D8D; margin-top: .3rem; }
.form-site .form-check-input:checked { background-color: var(--ac); border-color: var(--ac); }
.form-site .form-check-label { font-size: .9rem; color: var(--muted); }
.form-site button.btn-site { cursor: pointer; }
.form-note { font-size: .9rem; color: var(--muted); }

.case-tags { font-size: .8rem; color: var(--muted); letter-spacing: .02em; border-top: 1px solid var(--ink); padding-top: 1.25rem; margin: 0 0 .5rem; max-width: none; }
.block > .case-tags + h2 { border-top: 0; padding-top: 0; }

/* Path line above the title of second-level pages */
.crumb { font-size: .85rem; color: var(--muted); margin: 0 0 1.5rem; }
.crumb a { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.hero-shot:has(figcaption) img { width: 100%; max-height: 26rem; object-fit: cover; object-position: top left; }

/* Title typeface: large titles only; small labels stay in the text typeface */
.hero h1, .hero .hero-title, .block > h2, .plain h2, .band h3, .band.accent p, .steps li::before { font-family: var(--font-title); }
.block > h2, .plain h2, .band h3 { font-weight: var(--title-weight); font-size: calc(1.75rem * var(--title-scale)); }
.band.case > h2 { font-family: var(--font-text); font-size: .9rem; font-weight: 600; }

/* Home: the opening is a carousel; its index is the "In evidenza" row underneath */
/* All slides share one grid cell, so the opening is as tall as the tallest slide and never jumps */
.hero .carousel-inner { display: grid; }
.hero .carousel-item { display: block; grid-area: 1 / 1; float: none; margin: 0; visibility: hidden; }
.hero .carousel-item.active, .hero .carousel-item-next, .hero .carousel-item-prev { visibility: visible; }
.hero .carousel-item .row { height: 100%; }
.hero-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 2rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.hero-tabs .aside-title { margin: 0; }
.hero .carousel-indicators { position: static; margin: 0; flex: 1; flex-wrap: wrap; justify-content: flex-start; gap: .25rem 2rem; }
.hero .carousel-indicators [data-bs-target] {
    box-sizing: border-box; flex: 0 1 auto; width: auto; height: auto; margin: 0; padding: .35rem 0; text-indent: 0; opacity: 1;
    background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ac-ink); font-size: 1rem; text-align: left; transition: none;
}
.hero .carousel-indicators [data-bs-target]:hover { border-bottom-color: var(--mark); }
.hero .carousel-indicators .active { color: var(--ink); border-bottom-color: var(--mark); }
.hero-arrows { display: flex; gap: .25rem; }
.hero-arrows button { width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; }
.hero-arrows button:hover { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }

.foot-marks { font-size: .85rem; margin: 1rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--foot-line); }
.foot-marks + .foot-legal { border-top: 0; padding-top: 0; margin-top: .5rem; }

/* The grey figure beside a page title carries the same shadow as the tiles */
.hero-figure { box-shadow: 5px 6px 14px rgba(22, 22, 22, .12); }
.hero .carousel-inner { width: calc(100% + 1.25rem); padding: 0 1.25rem 1.5rem 0; margin: 0 -1.25rem -1.5rem 0; }   /* room for the shadow, which the carousel would clip */

@media (max-width: 991.98px) { .client-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .client-grid strong { font-size: 1rem; } }

/* Clients: a strip of logos (or names) that scrolls slowly and endlessly.
   site.js appends a copy of the list so the loop has no gap. */
.logo-roll { display: flex; overflow: hidden; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.logo-track { display: flex; flex-shrink: 0; align-items: center; gap: 4rem; list-style: none; margin: 0; padding: 0 4rem 0 0; animation: logo-roll 45s linear infinite; }
.logo-roll:hover .logo-track { animation-play-state: paused; }
.logo-track li { display: flex; flex-direction: column; align-items: center; gap: .5rem; white-space: nowrap; }
.logo-track img { height: 3rem; width: auto; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.logo-track li:hover img { filter: none; opacity: 1; }
.logo-track strong { display: flex; align-items: center; height: 3rem; font-family: var(--font-title); font-size: 1.6rem; font-weight: 300; color: var(--muted); transition: color .2s; }
.logo-track li:hover strong { color: var(--ac-ink); }
.logo-track span { font-size: .8rem; color: var(--muted); }
@keyframes logo-roll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
    .logo-roll { -webkit-mask-image: none; mask-image: none; }
    .logo-track { animation: none; flex-wrap: wrap; flex-shrink: 1; justify-content: center; gap: 2rem 3rem; padding: 0; }
    .logo-track[aria-hidden="true"] { display: none; }
}

/* Home: product tiles open with the product's logo or icon */
.product-logo { height: 2.5rem; width: auto; max-width: 100%; align-self: flex-start; object-fit: contain; object-position: left; margin-bottom: 1rem; }
.product-head { display: flex; align-items: center; gap: .75rem; height: 2.5rem; margin-bottom: 1rem; }
.product-head h3 { margin: 0; }
.product-icon { height: 2.5rem; width: 2.5rem; border-radius: 22%; flex-shrink: 0; }
.product-icon.book { border-radius: 0; fill: none; stroke: var(--ac); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.product-icon.book .mark { stroke: var(--mark); stroke-width: 2.5; }

/* A link inside the text of a tile that is itself one big link: it must sit above the stretched link */
.tile .inline-link { position: relative; z-index: 2; text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* A case shown inside a service page: small label, then the title */
.block > .case-tags + h2 { margin-bottom: 1.5rem; }

/* Side index: second-level entries (the single cases under "Casi") */
.toc li.sub a { padding: .45rem 0 .45rem 1rem; font-size: .9rem; color: var(--muted); }

/* Richer figure style (sample): cards with shadow, icons, a gradient hub, flowing connectors */
.fx .fx-halo { fill: var(--ac); opacity: .07; }
.fx .fx-card { fill: #fff; }
.fx .fx-ico { fill: none; stroke: var(--ac); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fx .fx-ico-bg { fill: color-mix(in srgb, var(--ac) 10%, #fff); stroke: none; }
.fx .fx-label { font-size: 14px; fill: var(--ink); }
.fx .fx-flow { fill: none; stroke: var(--ac); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 2 7; animation: fx-flow 1.4s linear infinite; }
.fx .fx-node { fill: var(--mark); stroke: #fff; stroke-width: 1.5; }
.fx .fx-stop-a { stop-color: color-mix(in srgb, var(--ac) 82%, #fff); }
.fx .fx-stop-b { stop-color: color-mix(in srgb, var(--ac) 88%, #000); }
.fx .fx-hub-ico { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.fx .fx-sub { font-size: 11px; fill: var(--muted); }
.fx .fx-hub-label { font-size: 13px; fill: #fff; }
@keyframes fx-flow { to { stroke-dashoffset: -18; } }
@media (prefers-reduced-motion: reduce) { .fx .fx-flow { animation: none; } }

/* ------------------------------------------------------------
   Contact form: bait field and result messages (contatti/, assets/js/contact.js).
   A message is shown by the script (.is-shown) or, after a plain POST without
   JavaScript, by the address fragment the endpoint redirects to (:target).
   ------------------------------------------------------------ */
.form-site .form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-site .form-result { max-width: none; }
.form-site .form-msg { display: none; max-width: none; margin: 0 0 1.5rem; padding: .85rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--ac); border-radius: var(--r); background: color-mix(in srgb, var(--ac) 6%, #fff); color: var(--ink); font-size: 1rem; scroll-margin-top: 6rem; }
.form-site .form-msg.is-shown, .form-site .form-msg:target { display: block; }
.form-site .form-msg.is-error { border-left-color: #B3261E; background: #FCF3F2; }
.form-site .form-msg:focus { outline: none; }
.form-site .form-msg:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.form-site .form-control.is-invalid, .form-site .form-select.is-invalid, .form-site .form-check-input.is-invalid { border-color: #B3261E; }
.form-site .form-control.is-invalid:focus { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E; }
.form-site .invalid-feedback { display: block; font-size: .875rem; color: #B3261E; margin-top: .35rem; }
.form-site .form-check-input.is-invalid ~ .form-check-label { color: var(--muted); }
.form-site button.btn-site:disabled { opacity: .6; cursor: default; }


/* ==========================================================================
   NADA teaser slide (home carousel) — markup in src/partials/slide-nada.html.
   A dark "coming soon" title card with letterbox bars, deliberately unlike the other slides:
   only the title and "In arrivo…", no other text and no links.
   Colours come from NADA's own design: page #FBFBF8, leaf green #6EA834 (lightened for the dark ground).
   The mascot is drawn for light grounds, so it stands in a disc of NADA's page colour.
   Everything is prefixed nada- and self-contained: remove this block together with the partial.
   ========================================================================== */
.nada-slide { --nada-page: #FBFBF8; --nada-green: #8CC653; --nada-bar: 2.5rem; }
.nada-card {
    position: relative; height: 100%; overflow: hidden; isolation: isolate; border-radius: var(--r); color: #fff;
    display: flex; flex-direction: column; justify-content: center;
    padding: calc(var(--nada-bar) + 1.75rem) clamp(1.5rem, 5vw, 4.5rem);
    background: radial-gradient(120% 140% at 78% 50%, #2F3438 0%, #1A1D20 45%, #0D0F10 100%);
    box-shadow: 5px 6px 14px rgba(22, 22, 22, .12);
}
/* Slow light sweep across the card */
.nada-card::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .07) 50%, transparent 60%);
    background-size: 300% 100%; background-position: 100% 0;
}
/* Letterbox bars: purely graphic */
.nada-bar { position: absolute; left: 0; right: 0; z-index: 3; height: var(--nada-bar); background: #000; }
.nada-bar-top { top: 0; }
.nada-bar-bottom { bottom: 0; }

/* Mascot: right half of the card, inside a disc of light */
.nada-stage { position: absolute; z-index: 0; top: var(--nada-bar); bottom: var(--nada-bar); right: 0; width: 50%; display: flex; align-items: center; justify-content: center; }
.nada-disc {
    position: relative; height: 86%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--nada-page);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 90px 10px rgba(251, 251, 248, .22);
}
.nada-disc img { position: absolute; left: 50%; top: 6%; width: 66%; height: auto; max-width: none; transform: translateX(-50%); }

/* Title and "In arrivo…": alone on the left half */
.nada-text { position: relative; z-index: 2; width: 50%; }
.nada-eyebrow { display: flex; align-items: center; gap: 1rem; margin: 0; color: var(--nada-green); font-size: clamp(1rem, 1.5vw, 1.3rem); font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }
.nada-eyebrow::before { content: ""; width: 3rem; height: 2px; background: currentColor; }
.nada-title { margin: .6rem 0 0 -.04em; font-family: var(--font-title); font-weight: 600; font-size: clamp(5.5rem, 11vw, 10rem); line-height: 1; letter-spacing: .06em; color: #fff; }

/* Stacked: mascot on top, text centred underneath */
@media (max-width: 991.98px) {
    .nada-card { align-items: center; gap: 2.5rem; text-align: center; padding: calc(var(--nada-bar) + 1.75rem) 1.25rem; background: radial-gradient(130% 80% at 50% 34%, #2F3438 0%, #1A1D20 50%, #0D0F10 100%); }
    .nada-stage { position: static; width: auto; flex: 0 1 auto; }
    .nada-disc { height: auto; width: min(19rem, 72vw); }
    .nada-text { width: auto; }
    .nada-eyebrow { justify-content: center; font-size: 1rem; padding-left: .32em; }
    .nada-eyebrow::before { width: 2.25rem; }
    .nada-eyebrow::after { content: ""; width: 2.25rem; height: 2px; background: currentColor; }
    .nada-title { margin-left: 0; padding-left: .06em; font-size: clamp(5rem, 24vw, 8rem); }
}
@media (max-width: 575.98px) {
    .nada-slide { --nada-bar: 2.25rem; }
}

/* Motion: the parts come in one after the other when the slide is shown, then the light keeps moving.
   The incoming slide carries .carousel-item-next/-prev during the crossfade and .active afterwards:
   all three are listed so the entrance starts with the crossfade and does not replay at its end.
   Nothing is hidden outside the keyframes (fill-mode both covers the delays), so the texts stay visible
   wherever animations do not run. */
@media (prefers-reduced-motion: no-preference) {
    .nada-text > * { animation-duration: .9s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); animation-fill-mode: both; }
    .nada-slide:is(.active, .carousel-item-next, .carousel-item-prev) .nada-text > * { animation-name: nada-rise; }
    .nada-slide:is(.active, .carousel-item-next, .carousel-item-prev) .nada-disc { animation: nada-light 1.4s cubic-bezier(.2, .7, .2, 1) .1s both; }
    .nada-slide:is(.active, .carousel-item-next, .carousel-item-prev) .nada-disc img { animation: nada-float 7s ease-in-out 1.5s infinite; }
    .nada-slide:is(.active, .carousel-item-next, .carousel-item-prev) .nada-card::after { animation: nada-sweep 9s ease-in-out 1.2s infinite; }
    /* Leaving: the dark card fades out during the crossfade instead of vanishing at its end */
    .hero .nada-slide.active:is(.carousel-item-start, .carousel-item-end) { opacity: 0; transition: opacity .6s ease; }
    .nada-slide .nada-title { animation-delay: .4s; }
    .nada-slide .nada-eyebrow { animation-delay: 1s; }
}
@keyframes nada-rise { from { opacity: 0; transform: translateY(.9rem); } to { opacity: 1; transform: none; } }
@keyframes nada-light { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes nada-float { 0%, 100% { transform: translateX(-50%); } 50% { transform: translate(-50%, -1.5%); } }
@keyframes nada-sweep { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
