/* Kubiqo · Polish — correzioni di layout e motion premium.
   File aggiuntivo: per tornare indietro basta rimuovere il <link> dalle pagine
   (o ripristinare le versioni salvate con restore_page). Non modifica gli altri asset. */
:root{--kp-ease:cubic-bezier(.22,.7,.2,1);--kp-ink:#23261f;--kp-paper:#f1f2ec;--kp-walnut:#6b4a32;--kp-sage:#e4e8e1;--kp-oak:#c9a77c}

/* ───────── Correzioni di layout ───────── */
html,body{max-width:100%}
body{overflow-x:clip}
main h1{overflow-wrap:break-word}
img,svg,video{max-width:100%}

/* Titolo prodotto lungo (es. «Portacorrispondenza») non deve uscire dallo schermo */
.pdp-info{min-width:0}
.pdp-info h1{overflow-wrap:anywhere;hyphens:manual}
@media(max-width:560px){.pdp-info h1{font-size:clamp(1.9rem,8.4vw,2.5rem);line-height:1.06}}

/* Card prodotto delle liste: stessa altezza, pulsante sempre allineato in basso */
.product-grid .product-card{display:flex;flex-direction:column;min-width:0}
.product-grid .product-card .info{flex:1 1 auto}
.product-grid .product-card .quick-add{align-self:flex-start;margin-top:12px}
.product-grid .product-card .name{display:block;text-wrap:balance}
@media(hover:none){.quick-add{min-height:40px;padding-inline:16px}}

/* Footer unico su tutte le pagine (scuro, come home e contatti) */
.site-footer{background:var(--kp-ink);color:rgba(241,242,236,.72)}
.site-footer .logo,.site-footer .logo a,.site-footer a.logo{color:var(--kp-paper)}
.site-footer h3{color:rgba(241,242,236,.55)}
.site-footer a{color:rgba(241,242,236,.86)}
.site-footer a:hover{color:#fff}
.site-footer p{color:rgba(241,242,236,.68)}
.site-footer .footer-bottom{border-color:rgba(241,242,236,.18);color:rgba(241,242,236,.55)}
.site-footer .footer-bottom span{color:inherit}
.site-footer ul{color:inherit}

/* Pagina Contattaci: logo e navigazione coerenti col resto del sito, contrasto del footer */
.page-contattaci .k-header .k-logo{color:var(--kp-ink)}
.page-contattaci .k-header .k-nav a{color:#5b6055}
.page-contattaci .k-header .k-nav a:hover,.page-contattaci .k-header .k-nav a[aria-current="page"]{color:var(--kp-ink)}
.page-contattaci .breadcrumbs a{color:#5b6055}
.page-contattaci .k-footer{background:var(--kp-ink);color:rgba(241,242,236,.72)}
.page-contattaci .k-footer .k-logo,.page-contattaci .k-footer a,.page-contattaci .k-footer button{color:rgba(241,242,236,.88)}
.page-contattaci .k-footer .k-logo{color:var(--kp-paper)}
.page-contattaci .k-footer a:hover,.page-contattaci .k-footer button:hover{color:#fff}
.page-contattaci .k-footer h3{color:rgba(241,242,236,.55)}
.page-contattaci .newsletter{background:var(--kp-walnut);color:var(--kp-paper)}
.page-contattaci .newsletter .eyebrow,.page-contattaci .newsletter p,.page-contattaci .newsletter .demo-hint{color:rgba(241,242,236,.78);background:transparent;border-color:transparent}
.page-contattaci .newsletter h2{color:var(--kp-paper)}
.page-contattaci .newsletter input{color:var(--kp-paper);border-color:rgba(241,242,236,.55);background:transparent}
.page-contattaci .newsletter input::placeholder{color:rgba(241,242,236,.62)}
.page-contattaci .newsletter button{color:var(--kp-paper)}
.page-contattaci .newsletter form>div{border-color:rgba(241,242,236,.55)}

/* Leggibilità: dimensioni minime dei testi nella pagina Contattaci (campi a 16px = niente zoom su iPhone) */
.page-contattaci .announcement{font-size:10px;letter-spacing:.1em;padding-block:9px}
.page-contattaci .breadcrumbs,.page-contattaci .breadcrumbs a{font-size:13px}
.page-contattaci .eyebrow{font-size:11px;letter-spacing:.14em}
.page-contattaci .demo-hint{font-size:13px;line-height:1.5}
.page-contattaci .contact-form label{font-size:14px}
.page-contattaci .contact-form input,.page-contattaci .contact-form textarea,.page-contattaci .newsletter input{font-size:16px}
.page-contattaci .contact-form .btn,.page-contattaci .newsletter button{font-size:15px}
.page-contattaci summary{font-size:16px;line-height:1.4}
.page-contattaci .detail-content{font-size:15px;line-height:1.65}
.page-contattaci .page-intro p{font-size:16px;line-height:1.6}
.page-contattaci .k-footer p,.page-contattaci .k-footer li,.page-contattaci .k-footer li a{font-size:14px;line-height:1.55}
.page-contattaci .k-footer h3{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:400}
.page-contattaci .k-footer .footer-bottom{font-size:12px;line-height:1.5}
.page-contattaci .k-footer .footer-bottom span{font-size:12px}

/* Footer della home: stessi titoli di colonna e stessa scala del resto del sito */
.k-home .k-footer h3{font:400 .78rem var(--k-sans,"Instrument Sans",system-ui,sans-serif);letter-spacing:.14em;text-transform:uppercase;color:rgba(241,242,236,.55)}
.k-home .k-footer ul{font-size:.9rem;gap:10px}
.k-home .k-footer li a{color:rgba(241,242,236,.86)}
.k-home .k-footer-bottom{font-size:.78rem}

/* ───────── Motion ───────── */
@keyframes kp-rise{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
@keyframes kp-mask{from{clip-path:inset(0 0 100% 0)}}
@keyframes kp-float{0%,100%{translate:0 0}50%{translate:0 -9px}}
@keyframes kp-sheen{from{background-position:130% 0}to{background-position:-130% 0}}
@keyframes kp-vt-out{to{opacity:0}}
@keyframes kp-vt-in{from{opacity:0}}

/* Elementi in attesa di comparire (la classe la gestisce kubiqo-polish.js) */
.kp-pre{opacity:0}

/* Ingresso della parte alta della pagina (solo CSS, nessun lampo) */
.page-head>*:not(.kubiqo-about-mark),.page-intro>*,.pdp-info>*,.k-hero-overlay>*{animation:kp-rise .95s var(--kp-ease) both}
.page-head>*:nth-child(2),.page-intro>*:nth-child(2),.pdp-info>*:nth-child(2),.k-hero-overlay>*:nth-child(2){animation-delay:.08s}
.page-head>*:nth-child(3),.page-intro>*:nth-child(3),.pdp-info>*:nth-child(3),.k-hero-overlay>*:nth-child(3){animation-delay:.16s}
.page-head>*:nth-child(4),.page-intro>*:nth-child(4),.pdp-info>*:nth-child(4),.k-hero-overlay>*:nth-child(4){animation-delay:.24s}
.pdp-info>*:nth-child(n+5){animation-delay:.32s}
.pdp .gallery .main{animation:kp-mask 1.15s var(--kp-ease) backwards}
.pdp .gallery .thumbs>div{animation:kp-rise .9s var(--kp-ease) backwards}
.pdp .gallery .thumbs>div:nth-child(1){animation-delay:.35s}
.pdp .gallery .thumbs>div:nth-child(2){animation-delay:.45s}
.pdp .gallery .thumbs>div:nth-child(3){animation-delay:.55s}

/* Movimenti discreti sugli oggetti */
.kubiqo-about-mark,.k-social-art-mark{animation:kp-float 9s ease-in-out infinite}
.pdp .gallery .main .k-retained-image{animation:kp-float 8s ease-in-out infinite}

/* Barra di avanzamento sottile */
#kp-progress{position:fixed;inset:0 0 auto 0;height:2px;z-index:90;pointer-events:none;background:var(--kp-walnut);transform-origin:0 50%;transform:scaleX(var(--kp-p,0));opacity:.85}

/* Transizione fluida tra le pagine (browser che supportano View Transitions) */
@view-transition{navigation:auto}
.k-header{view-transition-name:kp-header}
::view-transition-group(kp-header){animation-duration:0s}
::view-transition-old(root){animation:kp-vt-out .22s ease both}
::view-transition-new(root){animation:kp-vt-in .5s var(--kp-ease) both}

/* Hover (solo dispositivi con puntatore preciso) */
@media(hover:hover) and (pointer:fine){
  .k-product{transition:translate .6s var(--kp-ease)}
  .k-product:hover{translate:0 -4px}
  .k-product-media{transition:box-shadow .6s var(--kp-ease)}
  .k-product:hover .k-product-media{box-shadow:0 22px 36px -24px rgba(35,38,31,.35)}
  .product-card .name{background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:background-size .5s var(--kp-ease)}
  .product-card:hover .name{background-size:100% 1px}
  .site-footer a,.k-footer a{display:inline-block;transition:color .2s ease,translate .35s var(--kp-ease)}
  .site-footer a:hover,.k-footer a:hover{translate:4px 0}
  .chip,.opt{transition:translate .3s var(--kp-ease),background-color .2s,border-color .2s,color .2s}
  .chip:hover,.opt:hover{translate:0 -2px}
  .gallery .thumbs>div{transition:translate .35s var(--kp-ease),box-shadow .35s var(--kp-ease)}
  .gallery .thumbs>div:hover{translate:0 -3px;box-shadow:0 12px 20px -14px rgba(35,38,31,.45)}
  .btn-solid,.k-btn-dark,.quick-add{background-image:linear-gradient(110deg,transparent 38%,rgba(255,255,255,.16) 50%,transparent 62%);background-size:260% 100%;background-position:130% 0;background-repeat:no-repeat}
  .btn-solid:hover,.k-btn-dark:hover,.quick-add:hover{animation:kp-sheen 1s var(--kp-ease)}
  .k-social-links a{transition:translate .4s var(--kp-ease),background-color .25s}
  .k-social-links a:hover{translate:4px 0}
  .pdp .gallery .main,.k-story-art{will-change:transform;transition:transform .6s var(--kp-ease)}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;scroll-behavior:auto!important}
  .kp-pre{opacity:1}
  #kp-progress{display:none}
  @view-transition{navigation:none}
}
