/* =========================================================
   Nino Amoruso · Percorsi Formativi
   Palette: notte #0C1E34 · petrolio #013D59 · blu #00537B
            arancio #F6A201 · giallo #FFBA41
   ========================================================= */

/* font ospitati nel sito: nessuna chiamata a Google */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); }

:root {
  --notte: #0C1E34;
  --petrolio: #013D59;
  --blu: #00537B;
  --arancio: #F6A201;
  --giallo: #FFBA41;
  --carta: #F4F6F8;
  --bianco: #FFFFFF;
  --testo: #0C1E34;
  --testo-soft: #3E5266;
  --linea: #D9E1E8;

  /* font: cambiati dal pannello prove */
  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --display-weight: 600;
  --display-track: -0.01em;

  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

html[data-font="2"] {
  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --display-weight: 600;
  --display-track: -0.02em;
}
html[data-font="3"] {
  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;
  --display-weight: 700;
  --display-track: -0.03em;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--testo);
  background: var(--bianco);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  line-height: 1.08;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.2; }
p { margin: 0 0 1.1em; }
.r { font-size: .7em; vertical-align: super; line-height: 0; letter-spacing: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--arancio); color: var(--notte); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--giallo); outline-offset: 3px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
  padding: 22px 0;
}
.site-header.solid { background: rgba(12, 30, 52, .96); box-shadow: 0 1px 0 rgba(255,255,255,.06); padding: 12px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 40px; width: auto; transition: height .35s ease; }
.site-header.solid .brand img { height: 32px; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 34px); }
.nav a {
  color: #fff; text-decoration: none; font-size: .95rem; letter-spacing: .04em;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--arancio); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 760px) {
  .brand img { height: 30px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; background: var(--notte);
    flex-direction: column; justify-content: center; align-items: center; gap: 28px;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav a { font-family: var(--f-display); font-size: 2rem; }
  body.menu-open .nav { opacity: 1; pointer-events: auto; }
  .nav-toggle { position: relative; z-index: 60; }
  .brand { position: relative; z-index: 60; }
  body.menu-open { overflow: hidden; }
  body.menu-open .to-top { display: none; }
  body.menu-open .site-header { background: transparent; box-shadow: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff; background: var(--notte); overflow: hidden; isolation: isolate;
}
.hero.short { min-height: 78svh; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg canvas { width: 100%; height: 100%; display: block; }
.hero-photo {
  position: absolute; inset: -2%; z-index: -2; background-size: cover; background-position: center;
  filter: grayscale(1) contrast(1.05); opacity: 0; transition: opacity .8s ease;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,30,52,.55) 0%, rgba(1,61,89,.70) 55%, rgba(12,30,52,.96) 100%);
  mix-blend-mode: multiply;
}
html[data-hero="foto"] .hero-photo { opacity: 1; animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1) translate(0,0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

.hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,30,52,0) 30%, rgba(12,30,52,.75) 100%); }

.hero-content { padding-top: 160px; padding-bottom: clamp(64px, 10vh, 120px); }
.eyebrow {
  display: inline-block; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--giallo); margin-bottom: 1.4em; font-weight: 600;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 14ch; margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--giallo); }
html[data-font="3"] .hero h1 em { font-style: normal; }
.hero .lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); max-width: 40ch; color: rgba(255,255,255,.86); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2em; }

/* hero ritratto (home) */
.hero-ritratto {
  background:
    radial-gradient(520px circle at var(--mx, 72%) var(--my, 38%), rgba(0, 83, 123, .55), transparent 70%),
    radial-gradient(900px circle at 85% 110%, rgba(1, 61, 89, .7), transparent 60%),
    var(--notte);
}
.ritratto-wrap {
  position: absolute; z-index: -1; bottom: 0;
  right: max(0px, calc((100vw - var(--max)) / 2));
  height: 90%; aspect-ratio: 900 / 1125;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 1.2s cubic-bezier(.16, .8, .24, 1);
}
.ritratto {
  position: relative; height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, #000 70%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%, #000 80%, transparent 100%);
          mask-composite: intersect;
  filter: drop-shadow(0 0 48px rgba(0, 83, 123, .55)) brightness(.68) contrast(.95);
  opacity: 0; animation: ritratto-in 1.8s .3s cubic-bezier(.2, .7, .2, 1) forwards;
}
.ritratto-anello {
  position: absolute; left: 50%; top: 4%; width: 78%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(246, 162, 1, .55);
  transform: translate3d(calc(-50% + var(--rx, 0px)), var(--ry, 0px), 0);
  transition: transform 1.6s cubic-bezier(.16, .8, .24, 1);
  opacity: 0; animation: anello-in 2.2s .9s ease forwards;
}
@keyframes ritratto-in { from { opacity: 0; transform: translateY(40px) scale(1.03); filter: blur(6px); } to { opacity: 1; transform: none; } }
@keyframes anello-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) {
  .ritratto-wrap { height: 62%; right: -18%; opacity: .55; }
}

/* parole che salgono */
.reveal-words .w { display: inline-block; opacity: 0; transform: translateY(.5em); animation: up .8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }
.fade-in { opacity: 0; animation: up .9s ease forwards; animation-delay: .9s; }

.scroll-cue { position: absolute; right: var(--gutter); bottom: 32px; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.6); writing-mode: vertical-rl; }
.scroll-cue::after { content: ""; display: block; width: 1px; height: 48px; background: var(--arancio); margin: 12px auto 0; animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (max-width: 760px) { .scroll-cue { display: none; } }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600;
  padding: 14px 24px; border-radius: var(--radius); font-size: 1rem; transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--arancio); color: var(--notte); }
.btn-primary:hover { background: var(--giallo); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* ---------- sezioni ---------- */
section.block { padding: clamp(72px, 11vw, 140px) 0; }
.block.carta { background: var(--carta); }
.block.notte { background: var(--notte); color: #fff; }
.block.petrolio { background: var(--petrolio); color: #fff; }
.kicker { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blu); font-weight: 700; margin-bottom: 1em; display: block; }
.notte .kicker, .petrolio .kicker { color: var(--giallo); }
.intro { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.5; max-width: 44ch; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.prose { max-width: 62ch; color: var(--testo-soft); }
.notte .prose, .petrolio .prose { color: rgba(255,255,255,.82); }
.prose strong { color: var(--testo); }
/* firma: sfondo CSS, niente "salva immagine" né "apri in un'altra scheda" */
.firma {
  width: 200px; aspect-ratio: 700 / 283; margin-top: 1.5em; opacity: .9;
  background: url("img/firma-nino.png") left center / contain no-repeat;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; pointer-events: none;
}

/* foto con un mattoncino arancione appoggiato sul bordo alto */
.photo-frame { position: relative; margin: 26px 0 0; }
.photo-frame img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 18px 40px -18px rgba(12,30,52,.45); }
.photo-frame::before {            /* corpo del mattoncino */
  content: ""; position: absolute; top: -20px; right: 28px; width: 84px; height: 20px;
  background: var(--arancio); border-radius: 3px 3px 0 0;
}
.photo-frame::after {             /* i due bottoncini sopra */
  content: ""; position: absolute; top: -28px; right: 28px; width: 84px; height: 8px;
  background:
    linear-gradient(var(--arancio), var(--arancio)) 12px 0 / 22px 8px no-repeat,
    linear-gradient(var(--arancio), var(--arancio)) 50px 0 / 22px 8px no-repeat;
}
.photo-frame figcaption {
  font-size: .85rem; color: var(--testo-soft); margin-top: 16px;
  padding-left: 14px; border-left: 3px solid var(--arancio);
}

/* numeri */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); margin-top: 56px; }
.numbers div { background: var(--notte); padding: 28px 24px; }
.numbers b { display: block; font-family: var(--f-display); font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1; color: var(--giallo); font-weight: var(--display-weight); margin-bottom: 10px; }
.numbers span { font-size: .95rem; color: rgba(255,255,255,.78); }
@media (max-width: 760px) { .numbers { grid-template-columns: 1fr 1fr; } }

/* card */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--bianco); border-top: 4px solid var(--blu); padding: 32px 28px; border-radius: 0 0 var(--radius) var(--radius); }
.card:nth-child(2) { border-color: var(--arancio); }
.card:nth-child(3) { border-color: var(--petrolio); }
.card p { color: var(--testo-soft); margin: 0; }

/* passi del metodo */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: s; border-top: 1px solid rgba(255,255,255,.25); padding-top: 22px; }
.step::before { content: "0" counter(s); font-family: var(--f-display); font-size: 2.6rem; color: var(--arancio); display: block; line-height: 1; margin-bottom: 14px; }
.step p { color: rgba(255,255,255,.8); font-size: .98rem; margin: 0; }

/* timeline */
.timeline { list-style: none; margin: 48px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 92px; top: 6px; bottom: 6px; width: 2px; background: var(--linea); }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 32px; padding: 0 0 36px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 86px; top: 8px; width: 14px; height: 14px; background: var(--blu); border: 3px solid var(--bianco); border-radius: 50%; box-shadow: 0 0 0 1px var(--linea); }
.timeline li.nino::after { background: var(--arancio); }
.timeline time { font-family: var(--f-display); font-size: 1.5rem; font-weight: var(--display-weight); color: var(--blu); line-height: 1.2; }
.timeline li.nino time { color: #B87700; }
.timeline h3 { font-size: 1.25rem; margin-bottom: .3em; padding-left: 12px; }
.timeline p { color: var(--testo-soft); margin: 0; padding-left: 12px; }
@media (max-width: 600px) {
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .timeline li::after { left: 0; }
  .timeline h3, .timeline p { padding-left: 0; }
}

/* certificazione */
.cert { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; background: var(--bianco); padding: 40px; border-left: 6px solid var(--arancio); }
.cert img { width: 96px; }
@media (max-width: 600px) { .cert { grid-template-columns: 1fr; padding: 28px; } }

/* esperienze */
.exp-list { display: grid; gap: 20px; margin-top: 48px; }
.exp {
  display: grid; grid-template-columns: 140px 1fr 220px; gap: 32px; align-items: center;
  background: var(--bianco); padding: 28px 32px; border-radius: var(--radius); border: 1px solid var(--linea);
  transition: border-color .2s, transform .2s;
}
.exp:hover { border-color: var(--blu); transform: translateY(-2px); }
.logo-slot {
  width: 140px; height: 88px; border: 1.5px dashed #9FB2C2; border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; font-size: .78rem; color: #6B8093; padding: 8px; line-height: 1.3;
}
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-slot.has-logo { border: 0; padding: 0; justify-items: start; }
.logo-slot img { width: auto; height: auto; max-width: 140px; max-height: 72px; }
.logo-slot .logo-tile { border-radius: 6px; }
.exp h3 { margin-bottom: .2em; }
.exp .org { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blu); font-weight: 700; margin-bottom: .4em; display: block; }
.exp p { margin: 0; color: var(--testo-soft); }
.exp dl { margin: 0; font-size: .92rem; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.exp dt { color: #6B8093; }
.exp dd { margin: 0; font-weight: 600; }
.todo { background: #FFF3D6; color: #7A5200; padding: 1px 6px; border-radius: 3px; font-weight: 500; font-size: .85em; }
@media (max-width: 860px) { .exp { grid-template-columns: 1fr; gap: 16px; } }

.catalog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 760px) { .catalog { grid-template-columns: 1fr; } }
.catalog article { border: 1px solid rgba(255,255,255,.18); padding: 30px; border-radius: var(--radius); }
.catalog .meta { font-size: .85rem; color: var(--giallo); letter-spacing: .06em; margin-bottom: .8em; display: block; }
.catalog p { color: rgba(255,255,255,.8); margin: 0; }
.catalog article { display: flex; flex-direction: column; }
.catalog .btn-small { align-self: flex-start; margin-top: 22px; padding: 10px 18px; font-size: .92rem; }
.catalog .corso-evidenza { border-color: var(--arancio); }

/* contatti */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact {
  display: block; text-decoration: none; background: var(--bianco); padding: 36px 30px; border-radius: var(--radius);
  border: 1px solid var(--linea); transition: border-color .2s, transform .2s;
}
.contact:hover { border-color: var(--arancio); transform: translateY(-3px); }
.contact svg { width: 32px; height: 32px; color: var(--blu); margin-bottom: 20px; }
.contact .label { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #6B8093; display: block; margin-bottom: 6px; }
.contact .value.nowrap { white-space: nowrap; word-break: normal; }
.contact .value { font-family: var(--f-display); font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: var(--display-weight); word-break: break-word; }

/* cta finale */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.cta-band p { color: rgba(255,255,255,.8); max-width: 48ch; margin: 0 auto 2em; }

/* footer */
.site-footer { background: var(--notte); color: rgba(255,255,255,.7); padding: 56px 0 40px; font-size: .9rem; border-top: 1px solid rgba(255,255,255,.08); }
.site-footer .top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.site-footer .top img { height: 34px; width: auto; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--giallo); }
.site-footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
.legal { font-size: .78rem; color: rgba(255,255,255,.5); line-height: 1.6; max-width: 90ch; }

/* comparsa allo scroll */
.in { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.in.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-words .w, .fade-in, .in { opacity: 1 !important; transform: none !important; }
}


/* ---------- pagina privacy ---------- */
.legal-page { max-width: 760px; }
.legal-page h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2em; }
.legal-page h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.legal-page p, .legal-page li { color: var(--testo-soft); }
.legal-page ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.legal-page li { margin-bottom: .4em; }
.legal-page a { color: var(--blu); }
.legal-page code { font-size: .9em; background: var(--carta); padding: 1px 6px; border-radius: 3px; }
.legal-page .updated { font-size: .9rem; color: #6B8093; margin-bottom: 0; }

/* ---------- torna in alto ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--arancio); color: var(--notte);
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(12,30,52,.35);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s;
}
.to-top svg { width: 24px; height: 24px; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--giallo); }
@media (max-width: 760px) { .to-top { width: 46px; height: 46px; right: 14px; bottom: 14px; } }
