/* Giuseppe Trotta · landing "Officina app": fondo blu notte, titolo enorme, lavori come telefoni e browser disegnati */

@font-face {
  font-family: "Unbounded";
  src: url("fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --night: #0f1324;
  --night-2: #161b30;
  --night-3: #1f2640;
  --bone: #eeeae2;
  --dim: #a3a7b6;
  --sun: #ffc24a;
  --sun-ink: #241900;
  --violet: #8b7cff;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--bone); font: 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--sun); color: var(--sun-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 5vw, 50px); }
h3 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
p { margin: 0; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
section { padding-block: 88px; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.head > div { display: grid; gap: 12px; max-width: 720px; }
.head p { color: var(--dim); }

/* Testata */
header.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px; }
.logo { font: 600 18px var(--display); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--sun); }
nav { display: flex; gap: 26px; font-weight: 500; }
nav a { text-decoration: none; color: var(--dim); }
nav a:hover { color: var(--bone); }
@media (max-width: 820px) { nav { display: none; } }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 600 16px var(--body); text-decoration: none; cursor: pointer; border: 1.5px solid var(--night-3); background: transparent; color: var(--bone); }
.btn:hover { border-color: var(--bone); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { background: #ffd47a; border-color: #ffd47a; }
@media (max-width: 380px) {
  .logo { font-size: 16px; }
  header.top .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
}

/* Apertura */
.hero { padding-block: 48px 40px; }
.hero .wrap { display: grid; gap: 28px; }
.role { color: var(--dim); font-weight: 500; }
.hero h1 { font-size: clamp(42px, 8.4vw, 112px); line-height: .98; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero .lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--dim); max-width: 640px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ticker { margin-top: 48px; border-block: 1px solid var(--night-3); overflow: hidden; padding-block: 16px; }
.ticker ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 40px; width: max-content; animation: slide 38s linear infinite; font: 500 clamp(18px, 2.4vw, 26px) var(--display); color: var(--dim); }
.ticker li::after { content: "✳"; color: var(--sun); margin-left: 40px; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker ul { animation: none; flex-wrap: wrap; width: auto; padding-inline: 20px; }
  .ticker li[aria-hidden="true"] { display: none; }
  .work { transition: none; }
}

/* Chi sono */
.hello-text { display: grid; gap: 16px; max-width: 680px; }
.hello-text h2 { font-size: clamp(28px, 4vw, 40px); }
.hello-text p { color: var(--dim); font-size: 18px; }

/* Lavori */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 820px) { .works { grid-template-columns: 1fr; } }
.work { background: var(--night-2); border-radius: 24px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; transition: transform .2s; }
.work:hover { transform: translateY(-4px); }
.stage { aspect-ratio: 16 / 10; max-width: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #2a3156, var(--night-3)); padding: 20px; overflow: hidden; }
.stage.v { background: radial-gradient(circle at 70% 20%, #3a2f6e, var(--night-3)); }
.work-body { padding: 22px 24px 26px; display: grid; gap: 8px; align-content: start; }
.cat { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cat b { background: var(--sun); color: var(--sun-ink); padding: 2px 8px; border-radius: 6px; letter-spacing: .04em; }
.work h3 { font-size: 22px; }
.work p { color: var(--dim); font-size: 16px; }
/* Lumen: scheda in evidenza a tutta larghezza, foto a sinistra e testo a destra */
.work.featured { grid-column: 1 / -1; }
/* Il lume: fiammella che tremola con piccole faville che salgono, davanti alla mappa dei ricordi sfumata */
.stage.lume { padding: 0; background: radial-gradient(circle at 50% 46%, rgba(12,13,17,.15) 0, rgba(12,13,17,.55) 38%, rgba(12,13,17,.92) 75%), url("img/progetti/lumen-sfondo.jpg") center / cover, #0c0d11; }
/* Fascetta diagonale "Novità" nell'angolo in alto a sinistra della scheda */
.ribbon { position: absolute; z-index: 2; top: 26px; left: -46px; width: 190px; padding: 7px 0; transform: rotate(-45deg); background: var(--sun); color: var(--sun-ink); text-align: center; font: 700 13px var(--body); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.lume-halo { position: absolute; left: 50%; top: 44%; width: min(75%, 480px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,214,150,.35), rgba(243,217,177,0) 65%); }
.lume-icon { position: absolute; left: 50%; top: 44%; width: min(36%, 220px); transform: translate(-50%, -50%); border-radius: 22%; overflow: visible; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6), 0 0 120px rgba(255,200,120,.25); }
.lume-name { position: absolute; left: 0; right: 0; top: 76%; text-align: center; font: 600 clamp(26px, 4vw, 40px) var(--display); letter-spacing: -.02em; color: #f6efe4; }
.lume-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: lume-tremolio 3.2s ease-in-out infinite; }
.lume-spark { fill: #ffd9a0; opacity: 0; transform-box: fill-box; transform-origin: center; animation: lume-sale 3.6s ease-out infinite; }
.lume-spark.s1 { --dx: -4px; }
.lume-spark.s2 { --dx: 3px; animation-delay: .9s; }
.lume-spark.s3 { --dx: 1px; animation-delay: 1.8s; }
.lume-spark.s4 { --dx: -2px; animation-delay: 2.7s; }
@keyframes lume-tremolio {
  0%, 100% { transform: scale(1, 1) skewX(0); }
  18% { transform: scale(.97, 1.05) skewX(-2deg); }
  35% { transform: scale(1.02, .97) skewX(1.5deg); }
  52% { transform: scale(.98, 1.07) skewX(-1deg); }
  70% { transform: scale(1.01, .98) skewX(2deg); }
  86% { transform: scale(.99, 1.03) skewX(-.5deg); }
}
@keyframes lume-sale { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--dx), -26px) scale(.3); } }
@media (prefers-reduced-motion: reduce) { .lume-flame, .lume-spark { animation: none; } }
.work.featured .heart { color: var(--sun); font-weight: 600; }
.work .more { justify-self: start; margin-top: 4px; font-weight: 600; color: var(--bone); text-decoration: none; border-bottom: 1.5px solid var(--sun); padding-bottom: 2px; }
.work .more:hover { color: var(--sun); }
/* tutta la scheda è cliccabile: il link "Scopri" si allarga a coprirla (testo e lettori di schermo restano normali) */
.work:has(.more) { position: relative; cursor: pointer; }
.work .more::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.work:has(.more):hover .more { color: var(--sun); }
.work .more:focus-visible { outline: none; }
.work:has(.more:focus-visible) { outline: 2px solid var(--sun); outline-offset: 3px; }
@media (min-width: 821px) {
  .work.featured { grid-template-columns: 1.05fr 1fr; grid-template-rows: none; }
  .work.featured .stage { aspect-ratio: auto; min-height: 420px; }
  .work.featured .work-body { align-content: center; padding: 36px 40px; gap: 12px; }
  .work.featured h3 { font-size: 30px; }
}
@media (max-width: 820px) { .stage.lume { aspect-ratio: 4 / 3; } }
.tech { font: 600 14px var(--body); color: var(--sun); }
/* Schermate reali dei progetti */
.shot { display: block; max-width: 100%; box-shadow: 0 24px 50px -20px rgba(0,0,0,.7); }
.phone-shot { width: auto; height: 100%; max-height: 300px; border-radius: 22px; border: 6px solid #2e3558; background: #0a0d1a; }
.square { width: auto; height: 100%; max-height: 260px; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.logo-shot { background: #f6f6f6; padding: 18px; }
.landscape { width: auto; height: 100%; max-height: 260px; border-radius: 16px; }
/* Caricamento delle foto da pixellate a nitide (vedi script in fondo a index.html) */
.stage { position: relative; }
.px-wait { opacity: 0; }
.px-canvas { position: absolute; pointer-events: none; transition: opacity .35s ease-out; }
.px-canvas.px-out { opacity: 0; }
@media (max-width: 560px) {
  .stage { aspect-ratio: auto; }
  .phone-shot { height: 280px; }
  .landscape { width: min(100%, 293px); height: auto; max-height: none; }
  .square { height: 220px; }
}

/* Telefono disegnato */
.phone { width: 150px; height: 300px; max-height: 100%; border-radius: 26px; background: #0a0d1a; border: 6px solid #2e3558; padding: 14px 10px; display: grid; grid-template-rows: auto 1fr auto; gap: 8px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.7); }
.phone .bar { height: 8px; width: 40%; border-radius: 4px; background: #2e3558; justify-self: center; }
.screen { display: grid; gap: 6px; align-content: start; font-size: 10px; color: var(--bone); }
.screen .t { font: 600 11px var(--display); }
.screen .row { background: #1a2038; border-radius: 6px; padding: 6px; display: flex; justify-content: space-between; gap: 4px; }
.screen .row i { font-style: normal; color: var(--sun); }
.mic { width: 36px; height: 36px; border-radius: 50%; background: var(--sun); justify-self: center; display: grid; place-items: center; color: var(--sun-ink); font-weight: 700; font-size: 14px; }
/* Browser disegnato */
.browser { width: 100%; max-width: 380px; border-radius: 12px; background: #0a0d1a; border: 1px solid #2e3558; overflow: hidden; box-shadow: 0 24px 50px -20px rgba(0,0,0,.7); }
.browser .chrome { display: flex; gap: 5px; padding: 8px 10px; background: #1a2038; }
.browser .chrome i { width: 8px; height: 8px; border-radius: 50%; background: #3a4270; }
.browser .page { padding: 14px; display: grid; gap: 8px; font-size: 11px; }
.bars { display: flex; align-items: end; gap: 6px; height: 70px; }
.bars span { flex: 1; background: var(--violet); border-radius: 3px 3px 0 0; }
.bars span:last-child { background: var(--sun); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kpis div { background: #1a2038; border-radius: 6px; padding: 6px; }
.kpis b { display: block; font: 600 13px var(--display); color: var(--bone); }
.msg { background: #1a2038; border-radius: 8px; padding: 8px; color: var(--dim); }
.msg.me { background: var(--violet); color: #fff; justify-self: end; max-width: 80%; }

/* Servizi */
.services { border-top: 1px solid var(--night-3); }
.service { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; align-items: center; padding-block: 28px; border-bottom: 1px solid var(--night-3); }
@media (max-width: 760px) { .service { grid-template-columns: 1fr; gap: 8px; } }
.service h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.service p { color: var(--dim); }
.offer { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--night-2); border: 1px solid var(--night-3); border-radius: 20px; padding: 24px 28px; text-decoration: none; }
.offer strong { font: 600 20px var(--display); display: block; margin-bottom: 4px; }
.offer span { color: var(--dim); }
.offer .arrow { font: 600 28px var(--display); color: var(--sun); }
.offer:hover { border-color: var(--sun); }

/* Supporto */
.support { background: var(--bone); color: var(--night); }
.support .kicker { color: #8a5a00; }
.support-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 980px) { .support-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .support-grid { grid-template-columns: 1fr; } }
.support h2 { font-size: clamp(28px, 4vw, 42px); }
.support-grid > div { display: grid; gap: 10px; min-width: 0; }
.support-grid p { color: #4a4e5e; }
.when { font: 600 13px var(--body); letter-spacing: .1em; text-transform: uppercase; color: #8a5a00; }

/* Domande */
.faq { display: grid; max-width: 860px; border-top: 1px solid var(--night-3); }
details { border-bottom: 1px solid var(--night-3); padding-block: 20px; }
summary { cursor: pointer; font: 500 19px var(--display); letter-spacing: -.01em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--sun); font-size: 24px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--dim); margin-top: 12px; max-width: 70ch; }

/* Contatti */
.final .wrap { display: grid; gap: 28px; }
.final h2 { font-size: clamp(42px, 8vw, 104px); line-height: .98; }
.final h2 span { color: var(--sun); }
.final .intro { color: var(--dim); max-width: 640px; font-size: 18px; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 860px; }
@media (max-width: 640px) { form { grid-template-columns: 1fr; } }
form .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--dim); min-width: 0; }
input, textarea { font: 16px var(--body); padding: 14px 16px; border-radius: 12px; border: 1px solid var(--night-3); background: var(--night-2); color: var(--bone); width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--sun); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 13px; color: var(--dim); }
.fine a { color: var(--bone); }

/* Piede */
footer { border-top: 1px solid var(--night-3); padding-block: 48px 32px; color: var(--dim); font-size: 15px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot { grid-template-columns: 1fr; } }
.foot > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.foot b { color: var(--bone); font-weight: 600; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--sun); }
.legal { margin-top: 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.legal a:hover { color: var(--sun); }

/* Pagine di testo (privacy, grazie, errore) */
.text-page { padding-block: 48px 88px; }
.text-page .wrap { max-width: 760px; display: grid; gap: 18px; }
.text-page h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 8px; }
.text-page h2 { font-size: 22px; margin-top: 18px; }
.text-page p, .text-page li { color: var(--dim); }
.text-page a { color: var(--bone); }

/* Animazione BuildReel alla prima visita */
html.intro-on { overflow: hidden; }
.br-intro { position: fixed; inset: 0; z-index: 100; background: var(--night); transition: opacity .6s ease; }
.br-intro iframe { display: block; width: 100%; height: 100%; border: 0; }
.br-intro.out { opacity: 0; pointer-events: none; }
.br-intro-skip, .br-intro-note { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); padding: 7px 14px; border-radius: 999px; font: 600 13px var(--body); }
.br-intro-skip { right: max(12px, env(safe-area-inset-right, 0px)); background: var(--sun); color: var(--sun-ink); border: 0; cursor: pointer; }
.br-intro-skip:hover { background: #ffd47a; }
.br-intro-note { left: max(12px, env(safe-area-inset-left, 0px)); background: rgba(15, 19, 36, .82); color: var(--dim); border: 1px solid var(--night-3); font-weight: 500; }

/* Segnaposto da compilare prima della pubblicazione (vedi DA-COMPLETARE.md) */
.todo { justify-self: start; background: var(--sun); color: var(--sun-ink); padding: 0 4px; border-radius: 3px; }
