:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --line: #26262a;
  --text: #f3f0ea;
  --muted: #8d8a85;
  --accent: #ff7a3d;
  --radius: 14px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  /* Testi da leggere (presentazioni, descrizioni): serif da rivista, in coppia con i titoli */
  --read: "Newsreader", Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  /* Curve di animazione: ease-out deciso per ciò che entra o risponde, ease-in-out per ciò che si sposta */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.muted { color: var(--muted); }
em { font-style: italic; color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }
html { scrollbar-color: #3a3a40 var(--bg); }
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.to-top, .lb-stage a { display: inline-flex; align-items: center; gap: .35em; }

/* Tutto ciò che si preme: niente ritardo al tocco, niente selezione del testo con la pressione lunga */
button, .btn, .chip, .card, .topbar a {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Barra in alto */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(var(--gutter) + env(safe-area-inset-right, 0px)) 14px calc(var(--gutter) + env(safe-area-inset-left, 0px));
  background: rgba(11, 11, 12, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.logo { font: 400 24px/1 var(--serif); text-decoration: none; letter-spacing: .01em; }
.topbar nav { display: flex; gap: clamp(14px, 3vw, 32px); align-items: center; }
.topbar nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color 200ms ease; }
.topbar .nav-cta {
  color: var(--text); border: 1px solid var(--line); padding: 8px 16px; border-radius: 99px;
  transition: color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
}
.topbar .nav-cta:active { transform: scale(0.97); }

/* Hero */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  padding: 110px var(--gutter) 60px;
}
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: .98; margin: 0; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(54px, 7.6vw, 6rem); }
h2 { font-size: clamp(40px, 5.5vw, 76px); }
.lead { max-width: 44ch; color: #a8a49e; font: 400 21px/1.5 var(--read); margin: 28px 0 32px; text-wrap: pretty; }

/* Entrata della hero: si vede una volta sola, all'apertura del sito */
.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line > span { display: inline-block; }
.hero h1 .line > span { animation: line-up 1100ms var(--ease-out) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: 90ms; }
.hero h1 em { display: inline-block; animation: focus-in 1200ms var(--ease-out) 280ms both; }
.hero-text > :nth-child(2) { animation: rise 800ms var(--ease-out) 320ms both; }
.hero-text > :nth-child(3) { animation: rise 800ms var(--ease-out) 400ms both; }
@keyframes line-up { from { transform: translateY(105%); } }
@keyframes focus-in { from { opacity: 0; filter: blur(12px); transform: translateY(6px); } }
.hero-reel { animation: reveal 1200ms var(--ease-out) 150ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes reveal { from { opacity: 0; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; cursor: pointer;
  background: var(--text); color: var(--bg);
  border: 1px solid var(--text); border-radius: 99px;
  padding: 14px 26px; font: 500 15px var(--sans); text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn .icon { font-size: 1.15em; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }

.hero-reel {
  height: min(78svh, 760px); overflow: hidden; display: flex; gap: 14px;
  transform: rotate(4deg);
  mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
}
.marquee { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: up 70s linear infinite; }
.marquee.reverse { animation-direction: reverse; }
.marquee button { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; cursor: pointer; flex: none; }
.marquee img { width: 100%; aspect-ratio: 9/16; object-fit: cover; transition: transform 600ms var(--ease-out), opacity 300ms ease; }
.hero-reel { position: relative; }
.hero-reel.is-paused .marquee { animation-play-state: paused; }
.marquee-toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
  background: rgba(11, 11, 12, .72); color: var(--text);
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.marquee-toggle:active { transform: scale(0.94); }
.marquee-toggle .icon-play, .hero-reel.is-paused .marquee-toggle .icon-pause { display: none; }
.hero-reel.is-paused .marquee-toggle .icon-play { display: block; }
@keyframes up { to { transform: translateY(calc(-50% - 7px)); } }

/* Comparsa allo scorrimento (una volta sola) */
.js-anim .reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease-out) var(--d, 0ms), transform 900ms var(--ease-out) var(--d, 0ms); }
.js-anim .reveal.is-in { opacity: 1; transform: none; }
.js-anim .reveal-mask { padding-bottom: .12em; margin-bottom: -.12em; clip-path: inset(0 0 100% 0); transform: translateY(35%); transition: clip-path 900ms var(--ease-out) var(--d, 0ms), transform 900ms var(--ease-out) var(--d, 0ms); }
.js-anim .reveal-mask.is-in { clip-path: inset(0 0 0 0); transform: none; }
.js-anim .reveal-line > span { transform: translateY(105%); transition: transform 1000ms var(--ease-out) var(--d, 0ms); }
.js-anim .reveal-line.is-in > span { transform: none; }
.js-anim .reveal-img { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1100ms var(--ease-in-out); }
.js-anim .reveal-img > * { transform: scale(1.12); transition: transform 1600ms var(--ease-out); }
.js-anim .reveal-img.is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js-anim .reveal-img.is-in > * { transform: none; }

/* Sezioni */
section { padding: 90px var(--gutter); scroll-margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }

.filters {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 calc(-1 * var(--gutter)) 28px;
  padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  scrollbar-width: none; overscroll-behavior-x: contain;
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 9px 16px; font: 500 14px var(--sans); white-space: nowrap;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

@media (min-width: 900px) {
  .filters { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; mask-image: none; -webkit-mask-image: none; }
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card {
  position: relative; aspect-ratio: 9/16; overflow: hidden; cursor: pointer;
  border-radius: var(--radius); background: var(--bg-2);
  border: 0; padding: 0; color: inherit; text-align: left; font: inherit;
  transition: transform 160ms var(--ease-out);
}
.js-anim .card:not(.is-in) { opacity: 0; }
.card.is-in { animation: card-in 600ms var(--ease-out) var(--d, 0ms) backwards; }
.card:active { transform: scale(0.98); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card img { transition: transform 600ms var(--ease-out); }
.card video { opacity: 0; transition: opacity 250ms ease; }
.card.playing video { opacity: 1; }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, .85));
}
.card-info { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; }
.card-info strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; }
.card-info span { font-size: 12px; color: #bdb9b3; }
.card-dur {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px;
  background: rgba(0, 0, 0, .55); font-variant-numeric: tabular-nums;
}
.more-wrap { text-align: center; margin-top: 40px; }

/* Chi sono */
.about {
  display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
  border-top: 1px solid var(--line);
}
.about-media { aspect-ratio: 9/16; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.about-media img, .about-media video { width: 100%; height: 100%; object-fit: cover; }
.about-media.has-photo { aspect-ratio: 3/4; }
.about-media.has-photo img { object-position: center 30%; }
.about-lead { font: 400 clamp(20px, 1.8vw, 24px)/1.5 var(--read); max-width: 46ch; margin: 24px 0 0; text-wrap: pretty; }
.about-area[hidden] { display: none; }
.about-area { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 16px 0 0; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.steps li { border-top: 1px solid var(--line); padding-top: 16px; }
.steps strong { display: block; font: 400 28px/1.1 var(--serif); margin-bottom: 8px; }
.steps span { color: #a8a49e; font: 400 17.5px/1.5 var(--read); text-wrap: pretty; }

/* Contatti */
.contact { text-align: center; padding-block: 140px; }
.contact h2 { font-size: clamp(48px, 7.6vw, 6rem); }
.contact-note { color: #a8a49e; font: italic 400 21px/1.4 var(--read); margin: 20px 0 0; }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.btn-wa { padding-inline: 32px; }

.footer {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.footer a { text-decoration: none; }
.footer-links { display: flex; gap: 20px; }

/* Hover solo con il mouse: sul telefono resterebbero "incollati" dopo il tocco */
@media (hover: hover) and (pointer: fine) {
  .topbar nav a:hover { color: var(--text); }
  .topbar .nav-cta:hover { border-color: var(--text); }
  .btn:hover { background: #fff; border-color: #fff; }
  .btn.ghost:hover { background: transparent; border-color: var(--text); }
  .chip:hover { color: var(--text); border-color: #4a4a50; }
  .chip[aria-pressed="true"]:hover { color: var(--bg); border-color: var(--text); }
  .card:hover img { transform: scale(1.04); }
  .hero-reel:hover .marquee { animation-play-state: paused; }
  .hero-reel:hover .marquee img { opacity: .55; }
  .hero-reel .marquee button:hover img { opacity: 1; transform: scale(1.04); }
  .lb-close:hover, .lb-nav:not(:disabled):hover { background: rgba(255, 255, 255, .16); }
  .marquee-toggle:hover { background: rgba(11, 11, 12, .92); }
  .lb-stage a:hover { text-decoration: underline; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: rgba(5, 5, 6, .96);
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 150ms ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; transition-duration: 250ms; }
.lb-stage {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px;
  transform: scale(0.96); opacity: 0;
  transition: transform 150ms ease, opacity 150ms ease;
  touch-action: pan-y pinch-zoom;
}
.lightbox.is-open .lb-stage {
  transform: none; opacity: 1;
  transition: transform 300ms var(--ease-out), opacity 250ms ease;
}
.lb-media { position: relative; }
.lb-stage video { height: min(82svh, 860px); aspect-ratio: 9/16; max-width: 92vw; object-fit: contain; background: #000; border-radius: var(--radius); }
.lb-spinner {
  position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--text); border-radius: 50%;
  opacity: 0; transition: opacity 200ms ease; pointer-events: none;
  animation: spin 600ms linear infinite;
}
.lb-media.is-loading .lb-spinner { opacity: 1; transition-delay: 300ms; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-error {
  position: absolute; inset: 0; margin: 0; padding: 24px;
  display: grid; place-items: center; text-align: center;
  font: 400 17px/1.45 var(--read); color: var(--text); text-wrap: balance;
  background: rgba(5, 5, 6, .82); border-radius: var(--radius);
}
.lb-error[hidden] { display: none; }
.lb-stage figcaption { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; justify-content: center; font-size: 14px; }
.lb-stage figcaption span:first-child { font-weight: 600; }
.lb-stage a { color: var(--accent); text-decoration: none; }
.lb-close, .lb-nav {
  background: rgba(255, 255, 255, .08); color: var(--text); border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 24px; line-height: 1;
  display: grid; place-items: center;
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.lb-close:active, .lb-nav:active { transform: scale(0.94); }
.lb-nav:disabled { opacity: .25; cursor: default; transform: none; }
.lb-close { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; font-size: 20px; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 96px; gap: 32px; }
  .about { grid-template-columns: 1fr; }
  .about-media { max-width: 320px; }
  .hero-reel { height: 300px; transform: none; order: -1; overflow: hidden; }
  .hero-reel .marquee { flex-direction: row; animation: side 50s linear infinite; }
  .hero-reel .marquee.reverse { display: none; }
  .hero-reel .marquee button { width: 168px; }
  .hero-reel { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  @keyframes side { to { transform: translateX(calc(-50% - 7px)); } }
}
@media (max-width: 600px) {
  .topbar nav .nav-secondary { display: none; }
  .lead { font-size: 19px; margin: 20px 0 24px; }
  .steps { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .about-media, .about-media.has-photo { max-width: none; aspect-ratio: 4/5; }
  .contact-actions { flex-direction: column; align-items: stretch; max-width: 360px; margin-inline: auto; }
  .contact-actions .btn { text-align: center; }
  .footer { flex-direction: column; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card { border-radius: 10px; }
  .card-info { left: 10px; right: 10px; bottom: 8px; }
  .card-info strong { font-size: 12px; }
  .lightbox { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .lb-nav { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .lb-nav.prev { left: 20px; }
  .lb-nav.next { right: 20px; }
  .lb-stage video { height: auto; width: 92vw; max-height: 78svh; }
  .lb-close { width: 44px; height: 44px; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
  section { padding-block: 64px; }
  .contact { padding-block: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { animation: none; }
  .lb-spinner { animation-duration: 1.5s; }
  .marquee-toggle { display: none; }
  .hero-text > *, .hero-reel, .card.is-in, .hero h1 .line > span, .hero h1 em { animation-name: reveal; }
  .js-anim .reveal, .js-anim .reveal-mask, .js-anim .reveal-line > span, .js-anim .reveal-img, .js-anim .reveal-img > * { transform: none; clip-path: none; }
  .js-anim .reveal-mask, .js-anim .reveal-line, .js-anim .reveal-img { opacity: 0; transition: opacity 400ms ease; }
  .js-anim .reveal-mask.is-in, .js-anim .reveal-line.is-in, .js-anim .reveal-img.is-in { opacity: 1; }
  .lb-stage, .lightbox.is-open .lb-stage { transform: none; }
}
