@import "//fonts.googleapis.com/css?family=Lato:300,400,700";
@import "//fonts.googleapis.com/css2?family=Fjalla+One&display=swap";

html { height: 100%; }
*, *:after, *:before { box-sizing: border-box; padding: 0; margin: 0; }
body { font-family: Lato, Calibri, Arial, sans-serif; font-weight: 300; font-size: 15px; color: #333; background: #efeeee; overflow-x: hidden; }
a { color: #555; text-decoration: none; }

/* skip link + visible keyboard focus */
.skip-link { position: absolute; left: -9999px; top: 0; background: #1b4f72; color: #fff; padding: .6rem 1.2rem; z-index: 3000; border-radius: 0 0 .6rem 0; font-weight: 400; }
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid #1b4f72; outline-offset: 2px; }

.container { width: 100%; min-height: 100vh; position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 2vh; }
.container > header { width: 90%; display: grid; grid-template-columns: max-content 1fr max-content; grid-template-rows: auto auto; gap: 0 .5vw; margin: 3vh auto 0; text-align: left; align-items: center; }
#logo { grid-row: span 2; }
#logo > img, #logo > svg { width: 60px; display: block; }
#titolo { grid-column: 2; grid-row: 1; align-self: end; width: max-content; max-width: 100%; }
.container > header h1 { font-family: "Fjalla One", sans-serif; font-size: 1.6rem; line-height: 1.6rem; margin: 0 auto; font-weight: 400; color: #3a6a89; }
.container > header span.sub { grid-column: 2; grid-row: 2; display: block; font-family: Lato, Calibri, Arial, sans-serif; font-size: 1rem; font-weight: 300; color: #333; align-self: start; }
.main { flex-grow: 1; }
.contenuto { width: 90%; margin: 0 auto; position: relative; font-weight: 400; text-align: left; color: #333; }

/* small cms nav, same visual language — sits right of the logo in the header */
.cms-nav { grid-row: span 2; grid-column: 3; align-self: center; justify-self: end; display: flex; gap: 1.2rem; font-size: .85rem; text-transform: uppercase; letter-spacing: 2px; }
.cms-nav a { color: #3a6a89; font-weight: 400; }
.cms-nav a:hover { color: #333; }
.cms-nav a.active { color: #333; font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
/* active collection: same underline language, orange accent instead of dark */
.backlink.coll-active { color: #333; text-decoration: underline; text-decoration-color: #ffb74d; text-decoration-thickness: 1px; text-underline-offset: 5px; }
@media (max-width: 700px) {
  .container > header { grid-template-columns: max-content 1fr max-content; }
  .cms-nav { grid-row: auto; grid-column: 1 / -1; justify-self: stretch; margin-top: 1vh; flex-wrap: wrap; }
}
/* burger menu (small screens) */
#burger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; grid-column: 3; grid-row: span 2; align-self: center; justify-self: end; }
#burger span { display: block; width: 26px; height: 2px; background: #3a6a89; margin: 6px 0; transition: .3s; }
#burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#burger.open span:nth-child(2) { opacity: 0; }
#burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 700px) {
  #burger { display: block; }
  .cms-nav { display: none; flex-direction: column; gap: 0; background: #fff; border-radius: 1rem; padding: .5rem 1.2rem; box-shadow: 0 6px 14px rgba(0,0,0,.08); }
  .cms-nav.open { display: flex; }
  .cms-nav a { padding: .6rem 0; border-bottom: 1px solid #efeeee; }
  .cms-nav a:last-child { border-bottom: none; }
}

/* ---- circular grid (mimics arto.site og-grid) ---- */
.og-grid { display: grid; grid-template-columns: repeat(auto-fit, 250px); gap: 1rem; justify-content: center; list-style: none; margin: 0 auto; text-align: center; width: 100%; padding: 0; }
.og-grid li { display: block; height: 250px; border-radius: 50%; }
.og-grid li > a { border: none; outline: none; display: block; position: relative; transition: .5s; border-radius: 50%; }
.og-grid li > a img { border: none; outline: none; display: block; position: relative; transition: .5s; border-radius: 50%; width: 250px; height: 250px; object-fit: cover; }
.og-grid li > a:hover { box-shadow: -10px -10px 16px rgba(255,255,255,.87), 6px 6px 16px rgba(217,210,200,.8), -2px -2px 6px rgba(217,210,200,.85); transform: scale3d(1.01,1.01,1); }
.og-grid li > a:hover .overlay { opacity: .8; }
.og-grid li > a:hover .dida { opacity: 1; }
.og-grid li > a:hover .dida-text { color: red; transform: translateY(0); }
.og-grid li > a:hover img { filter: grayscale(50%) invert(100%) brightness(150%); }
/* keyboard: same reveal on focus */
.og-grid li > a:focus .overlay { opacity: .8; }
.og-grid li > a:focus .dida { opacity: 1; }
.og-grid li > a:focus .dida-text { color: red; transform: translateY(0); }
.og-grid li > a:focus img { filter: grayscale(50%) invert(100%) brightness(150%); }
/* touch: titles always visible under the circles */
.og-grid .m-caption { display: none; }
@media (hover: none) {
  .og-grid li { height: auto; }
  .og-grid .m-caption { display: block; font-size: .8rem; font-weight: 400; color: #3a6a89; text-transform: uppercase; letter-spacing: 1px; margin-top: .5rem; }
}
.overlay { position: absolute; top: 0; left: 0; width: 250px; height: 250px; background: #fff; opacity: 0; transition: .5s; border-radius: 50%; }
.dida { display: flex; position: absolute; bottom: 0; padding: 20px; justify-content: center; align-items: center; width: 250px; height: 250px; opacity: 0; transition: 1s; }
.dida-text { width: 100%; color: #000; font-weight: 500; transform: translateY(100px); transition: color 1s, transform .5s; text-transform: uppercase; }
/* featured sticker on homepage circles */
.og-grid .stick { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; background: #ffb74d; color: #333; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; padding: .28rem .9rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.18); white-space: nowrap; }

/* detail / text pages */
.work-detail { width: 90%; margin: 0 auto; }
.work-detail h2 { font-family: "Fjalla One", sans-serif; font-weight: 400; color: #3a6a89; font-size: 1.5rem; margin: 2vh 0 1vh; text-transform: uppercase; }
.work-detail h2 .work-sub, .hero-text h2 .work-sub { font-size: 1.5rem; }
.work-detail h2.work-title, .hero-text h2.work-title { font-size: 1.5rem; }
.work-detail img.full { max-width: 100%; border-radius: 4px; }
.work-meta { color: #666; font-size: .9rem; margin: .5rem 0 1rem; }
.work-desc { font-weight: 400; font-size: 16px; line-height: 22px; color: #666; }
.work-desc > p { margin: 0; }
.work-desc a { color: #3a6a89; text-decoration: underline; text-underline-offset: 2px; }
.work-desc ul, .work-desc ol { margin: .6rem 0 .6rem 1.2rem; }
.work-desc blockquote { border-left: 2px solid #ccc; margin: .8rem 0; padding: .2rem 0 .2rem .8rem; color: #555; font-style: italic; }
.about-photo { display: block; max-width: min(100%, 420px); height: auto; border-radius: 4px; margin: 1rem 0 1.5rem; }
/* about page: photo left, bio text right */
.about-hero { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 1rem; }
.about-hero .about-photo { margin: 0; max-width: 100%; }
.about-hero h2:first-child { margin-top: 0; }
@media (max-width: 768px) { .about-hero { grid-template-columns: 1fr; } }
.btn-arto { display: inline-block; font-weight: 600; font-size: .95rem; color: #3a6a89; text-transform: uppercase; letter-spacing: 2px; padding: .7rem 1.4rem; border: none; border-radius: 999px; background: rgba(58,106,137,.1); margin: 20px 0 0; cursor: pointer; }
.btn-arto::before { content: '→'; display: inline-block; margin-right: 10px; }
.btn-arto:hover { color: #333; background: rgba(58,106,137,.18); text-decoration: none; }
.backlink { font-size: .85rem; text-transform: uppercase; letter-spacing: 2px; color: #3a6a89; }

/* editorial work layout: title image left, text right */
.work-hero { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 2.5rem; width: 90%; margin: 2vh auto 0; align-items: start; }
.work-hero.no-imgs { grid-template-columns: 1fr; }
.hero-imgs img { display: block; width: 100%; height: auto; border-radius: 4px; margin-bottom: 1rem; transition: box-shadow .3s ease; }
.hero-imgs img:hover { cursor: zoom-in; box-shadow: 0 6px 14px rgba(0,0,0,.2), 0 4px 15px rgba(0,0,0,.15); }
.hero-text h2 { font-family: "Fjalla One", sans-serif; font-weight: 400; color: #3a6a89; font-size: 1.5rem; margin: 0 0 1vh; text-transform: uppercase; }
@media (max-width: 768px) { .work-hero { grid-template-columns: 1fr; } }
.expo-item { border-bottom: 1px solid #d8d5d0; padding: 1rem 0; }
.expo-item h3 { font-family: "Fjalla One", sans-serif; font-weight: 400; color: #3a6a89; }
.form-arto input, .form-arto textarea { width: 100%; border: 1px solid #ccc; background: #fff; padding: .6rem; font-family: inherit; font-size: 1rem; margin-top: .3rem; }
.form-arto button { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; padding: 10px 20px; border: 3px solid #333; background: transparent; cursor: pointer; }
.form-arto button:hover { border-color: #999; color: #999; }
.form-error { color: #b3261e; font-size: .85rem; margin-top: .3rem; font-weight: 400; }

footer { position: fixed; bottom: 14px; right: 5%; margin: 0; width: auto; max-width: 90%; text-align: right; font-weight: 400; font-size: .85rem; background: rgba(239,238,238,.88); padding: .3rem .8rem; border-radius: 2rem; z-index: 500; }
.main { padding-bottom: 4rem; }

/* ---- horizontal 3D gallery (mimics arto.site work pages) ---- */
#scrollhelp { position: absolute; top: 2rem; left: 1rem; color: #666; font-size: .85rem; letter-spacing: 1px; }
#contenitore-immagini { position: relative; }
.scrollsection { display: flex; overflow-x: auto; padding: 2rem 1rem 0.5rem; gap: 0; cursor: grab;
  scrollbar-width: none; }
.scrollsection::-webkit-scrollbar { display: none; }
.scrollsection.dragging { cursor: grabbing; }
.scrollsection.dragging .image { pointer-events: none !important; }
/* minimal custom scrollbar: short pill, fades in on hover */
.arto-scroll { position: relative; height: 2px; margin: 0 1rem 1rem; background: rgba(58,106,137,.32); border-radius: 2px; opacity: 0; transition: opacity .3s ease; }
.scrollsection:hover + .arto-scroll, .arto-scroll.visible { opacity: 1; }
.arto-thumb { position: absolute; top: 0; left: 0; width: 56px; height: 2px; background: rgba(58,106,137,.75); border-radius: 2px; cursor: pointer; }
.arto-thumb:hover { background: rgba(58,106,137,.95); }
.scrollsection > .item { display: block; position: relative; margin: 0 -6vh 0 2vh; perspective: 100vh; flex: 0 0 auto; height: min(58vh, 380px); width: min(58vh, 380px); z-index: 1; }
.scrollsection > .item:hover { z-index: 1000; }
.scrollsection > .item > .image { height: 100%; width: 100%; object-fit: cover; position: absolute; top: 0; left: 0; filter: grayscale(1); opacity: .2; pointer-events: none; transform: translateX(0) translateY(10vh) rotateY(45deg) rotateZ(-10deg) rotateX(60deg) scale(.3); transition: filter .3s ease, opacity 1s ease, transform 1s ease; }
.scrollsection > .item > .image.-active { opacity: .7; pointer-events: auto; transform: translateX(0) translateY(0) scale(.8); transition: filter .3s ease, opacity 1s ease, transform 1s ease; }
.scrollsection > .item > .image.-active:hover { transform: translateX(0) translateY(-2vh) rotateX(25deg) scale(.85); filter: grayscale(0); opacity: 1; cursor: pointer; box-shadow: 0 6px 14px rgba(0,0,0,.2), 0 4px 15px rgba(0,0,0,.15); transition: transform .5s ease; }

/* small screens: horizontal style becomes the simple grid */
@media (max-width: 768px) {
  #scrollhelp { display: none; }
  .scrollsection { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; width: 90%; margin: 0 auto; padding: 3rem 0 2.5rem; overflow: visible; cursor: default; }
  .scrollsection > .item { margin: 0; height: auto; width: auto; }
  .scrollsection > .item > .image { position: static; height: 260px; max-width: 100%; opacity: 1; pointer-events: auto; transform: none; filter: none; border-radius: 4px; transition: box-shadow .3s ease, transform .3s ease; }
  .scrollsection > .item > .image.-active { opacity: 1; transform: none; filter: none; }
  .scrollsection > .item > .image:hover { transform: translateX(0) translateY(-2vh) rotateX(25deg) scale(1.02); cursor: zoom-in; box-shadow: 0 6px 14px rgba(0,0,0,.2), 0 4px 15px rgba(0,0,0,.15); }
}

/* simple grid gallery (alternative style) */
.simplegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; width: 90%; margin: 0 auto; padding: 3rem 0 2.5rem; perspective: 100vh; }
.simplegrid img.image { display: block; width: 100%; height: 260px; object-fit: cover; border-radius: 4px; transition: box-shadow .3s ease, transform .5s ease; }
.simplegrid img.image:hover { transform: translateX(0) translateY(-2vh) rotateX(25deg) scale(1.02); cursor: zoom-in; box-shadow: 0 6px 14px rgba(0,0,0,.2), 0 4px 15px rgba(0,0,0,.15); }

/* related works: small left-aligned square thumbs (not the landing circles) */
.related-row { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: flex-start; }
.related-row .rel-thumb { display: block; width: 110px; }
.related-row .rel-thumb img { display: block; width: 110px; height: 110px; object-fit: cover; border-radius: 50%; transition: transform .3s ease, box-shadow .3s ease; }
.related-row .rel-thumb:hover img { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(0,0,0,.2), 0 4px 15px rgba(0,0,0,.15); }
.related-row .rel-title { font-size: .8rem; margin-top: .35rem; color: #555; }

/* touch devices: no hover lift (tap opens directly, no stuck hover state) */
@media (hover: none) {
  .scrollsection > .item > .image.-active:hover,
  .scrollsection > .item > .image:hover,
  .simplegrid img.image:hover,
  .hero-imgs img:hover { transform: none; box-shadow: none; }
}

/* reduced motion: stillness over animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- lightbox (white-framed, like arto.site expanded view) ---- */
#lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(239,238,238,.96); display: none; align-items: center; justify-content: center; flex-direction: column; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 82vw; max-height: 76vh; border: 15px solid #fff; box-shadow: 0 8px 17px rgba(0,0,0,.2), 0 6px 20px rgba(0,0,0,.15); }
#lightbox .lb-cap { margin-top: 1rem; color: #666; font-size: .9rem; letter-spacing: 1px; }
#lightbox .lb-close { position: absolute; top: 20px; right: 26px; width: 40px; height: 40px; cursor: pointer; background: none; border: none; padding: 0; }
#lightbox .lb-close::before, #lightbox .lb-close::after { content: ''; position: absolute; width: 100%; top: 50%; height: 1px; background: #888; transform: rotate(45deg); }
#lightbox .lb-close::after { transform: rotate(-45deg); }
#lightbox .lb-close:hover::before, #lightbox .lb-close:hover::after { background: #333; }
#lightbox .lb-prev, #lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.4rem; color: #3a6a89; cursor: pointer; padding: 0 1rem; user-select: none; background: none; border: none; font-family: inherit; }
#lightbox .lb-prev { left: 8px; } #lightbox .lb-next { right: 8px; }
#lightbox .lb-prev:hover, #lightbox .lb-next:hover { color: #333; }

/* ---- responsive video (mimics arto.site .video-youtube) ---- */
.video-youtube { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16 / 9; overflow: hidden; margin-top: 1.5rem; }
.video-youtube > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.social { display: inline; list-style: none; padding: 0 20px; }
.social-icon { display: inline; padding-right: 8px; }
.social-icon a { color: #555; display: inline-block; min-width: 24px; min-height: 24px; text-align: center; }

/* logo animation (from arto.site) */
#logo > svg:hover #braccio, header:hover #braccio { transform-box: fill-box; transform-origin: right bottom; animation: move 2s linear infinite; transform: rotate(20deg); }
header:hover #gambas { transform-box: fill-box; transform-origin: right top; animation: gambas 2s linear infinite; transform: rotate(20deg); }
header:hover #gambad { transform-box: fill-box; transform-origin: left top; animation: gambad 2s linear infinite; transform: rotate(20deg); }
header #titolo > h1 { transition: .5s; }
header #titolo > h1:hover { transform: translateY(-6px); animation-name: sospeso; animation-duration: 1.5s; animation-delay: .3s; animation-timing-function: linear; animation-iteration-count: infinite; animation-direction: alternate; }
@keyframes sospeso { 50% { transform: translateY(-3px); } 100% { transform: translateY(-6px); } }
@keyframes move { 0% { transform: rotate(20deg); } 18% { transform: rotate(45deg); } 30% { transform: rotate(20deg); } 41% { transform: rotate(45deg); } 46% { transform: rotate(20deg); } 58% { transform: rotate(60deg); } 70% { transform: rotate(20deg); } 85% { transform: rotate(65deg); } 93% { transform: rotate(25deg); } 95% { transform: rotate(45deg); } 100% { transform: rotate(20deg); } }
@keyframes gambas { 0% { transform: rotate(-10deg); } 50% { transform: rotate(-12deg); } 100% { transform: rotate(-10deg); } }
@keyframes gambad { 0% { transform: rotate(15deg); } 25% { transform: rotate(0); } 50% { transform: rotate(15deg); } 75% { transform: rotate(0); } 100% { transform: rotate(15deg); } }

