/* NetColombo - stile fumetto. Nessuna risorsa esterna: i caratteri sono nella cartella fonts. */
@font-face { font-family: "Bitter"; src: url("../fonts/bitter.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/anton.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  --ink: #1b1b2f;
  --paper: #fff8e7;
  --yellow: #ffd23f;
  --blue: #2e86de;
  --pink: #ff5d8f;
  --green: #23c16b;
  --orange: #ff9f1c;
  --title: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", "Roboto Condensed", "sans-serif-condensed", "Arial Black", sans-serif;
  --text: "Bitter", Rockwell, "Roboto Slab", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, .1) 1.5px, transparent 1.6px);
  background-size: 14px 14px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1100px, 92%); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; border: 3px solid var(--ink); z-index: 99; }
:focus-visible { outline: 4px dashed var(--pink); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--title); font-weight: 400; letter-spacing: .04em; line-height: 1.05; margin: 0; text-transform: uppercase; }

/* ---------- Testata ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--yellow);
  border-bottom: 4px solid var(--ink);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.logo { font-family: var(--title); font-size: 1.7rem; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }
.logo span { background: var(--ink); color: var(--yellow); padding: 0 8px; margin-right: 2px; display: inline-block; transform: rotate(-3deg); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-weight: 700; padding: 6px 12px;
  border: 3px solid transparent; border-radius: 999px;
}
.nav a:hover { background: #fff; border-color: var(--ink); }
.menu-btn { display: none; font: inherit; font-weight: 700; background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 6px 12px; cursor: pointer; }

/* ---------- Vignette ---------- */
.panel {
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--ink);
}
section { padding: 56px 0; }
.caption {
  display: inline-block;
  background: var(--yellow);
  border: 4px solid var(--ink);
  padding: 8px 18px 6px;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.5deg);
  margin-bottom: 14px;
}
.lead { max-width: 62ch; margin: 8px 0 28px; font-size: 1.12rem; }

/* ---------- Copertina ---------- */
.hero { padding: 36px 0 48px; }
.hero .panel {
  position: relative; overflow: hidden;
  padding: clamp(20px, 4vw, 44px);
  background:
    radial-gradient(rgba(255, 255, 255, .45) 2.5px, transparent 2.6px) 0 0 / 18px 18px,
    linear-gradient(160deg, #5cc3ff 0%, #2e86de 100%);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: end;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
}
.hero h1 em { font-style: normal; color: #fff; }
.hero .sub {
  background: #fff; border: 3px solid var(--ink); padding: 12px 16px; margin: 20px 0 22px;
  max-width: 46ch; box-shadow: 4px 4px 0 var(--ink);
}
.btn {
  display: inline-block; font-family: var(--title); font-size: 1.35rem; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; background: var(--pink); color: #fff;
  border: 4px solid var(--ink); border-radius: 10px; padding: 10px 22px 8px;
  box-shadow: 5px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn.alt { background: var(--yellow); color: var(--ink); margin-left: 10px; }
.trio { display: flex; align-items: flex-end; justify-content: center; gap: 0; position: relative; padding-top: 70px; }
.trio img { width: 34%; filter: drop-shadow(5px 5px 0 rgba(27, 27, 47, .35)); }
.trio img:nth-child(2) { width: 38%; margin: 0 -3%; z-index: 1; }
.boom {
  position: absolute; top: 0; right: 4%;
  font-family: var(--title); font-size: clamp(1.1rem, 2.6vw, 1.6rem); text-transform: uppercase; text-align: center; line-height: 1;
  background: var(--yellow); border: 4px solid var(--ink); padding: 14px 18px 10px;
  border-radius: 50% 46% 52% 44% / 48% 54% 44% 52%;
  transform: rotate(8deg); box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- La squadra ---------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.kid { padding: 22px 20px 20px; position: relative; display: flex; flex-direction: column; }
.kid:nth-child(1) { transform: rotate(-1deg); }
.kid:nth-child(3) { transform: rotate(1deg); }
.kid .pic { border: 4px solid var(--ink); border-radius: 6px; padding: 14px 20% 0; margin-bottom: 16px;
  background: radial-gradient(rgba(255, 255, 255, .5) 2px, transparent 2.1px) 0 0 / 12px 12px, var(--c); }
.kid h3 { font-size: 2.2rem; }
.kid h3 small { font-family: var(--text); font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 700; display: block; margin-top: 4px; }
.bubble {
  position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  padding: 10px 14px; margin: 16px 0 14px; font-weight: 700;
}
.bubble::before {
  content: ""; position: absolute; top: -12px; left: 34px; width: 18px; height: 18px;
  background: #fff; border-left: 3px solid var(--ink); border-top: 3px solid var(--ink); transform: rotate(45deg);
}
.kid ul { margin: 0 0 16px; padding-left: 1.1em; }
.kid li { margin-bottom: 4px; }
.pick {
  margin-top: auto; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--c); color: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 8px 14px;
  box-shadow: 3px 3px 0 var(--ink);
}
.pick:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.c-p { --c: var(--blue); } .c-n { --c: var(--pink); } .c-l { --c: var(--green); }

/* ---------- Superpoteri ---------- */
.powers-bg { background: var(--ink); background-image: radial-gradient(rgba(255, 255, 255, .1) 1.5px, transparent 1.6px); background-size: 14px 14px; }
.powers-bg .lead { color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.filters button {
  font: inherit; font-weight: 700; cursor: pointer; background: #fff; color: var(--ink);
  border: 3px solid var(--ink); outline: 2px solid #fff; border-radius: 999px; padding: 6px 16px;
}
.filters button[aria-pressed="true"] { background: var(--yellow); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; grid-auto-flow: dense; }
.power { padding: 20px; border-top: 14px solid var(--c); transition: opacity .2s, transform .2s; }
@media (min-width: 901px) { .grid > :last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
@media (min-width: 621px) and (max-width: 900px) { .grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.power.off { display: none; }
.power .who {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem;
  background: var(--c); color: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 12px 2px 4px; margin-bottom: 12px;
}
.power .who img { width: 30px; height: 30px; object-fit: cover; object-position: top; background: #fff; border-radius: 50%; border: 2px solid var(--ink); }
.power h3 { font-size: 1.65rem; margin-bottom: 8px; }
.power p { margin: 0 0 10px; }
.power ul { margin: 0; padding-left: 1.1em; font-size: .98rem; }

/* ---------- Come lavoriamo ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.strip li { padding: 46px 18px 18px; position: relative; counter-increment: step; }
.strip li::before {
  content: counter(step); position: absolute; top: -18px; left: 14px;
  font-family: var(--title); font-size: 1.8rem; width: 50px; height: 50px; display: grid; place-items: center;
  background: var(--orange); border: 4px solid var(--ink); border-radius: 50%;
}
.strip h3 { font-size: 1.45rem; margin-bottom: 6px; }
.strip p { margin: 0; font-size: .98rem; }

/* ---------- Chi c'e' dietro ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.about .panel { padding: 24px; }
.about p { margin: 0 0 12px; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.badges li { background: var(--paper); border: 3px solid var(--ink); border-radius: 10px; padding: 8px 12px; }
.badges b { display: block; }

/* ---------- Contatti ---------- */
.contact .panel { background: var(--yellow); padding: clamp(24px, 5vw, 48px); text-align: center; }
.contact h2 { font-size: clamp(2rem, 6vw, 3.4rem); }
.contact p { max-width: 56ch; margin: 12px auto 24px; font-size: 1.12rem; }
.mail { display: block; margin-top: 18px; font-weight: 700; word-break: break-all; }

footer { border-top: 4px solid var(--ink); background: #fff; padding: 18px 0; font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Animazioni ---------- */
.reveal { opacity: 0; translate: 0 24px; transition: opacity .5s, translate .5s; }
.reveal.in { opacity: 1; translate: 0 0; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.trio img { animation: bob 3s ease-in-out infinite; }
.trio img:nth-child(2) { animation-delay: .4s; }
.trio img:nth-child(3) { animation-delay: .8s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trio img { animation: none; }
  .reveal { opacity: 1; translate: 0 0; transition: none; }
}

/* ---------- Schermi piccoli ---------- */
@media (max-width: 900px) {
  .hero .panel, .about { grid-template-columns: 1fr; }
  .team, .grid { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .kid:nth-child(n) { transform: none; }
}
@media (max-width: 620px) {
  .team, .grid, .strip { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--yellow); border-bottom: 4px solid var(--ink); padding: 10px 4%; flex-direction: column; }
  .nav.open { display: flex; }
  .btn.alt { margin: 12px 0 0; }
  .kid .pic { padding: 14px 28% 0; }
}

/* ---------- Applicazioni AI ---------- */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 620px) { .ai-grid { grid-template-columns: 1fr; } }

/* ---------- Scheda con sottoinsiemi ---------- */
@media (min-width: 621px) { .power.wide { grid-column: 1 / -1; } }
.subs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.sub-card { background: #fff; border: 3px solid var(--ink); border-left: 12px solid var(--c); border-radius: 10px; padding: 14px 16px; }
.sub-card h4 { font-family: var(--title); font-weight: 400; font-size: 1.3rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px; }
@media (max-width: 620px) { .subs { grid-template-columns: 1fr; } }
.subs.one { grid-template-columns: 1fr; }
.subs.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .subs.three { grid-template-columns: 1fr; } }

/* ---------- La mappa ---------- */
.map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.island { padding: 0 0 14px; overflow: hidden; }
.island-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 0; border-bottom: 4px solid var(--ink);
  background: var(--c); }
.island-head img { width: 66px; }
.island-head p { margin: 0 0 10px; color: #fff; font-weight: 700; line-height: 1.25; text-shadow: 1px 1px 0 var(--ink); }
.island-head b { display: block; font-family: var(--title); font-weight: 400; font-size: 2.2rem; line-height: 1; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree { padding: 14px 16px 0; }
.tree > li { margin-bottom: 10px; }
.tree > li > a { display: block; background: var(--c); color: #fff; font-weight: 700; text-decoration: none;
  border: 3px solid var(--ink); border-radius: 10px; padding: 6px 12px; box-shadow: 3px 3px 0 var(--ink); }
.tree ul { margin: 0 0 0 18px; }
.tree ul li::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 4px solid var(--ink); }
.tree ul li:last-child::after { bottom: auto; height: 30px; }
.tree ul li { position: relative; padding: 8px 0 0 22px; }
.tree ul li::before { content: ""; position: absolute; left: 0; top: 26px; width: 18px; border-top: 4px solid var(--ink); }
.tree ul a { display: block; background: #fff; text-decoration: none; font-size: .95rem;
  border: 3px solid var(--ink); border-radius: 10px; padding: 4px 10px; }
.tree a:hover { transform: translate(2px, 2px); box-shadow: none; background: var(--yellow); color: var(--ink); }
section[id], .power[id], .sub-card[id] { scroll-margin-top: 100px; }
.power:target, .sub-card:target { outline: 5px dashed var(--yellow); outline-offset: 4px; }
@media (max-width: 900px) { .map { grid-template-columns: 1fr; } }

/* ---------- Schede richiudibili (solo con JavaScript attivo) ---------- */
.js .grid, .js .ai-grid { align-items: start; }
.js .more { display: none; }
.js .power.open .more { display: block; }
.js .power.wide:not(.open) { grid-column: auto; }
.toggle, .all-toggle {
  font: inherit; font-weight: 700; cursor: pointer; background: var(--yellow); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 999px; padding: 6px 16px; box-shadow: 3px 3px 0 var(--ink);
}
.toggle { margin-top: 12px; }
.toggle:hover, .all-toggle:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.filters .all-toggle { margin-left: auto; background: var(--pink); color: #fff; outline: 2px solid #fff; }

/* Menu su una riga */
.logo { white-space: nowrap; }
.nav a { padding: 6px 9px; font-size: .95rem; white-space: nowrap; }
@media (max-width: 1000px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--yellow); border-bottom: 4px solid var(--ink); padding: 10px 4%; flex-direction: column; }
  .nav.open { display: flex; }
}

/* ---------- Illustrazioni delle schede ---------- */
.power .ico { float: right; width: 84px; margin: -6px -4px 8px 10px; filter: drop-shadow(3px 3px 0 var(--ink)); }
.power .more, .power .toggle { clear: both; }

/* ---------- Testo giustificato ---------- */
main p, main li { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.contact p { text-align-last: center; }
.tree li, .strip li, .badges li { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
.strip li p, .badges li { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.island-head p { text-align: left; }

/* ---------- Parole chiave ---------- */
main strong { font-weight: 800; }
main li > b:first-child { font-weight: 800; }

/* ---------- Stelline magiche ---------- */
.grid .power { position: relative; }
.star { position: absolute; z-index: 3; pointer-events: none; opacity: 0;
  filter: drop-shadow(1.5px 1.5px 0 var(--ink)) drop-shadow(-1px -1px 0 var(--ink));
  animation: twinkle 1.1s ease-out forwards; }
.star i { display: block; width: 100%; height: 100%;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); }
@keyframes twinkle {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  35% { opacity: 1; transform: scale(1.25) rotate(60deg); }
  70% { opacity: 1; transform: scale(.9) rotate(120deg); }
  100% { opacity: 0; transform: scale(.2) rotate(200deg) translateY(-14px); }
}

/* ---------- Sfondo scuro su tutto il sito ---------- */
.lead { color: #fff; }

.btn.yellow { background: var(--yellow); color: var(--ink); }

/* ---------- Le tre nuvolette sopra i personaggi ---------- */
.trio { padding-top: 96px; }
.trio .boom { right: auto; white-space: nowrap; font-size: clamp(.85rem, 2vw, 1.45rem); padding: 12px 14px 9px; }
.trio .b1 { left: 17%; top: 8px; transform: translateX(-50%) rotate(-7deg); }
.trio .b2 { left: 50%; top: 34px; transform: translateX(-50%) rotate(3deg); z-index: 2; }
.trio .b3 { left: 83%; top: 4px; transform: translateX(-50%) rotate(8deg); padding-left: 20px; padding-right: 20px; }
@media (max-width: 620px) { .trio { padding-top: 104px; } .trio .b1 { top: 0; } .trio .b2 { top: 50px; } .trio .b3 { top: 0; } }
