/* ─────────────────────────────
   PROJECT PAGE
───────────────────────────── */

.project-page {
  min-height: auto;
  overflow: visible;
  padding-top: 65px; /* clears fixed header (.frame-3) */
}

/* ── Topbar (fixed header, same box model as the home .frame-3) ── */
.project-topbar a {
  color: var(--Black, black);
  font-size: 26px;
  font-family: var(--font-display);
  font-weight: 400;
  transition: opacity 0.15s;
}

.project-topbar a:hover {
  opacity: 0.7;
}

/* ── Project title block ── */
.project-title-block {
  width: 100%;
  box-sizing: border-box;
  padding: 20px 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.project-title {
  margin: 0;
  color: var(--Black, black);
  font-size: 128px;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 128px;
  word-wrap: break-word;
}

.title-break-mobile {
  display: none;
}

/* ── Crediti banner (accordion) ── */
.crediti-section {
  width: 100%;
  box-sizing: border-box;
  padding: 20px 60px;
  background: var(--White, white);
}

.crediti-card {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, black 100%),
    var(--crediti-bg);
  background-size: cover;
  background-position: center;
  color: white;
}

.crediti-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 32px 60px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

.crediti-toggle svg {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.crediti-toggle span {
  color: white;
  font-size: 36px;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 36px;
  word-wrap: break-word;
}

.crediti-list {
  margin: 0;
  padding: 0 60px 32px 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: white;
  font-size: 28px;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.3;
}

.crediti-list strong {
  font-weight: 700;
}

.crediti-list[hidden] {
  display: none;
}

/* ── Info bar ── */
.project-info-bar {
  width: 100%;
  box-sizing: border-box;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.info-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 5px;
}

.info-label {
  color: var(--Grey, #949494);
  font-size: 20px;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 24px;
}

.info-value {
  color: var(--Black, black);
  font-size: 32px;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 32px;
}

/* ── Content sections ── */
.project-section {
  width: 100%;
  box-sizing: border-box;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 30px;
}

.section-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 80px;
}

.section-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Text column width inside a text+image row: set --copy-width per section
   to size the text box independently of the image next to it. */
.section-row .section-copy {
  --copy-width: 506px;
  flex: 0 1 var(--copy-width);
  width: min(var(--copy-width), 100%);
}

/*.section-sfida .section-copy { --copy-width: 376px; }
.section-processo .section-copy { --copy-width: 676px; }
.section-decisioni .section-copy { --copy-width: 676px; }*/

.section-title {
  margin: 0;
  color: var(--Black, black);
  font-size: 64px;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 64px;
}

.section-text {
  margin: 0;
  color: var(--Grey, #949494);
  font-size:20px;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 100%;
  text-align: left;
  word-wrap: break-word;
}

/* LA SFIDA — image right */
.section-sfida .section-row {
  align-items: center;
}

.sfida-image {
  --image-width: 533px;
  flex-shrink: 0;
  width: min(var(--image-width), 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* IL PROCESSO — 2-col thumbnail grid right */
.section-processo .section-row {
  align-items: flex-start;
}

.processo-grid {
  --image-width: 492px;
  flex-shrink: 0;
  width: min(var(--image-width), 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.processo-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* DECISIONI CHIAVE — stacked image column right */
.section-decisioni .section-row {
  align-items: flex-start;
}

.decisioni-images {
  --image-width: 463px;
  flex-shrink: 0;
  width: min(var(--image-width), 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.decisioni-images img {
  width: 100%;
  height: 345px;
  object-fit: cover;
}

/* IL RISULTATO gallery */
.risultato-gallery {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.risultato-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
}

.risultato-col img {
  width: 427px;
  height: 280px;
  object-fit: cover;
}

.risultato-main {
  width: 872px;
  height: 580px;
  object-fit: cover;
}

/* IL SEDICESIMO */
.sedicesimo-images {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 91px;
}

.sedicesimo-images img {
  object-fit: cover;
  flex-shrink: 0;
}

.sedicesimo-images img:nth-child(1) { width: 257px; height: 200px; }
.sedicesimo-images img:nth-child(2) { width: 549px; height: 210px; }
.sedicesimo-images img:nth-child(3) { width: 365px; height: 195px; }


/* ── Shared project components ── */

/* Hero — "Prova il sito" + device mockup */
.section-provalo {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.provalo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--Link, #1b79de);
  font-size: 64px;
  font-family: var(--font-body);
  font-weight: 400;
  transition: opacity 0.15s;
}

.provalo-link:hover {
  opacity: 0.7;
}

.provalo-arrow {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  transform: rotate(-45deg);
}

.provalo-devices {
  width: min(533px, 100%);
  height: auto;
  flex-shrink: 0;
}

/* Wider text column for rows next to a large image/media block */
.row-copy-676 .section-copy {
  --copy-width: 676px;
}

/* Row with top-aligned content instead of centered */
.section-row.align-start {
  align-items: flex-start;
}

/* ── FUORI CAMPO ── */

/* LA SFIDA — single image */
.fc-sfida-image {
  width: min(533px, 100%);
  aspect-ratio: 533 / 251;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

/* IL BRIEF — fanned photo strip */
.fc-brief-images {
  width: min(533px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  flex-shrink: 0;
}

.fc-brief-images img {
  flex: 1 1 0;
  min-width: 0;
  height: 140px;
  object-fit: cover;
  border-radius: 5px;
}

.fc-brief-images img:nth-child(3) {
  height: 184px;
  border-radius: 7px;
}

/* VISUAL IDENTITY / DESIGN SYSTEM — full-width images */
.fc-visual-image {
  width: 100%;
  aspect-ratio: 1320 / 430.57;
  object-fit: cover;
  border-radius: 10px;
}

.fc-design-image {
  width: 100%;
  aspect-ratio: 1320 / 331.04;
  object-fit: cover;
  border-radius: 10px;
}

/* ── WORLD METROS ── */

/* IL DATASET — single logo image */
.wm-dataset-image {
  width: min(578px, 100%);
  aspect-ratio: 578 / 206;
  object-fit: contain;
  flex-shrink: 0;
}

/* VISIONE D'INSIEME — stacked graphics of different heights */
.wm-insieme-images {
  width: min(578px, 100%);
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex-shrink: 0;
}

.wm-insieme-images img {
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.wm-insieme-images img:nth-child(1) { aspect-ratio: 570 / 215; }
.wm-insieme-images img:nth-child(2) { aspect-ratio: 570 / 24.77; border-radius: 4px; }
.wm-insieme-images img:nth-child(3) { aspect-ratio: 578 / 32.67; border-radius: 4px; }

/* VISIONE DI DETTAGLIO — stacked screenshots */
.wm-dettaglio-images {
  width: min(583px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
}

.wm-dettaglio-images img {
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.wm-dettaglio-images img:nth-child(1) { aspect-ratio: 583 / 327; }
.wm-dettaglio-images img:nth-child(2) { aspect-ratio: 583 / 220; }
.wm-dettaglio-images img:nth-child(3) { aspect-ratio: 583 / 212; }

/* ── VOCI SENZA FINE ── */

.vsf-images {
  width: 100%;
  display: flex;
  gap: 40px;
  align-items: flex-end;
}

.vsf-img-portrait {
  flex: 404 0 0px;
  min-width: 0;
  aspect-ratio: 404 / 572;
}

.vsf-img-landscape {
  flex: 850 0 0px;
  min-width: 0;
  aspect-ratio: 850 / 572;
}

/* ── ARCHIVIO ── */

.archivio-entry.project-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.archivio-entry .section-row {
  align-items: flex-start;
}

.archivio-entry .section-copy {
  --copy-width: 800px;
}

.archivio-image {
  flex: 1 0 0;
  min-width: 0;
  aspect-ratio: 578 / 389;
  object-fit: cover;
}

.archivio-link {
  font-size: 39px;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--Black, black);
  text-decoration: none;
  transition: opacity 0.15s;
  line-height: 1;
}

.archivio-link:hover {
  opacity: 0.7;
}

/* ── FOTOGRAFIE COME LETTERE DI UN ALFABETO ── */

.alfabeto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 30px 60px;
}

.alfabeto-item {
  padding: 35px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.alfabeto-img {
  width: 100%;
  aspect-ratio: 342 / 230;
  object-fit: cover;
}

.alfabeto-caption {
  align-self: stretch;
  color: var(--Grey, #949494);
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.4;
  text-align: justify;
  margin: 0;
}

/* ── BI x LINO ── */

.bil-pixel-art {
  flex-shrink: 0;
  width: min(529px, 100%);
  height: auto;
}

.bil-image {
  flex: 1 0 0;
  min-width: 0;
  height: auto;
  object-fit: contain;
}

/* Stack the wide text+image rows earlier than the general 768px
   breakpoint, since their fixed widths don't fit at in-between
   viewport sizes. */
@media (max-width: 1300px) {
  .section-provalo {
    flex-direction: column-reverse;
    align-items: center;
    gap: 24px;
  }

  .row-copy-676 {
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
  }

  .row-copy-676 .section-copy {
    --copy-width: 100%;
  }

  .fc-sfida-image,
  .fc-brief-images,
  .wm-dataset-image,
  .wm-insieme-images,
  .wm-dettaglio-images,
  .archivio-image,
  .bil-image,
  .bil-pixel-art {
    width: 100%;
  }

  .vsf-images {
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
  }

  .vsf-img-portrait,
  .vsf-img-landscape {
    flex: none;
    width: 100%;
  }
}

/* ─────────────────────────────
   MOBILE  ≤ 768px
───────────────────────────── */

@media (max-width: 768px) {

  /* Title */
  .project-title-block {
    padding: 15px 30px;
  }

  .project-title {
    font-size: 75px;
    line-height: 75px;
  }

  .title-break-mobile {
    display: block;
  }

  /* Crediti */
  .crediti-section {
    padding: 15px 30px;
  }

  .crediti-toggle {
    padding: 20px 30px;
  }

  .crediti-toggle svg {
    width: 24px;
    height: 24px;
  }

  .crediti-toggle span {
    font-size: 24px;
    line-height: 24px;
  }

  .crediti-list {
    padding: 0 30px 20px 54px;
    font-size: 18px;
  }

  /* Info bar — 2×2 grid */
  .project-info-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 15px 30px;
    gap: 10px 20px;
  }

  .info-label {
    font-size: 16px;
    line-height: 16px;
  }

  .info-value {
    font-size: 20px;
    line-height: 20px;
  }

  /* Sections — stacked layout */
  .project-section {
    padding: 20px 30px;
    gap: 15px;
  }

  .section-row {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .section-title {
    font-size: 36px;
    line-height: 36px;
  }

  .section-text {
    font-size: 18px;
    line-height: 1.3;
  }

  /* LA SFIDA */
  .section-sfida .section-row {
    align-items: stretch;
  }

  .sfida-image {
    width: 100%;
  }

  /* IL PROCESSO — horizontal scroll strip */
  .processo-grid {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .processo-grid img {
    flex: 0 0 auto;
    width: 160px;
    height: 107px;
  }

  /* DECISIONI CHIAVE */
  .decisioni-images {
    width: 100%;
  }

  .decisioni-images img {
    height: 220px;
  }

  /* IL RISULTATO — stacked */
  .risultato-gallery {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .risultato-col img {
    width: 100%;
    height: 228px;
  }

  .risultato-main {
    width: 100%;
    height: 225px;
  }

  /* IL SEDICESIMO — stacked */
  .sedicesimo-images {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    width: 100%;
  }

  .sedicesimo-images img:nth-child(1),
  .sedicesimo-images img:nth-child(2),
  .sedicesimo-images img:nth-child(3) {
    width: 100%;
    height: auto;
  }

  /* Shared components */
  .provalo-link {
    font-size: 32px;
  }

  .provalo-arrow {
    width: 26px;
    height: 26px;
  }

  .provalo-devices {
    max-width: 340px;
  }

  /* FUORI CAMPO */
  .fc-sfida-image,
  .fc-brief-images {
    width: 100%;
  }

  .fc-brief-images {
    gap: 8px;
  }

  .fc-brief-images img {
    height: 91px;
  }

  .fc-brief-images img:nth-child(3) {
    height: 119px;
  }

  /* WORLD METROS */
  .wm-dataset-image,
  .wm-insieme-images,
  .wm-dettaglio-images {
    width: 100%;
  }

  .wm-insieme-images {
    gap: 24px;
  }

  .wm-dettaglio-images {
    gap: 15px;
  }

  /* ARCHIVIO — mobile */
  .archivio-entry.project-section {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .archivio-entry .section-copy {
    display: contents;
  }

  .archivio-entry .section-title { order: 1; }
  .archivio-entry .section-text  { order: 2; }
  .archivio-entry .archivio-image { order: 3; }
  .archivio-entry .archivio-link  { order: 4; }

  .archivio-link {
    font-size: 24px;
  }

  /* FOTOGRAFIE COME LETTERE — single column on mobile */
  .alfabeto-grid {
    grid-template-columns: 1fr;
    padding: 15px 30px;
  }

  /* LICALBE — tighter gap between text and images on mobile */
  .licalbe-page .section-row {
    gap: 8px;
  }

  /* VOCI SENZA FINE — swap image order on mobile (landscape first) */
  .vsf-img-landscape {
    order: -1;
    width: 100%;
    flex: none;
  }

  .vsf-img-portrait {
    width: 100%;
  }
}
