/* =============================================================================
   PROJECTS.CSS — Jaipur Stone Industries
   Landmark Projects page: editorial hero + per-project gallery sections.
   ============================================================================= */


/* =============================================================================
   PROJECTS PAGE HERO
   Full-bleed 16:9 image anchored at y:0; header overlays transparently.
   Heading and supporting line centered on the image.
   ============================================================================= */

.projects-hero {
  padding: 0;
  margin: 0;
  background-color: var(--color-bg-primary);
  line-height: 0;
}

.projects-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  z-index: 1;
  pointer-events: none;
  line-height: normal;
}

.projects-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 6vw, var(--font-size-5xl));
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  line-height: 1;
  color: var(--color-text-primary);
  margin: 0;
  text-align: center;
}

.projects-hero__rule {
  display: block;
  width: 36px;
  height: 1px;
  background-color: var(--color-accent);
  margin-top: var(--space-1);
}

.projects-hero__line {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.01em;
  color: rgba(234, 234, 234, 0.5);
  text-align: center;
  margin: 0;
}


/* =============================================================================
   PROJECT ENTRY SECTIONS
   One named section per project. Editorial chapter structure.
   ============================================================================= */

/* Thin top separator between entries; first entry has no top rule */
.project-entry {
  border-top: 1px solid var(--color-border);
}

.project-entry:first-of-type {
  border-top: none;
}


/* -----------------------------------------------------------------------------
   Project heading
   Larger than granite group headings; editorial, restrained, premium.
   ----------------------------------------------------------------------------- */
.project-entry__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, var(--font-size-2xl));
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--letter-spacing-snug);
  line-height: 1.1;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-10) 0;

  /* Layout: title stacks above location on small screens */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-5);
}

/* Location — muted secondary label beside the title */
.project-entry__location {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1;
  /* Optical alignment to text baseline */
  position: relative;
  top: -0.1em;
}


/* =============================================================================
   PROJECT GALLERY
   2-column image grid. 3:2 aspect ratio. Modal-enabled.
   ============================================================================= */

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

/* Each gallery tile — aspect ratio container */
.project-gallery__item {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

/* Full-width variant — for odd-numbered galleries */
.project-gallery__item--full {
  grid-column: span 2;
}

/* Keyboard focus ring */
.project-gallery__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Image placeholder — fills the tile absolutely */
.project-gallery__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(1);
  transition: transform 280ms ease; /* fast zoom-out */
}

/* Calm hover zoom — matches established site timing */
.project-gallery__item:hover .project-gallery__img {
  transform: scale(1.03);
  transition: transform 680ms ease-out; /* slow zoom-in */
}

/* Real image treatment — <picture> replaces .project-gallery__img */
.project-gallery__item picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(1);
  transition: transform 280ms ease;
}

.project-gallery__item:hover picture {
  transform: scale(1.03);
  transition: transform 680ms ease-out;
}

.project-gallery__item picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 640px) {
  .project-gallery {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .project-gallery__item--full {
    grid-column: span 1;
  }

  .project-entry__title {
    flex-direction: column;
    gap: var(--space-2);
  }

  .project-entry__location {
    top: 0;
  }
}
