/* Complici Digitali 1.1.0 — static HTML home and service pages.
 * Loaded after the bundle stylesheet, which provides header, hero, closing
 * sections, footer and form. Same palette as the experience. */
:root {
  --cd-navy: #0b1e3c; --cd-ivory: #fbf7f0; --cd-amber: #f2a33a; --cd-blue: #7fb8ff;
  --cd-muted: #a9b4c8; --cd-rule: #2b4068; --cd-raised: #142a4e; --cd-raised-2: #1b3561;
}
/* The closing-story components (buttons, eyebrow) read these outside .cd-closing too. */
.cd-static, .cdxp-page {
  --closing-navy: #0b1e3c; --closing-paper: #fbf7f0; --closing-amber: #f2a33a; --closing-muted: #a9b4c8;
  --closing-rule: #2b4068; --closing-raised: #142a4e; --closing-raised-2: #1b3561;
}
.cd-static, .cdxp-page { font-family: "Onest", Arial, sans-serif; color: var(--cd-ivory); background: var(--cd-navy); }
.cd-static[hidden] { display: none !important; }
.cd-static a, .cdxp-page a { text-decoration-thickness: 1px; text-underline-offset: .2em; }
.cd-static .agency-header a, .cdxp-page .agency-header a, .cd-closing a, .cd-s-button, .cd-s-link, .cd-page__services a, .cd-page__others a { text-decoration: none; }
.cd-closing a.cd-closing__cta { color: var(--cd-navy); }

/* Il poster HTML deve rientrare nello schermo anche se manca il CSS del film. */
.cd-static-hero .scroll-scrub__poster { max-width: 100%; }

/* Hero: same geometry as the opening film, without the pinned timeline. */
.cd-static-hero { height: 100svh; min-height: 560px; }
/* Nell’apertura HTML l’invito segue il testo anche senza lo scroll animato. */
.cd-static-hero .scroll-scrub__stage { position: relative; display: flex; flex-direction: column; }
.cd-static-hero .scroll-scrub__chapter-pin { min-height: 0; padding: clamp(16px, 4vh, 48px) var(--cd-edge) 0; }
.cd-static-hero.agency-hero .hero-controls { position: relative; inset: auto; align-self: flex-start; margin: clamp(12px, 3vh, 28px) var(--cd-edge) 0; }
.cd-static > .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cd-static > .agency-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0 12px; padding:4px var(--cd-edge); }
.cd-static > .agency-header .agency-wordmark img { width:auto; height:42px; }
.cd-static > .agency-header .agency-nav { display:flex; align-items:center; flex-wrap:wrap; gap:0 10px; }
.cd-static > .agency-header .agency-nav a { display:inline-flex; min-height:44px; align-items:center; gap:3px; font-size:14px; }

.cd-static-hero .hero-controls a { color: inherit; text-decoration: none; pointer-events: auto; }

/* Sections */
.cd-s { position: relative; padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--cd-rule); }
.cd-s__inner { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.cd-s h2 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.04; font-size: clamp(34px, 4.4vw, 60px); }
.cd-s h3 { margin: 0; }
.cd-s p { margin: 0; }
.cd-s-button { display: inline-flex; align-items: center; gap: 16px; min-height: 48px; padding: 10px 20px; border: 1px solid var(--cd-amber); border-radius: 6px; color: var(--cd-ivory); font-weight: 500; }
.cd-s-button:hover { background: rgb(242 163 58 / .12); }
.cd-s-button span, .cd-s-link span { color: var(--cd-amber); }
.cd-s-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--cd-ivory); font-weight: 500; border-bottom: 1px solid var(--cd-rule); }
.cd-s-link:hover { border-color: var(--cd-amber); }

/* Intro and window */
.cd-s-intro__title { font-size: clamp(48px, 7vw, 94px) !important; }
.cd-s-intro__body { max-width: 39ch; margin-top: 22px !important; color: var(--cd-muted); font-size: 17px; line-height: 1.5; }
.cd-s-window { max-width: 620px; margin-top: clamp(40px, 6vw, 72px); border: 1px solid var(--cd-rule); border-radius: 10px; overflow: hidden; background: var(--cd-raised); }
.cd-s-window__bar { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--cd-rule); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cd-muted); }
.cd-s-window__body { padding: 28px 24px 30px; display: grid; gap: 14px; justify-items: start; }
.cd-s-window__body h2 { font-size: clamp(26px, 3vw, 34px); }
.cd-s-window__body p { color: var(--cd-muted); max-width: 44ch; }

/* Form */
.cd-s-form__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.cd-s-form__intro { display: grid; gap: 18px; justify-items: start; }
.cd-s-form__intro p { color: var(--cd-muted); max-width: 40ch; font-size: 17px; line-height: 1.55; }


/* Service pages */
.agency-header--page { position: relative; }
.cd-page { width: min(1200px, calc(100% - 96px)); margin-inline: auto; padding-block: 8px clamp(64px, 8vw, 112px); }
.cd-page__crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--cd-muted); }
.cd-page__crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--cd-rule); }
.cd-page__crumbs a { color: var(--cd-muted); }
.cd-page__crumbs a:hover { color: var(--cd-ivory); }
.cd-page__crumbs [aria-current] { color: var(--cd-ivory); }
.cd-page__article { max-width: 860px; }
.cd-page--hub .cd-page__article { max-width: none; }
.cd-page__head { margin-top: clamp(32px, 5vw, 64px); }
.cd-page__head .cd-closing__eyebrow { margin: 0; }
.cd-page__head h1 { margin: 16px 0 0; font-size: clamp(40px, 5.6vw, 78px); line-height: 1.02; font-weight: 600; letter-spacing: -.045em; text-wrap: balance; }
.cd-page__lead { margin: 22px 0 0; max-width: 46ch; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--cd-ivory); }
.cd-page__figure { margin: clamp(32px, 4vw, 48px) 0 0; }
.cd-page__figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; border: 1px solid var(--cd-rule); }
.cd-page__content { max-width: 68ch; margin-top: clamp(32px, 4vw, 48px); font-size: 17px; line-height: 1.7; color: #fbf7f0; }
.cd-page__content > * { margin: 0 0 1.1em; }
.cd-page__content h2 { margin: 2.1em 0 .6em; color: var(--cd-ivory); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -.03em; }
.cd-page__content h3 { margin: 1.6em 0 .4em; color: var(--cd-ivory); font-size: 19px; line-height: 1.3; font-weight: 600; }
.cd-page__content h2:first-child { margin-top: 0; }
.cd-page__content ul, .cd-page__content ol { padding-left: 1.3em; }
.cd-page__content li { margin-bottom: .45em; }
.cd-page__content li::marker { color: var(--cd-amber); }
.cd-page__content a { color: var(--cd-ivory); text-decoration-color: var(--cd-amber); }
.cd-page__content strong { color: var(--cd-ivory); }
.cd-page-cta { display: grid; gap: 14px; justify-items: start; margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--cd-rule); border-radius: 14px; background: linear-gradient(160deg, var(--cd-raised-2), var(--cd-raised) 60%); }
.cd-page-cta h2 em { color: var(--cd-amber); font-style: normal; }
.cd-page-cta h2 { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; font-weight: 600; letter-spacing: -.035em; }
.cd-page-cta p { margin: 0; max-width: 52ch; color: var(--cd-muted); }
.cd-page-cta .cd-closing__cta { color: var(--cd-navy); text-decoration: none; min-width: min(300px, 100%); }
.cd-page__others { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--cd-rule); }
.cd-page__others h2 { margin: 0; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.03em; }
.cd-page__others ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.cd-page__others a { display: grid; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--cd-rule); border-radius: 10px; color: var(--cd-ivory); }
.cd-page__others a span { color: var(--cd-muted); font-size: 14px; line-height: 1.5; }
.cd-page__others a:hover { border-color: var(--cd-amber); }
.cd-page__services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; list-style: none; }

@media (max-width: 1000px) {
  .cd-page__services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-s-form__grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .cd-s__inner, .cd-page { width: calc(100% - 48px); }
  .cd-page__services { grid-template-columns: 1fr; }
  .cd-s-intro__body { font-size: 15px; }
  .cd-static-hero { min-height: 520px; }
}
@media (max-width: 360px) {
  .cd-s__inner, .cd-page { width: calc(100% - 32px); }
}

/* 1.1.1 — Hero legibility: a deeper shade behind the opening copy, over the
 * bright screens of the film. Same shapes as the bundle, stronger stops. */
.agency-hero .scroll-scrub__copy:before { background: radial-gradient(at 30% 30%, #0b1e3ce6, #0b1e3c99 48%, #0b1e3c00 76%); inset: -120px -110px -60px; }
.agency-hero .scroll-scrub__body { color: #fbf7f0; text-shadow: 0 1px 14px #0b1e3c, 0 0 3px #0b1e3ccc; }
.agency-hero .scroll-scrub__title { text-shadow: 0 2px 24px #0b1e3c99; }
.agency-hero .scroll-scrub__eyebrow { font-size: 13px; color: #fbf7f0; }
@media (max-width: 700px) {
  /* M38-E (1/11, titolare: «da telefono il colore mi sembra più opacizzato»): il velo dietro al testo copriva il 55 % dello
     schermo con alfa media 0,65; ora 90 % → 70 % → 0 e scatola più corta (alfa media ≈ 0,55, contrasto del testo ≥ 5,8:1). */
  .agency-hero .scroll-scrub__copy:before { background: linear-gradient(#0b1e3ce6, #0b1e3cb3 56%, #0b1e3c00); inset: -112px -24px -64px; }
  .agency-hero .scroll-scrub__eyebrow { font-size: 12px; }
}

/* 1.1.1 — Page not found */
.cd-page__others a strong { font-weight: 600; }

/* 1.2.0 — Service cards, same object as the home corridor: solid amber
 * band (brand: blu notte and ambra only), dark sheet with a raised tab for the number, picture, text, link. */
.cd-card-link {
  --sheet: #142a4e; --band-h: 12cqw; --step: 8cqw; --radius: 3.8cqw;
  container-type: inline-size; display: block; height: 100%; overflow: hidden; border-radius: 16px; color: var(--cd-ivory);
  background: linear-gradient(#f2a33a, #f2a33a) 0 0 / 100% calc(var(--band-h) + var(--step) + 2px) no-repeat, var(--sheet);
  box-shadow: 0 0 0 1px #2b4068, 0 22px 50px rgb(3 10 24 / .45);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.cd-card-link:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px #2b4068, 0 30px 60px rgb(3 10 24 / .55); }
.cd-card-link:focus-visible { outline: 3px solid var(--cd-amber); outline-offset: 4px; }
.cd-card-link__tab { position: relative; display: block; width: 58%; height: var(--step); margin-top: var(--band-h); background: var(--sheet); border-radius: var(--radius) calc(var(--radius) * .7) 0 0; }
.cd-card-link__tab::after { content: ""; position: absolute; left: 100%; bottom: 0; width: calc(var(--radius) * .7); height: calc(var(--radius) * .7); background: radial-gradient(circle at 100% 0, transparent calc(var(--radius) * .7 - .5px), var(--sheet) calc(var(--radius) * .7)); }
.cd-card-link__sheet { position: relative; display: grid; align-content: start; gap: 3.4cqw; height: calc(100% - var(--band-h) - var(--step)); margin-top: -1px; padding: 0 6cqw 6.4cqw; background: var(--sheet); }
.cd-card-link__head { display: flex; justify-content: space-between; align-items: flex-start; margin-top: calc(-1 * var(--step) + 3.6cqw); }
.cd-page__service-index { font-size: 15.5cqw; font-weight: 600; line-height: .9; letter-spacing: -.05em; color: var(--cd-ivory); font-variant-numeric: tabular-nums; }
.cd-card-link__arrow { margin-top: calc(var(--step) - 1.4cqw); margin-right: 1cqw; font-size: 5.4cqw; line-height: 1; transition: transform .3s, color .3s; }
.cd-card-link:hover .cd-card-link__arrow { transform: translate(3px, -3px); }
.cd-card-link img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10.4; object-fit: cover; border-radius: 4.2cqw; }
.cd-page__services h2 { margin: 1.2cqw 0 0; font-size: max(20px, 7.2cqw); line-height: 1.1; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.cd-page__services p { margin: 0; color: #a9b4c8; font-size: max(15px, 4.1cqw); line-height: 1.5; }
.cd-page__more { margin-top: 2cqw; font-weight: 600; font-size: max(15px, 4.3cqw); }
.cd-page__more span { display: inline-block; transition: transform .25s; }
.cd-card-link:hover .cd-page__more span { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .cd-card-link, .cd-card-link__arrow, .cd-page__more span { transition: none; } .cd-card-link:hover { transform: none; } }

/* 2.12.0 — testo solo per lettori di schermo (es. "si apre in una nuova scheda" nella frase privacy del modulo) */
.cdxp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
