/*
 * ==========================================================================
 * APP SHOWCASE STYLESHEET (STANDARDIZED FOR ZINCO.CC APPS)
 * Desktop First Approach with Brutalist Editorial Aesthetic
 * ==========================================================================
 */

/* ================================================================ */
/* 1. Global Page Overrides & Stacking Context                      */
/* ================================================================ */

.corner-button {
  z-index: 40;
}

#btnTopRight {
  z-index: 1000;
}

#hero-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  position: relative;
  z-index: 50;
}

#project-hero {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 60px 40px 40px calc(27px + 0.88vw);
  border-bottom: 2px solid black;
  position: relative;
}

.hero-title-container {
  position: relative;
  padding-top: 70px;
  width: 100%;
}

.scroll-down-arrow {
  position: absolute;
  top: 0;
  left: 0;
  text-decoration: none;
  color: black;
  font-size: 3rem;
  line-height: 1;
  animation: bounceArrow 2.5s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-16px);
  }
  60% {
    transform: translateY(-8px);
  }
}

#project-hero h1 {
  font-family: 'aktiv-grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: clamp(4rem, 10vw, 8.5rem);
  margin: 0;
  max-width: 80%;
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: black;
}

/* ================================================================ */
/* 2. Grand Hero App Link (The Prominent Hero Web App Link)         */
/* ================================================================ */

.hero-app-cta-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  max-width: 100%;
}

.hero-app-big-link {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 24px;
  background-color: black;
  color: white;
  border: 2px solid black;
  text-decoration: none;
  min-width: 280px;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.15);
}

.hero-app-big-link:hover {
  background-color: white;
  color: black;
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0px black;
}

.hero-link-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 12px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #00d26a;
  box-shadow: 0 0 8px #00d26a;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.hero-link-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.hero-link-domain {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-link-action {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  white-space: nowrap;
}

.hero-link-action .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hero-app-big-link:hover .hero-link-action .arrow {
  transform: translate(3px, -3px);
}

.hero-app-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  background-color: white;
  color: black;
  border: 2px solid black;
  text-decoration: none;
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.hero-app-download-btn:hover {
  background-color: black;
  color: white;
}

.hero-app-download-btn .download-icon {
  stroke: currentColor;
}

/* ================================================================ */
/* 3. Glance Navigation Grid (Interactive Thumbnails)              */
/* ================================================================ */

#glance-container {
  width: 100%;
  position: relative;
  border-bottom: 2px solid black;
  box-sizing: border-box;
  background-color: black;
  z-index: 2;
}

#glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 2px;
}

.glance-item {
  aspect-ratio: 1 / 1;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.glance-item:hover {
  background-color: black;
  transform: scale(1.05);
}

.glance-item img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.glance-item:hover img {
  opacity: 0.7;
}

.glance-item.glance-text {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 8px;
  color: black;
}

.glance-item.glance-text:hover {
  color: white;
}

/* ================================================================ */
/* 4. Main Section: Hero Media Preview                             */
/* ================================================================ */

main#sezione-progetto {
  padding-top: 0;
  width: 100%;
  background-color: white;
}

#hero-media-container {
  width: 100%;
  border-bottom: 2px solid black;
  line-height: 0;
  background-color: #f7f7f8;
}

.hero-media-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
}

.hero-media-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-media-wrapper:hover img {
  transform: scale(1.015);
}

.hero-media-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  pointer-events: none;
}

.zoom-pill {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ================================================================ */
/* 5. SEZIONE INFO PROGETTO — STILE EDITORIALE COLORATO (COME NUS) */
/* ================================================================ */

.project-info-section {
  width: 100%;
  background-color: white;
  border-bottom: 2px solid black;
  padding: 60px 40px 60px calc(27px + 0.88vw);
  box-sizing: border-box;
}

.project-info-content {
  width: 100%;
  margin: 0;
  color: black;
  text-align: left;
}

.project-info-content h2 {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: bold;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 2.5rem 0;
  color: black;
  opacity: 0.5;
}

/* Testo principale grande e giustificato con colore del progetto */
.project-info-text {
  column-count: 1;
  column-gap: 0;
}

.project-info-text p {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
  margin: 0;
  color: black;
}

.project-info-text p strong {
  font-weight: 500;
}

/* Paragrafi nascosti di default (collassati) */
.project-info-text p.description-hidden {
  display: none;
  margin-top: 0.6em;
}

/* Quando espanso, tutti visibili */
.project-info-text.expanded p.description-hidden {
  display: block;
}

/* Bottone "more / less" */
.description-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 1.2em;
  background: none;
  border: none;
  padding: 0;
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: bold;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: black;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.description-more-btn:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.description-more-btn .btn-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.description-more-btn.open .btn-arrow {
  transform: rotate(180deg);
}

/* Technical Specifications Strip */
.app-specs-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border: 2px solid black;
  margin-top: 48px;
  background-color: black;
}

.app-spec-cell {
  background-color: white;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid black;
}

.spec-label {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
}

.spec-value {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: black;
  line-height: 1.3;
}

/* ================================================================ */
/* 6. Standardized App Grid (Screenshots & Links)                  */
/* ================================================================ */

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background-color: white;
  border-top: 2px solid black;
  border-bottom: 2px solid black;
  width: 100%;
}

.app-grid-header {
  grid-column: 1 / -1;
  background-color: black;
  color: white;
  padding: 20px 40px;
  text-align: left;
}

.app-grid-header h2 {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: bold;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}

/* Screenshot Cards */
.app-screenshot-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border: 1px solid black;
  outline: 1px solid black;
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.app-screenshot-card:hover {
  z-index: 10;
  outline: 2px solid black;
}

.screenshot-frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #f1f1f3;
  overflow: hidden;
  position: relative;
  border-bottom: 2px solid black;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-screenshot-card:hover .screenshot-frame img {
  transform: scale(1.03);
}

.screenshot-zoom-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.screenshot-zoom-hint span {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 14px;
}

.app-screenshot-card:hover .screenshot-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-meta {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: white;
}

.screenshot-meta h3 {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
  color: black;
}

.screenshot-subtitle {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: black;
  opacity: 0.5;
  margin-bottom: 12px;
  display: block;
}

.screenshot-meta p {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333333;
  margin: 0;
}

/* Link Cards in Grid */
.app-link-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  background-color: white;
  border: 1px solid black;
  outline: 1px solid black;
  text-decoration: none;
  color: black;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 240px;
}

.app-link-card:hover {
  background-color: black;
  color: white;
}

.link-card-tag {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  display: block;
  margin-bottom: 12px;
}

.app-link-card h3 {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin: 0 0 10px 0;
}

.app-link-card p {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.8;
  margin: 0 0 20px 0;
}

.link-card-cta {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: auto;
}

.app-link-card.primary {
  background-color: #fafafb;
}

/* Color Swatches */
.app-color-item {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  border: 1px solid black;
  box-sizing: border-box;
}

.color-label {
  font-family: 'aktiv-grotesk', sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  padding: 4px 8px;
}

/* ================================================================ */
/* 7. Screenshot Lightbox Modal                                    */
/* ================================================================ */

.screenshot-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.screenshot-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}

.lightbox-dialog {
  position: relative;
  z-index: 10;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.15);
}

.lightbox-content {
  background-color: black;
  border: 2px solid white;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption-bar {
  padding: 16px 24px;
  background-color: black;
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-caption-bar h4 {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 1.1rem;
  margin: 0 0 4px 0;
}

.lightbox-caption-bar p {
  font-family: 'aktiv-grotesk', sans-serif;
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}

/* ================================================================ */
/* 8. Responsive Breakpoints (Desktop First)                       */
/* ================================================================ */

@media (max-width: 1200px) {
  #project-hero h1 {
    max-width: 85%;
  }
}

@media (max-width: 1024px) {
  .project-info-section {
    padding: 60px 30px;
    padding-left: 29px;
  }

  .project-info-text p {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
  }

  #project-hero {
    padding: 40px 30px;
    padding-left: 29px;
  }
}

@media (max-width: 768px) {
  #project-hero {
    padding: 24px 20px 30px 24px;
    min-height: 80vh;
    justify-content: center;
  }

  .hero-title-container {
    padding-top: 50px;
  }

  .scroll-down-arrow {
    font-size: 2.5rem;
  }

  #project-hero h1 {
    font-size: clamp(2.8rem, 14vw, 5rem);
    max-width: 100%;
  }

  .hero-app-cta-container {
    flex-direction: column;
    align-items: stretch;
    margin-top: 28px;
    width: 100%;
  }

  .hero-app-big-link {
    min-width: 100%;
    width: 100%;
  }

  .hero-app-download-btn {
    width: 100%;
    justify-content: center;
  }

  .project-info-section {
    padding: 40px 20px 40px 27px;
  }

  .project-info-text p {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    text-align: left;
    hyphens: auto;
    -webkit-hyphens: auto;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-meta {
    padding: 20px;
  }

  .app-link-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  #hero-wrapper {
    min-height: 85vh;
  }

  #project-hero h1 {
    font-size: clamp(2.4rem, 16vw, 3.6rem);
    line-height: 0.95;
  }

  .hero-link-domain {
    font-size: 1.25rem;
  }

  #glance-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
}
