html,body{margin:0;min-height:100%;background-color:var(--theme-bg)!important;color:var(--theme-text)!important;font-family:var(--theme-font-body);overflow:hidden;transition:background-color .45s ease,color .45s ease}.adesso-page{min-height:100vh}.adesso-header{z-index:40;pointer-events:none}.adesso-header a,.adesso-header button{pointer-events:auto}.adesso-logo{color:var(--theme-text)!important;text-decoration:none}.adesso-header .nav{display:flex;align-items:flex-start;gap:12px}.adesso-current{pointer-events:none;color:var(--theme-text)!important}.adesso-current .adesso-dot{background:#e32727!important}.adesso-page-title{position:fixed;left:50%;top:50%;z-index:4;display:flex;align-items:baseline;justify-content:center;gap:.22em;transform:translate(-50%,-50%);font-family:var(--theme-font-display);font-size:clamp(42px,6vw,104px);line-height:.95;letter-spacing:.025em;color:var(--theme-text);pointer-events:none;white-space:nowrap;text-align:center}.breathing-e{position:relative;display:inline-block}.accent-mark{position:absolute;left:.17em;top:-.30em;font-size:.9em;line-height:1;opacity:1;animation:accent-breath 4.8s ease-in-out infinite}@keyframes accent-breath{0%,18%,100%{opacity:1;transform:translateY(0)}45%,72%{opacity:0;transform:translateY(-.08em)}}
.adesso-main{position:relative;width:100vw;height:100vh;overflow:hidden}.adesso-composition{position:absolute;inset:0;overflow:hidden}.adesso-media{position:absolute;left:0;top:0;width:clamp(300px,31vw,520px);height:clamp(205px,21vw,350px);will-change:transform;transform-origin:center;z-index:8;cursor:grab;perspective:1000px}.adesso-media:active{cursor:grabbing}.adesso-image-frame{position:absolute;inset:0;border:1px solid var(--theme-accent);background:var(--theme-bg);overflow:hidden;box-shadow:0 20px 55px rgba(0,0,0,.12);transform-style:preserve-3d;will-change:transform}.adesso-image{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;user-select:none}.adesso-copy{position:absolute;z-index:12;max-width:min(620px,44vw);will-change:transform}.adesso-text{font-family:var(--theme-font-display);font-size:clamp(32px,4.2vw,76px);line-height:1.03;white-space:pre-wrap;overflow-wrap:normal;word-break:normal;color:var(--theme-text)}.has-both .adesso-text{font-size:clamp(24px,3vw,52px)}.adesso-time{margin-top:22px;font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--theme-muted)}.only-image .adesso-time{position:absolute;right:5vw;bottom:5vh;z-index:12}.adesso-lines{position:fixed;inset:0;width:100vw;height:100vh;z-index:5;pointer-events:none;overflow:visible}.adesso-lines path{fill:none;stroke:var(--theme-accent);stroke-width:1;vector-effect:non-scaling-stroke}.adesso-empty{position:absolute;inset:0;display:grid;place-items:center;font-family:var(--theme-font-display);font-size:clamp(26px,4vw,56px);opacity:.45;text-align:center;color:var(--theme-text)}.layout-0 .adesso-copy{left:7vw;top:24vh}.layout-1 .adesso-copy{right:7vw;top:22vh;text-align:right}.layout-2 .adesso-copy{left:9vw;bottom:10vh}.layout-3 .adesso-copy{right:8vw;bottom:9vh;text-align:right}.layout-4 .adesso-copy{left:50%;top:15vh;transform:translateX(-50%);text-align:center}.layout-5 .adesso-copy{left:6vw;top:48%;transform:translateY(-50%)}.only-text .adesso-copy{max-width:min(1050px,82vw)}.only-text.layout-0 .adesso-copy{left:8vw;top:20vh}.only-text.layout-1 .adesso-copy{right:7vw;top:17vh}.only-text.layout-2 .adesso-copy{left:8vw;bottom:12vh}.only-text.layout-3 .adesso-copy{right:8vw;bottom:12vh}.only-text.layout-4 .adesso-copy{left:50%;top:50%;transform:translate(-50%,-50%)}.only-text.layout-5 .adesso-copy{left:12vw;top:36vh}@media(max-width:760px){html,body{overflow:auto}.adesso-page-title{left:50%;top:48%;font-size:clamp(34px,11vw,62px);transform:translate(-50%,-50%);gap:.18em}.adesso-main{height:auto;min-height:100vh;padding:90px 18px 40px;box-sizing:border-box}.adesso-composition{position:relative;inset:auto;display:flex;flex-direction:column;gap:28px;min-height:calc(100vh - 130px);justify-content:center}.adesso-media{position:relative!important;left:auto!important;top:auto!important;width:100%;height:min(62vw,390px);transform:none!important}.adesso-copy{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;max-width:100%!important;text-align:left!important}.adesso-lines{display:none}.adesso-text,.has-both .adesso-text{font-size:clamp(30px,10vw,58px)}.only-image .adesso-time{position:relative;right:auto;bottom:auto}.adesso-header .nav{gap:10px}.adesso-current span{display:none}}

/* RC4.11 — calmer desktop typography and a living mobile image. */
@media (min-width: 761px) {
  .adesso-text { font-size: clamp(32px,3.8vw,68px); }
  .has-both .adesso-text { font-size: clamp(24px,2.8vw,48px); }
}
@keyframes adesso-mobile-drift {
  0%   { transform: translate3d(-7px, 5px, 0) rotate(-.45deg); }
  24%  { transform: translate3d(10px, -8px, 0) rotate(.65deg); }
  52%  { transform: translate3d(4px, 10px, 0) rotate(-.25deg); }
  78%  { transform: translate3d(-11px, -3px, 0) rotate(.5deg); }
  100% { transform: translate3d(-7px, 5px, 0) rotate(-.45deg); }
}
@media (max-width:760px) {
  .adesso-media {
    transform: translate3d(0,0,0) !important;
    animation: adesso-mobile-drift 9s cubic-bezier(.45,.05,.55,.95) infinite;
    will-change: transform;
  }
  .adesso-image-frame { transform: none !important; }
  .adesso-text,.has-both .adesso-text { font-size:clamp(27px,8.8vw,50px); }
}
@media (prefers-reduced-motion: reduce) and (max-width:760px) {
  .adesso-media { animation: none; }
}


/* RC4.13 — hotfix mobile: menu pulito e immagine realmente mobile. */
.adesso-header a,
.adesso-header a:link,
.adesso-header a:visited,
.adesso-header a:hover,
.adesso-header a:focus,
.adesso-header a:active {
  text-decoration: none !important;
}

@keyframes adesso-mobile-drift-rc413 {
  0%   { transform: translate3d(-12px,-8px,0) rotate(-.6deg); }
  22%  { transform: translate3d(18px,10px,0) rotate(.7deg); }
  48%  { transform: translate3d(-4px,24px,0) rotate(-.35deg); }
  73%  { transform: translate3d(-20px,5px,0) rotate(.55deg); }
  100% { transform: translate3d(-12px,-8px,0) rotate(-.6deg); }
}

@media (max-width:760px) {
  .adesso-main {
    padding-top: 104px;
  }
  .adesso-composition {
    justify-content: flex-start;
    gap: 34px;
    padding-top: 13vh;
  }
  .adesso-page-title {
    top: 43%;
    z-index: 10;
  }
  .adesso-media {
    width: min(78vw, 360px);
    height: min(52vw, 248px);
    align-self: flex-end;
    z-index: 7;
    transform: translate3d(0,0,0);
    animation: adesso-mobile-drift-rc413 10.5s cubic-bezier(.45,.05,.55,.95) infinite;
  }
  .adesso-image-frame {
    transform: none !important;
  }
  .adesso-copy {
    z-index: 12;
    padding-right: 4vw;
  }
  .layout-1 .adesso-media,
  .layout-3 .adesso-media,
  .layout-5 .adesso-media {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width:760px) {
  .adesso-media { animation: none !important; }
}


/* RC4.14 — mobile presence hotfix: full menu label, free image drift, shared layering. */
@media (max-width:760px) {
  .adesso-current span { display:inline !important; }
  .adesso-header .nav { align-items:center; }
  .adesso-page-title { z-index:6; }
  .adesso-lines { display:block !important; z-index:5; }
  .adesso-media {
    position:fixed !important;
    left:0 !important;
    top:0 !important;
    align-self:auto !important;
    z-index:10;
    animation:none !important;
    transform:translate3d(0,0,0);
    will-change:transform;
    width:min(72vw,340px);
    height:min(48vw,228px);
  }
  .adesso-copy { z-index:12; }
  .adesso-image-frame { transform:none; }
}


/* RC4.15 — one motion source on mobile: JS moves the image, lines read the same state. */
@media (max-width:760px) {
  .adesso-media {
    animation:none !important;
    /* No !important on transform: the inline transform written each frame must win. */
  }
}


/* RC4.16 — mobile image and lines share the exact same transformed element. */
@media (max-width:760px) {
  .adesso-media {
    position:fixed !important;
    left:0 !important;
    top:0 !important;
    margin:0 !important;
    animation:none !important;
    will-change:transform;
  }
  .adesso-image-frame {
    animation:none !important;
    will-change:transform;
  }
}

/* RC4.16 — stronger editorial presence for text received by mail on desktop. */
@media (min-width:761px) {
  .adesso-text { font-size:clamp(46px,5.4vw,104px); line-height:.98; }
  .has-both .adesso-text { font-size:clamp(36px,4.25vw,78px); line-height:1; }
}

/* RC4.18 — real mobile visual viewport: no page scroll, one coordinate system. */
@media (max-width:760px) {
  html,
  body {
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden !important;
    overscroll-behavior:none;
    touch-action:manipulation;
  }
  .adesso-page {
    position:fixed;
    inset:0;
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  .adesso-main {
    position:fixed;
    inset:0;
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  .adesso-composition {
    position:absolute;
    inset:0;
    min-height:0;
    overflow:hidden;
  }
  .adesso-lines {
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
  }
}

/* RC4.18 — slightly larger photographic presence on desktop. */
@media (min-width:761px) {
  .adesso-media {
    width:clamp(360px,36vw,640px);
    height:clamp(246px,24.4vw,430px);
  }
}

/* RC4.19 — desktop hierarchy, larger content, and mail-authored line breaks. */
@media (min-width:761px) {
  .adesso-page-title {
    z-index:60;
  }
  .adesso-media {
    width:clamp(440px,43vw,780px);
    height:clamp(300px,29.1vw,525px);
  }
  .adesso-copy {
    max-width:none;
  }
  .adesso-text {
    font-size:clamp(58px,6.2vw,120px);
    line-height:.94;
    white-space:pre;
    overflow-wrap:normal;
    word-break:normal;
  }
  .has-both .adesso-text {
    font-size:clamp(44px,5vw,94px);
    line-height:.96;
    white-space:pre;
  }
  .only-text .adesso-copy {
    max-width:92vw;
  }
}

/* RC4.20 — six real mobile text compositions, stable for each publication. */
@media (max-width:760px) {
  .adesso-copy {
    position:fixed !important;
    z-index:12;
    width:auto;
    max-width:min(78vw, 430px) !important;
    margin:0 !important;
    padding:0 !important;
    transform:none !important;
  }

  .layout-0 .adesso-copy {
    left:6vw !important;
    right:auto !important;
    top:16vh !important;
    bottom:auto !important;
    text-align:left !important;
  }
  .layout-1 .adesso-copy {
    left:auto !important;
    right:6vw !important;
    top:17vh !important;
    bottom:auto !important;
    text-align:right !important;
  }
  .layout-2 .adesso-copy {
    left:6vw !important;
    right:auto !important;
    top:auto !important;
    bottom:8vh !important;
    text-align:left !important;
  }
  .layout-3 .adesso-copy {
    left:auto !important;
    right:6vw !important;
    top:auto !important;
    bottom:8vh !important;
    text-align:right !important;
  }
  .layout-4 .adesso-copy {
    left:50% !important;
    right:auto !important;
    top:18vh !important;
    bottom:auto !important;
    transform:translateX(-50%) !important;
    text-align:center !important;
    max-width:min(86vw, 460px) !important;
  }
  .layout-5 .adesso-copy {
    left:6vw !important;
    right:auto !important;
    top:50% !important;
    bottom:auto !important;
    transform:translateY(-50%) !important;
    text-align:left !important;
    max-width:min(72vw, 400px) !important;
  }

  /* Keep copy clear of the header and inside the visual viewport. */
  .adesso-copy .adesso-time {
    margin-top:14px;
  }
}


/* RC4.29 — countdown and protected central title area. */
.adesso-page-title{
  flex-direction:column;
  align-items:center;
  gap:.13em;
}
.adesso-title-words{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:.22em;
  white-space:nowrap;
}
.adesso-countdown{
  min-height:1em;
  font-family:var(--theme-font-body);
  font-size:clamp(10px,.72vw,13px);
  line-height:1;
  letter-spacing:.18em;
  font-variant-numeric:tabular-nums;
  color: #d32f2f;
  opacity:.82;

  font-weight: 700;
}
.adesso-countdown[hidden]{display:none}
.layout-safe .adesso-copy{z-index:12}
@media(max-width:760px){
  .adesso-page-title{gap:.22em}
  .adesso-title-words{gap:.18em}
  .adesso-countdown{font-size:10px;letter-spacing:.16em}
}

/* RC4.31 — didascalia museale dell'opera. */
.adesso-page-title{
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  transition:opacity .22s ease;
}
.adesso-page-title:hover{opacity:.82}
.adesso-page-title:focus-visible{
  outline:1px solid currentColor;
  outline-offset:10px;
}
.artwork-caption{
  position:fixed;
  inset:0;
  z-index:80;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(96px,16vh,170px) 24px 34px;
  background:color-mix(in srgb,var(--theme-bg) 72%,transparent);
  -webkit-backdrop-filter:blur(5px);
  backdrop-filter:blur(5px);
  opacity:0;
  visibility:hidden;
  transition:opacity .26s ease,visibility 0s linear .26s;
}
.artwork-caption.is-open{
  opacity:1;
  visibility:visible;
  transition:opacity .26s ease;
}
.artwork-caption[hidden]{display:none}
.artwork-caption-panel{
  width:min(560px,calc(100vw - 48px));
  max-height:calc(100dvh - 170px);
  overflow:auto;
  padding:clamp(24px,3.5vw,42px);
  background:var(--theme-bg);
  color:var(--theme-text);
  border:1px solid color-mix(in srgb,var(--theme-text) 17%,transparent);
  box-shadow:none;
  font-family:var(--theme-font-body);
  font-size:clamp(15px,1.05vw,18px);
  line-height:1.5;
  text-align:left;
  outline:none;
}
.artwork-caption-panel h2{
  margin:0 0 18px;
  font-family:var(--theme-font-display);
  font-size:clamp(24px,2.25vw,38px);
  line-height:1;
  font-weight:400;
  letter-spacing:-.025em;
}
.artwork-caption-panel p{margin:0 0 1em}
.artwork-caption-panel p:last-child{margin-bottom:0}
.artwork-caption-year{font-variant-numeric:tabular-nums}
.artwork-caption-type{margin-bottom:1.55em!important}
.artwork-caption-site{white-space:nowrap}
body.caption-open{overflow:hidden}
body.caption-open .adesso-page-title{z-index:95;opacity:1}
@media(max-width:760px){
  .adesso-page-title:hover{opacity:1}
  .artwork-caption{align-items:flex-start;padding:clamp(138px,21vh,190px) 18px 24px}
  .artwork-caption-panel{width:100%;max-height:calc(100dvh - 170px);padding:24px 22px 26px;font-size:15px}
  .artwork-caption-panel h2{font-size:27px}
}

/* RC4.32 — abilita realmente il click sulla didascalia. */
.adesso-page-title{
  pointer-events:auto !important;
  cursor:pointer !important;
}
.adesso-page-title *{pointer-events:none;}
body.caption-open .adesso-page-title{pointer-events:auto !important;}



/* RC4.33 — gerarchia visiva della didascalia. */
.adesso-header,
.adesso-lines,
.adesso-page-title,
.adesso-main{
  transition:opacity .32s ease,filter .38s ease;
}
body.caption-open .adesso-header{
  opacity:.24;
  filter:blur(3px);
  pointer-events:none;
}
body.caption-open .adesso-lines{
  opacity:.13;
  filter:blur(3px);
}
body.caption-open .adesso-page-title{
  z-index:4;
  opacity:.13;
  filter:blur(3px);
  pointer-events:none !important;
}
body.caption-open .adesso-main{
  opacity:.25;
  filter:blur(4px);
  pointer-events:none;
}
.artwork-caption{
  z-index:100;
  padding:clamp(72px,12vh,130px) 24px 34px;
  background:color-mix(in srgb,var(--theme-bg) 58%,transparent);
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.artwork-caption-panel{
  width:min(520px,calc(100vw - 48px));
  padding:clamp(30px,4vw,52px);
  background:color-mix(in srgb,var(--theme-bg) 95%,transparent);
  border:0;
  box-shadow:none;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .24s ease .10s,transform .32s ease .10s;
}
.artwork-caption.is-open .artwork-caption-panel{
  opacity:1;
  transform:translateY(0);
}
.artwork-caption-panel h2{margin-bottom:22px}
.artwork-caption-site{white-space:nowrap;font-weight:500}
@media(max-width:760px){
  .artwork-caption{
    align-items:center;
    padding:84px 18px 28px;
  }
  .artwork-caption-panel{
    max-height:calc(100dvh - 112px);
    padding:28px 24px 30px;
  }
}


/* RC4.43 — supporto video per ADESSO È ORA. */
.adesso-video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;user-select:none;background:#000}
.adesso-video-audio{position:absolute;right:12px;bottom:12px;z-index:4;border:0;padding:7px 9px;background:color-mix(in srgb,var(--theme-bg) 82%,transparent);color:var(--theme-text);font:500 9px/1 var(--theme-font-body,Inter,sans-serif);letter-spacing:.14em;text-transform:uppercase;cursor:pointer;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.adesso-video-audio:hover{background:var(--theme-bg)}
@media(max-width:760px){.adesso-video-audio{right:9px;bottom:9px;padding:7px 8px;font-size:8px}}


/* RC4.59 — Conservazione del momento. */
.adesso-conserve{position:fixed;left:50%;bottom:24px;z-index:38;transform:translateX(-50%);border:0;border-bottom:1px solid currentColor;padding:7px 2px;background:transparent;color:var(--theme-text);font:500 10px/1 var(--theme-font-body,Inter,sans-serif);letter-spacing:.18em;text-transform:uppercase;cursor:pointer;transition:opacity .25s ease,color .25s ease}
.adesso-conserve:hover{color:var(--theme-accent)}
.adesso-conserve:disabled{opacity:.42;cursor:default}
.adesso-conserve-status{position:fixed;left:50%;bottom:24px;z-index:37;transform:translateX(-50%);font:500 10px/1 var(--theme-font-body,Inter,sans-serif);letter-spacing:.15em;text-transform:uppercase;color:var(--theme-muted);pointer-events:none}
@media(max-width:760px){.adesso-conserve,.adesso-conserve-status{bottom:18px}}


/* RC4.67 — bersaglio invisibile per le linee nelle pubblicazioni solo testo. */
.adesso-media-virtual{
  pointer-events:none!important;
  cursor:default!important;
  background:transparent!important;
}
.adesso-image-frame-virtual{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}


/* RC4.69 DEV — immagini/GIF mantengono il rapporto originale e restano interamente visibili. */
.adesso-image{object-fit:contain;}

/* RC4.81 — ORA CONSERVA resta visibile sopra il marquee interno. */
.adesso-page .adesso-conserve{
  bottom:58px;
  z-index:66;
}
.adesso-page .adesso-conserve-status{
  bottom:58px;
  z-index:65;
}
@media(max-width:760px){
  .adesso-page .adesso-conserve,
  .adesso-page .adesso-conserve-status{
    bottom:53px;
  }
}

/* Inattivo: titolo sopra, messaggio sotto, nessuna sovrapposizione. */
.adesso-page.adesso-is-inactive .adesso-page-title{
  top:44%!important;
}
.adesso-page.adesso-is-inactive .adesso-empty{
  inset:auto 0 auto 0!important;
  top:56%!important;
  display:block!important;
  transform:translateY(-50%)!important;
  padding:0 20px!important;
}
@media(max-width:760px){
  .adesso-page.adesso-is-inactive .adesso-page-title{
    top:42%!important;
  }
  .adesso-page.adesso-is-inactive .adesso-empty{
    top:56%!important;
    font-size:clamp(22px,7vw,38px)!important;
  }
}


/* STEP 9.1 — cursore ZOOM IN coerente con la gallery delle opere */
.adesso-gallery-cursor{
  position:fixed;
  z-index:170;
  left:0;
  top:0;
  width:82px;
  height:82px;
  border-radius:50%;
  color:#fff;
  display:grid;
  place-items:center;
  pointer-events:none;
  opacity:0;
  overflow:hidden;
  transform:translate3d(calc(var(--x,0px) - 41px),calc(var(--y,0px) - 41px),0) scale(.58);
  transition:opacity .2s,transform .28s cubic-bezier(.16,1,.3,1);
  background:rgba(17,14,44,.14);
  -webkit-backdrop-filter:hue-rotate(145deg) saturate(2.35) contrast(1.18) brightness(.96);
  backdrop-filter:hue-rotate(145deg) saturate(2.35) contrast(1.18) brightness(.96);
}
.adesso-gallery-cursor::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background-image:var(--lens-image,none);
  background-repeat:no-repeat;
  background-size:var(--lens-size,auto);
  background-position:var(--lens-position,center);
  filter:hue-rotate(145deg) saturate(2.35) contrast(1.18) brightness(.96);
  transform:scale(1.015);
  opacity:0;
}
.adesso-gallery-cursor.has-image::before{opacity:1}
.adesso-gallery-cursor.visible{
  opacity:1;
  transform:translate3d(calc(var(--x,0px) - 41px),calc(var(--y,0px) - 41px),0) scale(1);
}
.adesso-gallery-cursor span{
  position:relative;
  z-index:1;
  font-size:27px;
  line-height:1;
  font-weight:200;
  color:#fff;
  text-shadow:0 1px 5px rgba(0,0,0,.65);
}
.adesso-zoom-follower{
  position:fixed;
  left:0;
  top:0;
  z-index:175;
  pointer-events:none;
  padding:8px 15px;
  border-radius:999px;
  background:#110e2c;
  color:#faf8f5;
  font-size:10px;
  font-weight:500;
  line-height:1;
  letter-spacing:1.15px;
  text-transform:uppercase;
  white-space:nowrap;
  opacity:0;
  transform:translate3d(calc(var(--zx,0px) + 24px),calc(var(--zy,0px) + 22px),0) scale(.82);
  transition:opacity .2s ease,transform .28s cubic-bezier(.16,1,.3,1);
  box-shadow:0 10px 25px rgba(17,14,44,.15);
}
.adesso-zoom-follower.visible{
  opacity:1;
  transform:translate3d(calc(var(--zx,0px) + 24px),calc(var(--zy,0px) + 22px),0) scale(1);
}
[data-theme="dark"] .adesso-zoom-follower{background:#faf8f5;color:#110e2c}

@media(min-width:761px) and (pointer:fine){
  .adesso-media:not(.adesso-media-virtual),
  .adesso-media:not(.adesso-media-virtual) *{
    cursor:none!important;
  }
}
@media(max-width:760px),(pointer:coarse){
  .adesso-gallery-cursor,.adesso-zoom-follower{display:none!important}
}

/* STEP 9.2 — follow sul titolo ADESSO È ORA */
.adesso-caption-follower{
  position:fixed;
  left:0;
  top:0;
  z-index:180;
  pointer-events:none;
  padding:8px 16px;
  border-radius:999px;
  background:#110e2c;
  color:#faf8f5;
  font-size:10px;
  font-weight:500;
  line-height:1;
  letter-spacing:1.15px;
  text-transform:uppercase;
  white-space:nowrap;
  opacity:0;
  transform:translate3d(calc(var(--cfx,0px) + 24px),calc(var(--cfy,0px) + 22px),0) scale(.82);
  transition:opacity .2s ease,transform .28s cubic-bezier(.16,1,.3,1);
  box-shadow:0 10px 25px rgba(17,14,44,.15);
}
.adesso-caption-follower.visible{
  opacity:1;
  transform:translate3d(calc(var(--cfx,0px) + 24px),calc(var(--cfy,0px) + 22px),0) scale(1);
}
[data-theme="dark"] .adesso-caption-follower{
  background:#faf8f5;
  color:#110e2c;
}
@media(max-width:760px),(pointer:coarse){
  .adesso-caption-follower{display:none!important}
}

/* ORA CONSERVA più visibile ma coerente */
#adesso-conserve:not([hidden]):not(:disabled){
  animation:adessoConservePulse 1.9s ease-in-out infinite;
  transform-origin:center;
}
@keyframes adessoConservePulse{
  0%,100%{
    transform:translateX(-50%) scale(1);
    box-shadow:0 0 0 0 color-mix(in srgb,var(--theme-accent) 0%,transparent);
  }
  50%{
    transform:translateX(-50%) scale(1.055);
    box-shadow:0 0 0 7px color-mix(in srgb,var(--theme-accent) 12%,transparent);
  }
}
#adesso-conserve:hover{
  animation-play-state:paused;
}
@media(prefers-reduced-motion:reduce){
  #adesso-conserve:not([hidden]):not(:disabled){animation:none}
}

/* STEP 9.3 — INFO follow sul titolo */
.adesso-caption-follower{
 position:fixed;left:0;top:0;z-index:180;pointer-events:none;
 padding:8px 16px;border-radius:999px;background:#110e2c;color:#faf8f5;
 font-size:10px;font-weight:500;line-height:1;letter-spacing:1.15px;text-transform:uppercase;
 white-space:nowrap;opacity:0;
 transform:translate3d(calc(var(--cfx,0px) + 24px),calc(var(--cfy,0px) + 22px),0) scale(.82);
 transition:opacity .2s ease,transform .28s cubic-bezier(.16,1,.3,1);
 box-shadow:0 10px 25px rgba(17,14,44,.15)
}
.adesso-caption-follower.visible{opacity:1;transform:translate3d(calc(var(--cfx,0px) + 24px),calc(var(--cfy,0px) + 22px),0) scale(1)}
[data-theme="dark"] .adesso-caption-follower{background:#faf8f5;color:#110e2c}
@media(max-width:760px),(pointer:coarse){.adesso-caption-follower{display:none!important}}

/* ORA CONSERVA: nessun alone o sfondo aggiunto, pulsa solo la scritta */
#adesso-conserve:not([hidden]):not(:disabled){
 animation:adessoConserveTextOnly 1.8s ease-in-out infinite!important;
 box-shadow:none!important;
}
@keyframes adessoConserveTextOnly{
 0%,100%{transform:translateX(-50%) scale(1)}
 50%{transform:translateX(-50%) scale(1.12)}
}
#adesso-conserve:hover{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){#adesso-conserve:not([hidden]):not(:disabled){animation:none!important}}

/* STEP 9.6 — pinch mobile solo sull'opera */
@media(max-width:760px),(pointer:coarse){
  .adesso-media:not(.adesso-media-virtual){touch-action:pan-x pan-y}
}

/* Bilingue finale — stato CONSERVA separato dal pulsante */
.adesso-page .adesso-conserve-status{
  bottom:82px!important;
  max-width:min(78vw,620px);
  text-align:center;
  line-height:1.35;
  white-space:normal;
}
@media(max-width:760px){
  .adesso-page .adesso-conserve-status{
    bottom:76px!important;
    max-width:82vw;
    font-size:8px;
  }
}


/* =========================================================
   AEO — testo fedele alla formattazione della mail
   Nessun a capo automatico: restano solo quelli ricevuti.
   La dimensione viene adattata via JS quando una riga è lunga.
   ========================================================= */
.adesso-text{
  white-space:pre!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  max-width:none!important;
}

/* Durante il primo fetch non mostrare per un istante lo stato inattivo statico. */
body.adesso-awaiting-state .adesso-page-title,
body.adesso-awaiting-state .adesso-main,
body.adesso-awaiting-state .adesso-lines,
body.adesso-awaiting-state .adesso-conserve,
body.adesso-awaiting-state .adesso-conserve-status{
  visibility:hidden!important;
}

/* Mobile: stessa regola — niente wrapping introdotto dal viewport. */
@media(max-width:760px){
  .adesso-text,
  .has-both .adesso-text{
    white-space:pre!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
}


/* Tema scuro: pill bianca, testo scuro */
html[data-theme="dark"] .adesso-conserve{
  background:#faf8f5!important;
  color:#110e2c!important;
}

/* Il messaggio successivo resta indipendente e leggibile;
   nessun cambio di posizione o sovrapposizione al bottone. */
.adesso-conserve-status{
  font-weight:500!important;
  letter-spacing:.04em!important;
}

@media(max-width:760px){
  .adesso-conserve{
    padding:10px 15px!important;
    font-size:9.5px!important;
  }
}


/* Anche il messaggio successivo resta perfettamente centrato. */
.adesso-conserve-status{
  transform:translateX(-50%)!important;
}


/* Il pulse di questo controllo è parte del feedback visivo dell'opera:
   non viene annullato dalle vecchie regole reduced-motion del pulsante. */
@media (prefers-reduced-motion: reduce){
  .adesso-conserve:not(:disabled){
    transform:translateX(-50%)!important;
    animation:adesso-conserve-scale-pulse 1.65s ease-in-out infinite!important;
  }
}


/* =========================================================
   AEO — CONSERVA ORA / stile + pulse definitivo
   Un solo transform governa centraggio e pulsazione.
   ========================================================= */
@keyframes aeoConservePulse {
  0%,100% {
    transform:translateX(-50%) scale(1);
  }
  50% {
    transform:translateX(-50%) scale(1.075);
  }
}

.adesso-page .adesso-conserve{
  border:0;
  outline:0;
  box-shadow:none;
  border-radius:999px;
  padding:10px 17px;

  background:#110e2c;
  color:#faf8f5;

  font-family:var(--theme-font-body,Inter,sans-serif);
  font-size:10px;
  line-height:1;
  font-weight:500;
  letter-spacing:1.15px;
  text-transform:uppercase;

  transform:translateX(-50%) scale(1);
  transform-origin:center center;
  animation:aeoConservePulse 1.55s ease-in-out infinite;

  transition:background-color .25s ease,color .25s ease,opacity .2s ease;
}

html[data-theme="dark"] .adesso-page .adesso-conserve{
  background:#faf8f5;
  color:#110e2c;
}

.adesso-page .adesso-conserve:hover{
  animation-play-state:paused;
  transform:translateX(-50%) scale(1.075);
}

.adesso-page .adesso-conserve:active{
  animation-play-state:paused;
  transform:translateX(-50%) scale(.98);
}

.adesso-page .adesso-conserve:disabled{
  animation:none;
  transform:translateX(-50%) scale(1);
  opacity:.42;
}

/* Messaggio dopo il click: resta centrato e non eredita il pulse. */
.adesso-page .adesso-conserve-status{
  transform:translateX(-50%);
  font-weight:500;
  letter-spacing:.04em;
}

@media(max-width:760px){
  .adesso-page .adesso-conserve{
    padding:10px 15px;
    font-size:9.5px;
  }
}


/* =========================================================
   CONSERVA ORA — fix hover desktop + pulse mobile
   ========================================================= */
@media (min-width:761px) and (hover:hover) and (pointer:fine){
  .adesso-page .adesso-conserve:hover{
    animation:none!important;
    transform:translateX(-50%) scale(1.075)!important;
  }
  .adesso-page .adesso-conserve:active{
    animation:none!important;
    transform:translateX(-50%) scale(.98)!important;
  }
}

@media (max-width:760px){
  .adesso-page .adesso-conserve:not(:disabled){
    animation:aeoConservePulse 1.55s ease-in-out infinite!important;
    transform-origin:center center!important;
  }
  .adesso-page .adesso-conserve:active{
    animation:none!important;
    transform:translateX(-50%) scale(.98)!important;
  }
}

@media (prefers-reduced-motion: reduce){
  .adesso-page .adesso-conserve:not(:disabled){
    animation:aeoConservePulse 1.55s ease-in-out infinite!important;
  }
}

@media (min-width:761px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion: reduce){
  .adesso-page .adesso-conserve:hover{
    animation:none!important;
    transform:translateX(-50%) scale(1.075)!important;
  }
}
