/* mdmecco.it — stile comune (2026) */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #646a73;
  --accent: #1f8a5b;
  --accent-2: #2b6fd6;
  --accent-soft: rgba(31,138,91,.10);
  --line: rgba(20,22,26,.09);
  --radius: 20px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -12px rgba(16,24,40,.14);
  --shadow-hover: 0 2px 4px rgba(16,24,40,.06), 0 24px 48px -16px rgba(16,24,40,.28);
  --ease: cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #171a1f;
    --text: #eceae6;
    --muted: #9aa1ab;
    --accent: #4fd197;
    --accent-2: #6aa6ff;
    --accent-soft: rgba(79,209,151,.12);
    --line: rgba(255,255,255,.08);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
    --shadow-hover: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.8);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* barra in alto */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.logo::before {
  content: ""; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--accent) 50%, transparent);
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--muted); font-weight: 600; }
nav { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a { white-space: nowrap; }
body { overflow-x: hidden; }
nav a {
  color: var(--muted); font-size: .92rem; font-weight: 550;
  padding: 7px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
nav a.on { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }

/* apertura */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .55;
}
.hero::before { width: 520px; height: 520px; top: -180px; right: -80px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.hero::after  { width: 460px; height: 460px; bottom: -220px; left: -120px; background: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 650; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 18px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft);
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.02; margin: 0 0 22px;
  letter-spacing: -.045em; font-weight: 800;
}
h1 .grad, h2 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 34px; max-width: 32em; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 650; font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); margin-left: 8px; }
.btn.ghost:hover { background: var(--surface); }
.hero figure { margin: 0; position: relative; }
.hero figure img {
  border-radius: 28px; box-shadow: var(--shadow-hover); aspect-ratio: 1/1; object-fit: cover; width: 100%;
  transform: rotate(1.5deg);
}
.hero figure::after {
  content: ""; position: absolute; inset: 0; border-radius: 28px; transform: rotate(-3deg);
  border: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); z-index: -1;
}

/* sezioni */
section { padding: 88px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.1; margin: 0 0 12px; letter-spacing: -.035em; font-weight: 800; }
.sub { color: var(--muted); margin: 0 0 44px; font-size: 1.08rem; max-width: 40em; }

.bio { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.bio p { margin: 0 0 18px; font-size: 1.06rem; }
.bio p:first-child::first-letter {
  float: left; font-size: 3.6rem; line-height: .9; font-weight: 800; margin: 6px 10px 0 0; color: var(--accent);
}
.bio figure { margin: 0; position: sticky; top: 100px; }
.bio figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.bio figcaption { color: var(--muted); font-size: .88rem; margin-top: 10px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
section.alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.card .ico {
  font-size: 1.5rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-2) 12%, transparent));
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 6px; font-size: 1.1rem; letter-spacing: -.015em; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* card foto con titolo sull'immagine */
.trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.trip {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; background: var(--line); box-shadow: var(--shadow); color: #fff; isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.trip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); z-index: -2; }
.trip::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,0) 70%);
}
.trip:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); text-decoration: none; }
.trip:hover img { transform: scale(1.07); }
.trip .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; }
.trip .info small { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 650; }
.trip .info b { display: block; font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.2; margin: 2px 0 2px; }
.trip .info span { font-size: .86rem; opacity: .85; }
.trip .badge {
  position: absolute; top: 14px; right: 14px; font-size: .78rem; font-weight: 650;
  padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.trip.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.trip.big .info b { font-size: 2rem; }
@media (max-width: 640px) { .trip.big { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; } }

/* filtri */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; }
.chip {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip em { font-style: normal; opacity: .6; margin-left: 4px; }

.stats { display: flex; gap: 48px; flex-wrap: wrap; margin: 8px 0 36px; }
.stats div b {
  display: block; font-size: 2.8rem; line-height: 1.1; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats div span { color: var(--muted); font-size: .95rem; }

/* futuro e passato */
.memoria .wrap { max-width: 860px; }
.memoria figure { margin: 28px 0 36px; }
.memoria figure img { width: 100%; border-radius: 24px; box-shadow: var(--shadow-hover); }
blockquote {
  margin: 0; padding: 0 0 0 24px; border-left: 3px solid var(--accent);
  font-size: 1.25rem; line-height: 1.55; letter-spacing: -.01em;
}
blockquote p { margin: 0 0 14px; }
blockquote cite { display: block; font-style: normal; color: var(--muted); font-size: .95rem; margin-top: 8px; }
details { margin-top: 26px; color: var(--muted); font-size: .95rem; }
summary { cursor: pointer; font-weight: 600; }

.feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.feature .foto { display: block; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-hover); }
.feature .foto img { width: 100%; transition: transform .8s var(--ease); }
.feature .foto:hover img { transform: scale(1.04); }
.feature blockquote { font-size: 1.15rem; margin-bottom: 28px; }

/* comparsa allo scorrimento */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.vis { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

footer { padding: 40px 0 56px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 28px; }

@media (max-width: 860px) {
  .hero { padding: 56px 0 48px; }
  .hero .wrap, .bio, .feature { grid-template-columns: 1fr; gap: 36px; }
  .hero figure { max-width: 380px; }
  .bio figure { max-width: 320px; position: static; }
  section { padding: 64px 0; }
  body { font-size: 16px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  nav a { padding: 6px 8px; font-size: .8rem; }
  header.top .wrap { gap: 10px; }
  .lead { font-size: 1.05rem; }
  nav a[href$="#chi-sono"], nav a[href="./"] { display: none; }
  .logo span { display: none; }
  .btn.ghost { margin: 10px 0 0; }
}

/* ===== galleria ===== */
.album-head { padding: 64px 0 28px; }
.album-head .crumb { color: var(--muted); font-size: .92rem; margin-bottom: 18px; display: table; }
.album-head .meta { color: var(--muted); font-size: 1.05rem; }
.griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; grid-auto-flow: dense; }
.griglia button {
  all: unset; cursor: zoom-in; position: relative; border-radius: 14px; overflow: hidden;
  aspect-ratio: 4/3; background: var(--line);
}
.griglia button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.griglia img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .5s; opacity: 0; }
.griglia img.ok { opacity: 1; }
.griglia button:hover img { transform: scale(1.06); }
.griglia button.wide { grid-column: span 2; grid-row: span 2; }
@media (max-width: 600px) { .griglia { grid-template-columns: repeat(2, 1fr); gap: 6px; } .griglia button { border-radius: 10px; } }

.altri { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; }
.altri .trip { aspect-ratio: 16/7; }
.altri .trip.next .info { text-align: right; }
@media (max-width: 600px) { .altri { grid-template-columns: 1fr; } }

/* visualizzatore a tutto schermo */
.lb {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(8,9,11,.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: #fff; user-select: none;
}
.lb.open { display: grid; grid-template-rows: auto 1fr auto; animation: lbIn .25s var(--ease); }
@keyframes lbIn { from { opacity: 0; } }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: .92rem; color: rgba(255,255,255,.75); }
.lb-top .azioni { display: flex; gap: 6px; }
.lb button.ic {
  all: unset; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 999px; color: #fff; background: rgba(255,255,255,.08); transition: background .2s;
}
.lb button.ic:hover { background: rgba(255,255,255,.18); }
.lb button.ic svg { width: 20px; height: 20px; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.lb-stage img {
  max-width: calc(100vw - 160px); max-height: calc(100vh - 200px);
  border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transition: opacity .25s, transform .25s var(--ease);
}
.lb-stage img.fade { opacity: 0; transform: scale(.98); }
.lb .lb-stage button.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lb .lb-stage button.prev { left: 20px; }
.lb .lb-stage button.next { right: 20px; }
.lb-strip { display: flex; gap: 6px; padding: 12px 20px 20px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip img {
  height: 52px; width: 70px; object-fit: cover; border-radius: 6px; cursor: pointer; flex: none;
  opacity: .4; transition: opacity .2s, outline-color .2s; outline: 2px solid transparent; outline-offset: 2px;
}
.lb-strip img:hover { opacity: .8; }
.lb-strip img.on { opacity: 1; outline-color: #fff; }
.lb .play.on { background: var(--accent); color: #0b0c0e; }
@media (max-width: 700px) {
  .lb-stage img { max-width: 100vw; max-height: calc(100vh - 170px); border-radius: 0; }
  .lb .lb-stage button.nav { display: none; }
}

/* ===== area riservata ===== */
.riservata { padding: 56px 0 72px; min-height: 60vh; }
.riservata .crumb { color: var(--muted); font-size: .92rem; display: table; margin-bottom: 18px; }
.accesso { max-width: 460px; }
.modulo { display: grid; gap: 16px; margin: 8px 0 18px; }
.modulo label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.modulo label small { font-weight: 400; color: var(--muted); }
.modulo input, .modulo textarea {
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--text);
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.modulo input:focus, .modulo textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.modulo .btn { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.nascosto { position: absolute !important; left: -9999px; }
.piccolo { color: var(--muted); font-size: .9rem; }
.avviso { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; font-size: .95rem; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.avviso.errore { background: rgba(220,53,69,.10); border-color: rgba(220,53,69,.35); }
.avviso .pw { font-size: 1.1rem; padding: 2px 8px; border-radius: 6px; background: var(--surface); user-select: all; }
.card.link { display: block; color: var(--text); }
.card.link:hover { text-decoration: none; }
.strumenti { margin-top: 40px; display: flex; gap: 22px; flex-wrap: wrap; font-weight: 600; }
.conta { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #dc3545; color: #fff; font-size: .78rem; text-align: center; margin-left: 4px; }
h2.sez { font-size: 1.35rem; margin: 44px 0 16px; letter-spacing: -.02em; }
h2.sez small { color: var(--muted); font-weight: 600; font-size: .95rem; margin-left: 6px; }
.vuoto { color: var(--muted); }
.riga {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 18px 20px; margin-bottom: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.riga.spento { opacity: .6; }
.riga .chi { display: grid; gap: 2px; min-width: 240px; flex: 1; }
.riga .chi span { color: var(--muted); font-size: .92rem; }
.riga .chi small { color: var(--muted); font-size: .82rem; }
.riga .nota { margin: 6px 0 0; font-style: italic; font-size: .92rem; }
.riga .azioni { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.riga .btn { padding: 8px 14px; font-size: .85rem; border: 0; cursor: pointer; font-family: inherit; }
.riga .btn.ghost { border: 1px solid var(--line); margin: 0; }
.riga .btn.rosso { color: #dc3545; }
.permessi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.spunta { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .88rem; cursor: pointer; }
.spunta:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.btn.piccolo { padding: 6px 14px; font-size: .82rem; }
.contenuto { max-width: 820px; font-size: 1.05rem; }
.contenuto img, .contenuto video { border-radius: 16px; box-shadow: var(--shadow); margin: 18px 0; max-width: 100%; }
.contenuto figure { margin: 24px 0; }
.contenuto figcaption { color: var(--muted); font-size: .88rem; }
