/* lucamagnino.com – foglio di stile unico, nessun framework */
:root {
  --bg: #0d0e0e;
  --bg-alt: #151717;
  --card: #1c1f1f;
  --line: #2a2e2e;
  --text: #ecefee;
  --muted: #9aa3a0;
  --accent: #26b377;
  --accent-2: #3fe0a0;
  --radius: 14px;
  --wrap: 1180px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #04140d; font-family: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: #ffffff40; }
.btn-ghost:hover { background: #ffffff12; color: var(--text); border-color: #ffffff80; }

/* Navigazione */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  transition: background .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.nav.scrolled { background: #0d0e0ee6; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 24px; width: auto; opacity: 0; transition: opacity .3s; }
.nav.scrolled .brand img { opacity: 1; }
.menu { display: flex; gap: 6px; align-items: center; }
.menu a {
  text-decoration: none; font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 12px; border-radius: 999px; color: #d6dbd9; transition: color .2s, background .2s;
}
.menu a:hover, .menu a.active { color: #fff; background: #ffffff14; }
.menu a.menu-cta { background: var(--accent); color: #04140d; }
.menu a.menu-cta:hover { background: var(--accent-2); }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .menu-btn {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: transparent; border: 0; cursor: pointer; padding: 0;
  }
  .menu-btn span { display: block; width: 24px; height: 2px; background: #fff; transition: transform .25s; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #0d0e0ef7; border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .menu a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .menu a.menu-cta { margin-top: 14px; text-align: center; border-radius: 999px; border: 0; }
  .nav.open { background: #0d0e0ef7; }
  .nav.open .brand img { opacity: 1; }
}

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid { image-rendering: pixelated; }
/* linee scure sottili tra i quadrati del mosaico */
.hero-cells { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, #000 0 1px, transparent 1px), linear-gradient(0deg, #000 0 1px, transparent 1px);
  background-size: calc(100% / var(--cols, 50)) calc(100% / var(--rows, 30)); opacity: .6; }
.hero-fx { filter: blur(0.8px); mix-blend-mode: screen; opacity: .8; }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #0d0e0e66 0%, #0d0e0ecc 70%), linear-gradient(180deg, #0d0e0e00 60%, var(--bg) 100%); }
.hero-content { position: relative; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 48px; display: flex; flex-direction: column; align-items: center; }
.avatar { width: clamp(130px, 22vw, 190px); height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 3px #ffffff22, 0 20px 60px #000a; margin-bottom: 28px; }
.hero h1 img { width: min(520px, 84vw); height: auto; margin: 0 auto; }
.roles { list-style: none; padding: 0; margin: 22px 0 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; }
.roles li { font-weight: 600; font-size: clamp(.8rem, 2.2vw, 1rem); letter-spacing: .18em; text-transform: uppercase; color: #dfe5e2; }
.roles li + li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 14px 2px -18px; vertical-align: middle; }
@media (max-width: 600px) { .roles { flex-direction: column; gap: 6px; } .roles li + li::before { display: none; } }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 28px; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .social { justify-content: center; }
.social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #ffffff10; border: 1px solid #ffffff1f; transition: background .2s, transform .2s; }
.social a:hover { background: #ffffff24; transform: translateY(-2px); }
.social img { width: 20px; height: 20px; object-fit: contain; filter: invert(1); }

/* Sezioni */
.section { padding: clamp(64px, 10vw, 110px) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { margin-bottom: 30px; max-width: 680px; }
.kicker { color: var(--accent); font-weight: 600; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 1.05rem; margin-top: 12px; }

/* Filtri */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip {
  font-family: inherit; font-weight: 600; font-size: .85rem; line-height: 1; color: var(--muted); background: transparent;
  border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: #ffffff40; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Griglia card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { display: block; background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; border: 1px solid var(--line); transition: transform .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); border-color: #ffffff30; }
.card[hidden] { display: none; }
.collapsible:not(.expanded) .card.extra { display: none; }
.cover { aspect-ratio: 1; background: #111; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .cover img { transform: scale(1.04); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; text-align: center; background: linear-gradient(135deg, #1b3a2d, #0f1514 60%); }
.placeholder span { font-weight: 800; font-size: 1.1rem; text-transform: uppercase; color: #ffffffcc; }
.card-body { padding: 14px 16px 16px; }
.card h3 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.card .sub { color: #c9cfcc; font-size: .82rem; font-weight: 600; margin: 4px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.card .role { color: var(--accent); font-size: .8rem; margin: 0; }
@media (max-width: 520px) { .card-body { padding: 10px 12px 12px; } .card h3 { font-size: .85rem; } .card .sub, .card .role { font-size: .72rem; } }
.more { display: flex; justify-content: center; margin-top: 30px; }
.more[hidden] { display: none; }

/* Studio */
.studio-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.studio-hero img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.studio-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: clamp(20px, 4vw, 44px); background: linear-gradient(0deg, #000c 0%, #0000 65%); }
.studio-overlay h2 { margin-bottom: 16px; font-size: clamp(2.2rem, 6vw, 4rem); }
@media (max-width: 600px) { .studio-hero img { aspect-ratio: 4/3.4; } }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.service h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.service h3::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 14px; }
.service p { color: var(--muted); font-size: .92rem; margin: 0; }
.setup { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.setup summary { cursor: pointer; padding: 18px 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; list-style: none; display: flex; justify-content: space-between; }
.setup summary::-webkit-details-marker { display: none; }
.setup summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.setup[open] summary::after { content: "–"; }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; padding: 0 20px 22px; }
.setup-group h4 { color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 8px; }
.setup-group ul { list-style: none; margin: 0; padding: 0; color: #cdd3d0; font-size: .9rem; }
.setup-group li { padding: 3px 0; }

/* Bio */
.bio { display: grid; grid-template-columns: 260px 1fr; gap: 50px; align-items: start; }
.bio-img { border-radius: 50%; width: 100%; height: auto; position: sticky; top: calc(var(--nav-h) + 30px); }
.bio h2 { margin-bottom: 22px; }
.bio p { color: #cfd5d2; font-size: 1.05rem; max-width: 70ch; }
@media (max-width: 760px) { .bio { grid-template-columns: 1fr; gap: 26px; } .bio-img { width: 140px; position: static; } }

/* Contatti */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 28px 0; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; padding-top: 2px; }
.contact-list a { text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent-2); }
.contact-list address { font-style: normal; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 34px); display: grid; gap: 16px; align-content: start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.form small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.form input, .form select, .form textarea {
  font-family: inherit; font-size: 1rem; line-height: 1.4; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; text-transform: none; letter-spacing: 0;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form .invalid { border-color: #e2555a; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.hp { position: absolute !important; left: -9999px; }
.form-status { margin: 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: var(--accent-2); }
.form-status.err { color: #ff7b7f; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; text-align: center; color: var(--muted); font-size: .85rem; }
.footer img { height: 22px; width: auto; margin: 0 auto 14px; opacity: .7; }
.footer p { margin: 0; }
