/* Spaziotessile Julius — homepage a tutta larghezza, proporzioni rispettate */

:root {
  --st-header-h: clamp(3.5rem, 6vw, 5.5rem);
  --st-layout-max: 3604px;
  /* Fascia contenuto hero-julius-source.png (3604×1240): J → margine destro statua */
  --st-hero-band-inset-left: 12.514%;
  --st-hero-band-inset-right: 12.153%;
  --st-myth-cols: 9;
  --st-bg: #f7f5f2;
  --st-text: #1a1a1a;
  --st-muted: #666;
  --st-accent: #8b1e2f;
  --st-font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --st-gold-deep: #7a6648;
  --st-gold-mid: #ddd0b4;
  --st-gold-light: #f0e9dc;
  --st-gold-highlight: #faf8f4;
  --st-gold-bar: #fff;
  --st-header-ink: #4a433c;
  --st-nav-link: #6b6358;
  --st-scene-ratio: 16 / 9;
  --st-scene-ratio-mobile: 4 / 5;
  --st-edge-pad: clamp(0.75rem, 2.5vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--st-text);
  background: var(--st-bg);
  line-height: 1.5;
}

body.home .st-main {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

a {
  color: inherit;
}

/* Header — fondo bianco */
.st-site-header--lux {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  color: var(--st-header-ink);
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.st-site-header--lux::before,
.st-site-header--lux::after {
  display: none;
}

.st-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.st-header-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Stessa larghezza del banner hero (JULIUS → statua) */
.st-layout-width {
  width: min(100%, var(--st-layout-max));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.st-header-row--top {
  display: block;
  min-height: var(--st-header-h);
  padding: 0.32rem 0 0.22rem;
}

/* Stesso contenitore del banner hero: allineamento pixel-perfect con J e statua */
.st-header-hero-align {
  width: min(100%, var(--st-layout-max));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.st-header-bar {
  border: none;
  background: #fff;
  box-shadow: none;
}

.st-header-bar--myth {
  width: calc(
    100% - var(--st-hero-band-inset-left) - var(--st-hero-band-inset-right)
  );
  margin-left: var(--st-hero-band-inset-left);
  margin-right: var(--st-hero-band-inset-right);
  padding: 0.5rem clamp(0.25rem, 0.5vw, 0.5rem) 0.35rem;
  background: #fff;
}

/* Menu — link testuali + icone Preferiti / Carrello */
.st-myth-nav {
  width: 100%;
}

.st-myth-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--st-myth-cols), minmax(0, 1fr));
  gap: clamp(0.2rem, 0.45vw, 0.5rem);
  align-items: center;
  width: 100%;
}

.st-myth-nav-item {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.st-myth-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  color: var(--st-nav-link);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.st-myth-tile:hover {
  color: var(--st-header-ink);
  opacity: 0.88;
}

/* Voci solo testo */
.st-myth-tile--link {
  min-height: 2.75rem;
  padding: 0.35rem 0.15rem;
}

.st-myth-tile--link .st-myth-tile-label {
  margin-top: 0;
  font-family: var(--st-font-display);
  font-size: clamp(0.72rem, 0.95vw, 0.92rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: nowrap;
}

/* Preferiti e Carrello — figure su bianco */
.st-myth-tile--icon .st-myth-tile-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.st-myth-tile--icon .st-myth-tile-img {
  display: block;
  width: auto;
  height: auto;
  max-width: clamp(5.5rem, 7.5vw, 8rem);
  max-height: clamp(6.5rem, 9vw, 9.5rem);
  margin: 0 auto;
  object-fit: contain;
  object-position: center bottom;
}

.st-myth-tile--icon .st-myth-tile-label {
  margin-top: clamp(0.15rem, 0.3vw, 0.28rem);
  font-family: var(--st-font-display);
  font-size: clamp(0.6rem, 0.78vw, 0.74rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--st-nav-link);
}

.st-myth-tile-figure {
  display: none;
}

.st-myth-tile--icon .st-myth-tile-figure {
  display: flex;
}

.st-myth-tile-label {
  display: block;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-myth-tile-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  font-size: 0.65rem;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  background: var(--st-accent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  min-width: 1.1rem;
  line-height: 1.1rem;
  text-align: center;
  padding: 0 0.28rem;
  z-index: 2;
}

/* Hero — banner nativo, mai upscale oltre la larghezza del file sorgente */
.st-hero {
  width: 100%;
  margin: 0;
  padding: clamp(0.5rem, 2vh, 1.5rem) 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-hero-frame {
  line-height: 0;
}

.st-hero-mobile {
  display: none;
}

.st-hero-banner {
  display: block;
  width: 100%;
  line-height: 0;
  background: #fff;
}

.st-hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* Capitoli — edge to edge */
.st-chapters {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 4rem;
}

.st-chapter {
  width: 100%;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  scroll-margin-top: calc(var(--st-header-h) + 0.5rem);
}

.st-chapter-scene {
  position: relative;
  width: 100%;
  aspect-ratio: var(--st-scene-ratio);
  background: #e8e4de;
  overflow: hidden;
}

.st-chapter-scene-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2.2s ease-in-out;
  pointer-events: none;
}

.st-chapter-scene-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.st-chapter-scene-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  animation: st-scene-kenburns 22s ease-in-out infinite alternate;
}

.st-chapter-scene-slide--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eceae6 0%, #d8d4cc 100%);
}

.st-chapter-scene-slide--placeholder img {
  animation: none;
}

.st-chapter-scene-placeholder {
  text-align: center;
  padding: 2rem var(--st-edge-pad);
  max-width: 28rem;
}

.st-chapter-scene-placeholder-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.st-chapter-scene-placeholder-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.st-chapter-scene-placeholder-path {
  display: block;
  font-size: 0.7rem;
  word-break: break-all;
  opacity: 0.75;
}

@keyframes st-scene-kenburns {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.07) translate(-1.2%, -0.6%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-chapter-scene-slide {
    transition: none;
  }

  .st-chapter-scene-slide img {
    animation: none;
  }
}

.st-chapter-narration {
  width: 100%;
  background: #eceae6;
  padding: 0.85rem var(--st-edge-pad);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
}

.st-chapter-products-row {
  width: 100%;
  padding: 0.75rem var(--st-edge-pad) 0;
}

.st-product-carousel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.st-carousel-btn {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--st-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
}

.st-carousel-btn:hover {
  border-color: var(--st-text);
}

.st-chapter-products {
  display: flex;
  gap: clamp(0.5rem, 1.2vw, 0.85rem);
  overflow-x: auto;
  flex: 1;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.st-product-card {
  flex: 0 0 clamp(88px, 14vw, 140px);
  text-decoration: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
  color: var(--st-text);
}

.st-product-card--placeholder .st-product-card-media {
  border: 1px dashed #bbb;
  background: #f3f1ee;
}

.st-product-card-placeholder-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--st-muted);
}

.st-product-card-price {
  font-size: 0.7rem;
  color: var(--st-muted);
}

.st-product-card-price .amount {
  font-weight: 600;
  color: var(--st-text);
}

.st-product-card-badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--st-accent);
}

.st-product-card-media {
  aspect-ratio: 1;
  width: 100%;
  background: #ddd;
  overflow: hidden;
}

.st-product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.muted {
  color: var(--st-muted);
}

.st-scroll-hint {
  text-align: center;
  font-size: 2rem;
  color: var(--st-muted);
  margin-bottom: 2rem;
}

.st-site-footer {
  width: 100%;
  padding: 2rem var(--st-edge-pad) 1.5rem;
  border-top: 1px solid #ddd4c4;
  background: linear-gradient(180deg, #faf8f4 0%, #f3efe6 100%);
}

.st-footer-inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.st-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.st-footer-brand {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.st-footer-tagline {
  margin: 0;
  font-size: 0.85rem;
}

.st-footer-heading {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.st-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-footer-menu a {
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.6;
}

.st-footer-copy {
  margin: 0;
  font-size: 0.75rem;
  text-align: center;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Pagine istituzionali */
.st-content-wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--st-edge-pad) 4rem;
}

.st-page-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd4c4;
}

.st-page-title {
  margin: 0;
  font-family: var(--st-font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--st-gold-deep);
}

.st-content-wrap p,
.st-content-wrap li {
  font-size: 1.02rem;
  line-height: 1.65;
}

.st-content-wrap a {
  color: var(--st-gold-deep);
}

@media (max-width: 1100px) {
  :root {
    --st-myth-cols: 5;
  }
}

/* Mobile — menu 4+4 (senza Outlet), hero logo sopra / statua sotto */
@media (max-width: 768px) {
  :root {
    --st-header-h: auto;
    --st-myth-cols: 4;
    --st-hero-band-inset-left: 0;
    --st-hero-band-inset-right: 0;
  }

  .st-header-row--top {
    min-height: 0;
    padding: 0.28rem 0 0.2rem;
  }

  .st-header-hero-align {
    width: 100%;
    padding: 0 var(--st-edge-pad);
  }

  .st-header-bar--myth {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0.32rem 0.4rem 0.24rem;
    border-radius: 3px;
  }

  .st-myth-nav-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem 0.2rem;
    align-items: center;
  }

  .st-myth-nav-item--outlet {
    display: none;
  }

  .st-myth-tile--link {
    min-height: 2.25rem;
    padding: 0.3rem 0.1rem;
  }

  .st-myth-tile--link .st-myth-tile-label {
    font-size: clamp(0.62rem, 2.9vw, 0.78rem);
    letter-spacing: 0.12em;
  }

  .st-myth-tile--icon .st-myth-tile-img {
    max-width: 4.75rem;
    max-height: 5.5rem;
  }

  .st-myth-tile--icon .st-myth-tile-label {
    font-size: clamp(0.53rem, 3vw, 0.62rem);
  }

  .st-myth-tile-badge {
    top: 0.1rem;
    right: 0.08rem;
    font-size: 0.55rem;
    min-width: 0.95rem;
    line-height: 0.95rem;
  }

  .st-hero {
    padding: 0.4rem var(--st-edge-pad) 0.75rem;
  }

  .st-hero-frame {
    line-height: normal;
  }

  .st-hero-desktop {
    display: none;
  }

  .st-hero-frame {
    width: 100%;
    padding: 0;
  }

  .st-hero-mobile {
    display: block;
    width: 100%;
    margin: 0 auto;
  }

  .st-hero-mobile-banner,
  .st-hero-mobile-part {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    line-height: 0;
    overflow: hidden;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(90, 75, 50, 0.08);
  }

  .st-hero-mobile:has(.st-hero-mobile-part--statue) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
  }

  .st-hero-mobile-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
  }
}

@media (max-width: 768px) {
  .st-chapter-scene {
    aspect-ratio: var(--st-scene-ratio-mobile);
  }
}
