/* Officina OT7: identità autonoma, nessuna dipendenza dagli stili della home. */
:root {
  --purple: #2d1d3e;
  --ink: #281638;
  --lavender: #cbb6ef;
  --paper: #f8f6f2;
  --ivory: #f0eae1;
  --muted: #69616e;
  --rule: #e3ddd9;
  --green: #143f30;
  --ochre: #c78d30;
  --sans: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #8a60b0; outline-offset: 5px; }
::selection { color: var(--ink); background: #e0d1f1; }
.wrapper { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 10; top: 12px; left: 24px; padding: 12px 18px; color: var(--ink); background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.purple-intro { background: var(--purple); color: var(--paper); }
.page-header { display: flex; align-items: center; justify-content: space-between; min-height: 96px; gap: 28px; border-bottom: 1px solid #74627f; }
.brand { display: flex; align-items: center; gap: 30px; }
.ot7-mark { display: inline-block; position: relative; padding-right: 10px; font-size: 37px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.brand-dot { position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); }
.brand-caption { color: #d2c5da; font-size: 10px; line-height: 1.6; letter-spacing: 0.18em; text-transform: uppercase; }
.back-link { font-size: 12px; line-height: 1.5; color: #e2d8e8; }
.back-link span { padding-left: 10px; font-size: 17px; }
.back-link:hover, .page-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.purple-intro a:focus-visible { outline-color: var(--lavender); }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding-block: 94px 92px; }
h1 { margin: 0 0 24px; font-size: clamp(42px, 4.6vw, 68px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; }
.hero-copy p { margin: 0; color: #ddd0e4; font-size: clamp(17px, 1.65vw, 23px); line-height: 1.5; font-weight: 400; }
.explore-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 48px; margin-top: 34px; padding: 13px 22px; border: 1px solid #af9abf; border-radius: 3px; font-size: 13px; letter-spacing: 0.035em; }
.explore-link span { font-size: 19px; }
.explore-link:hover { color: var(--purple); background: var(--lavender); border-color: var(--lavender); }
.orbital-brand { position: relative; display: flex; align-items: center; justify-content: center; height: 320px; min-width: 0; }
.orbital-word { position: relative; z-index: 1; padding-right: 36px; color: var(--lavender); font-size: clamp(125px, 13.5vw, 204px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
.orbital-dot { position: absolute; width: 37px; height: 37px; right: -3px; top: -11px; background: var(--lavender); border-radius: 50%; }
.orbital-line { position: absolute; width: 110%; height: 190px; border: 1px solid #8c73a1; border-radius: 50%; transform: rotate(-32deg); }
.workflow-section { padding-block: 72px 64px; }
.eyebrow { margin: 0; font-size: 11px; line-height: 1.6; letter-spacing: 0.15em; text-transform: uppercase; color: #80609d; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin: 14px 0 36px; }
.section-heading h2 { margin: 0; font-size: clamp(32px, 3.3vw, 48px); line-height: 1.1; letter-spacing: -0.04em; }
.selection-hint { display: none; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.has-workflows-js .selection-hint { display: block; }
.selection-hint span { padding-left: 6px; color: #80609d; }
.workflow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.workflow-card { display: block; padding: 20px 22px 23px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; }
.workflow-card[data-active] { border-color: #9977c3; }
.workflow-card:focus-visible { outline-offset: 4px; }
.workflow-card:hover { border-color: #9977c3; }
.mascot-stage { display: flex; align-items: center; justify-content: center; height: clamp(170px, 17.2vw, 245px); margin-bottom: 16px; }
.mascot { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: center 85%; transition: transform 360ms cubic-bezier(0.2, 0.65, 0.3, 1); }
.card-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-caption h3 { font-size: clamp(22px, 2vw, 29px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 700; margin: 0; white-space: nowrap; }
.card-caption .identity-dot { width: 0.3em; height: 0.3em; margin-left: 0.18em; }
.card-arrow { color: #80609d; font-size: 17px; }
.workflow-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 9px 0 0; }
@media (hover: hover) and (pointer: fine) {
  .workflow-card:hover .mascot { transform: translateY(-7px) rotate(-2deg); }
  .workflow-card:nth-child(even):hover .mascot { transform: translateY(-7px) rotate(2deg); }
}
.workflow-card:focus-visible .mascot { transform: translateY(-5px) rotate(-1.5deg); }
.workflow-card.is-tapped .mascot { animation: mascot-greeting 440ms ease-out; }
@keyframes mascot-greeting { 0%, 100% { transform: none; } 45% { transform: translateY(-6px) rotate(-2deg); } }
.detail-section { padding-block: 48px 60px; background: var(--ivory); border-top: 1px solid #ded6cc; }
.detail-label { margin-bottom: 12px; }
.workflow-panel { display: grid; grid-template-columns: 1fr 1.12fr; align-items: center; gap: 72px; min-height: 470px; scroll-margin-top: 30px; }
.workflow-panel + .workflow-panel { border-top: 1px solid #d6ccc1; margin-top: 42px; padding-top: 42px; }
.has-workflows-js .workflow-panel:not([data-active]) { display: none; }
.has-workflows-js .workflow-panel + .workflow-panel { border-top: 0; margin-top: 0; padding-top: 0; }
.detail-image { display: flex; align-items: center; justify-content: center; }
.detail-image img { display: block; width: 100%; height: 460px; object-fit: contain; }
.workflow-name { margin: 0; font-size: clamp(44px, 4.4vw, 64px); line-height: 1.05; letter-spacing: -0.03em; }
.workflow-name:focus { outline: none; }
.workflow-name:focus-visible { outline: 2px solid #80609d; outline-offset: 7px; }
.mochi-panel .workflow-name { color: var(--green); }
.identity-dot { display: inline-block; width: 19px; height: 19px; margin-left: 9px; vertical-align: top; border-radius: 50%; background: var(--ochre); }
.workflow-area { margin: 8px 0 25px; font-size: 11px; line-height: 1.6; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.detail-copy h3 { font-size: clamp(29px, 2.8vw, 40px); line-height: 1.12; letter-spacing: -0.035em; margin: 0 0 22px; }
.detail-description { max-width: 550px; font-size: 15px; color: #5d5662; line-height: 1.7; margin: 0; }
.process-stages { padding: 0; margin: 30px 0 32px; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.process-stages li { padding-inline: 17px; color: #4b424f; font-size: 12px; line-height: 1.55; border-left: 1px solid #b5a9ae; }
.process-stages li:first-child { padding-left: 0; border: 0; }
.process-stages li:last-child { padding-right: 0; }
.stage-number { display: block; margin-bottom: 8px; color: #80609d; font-size: 13px; }
.human-control { font-size: 23px; font-weight: 700; line-height: 1.16; letter-spacing: -0.02em; margin: 0 0 12px; }
.control-note { font-size: 12px; line-height: 1.6; color: #5d5662; margin: 0; }
.workflow-traits { margin: 32px 0 0; padding-top: 25px; border-top: 1px solid #cfc3ca; }
.workflow-traits dt { font-size: 11px; line-height: 1.6; color: #80609d; text-transform: uppercase; letter-spacing: 0.13em; margin: 0 0 10px; }
.workflow-traits dd { font-size: 18px; line-height: 1.5; margin: 0; color: #4b424f; }
.page-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 38px; min-height: 98px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.page-footer p { margin: 0; }
.page-footer p > span { padding-inline: 8px; }
.page-footer > a { white-space: nowrap; }
.page-footer > a span { margin-left: 8px; font-size: 17px; }
@media (max-width: 1080px) {
  .wrapper { width: calc(100% - 72px); }
  .brand { gap: 22px; }
  .hero { gap: 28px; padding-block: 70px; }
  .orbital-brand { height: 270px; }
  .orbital-line { height: 140px; width: 105%; }
  .orbital-dot { width: 28px; height: 28px; top: -7px; }
  .orbital-word { padding-right: 30px; }
  .section-heading { display: block; }
  .selection-hint { margin-top: 15px; }
  .workflow-card { padding: 16px 17px 21px; }
  .workflow-card p { font-size: 13px; }
  .workflow-panel { gap: 40px; }
  .detail-image img { height: 370px; }
  .process-stages li { padding-inline: 10px; font-size: 11px; }
}
@media (max-width: 800px) {
  .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .mascot-stage { height: 240px; }
  .workflow-card { padding: 21px 24px 26px; }
  .card-caption h3 { font-size: 28px; }
  .workflow-card p { font-size: 14px; }
  .brand-caption { font-size: 9px; letter-spacing: 0.12em; }
  .back-link { max-width: 165px; text-align: right; }
  .hero { grid-template-columns: 1.25fr 0.85fr; gap: 28px; }
  h1 { font-size: 43px; }
  .orbital-word { font-size: 122px; padding-right: 21px; }
  .orbital-dot { width: 22px; height: 22px; right: 0; top: -5px; }
  .orbital-line { width: 104%; height: 105px; }
  .workflow-panel { grid-template-columns: 0.9fr 1.2fr; gap: 28px; }
  .detail-image img { height: 300px; }
  .detail-copy h3 { font-size: 29px; }
  .workflow-name { font-size: 44px; }
  .detail-description { font-size: 14px; }
  .process-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
  .process-stages li:nth-child(3) { padding-left: 0; border-left: 0; }
  .process-stages li:nth-child(even) { padding-right: 0; }
  .human-control { font-size: 22px; }
}
@media (max-width: 600px) {
  .wrapper { width: calc(100% - 44px); }
  .page-header { min-height: 86px; gap: 20px; }
  .brand { align-items: flex-start; flex-direction: column; gap: 7px; }
  .ot7-mark { font-size: 28px; padding-right: 8px; }
  .brand-dot { width: 8px; height: 8px; }
  .brand-caption { font-size: 7px; letter-spacing: 0.1em; }
  .back-link { max-width: 125px; font-size: 10px; }
  .back-link span { padding-left: 3px; font-size: 14px; }
  .hero { display: block; position: relative; padding-block: 55px 43px; }
  h1 { font-size: clamp(29px, 8.3vw, 48px); line-height: 1.1; margin-bottom: 20px; }
  .hero-copy p { font-size: 16px; line-height: 1.65; }
  .explore-link { margin-top: 26px; min-height: 45px; padding: 11px 16px; font-size: 12px; gap: 20px; }
  .orbital-brand { width: 220px; height: 170px; margin: 18px 0 0 auto; }
  .orbital-word { font-size: 100px; padding-right: 20px; }
  .orbital-dot { width: 19px; height: 19px; }
  .orbital-line { width: 100%; height: 95px; }
  .workflow-section { padding-block: 42px 42px; }
  .eyebrow { font-size: 9px; }
  .section-heading { margin: 13px 0 26px; }
  .section-heading h2 { font-size: 31px; line-height: 1.12; }
  .selection-hint { font-size: 11px; margin-top: 13px; }
  .workflow-grid { gap: 12px; }
  .workflow-card { padding: 14px 13px 19px; border-radius: 6px; }
  .mascot-stage { height: clamp(110px, 32vw, 185px); margin-bottom: 13px; }
  .card-caption { gap: 6px; }
  .card-caption h3 { font-size: clamp(19px, 5.4vw, 27px); }
  .card-arrow { font-size: 14px; }
  .workflow-card p { font-size: 11px; line-height: 1.5; margin-top: 7px; }
  .detail-section { padding-block: 31px 42px; }
  .detail-label { margin-bottom: 18px; }
  .workflow-panel { display: block; min-height: 0; }
  .detail-image img { height: 265px; max-width: 330px; }
  .detail-image { margin-bottom: 25px; }
  .workflow-name { font-size: 46px; }
  .identity-dot { width: 15px; height: 15px; margin-left: 8px; }
  .workflow-area { margin: 7px 0 21px; font-size: 9px; }
  .detail-copy h3 { font-size: 32px; margin-bottom: 19px; }
  .detail-description { font-size: 14px; }
  .process-stages { margin-block: 26px 29px; gap: 21px 0; }
  .process-stages li { font-size: 12px; }
  .human-control { font-size: 23px; }
  .control-note { font-size: 12px; }
  .workflow-traits { margin-top: 26px; }
  .page-footer { padding-block: 28px; align-items: flex-start; flex-direction: column; gap: 14px; font-size: 11px; }
  .page-footer p > span { padding-inline: 3px; }
}
@media (max-width: 360px) {
  .wrapper { width: calc(100% - 36px); }
  .workflow-card { padding-inline: 10px; }
  .workflow-card p { font-size: 10px; }
  .section-heading h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mascot { transition: none; }
  .workflow-card:hover .mascot,
  .workflow-card:nth-child(even):hover .mascot,
  .workflow-card:focus-visible .mascot { transform: none; }
  .workflow-card.is-tapped .mascot { animation: none; }
}

/* OT7: quattro scene statiche dalle schede originali. */
.mochi-panel, .gallery-panel { row-gap: 32px; }
.mochi-gallery, .workflow-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-top: 28px;
  border-top: 1px solid #d9d0c6;
}
.mochi-gallery figure, .workflow-gallery figure { margin: 0; min-width: 0; }
.mochi-scene, .workflow-scene { aspect-ratio: 4 / 3; background: #f0eae1; }
.mochi-scene img, .workflow-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: none;
  transition: none;
  transform: none;
}
.mochi-gallery figcaption, .workflow-gallery figcaption {
  margin-top: 13px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 680px) {
  .mochi-gallery, .workflow-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}
@media (max-width: 600px) {
  .mochi-gallery, .workflow-gallery { margin-top: 32px; padding-top: 25px; }
  .mochi-gallery figcaption, .workflow-gallery figcaption { margin-top: 10px; font-size: 9px; }
}

/* Integra il fondo chiaro delle scene originali senza riquadri aggiunti. */
.workflow-scene { isolation: isolate; }
.workflow-scene img { mix-blend-mode: darken; }

/* Cinque attività originali: layout comune, senza restringere le altre gallerie. */
:is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) {
  max-width: 1200px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1000px) {
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure { grid-column: span 2; }
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure:nth-child(4) { grid-column: 2 / span 2; }
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure:nth-child(5) { grid-column: 4 / span 2; }
}
@media (max-width: 680px) {
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure,
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure:nth-child(4),
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure:nth-child(5) { grid-column: auto; }
  :is(.mochi-gallery.mochi-gallery-five, .workflow-gallery.workflow-gallery-five) > figure:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 16px) / 2);
    justify-self: center;
  }
}

/* PNG originali con alfa: conserva i colori senza il blending dei ritagli provvisori. */
.workflow-gallery.workflow-gallery-five .workflow-scene img { mix-blend-mode: normal; }

/* Schede editoriali: stessa gerarchia di MOCHI, con descrizioni delle quattro aree. */
#workflow-rm .workflow-name { color: var(--green); }
#workflow-rm .rm-interventions-title,
#workflow-ho-bi .ho-bi-interventions-title,
#workflow-yoon .yoon-interventions-title,
#workflow-kookie .kookie-interventions-title,
#workflow-woo-t .woo-t-interventions-title,
#workflow-van .van-interventions-title,
#workflow-mochi .mochi-interventions-title { margin: 28px 0 0; }
:is(#workflow-rm, #workflow-ho-bi, #workflow-yoon, #workflow-kookie, #workflow-woo-t, #workflow-van, #workflow-mochi) .process-stages {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 0;
  margin: 16px 0 30px;
}
:is(#workflow-rm, #workflow-ho-bi, #workflow-yoon, #workflow-kookie, #workflow-woo-t, #workflow-van, #workflow-mochi) .process-stages li { padding-inline: 17px; font-size: 12px; }
:is(#workflow-rm, #workflow-ho-bi, #workflow-yoon, #workflow-kookie, #workflow-woo-t, #workflow-van, #workflow-mochi) .process-stages li:nth-child(odd) { padding-left: 0; border-left: 0; }
:is(#workflow-rm, #workflow-ho-bi, #workflow-yoon, #workflow-kookie, #workflow-woo-t, #workflow-van, #workflow-mochi) .process-stages li:nth-child(even) { padding-right: 0; }
:is(#workflow-rm, #workflow-ho-bi, #workflow-yoon, #workflow-kookie, #workflow-woo-t, #workflow-van, #workflow-mochi) .stage-title { display: block; margin-bottom: 7px; font-weight: 600; }
:is(#workflow-rm, #workflow-ho-bi, #workflow-yoon, #workflow-kookie, #workflow-woo-t, #workflow-van, #workflow-mochi) .stage-description { display: block; color: #5d5662; line-height: 1.65; }
#workflow-rm .rm-benefit,
#workflow-ho-bi .ho-bi-benefit,
#workflow-yoon .yoon-benefit,
#workflow-kookie .kookie-benefit,
#workflow-woo-t .woo-t-benefit,
#workflow-van .van-benefit,
#workflow-mochi .mochi-benefit { margin-bottom: 16px; }

/* Pallini identitari: colori dei sette OT7, forma e posizione comuni a MOCHI. */
#workflow-rm .identity-dot, [data-workflow="rm"] .identity-dot { background: #607b61; }
#workflow-woo-t .identity-dot, [data-workflow="woo-t"] .identity-dot { background: #fe8f9c; }
#workflow-yoon .identity-dot, [data-workflow="yoon"] .identity-dot { background: #363b4b; }
#workflow-ho-bi .identity-dot, [data-workflow="ho-bi"] .identity-dot { background: #fe7126; }
#workflow-van .identity-dot, [data-workflow="van"] .identity-dot { background: #af89d7; }
#workflow-kookie .identity-dot, [data-workflow="kookie"] .identity-dot { background: #84b8f1; }

/* Equilibrio ottico: anatomie e asset invariati; scale non interferisce con l'hover. */
.workflow-card[data-workflow="yoon"] .mascot,
#workflow-yoon .detail-image img,
#workflow-yoon .workflow-scene img { scale: 0.94; }
#workflow-woo-t .detail-image img,
#workflow-yoon .detail-image img { transform-origin: center 85%; }
#workflow-woo-t .workflow-scene img,
#workflow-yoon .workflow-scene img { transform-origin: center 95%; }
