* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  color: #000000;
  position: relative;
}

/*scorrimento*/
html {
  scroll-behavior: smooth;
}

/*header*/
header {
  width: 100%;
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: white;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.logo {
  font-weight: bold;
  font-size: 15px;
  color: #000000;
  z-index: 1001;
}

.logo a {
  text-decoration: none;
  color: #000000;
}

/*navigazione*/
.nav-desktop {
  display: flex;
  gap: 40px;
}

.nav-desktop a {
  text-decoration: none;
  color: #000000;
  font-size: 15px;
  transition: color 0.2s;
  position: relative;
}

/*sezione*/
.nav-desktop a.explore {
  color: #ff2b00;
  font-weight: bold;
}

.nav-desktop a:hover {
  color: #ff2b00;
}

/*main content*/
#main-content {
  padding: 40px 80px;
  position: relative;
  min-height: calc(100vh - 200px);
  width: 100%;
  z-index: 1;
  box-sizing: border-box;
}

/* contenitore pallini*/
#p5-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -100;
  pointer-events: none;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

/*pallini fissi*/
#fixed-dots {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 10000;
  pointer-events: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

/*singolo pallino non selezionato*/
.fixed-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  background-color: rgba(255, 43, 0, 0.3);
}

/*singolo pallino selezionato*/
.fixed-dot.active {
  background-color: #ff2b00;
  transform: scale(1.2);
  border-color: #ff2b00;
}

/*hover pallino selezionato*/
.fixed-dot:hover {
  background-color: rgba(255, 43, 0, 0.7);
  border-color: #ff2b00;
  transform: scale(1.3);
}

.screen-title {
  position: absolute;
  top: 20px;
  left: 97px;
  font-size: 72px;
  font-weight: bold;
  line-height: 1.1;
  z-index: 2;
  pointer-events: none;
  color: #000000;
  transition: opacity 0.3s ease-out;
  margin-bottom: 10px;
}

.screen-subtitle {
  font-size: 24px;
  line-height: 1.4;
  position: absolute;
  top: 100px;
  left: 100px;
  z-index: 2;
  pointer-events: none;
  color: #000000;
  transition: opacity 0.3s ease-out;
}

.main-container {
  display: flex;
  position: relative;
  margin-top: 120px;
  height: calc(100vh - 320px);
  min-height: 600px;
}

/*testo*/
.text-scroll-container {
  flex: 1;
  position: relative;
  width: 600px;
  height: 86%;
  margin-right: 40px;
  margin-top: 10px;
  background-color: transparent;
  margin-bottom: 80px;
}

.text-content {
  width: 95%;
  height: 88%;
  overflow-y: auto;
  padding: 20px;
  padding-top: 5px;
  padding-bottom: 100px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/*scrollbar non visibile*/
.text-content::-webkit-scrollbar {
  display: none;
}

/*testo*/
.text-section {
  margin-bottom: 60px;
  opacity: 1;
}

.section-title {
  font-size: 32px;
  color: #ff2b00;
  margin: 50px 0 20px;
  font-weight: bold;
}

/*titolo*/
.section-title:first-child {
  margin-top: 0;
}

.section-text {
  margin-bottom: 20px;
  color: #333333;
  font-size: 16px;
  line-height: 1.6;
}

.bold-text {
  font-weight: bold;
  color: #000000;
}

.impact-list {
  margin: 25px 0;
  padding-left: 20px;
  color: #333333;
}

.impact-list li {
  margin-bottom: 15px;
  line-height: 1.6;
  list-style-type: disc;
}

/*tabella*/
.impact-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 30px 0;
  font-size: 14px;
  border: 2px solid #ff2b00;
}

/*intestazioni tabella*/
.impact-table th {
  background-color: #ff2b00;
  color: white;
  text-align: center;
  padding: 12px;
  font-weight: bold;
}

/*cella tabella*/
.impact-table td {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  text-align: center;
}

/*riga pari*/
.impact-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/*riga dispari*/
.impact-table tr:nth-child(odd) {
  background-color: white;
}

/*prima colonna*/
.impact-table td:first-child {
  font-weight: bold;
  text-align: left;
  padding-left: 20px;
}

/*note*/
.table-note {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  line-height: 1.4;
}

/*footer*/
.footer-space {
  height: 200px;
}

/*testo e animazioni*/
.text-scroll-hint {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: #000000;
  font-size: 40px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  z-index: 3;
  width: 40px;
  height: 40px;
  animation: bounce 2s infinite;
  pointer-events: auto;
  opacity: 1;
  transition: all 0.3s ease-out;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Helvetica", Arial, sans-serif;
  line-height: 1;
}

/*fraccia per salire*/
.text-scroll-hint.flipped {
  transform: translateX(-50%) rotate(180deg);
  animation: bounce-flipped 2s infinite;
}

.text-scroll-hint:hover {
  opacity: 0.8;
}

.text-scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

/*img*/
.image-container {
  position: relative;
  width: calc(50% - 120px);
  height: 75%;
  background-color: transparent;
  overflow: hidden;
  margin-top: 10px;
}

.methodology-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateX(50px) scale(0.95);
  transition:
    opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.methodology-image.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/*learn more bottone*/
.learn-more-btn {
  background-color: transparent;
  color: #000000;
  border: 2px solid #ff2b00;
  border-radius: 5px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: absolute;
  bottom: 150px;
  right: 80px;
  z-index: 4;
}

.learn-more-btn:hover {
  background-color: #ff2b00;
  color: white;
}

/*footer*/
#html-footer {
  width: 100%;
  border-top: 2px solid #ff2b00;
  padding: 80px max(5%, 20px) 80px max(5%, 20px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 80px;
  position: relative;
  color: #000000;
  font-size: 14px;
  background: #fff;
  line-height: 1.5;
  min-height: 320px;
  box-sizing: border-box;
  z-index: 2;
  transition: all 0.3s ease;
  max-width: 1800px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

/*col1*/
.studio-header {
  margin-bottom: 20px;
}

.studio-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
}

.academic-year {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
  font-weight: 400;
}

.degree-link {
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  padding-bottom: 1px;
  transition: all 0.2s;
  display: inline-block;
  margin-bottom: 20px;
}

.degree-link:hover {
  color: #ff2b00;
}

/*polimi logo*/
.polimi-logo-container {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.polimi-logo {
  max-height: 105px;
  max-width: 200px;
  width: 100%;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.2s;
  object-fit: contain;
}

.polimi-logo:hover {
  opacity: 1;
}

/*autori*/
.project-team {
  margin-top: 15px;
}

.team-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-name {
  font-size: 14px;
  color: #444;
}

.license-section {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.license-content {
  width: 100%;
  max-width: 350px;
}

.license-header {
  font-size: 13px;
  color: #222;
  margin-bottom: 12px;
  line-height: 1.4;
}

.copyright-symbol {
  font-size: 14px;
  margin-right: 4px;
}

.license-badge {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  margin: 0 4px;
  text-decoration: none;
  color: #333;
  display: inline-block;
}

.license-badge:hover {
  background-color: #eee;
  border-color: #ccc;
}

.license-text {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 20px;
  margin-top: 30px;
}

.license-link {
  color: #000000;
  text-decoration: underline;
  font-size: 13px;
}

.contact-email {
  color: #ff2b00;
  font-weight: 500;
  font-size: 13px;
  word-break: break-all;
}

.license-spacer {
  height: 20px;
}

/*col3*/
.faculty-section {
  margin-bottom: 20px;
}

.faculty-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.faculty-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.faculty-name {
  font-size: 14px;
  color: #444;
}

.assistants-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.assistants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 25px;
}

.assistant-name {
  font-size: 14px;
  color: #444;
}

/*DensityDesign e NECST*/
.logos-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 0px;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.design-logo {
  max-height: 95px;
  max-width: 130px;
  width: 100%;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.2s;
  margin-bottom: 5px;
}

.designnecst-logo {
  max-height: 95px;
  max-width: 130px;
  width: 100%;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.2s;
  margin-bottom: 5px;
  display: block;
  object-fit: contain;
}

.design-logo:hover,
.designnecst-logo:hover {
  opacity: 1;
}

/*animazioni*/
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes bounce-flipped {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(180deg);
  }
  40% {
    transform: translateX(-50%) translateY(10px) rotate(180deg);
  }
  60% {
    transform: translateX(-50%) translateY(5px) rotate(180deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title-transition {
  animation: fadeInUp 0.4s ease-out;
}

@media (max-width: 1439px) and (min-width: 1280px) {
  #main-content {
    padding: 35px 60px;
  }

  .main-container {
    margin-top: 140px;
    height: calc(100vh - 300px);
    min-height: 550px;
  }

  .text-scroll-container {
    width: 550px;
    height: 84%;
    margin-bottom: 75px;
  }

  .image-container {
    width: calc(50% - 100px);
    height: 78%;
  }

  .text-scroll-hint {
    bottom: -45px;
    font-size: 36px;
  }

  .learn-more-btn {
    bottom: 85px;
    right: 35px;
    padding: 11px 28px;
    font-size: 15px;
  }

  .screen-title {
    font-size: 65px;
    top: 18px;
    left: 60px;
  }

  .screen-subtitle {
    font-size: 22px;
    top: 95px;
    left: 60px;
  }

  .section-title {
    font-size: 30px;
  }

  .section-text {
    font-size: 15.5px;
  }
}

@media (max-width: 1279px) and (min-width: 1024px) {
  #main-content {
    padding: 30px 50px;
  }

  .main-container {
    margin-top: 130px;
    height: calc(100vh - 280px);
    min-height: 500px;
  }

  .text-scroll-container {
    width: 500px;
    height: 70%;
    margin-right: 30px;
    margin-bottom: 70px;
  }

  .image-container {
    width: calc(50% - 80px);
    height: 75%;
  }

  .text-scroll-hint {
    bottom: -40px;
    font-size: 32px;
  }

  .learn-more-btn {
    bottom: 75px;
    right: 30px;
    padding: 10px 25px;
    font-size: 14px;
  }

  .screen-title {
    font-size: 58px;
    top: 15px;
    left: 50px;
  }

  .screen-subtitle {
    font-size: 20px;
    top: 90px;
    left: 50px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-text {
    font-size: 15px;
  }
}

@media (max-width: 1023px) and (min-width: 900px) {
  #main-content {
    padding: 25px 40px;
  }

  .main-container {
    margin-top: 120px;
    height: calc(100vh - 260px);
    min-height: 480px;
  }

  .text-scroll-container {
    width: 450px;
    height: 75%;
    margin-right: 25px;
    margin-bottom: 65px;
  }

  .image-container {
    width: calc(50% - 70px);
    height: 70%;
  }

  .text-scroll-hint {
    bottom: -35px;
    font-size: 28px;
  }

  .learn-more-btn {
    bottom: 70px;
    right: 25px;
    padding: 10px 22px;
    font-size: 13px;
  }

  .screen-title {
    font-size: 50px;
    top: 12px;
    left: 40px;
  }

  .screen-subtitle {
    font-size: 18px;
    top: 85px;
    left: 40px;
  }

  .section-title {
    font-size: 26px;
  }

  .section-text {
    font-size: 14.5px;
  }
}