/* ═══════════════════════════════════════════════
   ECOCUBE PAGE ONLY
═══════════════════════════════════════════════ */

body.project-page section {
  min-height: auto;
}

body.project-page h2 {
  width: auto;
  max-width: none;
}

body.project-page .section-header {
  max-width: 760px;
  margin-bottom: 3rem;
}

body.project-page .section-header h2 span {
  color: var(--theme-surface-on-surface-variant);
}

/* HERO */

.project-hero {
  display: grid;
  grid-template-columns: subgrid;
  align-content: center;
  padding-block: 8rem 6rem;
  min-height: 100dvh;
}

.project-hero > * {
  grid-column: main;
}

.project-hero-content {
  max-width: 920px;
}

.project-hero h1 {
  margin: 1rem 0;
  font-size: clamp(4.5rem, 14vw, 12rem);
  line-height: .85;
  letter-spacing: -.08em;
  font-weight: 500;
  color: var(--theme-surface-on-surface);
}

.project-hero h1 span {
  display: block;
  max-width: 14ch;
  margin-top: 1.25rem;

  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 400;

  color: var(--theme-surface-on-surface-variant);
}

.project-hero-text {
  max-width: 62ch;
  margin: 2rem 0 0;
  font-size: 1.08rem;
  line-height: 1.8;
}

.project-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2rem;
}

.project-hero-media {
  margin-top: 4rem;
  border-radius: 2.5rem;
  overflow: hidden;
  border: 1px solid var(--theme-outline-variant);
  background: var(--theme-surface-surface-container);
  box-shadow: 0 40px 120px rgba(0,0,0,.12);
}

.project-hero-media img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* SHARED SECTIONS */

.project-overview,
.project-showcase,
.project-features,
.project-gallery,
.project-stack,
.project-next {
  display: grid;
  grid-template-columns: subgrid;
  padding-block: 7rem;
  border-top: 1px solid var(--theme-outline-variant);
}

.project-overview > *,
.project-showcase > *,
.project-features > *,
.project-gallery > *,
.project-stack > *,
.project-next > * {
  grid-column: main;
}

/* OVERVIEW */

.project-overview {
  gap: 3rem;
}

.project-overview-text h2 {
  max-width: 780px;
}

.project-overview-text h2 span {
  color: var(--theme-surface-on-surface-variant);
}

.project-overview-text p:not(.section-label) {
  max-width: 70ch;
  line-height: 1.8;
  font-size: 1.05rem;
}

.project-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-meta div {
  padding: 1.4rem;
  border-radius: 1.5rem;
  border: 1px solid var(--theme-outline-variant);
  background: var(--theme-surface-surface-container);
}

.project-meta span {
  display: block;
  margin-bottom: .5rem;
  font-size: .78rem;
  color: var(--theme-surface-on-surface-variant);
}

.project-meta strong {
  font-weight: 500;
  color: var(--theme-surface-on-surface);
}

/* SHOWCASE */

.project-showcase {
  padding-top: 2rem;
}

.project-showcase img {
  width: 100%;
  display: block;
  border-radius: 2.5rem;
  border: 1px solid var(--theme-outline-variant);
  background: var(--theme-surface-surface-container);
  box-shadow: 0 40px 120px rgba(0,0,0,.12);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* FEATURES */

.project-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-feature-grid article {
  min-height: 260px;
  padding: 1.5rem;
  border-radius: 1.7rem;
  border: 1px solid var(--theme-outline-variant);
  background: var(--theme-surface-surface-container);
  transition:
    transform .25s var(--ease-out-cubic),
    border-color .25s ease,
    box-shadow .25s ease;
}

.project-feature-grid article:hover {
  transform: translateY(-4px);
  border-color: var(--theme-outline);
  box-shadow: 0 24px 70px rgba(0,0,0,.08);
}

.project-feature-grid .material-symbols-outlined {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-content: center;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  background: var(--theme-surface-surface-container-higher);
  border: 1px solid var(--theme-outline-variant);
  color: var(--theme-surface-on-surface);
}

.project-feature-grid h3 {
  margin: 0 0 .8rem;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -.03em;
  color: var(--theme-surface-on-surface);
}

.project-feature-grid p {
  margin: 0;
  line-height: 1.7;
}

/* GALLERY */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  display: block;
  border-radius: 1.7rem;
  border: 1px solid var(--theme-outline-variant);
  background: var(--theme-surface-surface-container);
  object-fit: cover;
  aspect-ratio: 16 / 10;
  box-shadow: 0 24px 70px rgba(0,0,0,.08);
}

/* STACK */

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.stack-list span {
  padding: .75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--theme-outline-variant);
  background: var(--theme-surface-surface-container);
  color: var(--theme-surface-on-surface-variant);
  font-size: .95rem;
}

/* NEXT CTA */

.project-next-card {

  position: relative;

  overflow: hidden;

  min-height: 520px;

  padding: clamp(2rem, 6vw, 5rem);

  border-radius: 2.5rem;

  background: var(--theme-primary-primary);

  color: var(--theme-primary-on-primary);

  display: flex;

  justify-content: center;

  align-items: center;

}

.project-next-content{

    position:relative;

    z-index:2;

    width:100%;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

}

#ecocube-next-wave{

    position:absolute;

    inset:0;

    width:100%;

    height:100%;

    z-index:0;

    pointer-events:none;

    opacity:.45;

}

.project-next-card .section-label {
  color: rgba(255,255,255,.6);
}

.project-next-card h2 {
  margin: 1rem 0;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: .9;
  letter-spacing: -.07em;
  color: var(--theme-primary-on-primary);
}

.project-next-card h2 span {
  color: rgba(255,255,255,.5);
}

.project-next-card .project-link {
  background: #fff;
  color: #111;
}

.project-next-card .project-link-secondary {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
}

/* DESKTOP */

@media (width >= 900px) {
  .project-meta {
    grid-template-columns: repeat(4, 1fr);
  }

  .project-feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid img:first-child {
    grid-column: span 2;
    aspect-ratio: 16 / 8;
  }
}

/* MOBILE */

@media (width < 768px) {
  .project-hero {
    padding-block: 7rem 4rem;
  }

  .project-hero h1 {
    font-size: 4.5rem;
  }

  .project-hero h1 span {
    font-size: 2rem;
  }

  .project-hero-media,
  .project-showcase img {
    border-radius: 1.5rem;
  }

  .project-overview,
  .project-showcase,
  .project-features,
  .project-gallery,
  .project-stack,
  .project-next {
    padding-block: 5rem;
  }

  .project-next-card {
    min-height: 460px;
    border-radius: 2rem;
  }

  .project-next-card h2 {
    font-size: 3.2rem;
  }
}

