/* chi-sono/codice-etico.html: componenti della pagina, prefisso "ce-". Base: token e classi di site.css
   (crumbs, checks, crosses, link-arrow). Effetti sobri: l'alba sulla foto della hero, la citazione che sale,
   lo schermo che si accende e la barra di lettura. Tutti spenti con prefers-reduced-motion, con «Ferma le animazioni»
   (html.motion-paused) e in stampa; senza JavaScript la pagina è completa. */

/* ---------- hero: foto a tutta pagina, strato scuro a sinistra dove c'è il cielo libero ---------- */
.ce-hero {
  position: relative; isolation: isolate; overflow: hidden; margin-top: var(--nav-h);
  display: flex; align-items: center; min-height: clamp(540px, calc(100svh - var(--nav-h)), 860px);
  padding: 64px 0; background: var(--dark); color: #e2e8f0;
}
.ce-hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.ce-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 45%; }
.ce-hero-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 10, 19, .92) 0%, rgba(6, 10, 19, .86) 36%, rgba(6, 10, 19, .5) 51%, rgba(6, 10, 19, 0) 66%),
    linear-gradient(0deg, rgba(6, 10, 19, .55) 0%, rgba(6, 10, 19, 0) 30%);
}
.ce-hero-copy { max-width: min(560px, 46vw); }
.ce-hero .crumbs { color: #b6c2d4; }
.ce-hero .crumbs a { color: #d5dde8; }
.ce-hero .crumbs a:hover { color: #fff; }
.ce-hero .crumbs li + li::before { color: #94a3b8; }
.ce-hero .crumbs [aria-current] { color: #fff; }
.ce-hero h1 {
  margin: 6px 0 30px; color: #fff; font-size: clamp(2.9rem, 6.4vw, 5.6rem); font-weight: 900;
  letter-spacing: -.045em; line-height: 1;
}
.ce-hero-quote { margin: 0; padding-left: 22px; border-left: 3px solid var(--a-hi); }
.ce-hero-quote blockquote { margin: 0; }
.ce-hero-quote blockquote p {
  margin: 0; font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-size: clamp(1.14rem, 1.7vw, 1.42rem); line-height: 1.55; color: #f1f5f9; text-wrap: pretty;
}
.ce-hero-quote figcaption { margin-top: 14px; font-size: 14.5px; color: #e2e8f0; }
.ce-hero-skip { margin-top: 34px; color: var(--a-hi); }
.ce-hero-skip:hover { color: #fff; }
.ce-hero :focus-visible { outline-color: var(--a-hi); }

/* tablet e computer piccoli: il testo occupa una parte più larga della foto, lo strato scuro arriva più in là */
@media (min-width: 721px) and (max-width: 1279px) {
  .ce-hero-copy { max-width: min(520px, 42vw); }
  .ce-hero-media::after {
    background:
      linear-gradient(90deg, rgba(6, 10, 19, .92) 0%, rgba(6, 10, 19, .88) 46%, rgba(6, 10, 19, .55) 58%, rgba(6, 10, 19, 0) 72%),
      linear-gradient(0deg, rgba(6, 10, 19, .55) 0%, rgba(6, 10, 19, 0) 30%);
  }
}

/* telefono: prima la foto, intera sul soggetto; il testo entra sul fondo scuro delle rocce */
@media (max-width: 720px) {
  .ce-hero { display: block; min-height: 0; padding: 0 0 44px; }
  .ce-hero-media { position: relative; inset: auto; z-index: 0; aspect-ratio: 4 / 5; max-height: 72svh; }
  .ce-hero-media img { object-position: 57% 50%; }
  .ce-hero-media::after { background: linear-gradient(180deg, rgba(6, 10, 19, 0) 52%, rgba(6, 10, 19, .72) 80%, var(--dark) 100%); }
  .ce-hero-copy { position: relative; max-width: none; margin-top: -64px; }
  .ce-hero h1 { margin-bottom: 24px; }
}

/* ---------- La mia vetta: il racconto della foto, poi la citazione di Giordano Bruno ---------- */
.ce-vetta { padding: 96px 0 104px; background: var(--bg); }
.ce-vetta-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); column-gap: 72px;
  grid-template-areas: "head head" "a wall" "b wall" "bruno bruno";
}
.ce-vetta-head { grid-area: head; margin: 0 0 32px; }
.ce-vetta-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.04em; }
.ce-vetta-a { grid-area: a; }
.ce-vetta-b { grid-area: b; }
.ce-vetta-text p { max-width: 64ch; margin: 0 0 1.15em; font-size: clamp(1.04rem, 1.2vw, 1.14rem); line-height: 1.78; color: var(--ink-2); }
.ce-vetta-a p:first-child { font-size: clamp(1.18rem, 1.7vw, 1.36rem); line-height: 1.6; color: var(--ink); }
.ce-vetta-b p:last-child { margin-bottom: 0; }

/* lo sfondo del computer: uno schermo disegnato in CSS con la stessa foto */
.ce-wall { grid-area: wall; align-self: start; position: sticky; top: calc(var(--nav-h) + 40px); margin: 6px 0 0; }
.ce-wall-screen { padding: 12px 12px 14px; border-radius: 18px; background: #0b1221; box-shadow: 0 34px 60px -34px rgba(11, 18, 32, .55); }
.ce-wall-screen img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 55% 50%; border-radius: 7px; }
/* scrivania stile Mac (titolare, 5/12/2026): icone a destra e barra delle app in basso, disegnate qui con icone generiche
   (nessuna icona o logo di Apple). Misure in cqw, cioè in percentuale della larghezza dello schermo: proporzioni uguali
   da telefono e da computer; prima delle cqw una misura in px per i browser che non le conoscono */
.ce-wall-desk { position: relative; container-type: inline-size; border-radius: 7px; overflow: hidden; }
.ce-wall-desk img { display: block; }
.ce-desk-icone { position: absolute; top: 4cqw; right: 2.5cqw; margin: 0; padding: 0; list-style: none; display: grid; gap: 2.2cqw; }
.ce-desk-icone li { display: grid; justify-items: center; gap: .5cqw; width: 54px; width: 13cqw; }
.ce-desk-icone svg { width: 26px; height: 26px; width: 6.4cqw; height: 6.4cqw; filter: drop-shadow(0 .3cqw .5cqw rgba(0, 0, 0, .35)); }
.ce-desk-icone span { max-width: 100%; font-size: 8px; font-size: max(7px, 1.85cqw); line-height: 1.2; color: #fff; text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8); overflow-wrap: anywhere; }
.ce-ico-pieno { fill: #60a5fa; stroke: #2563eb; stroke-width: .8; }
.ce-ico-foglio { fill: #f8fafc; stroke: #94a3b8; stroke-width: .8; }
.ce-ico-disco { fill: #cbd5e1; stroke: #64748b; stroke-width: .8; }
.ce-ico-righe { fill: none; stroke: #64748b; stroke-width: 1.2; stroke-linecap: round; }
.ce-dock { position: absolute; left: 50%; bottom: 2cqw; transform: translateX(-50%); display: flex; align-items: center; gap: 1cqw;
  padding: 1cqw 1.2cqw; border-radius: 2.4cqw; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .3); }
.ce-app { display: grid; place-items: center; width: 22px; height: 22px; width: 5.4cqw; height: 5.4cqw; border-radius: 1.4cqw;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 .4cqw .8cqw rgba(0, 0, 0, .25); }
.ce-app svg { width: 64%; height: 64%; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ce-dock-sep { align-self: stretch; width: 1px; margin: .6cqw .2cqw; background: rgba(255, 255, 255, .5); }
.ce-app-file { background: linear-gradient(180deg, #7dd3fc, #1d8fe0); }
.ce-app-web { background: linear-gradient(180deg, #67e8f9, #0284c7); }
.ce-app-posta { background: linear-gradient(180deg, #93c5fd, #2563eb); }
.ce-app-messaggi { background: linear-gradient(180deg, #86efac, #16a34a); }
.ce-app-foto { background: linear-gradient(135deg, #fbbf24, #f97316 50%, #db2777); }
.ce-app-calendario { background: #fff; }
.ce-app-calendario svg { stroke: #dc2626; }
.ce-app-note { background: linear-gradient(180deg, #fef08a, #facc15); }
.ce-app-note svg { stroke: #713f12; }
.ce-app-musica { background: linear-gradient(180deg, #fda4af, #e11d48); }
.ce-app-terminale { background: #0f172a; }
.ce-app-terminale svg { stroke: #4ade80; }
.ce-app-impostazioni { background: linear-gradient(180deg, #9ca3af, #4b5563); }
.ce-app-cestino { background: rgba(255, 255, 255, .28); }
.ce-wall-stand { width: 20%; height: 32px; margin: 0 auto; background: #1e293b; clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%); }
.ce-wall-base { width: 36%; height: 8px; margin: 0 auto; border-radius: 6px 6px 3px 3px; background: #334155; }

.ce-bruno {
  grid-area: bruno; position: relative; margin: 88px 0 0; padding: 60px clamp(24px, 6vw, 88px) 52px;
  border-radius: var(--r-xl); text-align: center; color: #e2e8f0;
  background: radial-gradient(70% 90% at 50% 130%, rgba(251, 146, 60, .26), rgba(251, 146, 60, 0) 70%), var(--dark);
}
/* la citazione in meno righe (titolare, 5/12/2026): riquadro largo quanto la fascia e carattere un po' più piccolo */
.ce-bruno blockquote { max-width: none; margin: 0 auto; }
.ce-bruno blockquote p {
  margin: 0; font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.32; letter-spacing: -.01em; color: #fff; text-wrap: balance;
}
.ce-bruno figcaption { margin-top: 24px; font-size: 15px; line-height: 1.5; color: #cbd5e1; }
.ce-bruno figcaption cite { font-style: italic; }

@media (max-width: 900px) {
  .ce-vetta { padding: 64px 0 72px; }
  .ce-vetta-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "a" "wall" "b" "bruno"; }
  .ce-wall { position: static; width: 100%; max-width: 440px; margin: 12px auto 40px; }
  .ce-bruno { margin-top: 56px; padding: 44px 22px 40px; }
}

/* ---------- il codice: indice a lato (a pillole sul telefono) e il documento come un foglio ---------- */
.ce-doc-sec { padding: 88px 0 104px; background: var(--bg-3); }
.ce-doc-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
.ce-toc { position: sticky; top: calc(var(--nav-h) + 28px); max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto; }
.ce-toc-title { margin: 0 0 12px; padding-left: 12px; font-size: 15px; font-weight: 800; color: var(--ink); }
.ce-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ce-toc a {
  display: flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--body); text-decoration: none;
}
.ce-toc a:hover { background: #fff; color: var(--ink); }
.ce-toc a.is-active { background: #fff; color: var(--a-strong); box-shadow: inset 3px 0 0 var(--a); }

.ce-doc {
  min-width: 0; max-width: 760px; padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl); background: #fff;
  font-size: 17px; line-height: 1.72; color: var(--body);
}
.ce-doc p, .ce-doc ul, .ce-doc ol, .ce-doc dl { margin: 0 0 1.1em; }
.ce-doc li { margin-bottom: .45em; }
.ce-doc ul:not([class]) li::marker { color: var(--a); }
.ce-doc a:not(.btn) { font-weight: 600; }
.ce-doc h2 { margin: 0 0 .7em; font-size: clamp(1.55rem, 2.6vw, 2.05rem); letter-spacing: -.03em; }
.ce-doc h3 { margin: 2.1em 0 .55em; font-size: 1.24rem; letter-spacing: -.015em; }
.ce-doc h4 { margin: 1.7em 0 .45em; font-size: 1.06rem; color: var(--ink-2); letter-spacing: -.01em; }
.ce-doc h5 { margin: 1.4em 0 .4em; font-size: 1rem; color: var(--ink-2); letter-spacing: 0; }
.ce-doc h2 + h3, .ce-doc h3 + h4 { margin-top: 1.1em; }
.ce-doc h2, .ce-doc h3, .ce-vetta-head h2 { text-wrap: balance; }
.ce-n { margin-right: .3em; color: var(--a); font-variant-numeric: tabular-nums; }
.ce-part + .ce-part { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--line); }
.ce-part > :last-child { margin-bottom: 0; }
.ce-doc-intro { margin-bottom: 0; }
.ce-doc-intro p:first-of-type { font-size: 1.12rem; color: var(--ink-2); }

/* impegni numerati e attività forensi */
.ce-ol { list-style: none; padding: 0; counter-reset: ce; display: grid; gap: 14px; }
.ce-ol > li { counter-increment: ce; position: relative; margin: 0; padding-left: 50px; min-height: 34px; }
.ce-ol > li::before {
  content: counter(ce); position: absolute; left: 0; top: -1px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--a-soft); color: var(--a-strong);
  font-size: 15px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
}

/* «Non si effettua nessun servizio per»: il pannello che deve fermare chi cerca altro */
.ce-part.ce-stop { margin-top: 56px; padding: clamp(26px, 4vw, 42px); border: 0; border-radius: var(--r-lg); background: var(--dark); color: #cbd5e1; }
.ce-part.ce-stop + .ce-part { border-top: 0; padding-top: 0; }
.ce-stop h2 { display: flex; align-items: center; gap: 14px; color: #fff; }
/* segnale di divieto disegnato in CSS: cerchio rosso con la barra, solo decorativo */
.ce-stop h2::before {
  content: ''; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--a-hi);
  background: linear-gradient(var(--a-hi), var(--a-hi)) center / 22px 4px no-repeat; transform: rotate(-45deg);
}
.ce-stop .crosses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0 0 28px; font-weight: 600; color: #fff; }
.ce-stop .crosses li { margin: 0; }
.ce-legge { margin: 0 0 18px; padding: 18px 20px; border-left: 4px solid var(--a-hi); border-radius: 0 var(--r) var(--r) 0; background: rgba(200, 16, 46, .16); color: #f1f5f9; }
.ce-legge p { margin: 0; }
.ce-stop strong { color: #fff; }
.ce-stop > p:last-child { margin: 0; }
@media (max-width: 640px) { .ce-stop .crosses { grid-template-columns: minmax(0, 1fr); } }

/* principi di comportamento del personale: voce e descrizione */
.ce-dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 28px; padding: 18px 0; border-top: 1px solid var(--line); }
.ce-dl > div:last-child { border-bottom: 1px solid var(--line); }
.ce-dl dt { font-weight: 800; color: var(--ink); }
.ce-dl dd { margin: 0; }
.ce-dl dd p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  .ce-doc-sec { padding: 56px 0 72px; }
  .ce-doc-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ce-toc { position: static; max-height: none; overflow: visible; }
  .ce-toc-title { padding-left: 0; }
  .ce-toc ol { display: flex; flex-wrap: wrap; gap: 8px; }
  .ce-toc a { min-height: 44px; padding: 8px 15px; border-radius: var(--r-pill); background: #fff; font-size: 14px; }
  .ce-doc { max-width: none; }
}
@media (max-width: 640px) {
  .ce-doc { padding: 26px 20px 32px; border-radius: var(--r-lg); font-size: 16.5px; }
  .ce-dl > div { grid-template-columns: minmax(0, 1fr); }
  .ce-toc ol { gap: 8px 6px; }
  .ce-toc a { padding: 8px 12px; font-size: 13.5px; }
  /* il pannello dei servizi esclusi arriva ai bordi del foglio: sul telefono la colonna di testo resta larga */
  .ce-part.ce-stop { margin-left: -20px; margin-right: -20px; padding: 28px 20px; border-radius: 0; }
  .ce-legge { padding: 14px 14px 14px 16px; }
}

/* linguette della barra laterale (48 px sul bordo sinistro, da 681 px in su): finché il contenitore del sito non
   lascia almeno 64 px di margine (sotto i 1280 px) il testo della pagina parte più a destra, così non ci finisce sotto */
@media (min-width: 681px) and (max-width: 1279px) {
  .ce-hero > .container, .ce-vetta-grid, .ce-doc-wrap { padding-left: 68px; }
}

/* ---------- effetti: solo con movimento ammesso e animazioni attive ---------- */
.ce-progress { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .ce-hero-media img { animation: ce-alba-zoom 16s var(--ease) both; }
  html:not(.motion-paused) .ce-hero-media::before {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: rgba(6, 10, 19, .5); animation: ce-alba-luce 4.5s ease-out .2s both;
  }
  html:not(.motion-paused) .ce-hero-quote { animation: ce-sale .9s var(--ease) .45s both; }
  @supports (animation-timeline: view()) {
    html:not(.motion-paused) .ce-wall-desk { animation: ce-acceso linear both; animation-timeline: view(); animation-range: entry 15% cover 45%; }
  }
  @supports (animation-timeline: scroll()) {
    html:not(.motion-paused) .ce-progress {
      display: block; position: fixed; left: 0; right: 0; top: var(--nav-h); z-index: 90; height: 3px; pointer-events: none;
      background: var(--a); transform-origin: 0 50%; transform: scaleX(0);
      animation: ce-lettura linear both; animation-timeline: scroll(root block);
    }
  }
}
@keyframes ce-alba-zoom { from { transform: scale(1.07); } to { transform: none; } }
@keyframes ce-alba-luce { from { opacity: 1; } to { opacity: 0; } }
@keyframes ce-sale { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ce-acceso { from { filter: brightness(.18) saturate(.4); } to { filter: none; } }
@keyframes ce-lettura { to { transform: scaleX(1); } }

/* ---------- stampa: solo il testo, in nero ---------- */
@media print {
  .ce-hero { display: block; min-height: 0; margin-top: 0; padding: 0 0 12px; background: none; color: #000; }
  .ce-hero-media, .ce-hero-skip, .ce-progress, .ce-toc, .ce-wall { display: none !important; }
  .ce-hero-copy { max-width: none; margin: 0; }
  .ce-hero h1, .ce-hero-quote blockquote p, .ce-hero-quote figcaption,
  .ce-hero .crumbs, .ce-hero .crumbs a, .ce-hero .crumbs [aria-current] { color: #000 !important; }
  .ce-hero h1 { font-size: 30pt; margin-bottom: 12pt; }
  .ce-hero-quote { border-left-color: #000; }
  .ce-hero-quote, .ce-hero-media img, .ce-wall-desk { animation: none !important; }
  .ce-vetta, .ce-doc-sec { padding: 12pt 0; background: none; }
  .ce-vetta-grid, .ce-doc-wrap { display: block; }
  .ce-hero > .container, .ce-vetta-grid, .ce-doc-wrap { padding-left: 0; padding-right: 0; }
  .ce-vetta-text p { color: #000; }
  .ce-bruno { margin-top: 18pt; padding: 14pt; background: none; border: 1px solid #000; color: #000; }
  .ce-bruno blockquote p, .ce-bruno figcaption { color: #000; }
  .ce-doc { max-width: none; padding: 0; background: none; color: #000; }
  .ce-part.ce-stop { padding: 14pt; background: none; border: 2px solid #000; color: #000; }
  .ce-stop h2, .ce-stop .crosses, .ce-stop strong, .ce-legge { color: #000; }
  .ce-stop h2::before { border-color: #000; background-image: linear-gradient(#000, #000); }
  .ce-legge { background: none; border-left-color: #000; }
  .ce-doc h2, .ce-doc h3, .ce-doc h4, .ce-doc h5 { break-after: avoid; }
  .ce-doc li, .ce-dl > div, .ce-bruno { break-inside: avoid; }
}
