/* ==========================================================
   L&R DESIGN & BUILD LTD
   PROJECT GALLERY
========================================================== */


/* ==========================================================
   SAFETY
========================================================== */

.project-gallery-hero,
.project-gallery-section,
.project-gallery-cta-section {
  width: 100%;
}


.project-gallery-hero *,
.project-gallery-section *,
.project-gallery-cta-section * {
  min-width: 0;
}


/* ==========================================================
   HERO
========================================================== */

.project-gallery-hero {
  position: relative;

  overflow: hidden;

  padding:
    155px
    0
    95px;

  background:
    radial-gradient(
      circle at 76% 37%,
      rgba(144, 247, 249, 0.09),
      transparent 33%
    ),
    #000000;
}


.project-gallery-hero-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 0.86fr)
    minmax(480px, 1.14fr);

  align-items: center;

  gap:
    clamp(
      55px,
      7vw,
      105px
    );
}


/* ==========================================================
   HERO COPY
========================================================== */

.project-gallery-hero-copy {
  max-width: 680px;
}


.project-gallery-kicker {
  margin-bottom: 18px;

  color:
    var(
      --lr-cyan,
      #90f7f9
    );

  font-size: 11px;

  font-weight: 700;

  line-height: 1.2;

  letter-spacing: 0.16em;

  text-transform: uppercase;
}


.project-gallery-hero-copy h1 {
  margin: 0;

  color: #ffffff;

  font-family:
    var(
      --font-title,
      "Plus Jakarta Sans",
      sans-serif
    );

  font-size:
    clamp(
      52px,
      5.3vw,
      82px
    );

  font-weight: 700;

  line-height: 0.99;

  letter-spacing: -0.064em;

  text-wrap: balance;
}


.project-gallery-hero-copy h1 span {
  display: block;

  color:
    var(
      --lr-cyan-light,
      #cafeff
    );
}


.project-gallery-hero-copy p {
  max-width: 620px;

  margin:
    25px
    0
    31px;

  color:
    rgba(255, 255, 255, 0.7);

  font-size: 17px;

  line-height: 1.72;
}


.project-gallery-scroll-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 52px;

  padding:
    0
    25px;

  color: #000000;

  background:
    var(
      --lr-cyan,
      #90f7f9
    );

  border:
    2px solid
    var(
      --lr-cyan,
      #90f7f9
    );

  border-radius: 999px;

  font-size: 13px;

  font-weight: 700;

  transition:
    background-color
    var(--transition, 250ms ease),
    border-color
    var(--transition, 250ms ease),
    transform
    var(--transition, 250ms ease);
}


.project-gallery-scroll-button:hover {
  color: #000000;

  background:
    var(
      --lr-cyan-light,
      #cafeff
    );

  border-color:
    var(
      --lr-cyan-light,
      #cafeff
    );

  transform:
    translateY(-2px);
}


/* ==========================================================
   HERO IMAGE MOSAIC
========================================================== */

.project-gallery-hero-media {
  display: grid;

  grid-template-columns:
    minmax(0, 1.34fr)
    minmax(190px, 0.66fr);

  grid-template-rows:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 12px;

  height:
    clamp(
      520px,
      52vw,
      700px
    );
}


.project-gallery-hero-image {
  position: relative;

  display: block;

  width: 100%;
  height: 100%;

  padding: 0;

  overflow: hidden;

  background: #111111;

  border:
    1px solid
    rgba(255, 255, 255, 0.12);

  border-radius: 24px;

  cursor: zoom-in;
}


.project-gallery-hero-image-main {
  grid-row:
    1 / 3;
}


.project-gallery-hero-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter:
    saturate(0.78)
    brightness(0.87);

  transition:
    transform
    750ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    ),
    filter
    500ms
    ease;
}


.project-gallery-hero-image-main img {
  object-position:
    center
    56%;
}


.project-gallery-hero-image:hover img {
  filter:
    saturate(0.95)
    brightness(0.94);

  transform:
    scale(1.035);
}


/* ==========================================================
   MAIN GALLERY SECTION
========================================================== */

.project-gallery-section {
  padding:
    clamp(
      90px,
      8vw,
      125px
    )
    0;

  background:
    #050606;
}


.project-gallery-heading {
  display: grid;

  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(300px, 0.75fr);

  align-items: end;

  gap:
    clamp(
      45px,
      7vw,
      100px
    );

  margin-bottom: 55px;
}


.project-gallery-heading h2 {
  max-width: 850px;

  margin: 0;

  color: #ffffff;

  font-family:
    var(
      --font-title,
      "Plus Jakarta Sans",
      sans-serif
    );

  font-size:
    clamp(
      42px,
      4.4vw,
      68px
    );

  font-weight: 700;

  line-height: 1.02;

  letter-spacing: -0.057em;

  text-wrap: balance;
}


.project-gallery-heading h2 span {
  display: block;

  color:
    var(
      --lr-cyan-light,
      #cafeff
    );
}


.project-gallery-heading > p {
  max-width: 510px;

  margin: 0;

  color:
    rgba(255, 255, 255, 0.65);

  font-size: 16px;

  line-height: 1.72;
}


/* ==========================================================
   MASONRY / MOSAIC GALLERY

   Keeps natural image dimensions rather than cropping
   everything into equal cards.
========================================================== */

.project-gallery-grid {
  column-count: 3;

  column-gap: 14px;
}


.project-gallery-item {
  width: 100%;

  margin:
    0
    0
    14px;

  break-inside: avoid;
}


/* ==========================================================
   GALLERY TILE
========================================================== */

.project-gallery-tile {
  position: relative;

  display: block;

  width: 100%;

  padding: 0;

  overflow: hidden;

  text-align: left;

  background:
    #101212;

  border:
    1px solid
    rgba(255, 255, 255, 0.1);

  border-radius: 22px;

  cursor: zoom-in;

  isolation: isolate;

  transition:
    transform
    400ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    ),
    border-color
    300ms
    ease,
    box-shadow
    300ms
    ease;
}


.project-gallery-tile:hover {
  border-color:
    rgba(144, 247, 249, 0.4);

  box-shadow:
    0
    24px
    60px
    rgba(0, 0, 0, 0.35);

  transform:
    translateY(-4px);
}


.project-gallery-tile img {
  display: block;

  width: 100%;
  height: auto;

  object-fit: cover;

  filter:
    saturate(0.84)
    brightness(0.88);

  transition:
    transform
    750ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    ),
    filter
    500ms
    ease;
}


.project-gallery-tile:hover img {
  filter:
    saturate(1)
    brightness(0.96);

  transform:
    scale(1.025);
}


/* ==========================================================
   TILE GRADIENT
========================================================== */

.project-gallery-tile-gradient {
  position: absolute;

  z-index: 1;

  inset: 0;

  background:
    linear-gradient(
      180deg,
      transparent 44%,
      rgba(0, 0, 0, 0.06) 58%,
      rgba(0, 0, 0, 0.82) 100%
    );

  pointer-events: none;
}


/* ==========================================================
   TILE COPY
========================================================== */

.project-gallery-tile-copy {
  position: absolute;

  z-index: 3;

  right: 21px;
  bottom: 20px;
  left: 21px;

  display: block;

  padding-right: 48px;

  pointer-events: none;
}


.project-gallery-tile-copy small {
  display: block;

  margin-bottom: 6px;

  color:
    var(
      --lr-cyan,
      #90f7f9
    );

  font-size: 9px;

  font-weight: 700;

  line-height: 1.2;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}


.project-gallery-tile-copy strong {
  display: block;

  color: #ffffff;

  font-family:
    var(
      --font-title,
      "Plus Jakarta Sans",
      sans-serif
    );

  font-size:
    clamp(
      18px,
      1.6vw,
      24px
    );

  font-weight: 700;

  line-height: 1.15;

  letter-spacing: -0.035em;

  text-shadow:
    0
    2px
    14px
    rgba(0, 0, 0, 0.55);
}


/* ==========================================================
   EXPAND ICON
========================================================== */

.project-gallery-expand {
  position: absolute;

  z-index: 4;

  right: 17px;
  bottom: 17px;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 43px;
  height: 43px;

  color: #000000;

  background:
    var(
      --lr-cyan,
      #90f7f9
    );

  border:
    2px solid
    var(
      --lr-cyan-light,
      #cafeff
    );

  border-radius: 50%;

  font-size: 15px;

  pointer-events: none;

  transition:
    transform
    300ms
    ease,
    background-color
    300ms
    ease;
}


.project-gallery-tile:hover
.project-gallery-expand {
  background:
    var(
      --lr-cyan-light,
      #cafeff
    );

  transform:
    scale(1.07);
}


/* ==========================================================
   CTA
========================================================== */

.project-gallery-cta-section {
  padding:
    20px
    0
    90px;

  background:
    #050606;
}


.project-gallery-cta {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  align-items: end;

  gap: 50px;

  padding:
    clamp(
      43px,
      5vw,
      65px
    );

  color: #000000;

  background:
    var(
      --lr-cyan,
      #90f7f9
    );

  border-radius: 30px;
}


.project-gallery-cta-kicker {
  margin-bottom: 15px;

  color:
    rgba(0, 0, 0, 0.58);

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.15em;

  text-transform: uppercase;
}


.project-gallery-cta h2 {
  max-width: 790px;

  margin: 0;

  color: #000000;

  font-family:
    var(
      --font-title,
      "Plus Jakarta Sans",
      sans-serif
    );

  font-size:
    clamp(
      42px,
      4.3vw,
      67px
    );

  font-weight: 700;

  line-height: 1.01;

  letter-spacing: -0.06em;

  text-wrap: balance;
}


.project-gallery-cta h2 span {
  display: block;

  color:
    rgba(0, 0, 0, 0.54);
}


.project-gallery-cta p {
  max-width: 650px;

  margin:
    20px
    0
    0;

  color:
    rgba(0, 0, 0, 0.66);

  font-size: 16px;

  line-height: 1.7;
}


.project-gallery-cta-actions {
  display: flex;

  flex-direction: column;

  gap: 9px;

  min-width: 225px;
}


.project-gallery-cta-primary,
.project-gallery-cta-secondary {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 51px;

  padding:
    0
    23px;

  border-radius: 999px;

  font-size: 13px;

  font-weight: 700;

  white-space: nowrap;

  transition:
    transform
    var(--transition, 250ms ease),
    background-color
    var(--transition, 250ms ease),
    border-color
    var(--transition, 250ms ease);
}


.project-gallery-cta-primary {
  color: #ffffff;

  background: #000000;

  border:
    2px solid
    #000000;
}


.project-gallery-cta-primary:hover {
  color: #ffffff;

  background:
    #151515;

  border-color:
    #151515;

  transform:
    translateY(-2px);
}


.project-gallery-cta-secondary {
  color: #000000;

  background: #ffffff;

  border:
    2px solid
    #ffffff;
}


.project-gallery-cta-secondary:hover {
  color: #000000;

  background:
    rgba(255, 255, 255, 0.84);

  border-color:
    rgba(255, 255, 255, 0.84);

  transform:
    translateY(-2px);
}


/* ==========================================================
   LIGHTBOX
========================================================== */

.gallery-lightbox-open {
  overflow: hidden;
}


.project-lightbox {
  position: fixed;

  z-index: 99999;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  padding:
    75px
    95px
    45px;

  visibility: hidden;

  opacity: 0;

  background:
    rgba(0, 0, 0, 0.94);

  backdrop-filter:
    blur(15px);

  transition:
    opacity
    250ms
    ease,
    visibility
    250ms
    ease;
}


.project-lightbox.is-open {
  visibility: visible;

  opacity: 1;
}


.project-lightbox-inner {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(260px, 350px);

  align-items: center;

  gap: 34px;

  width: min(
    1450px,
    100%
  );

  height: min(
    820px,
    calc(100vh - 120px)
  );
}


/* ==========================================================
   LIGHTBOX IMAGE
========================================================== */

.project-lightbox-image-wrap {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  min-height: 0;
}


.project-lightbox-image-wrap img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;

  border-radius: 18px;

  box-shadow:
    0
    25px
    70px
    rgba(0, 0, 0, 0.4);
}


/* ==========================================================
   LIGHTBOX CAPTION
========================================================== */

.project-lightbox-caption {
  align-self: end;

  padding-bottom: 25px;
}


.project-lightbox-caption > span {
  display: block;

  margin-bottom: 12px;

  color:
    var(
      --lr-cyan,
      #90f7f9
    );

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.15em;

  text-transform: uppercase;
}


.project-lightbox-caption h2 {
  margin:
    0
    0
    14px;

  color: #ffffff;

  font-family:
    var(
      --font-title,
      "Plus Jakarta Sans",
      sans-serif
    );

  font-size:
    clamp(
      28px,
      3vw,
      44px
    );

  font-weight: 700;

  line-height: 1.05;

  letter-spacing: -0.05em;
}


.project-lightbox-caption p {
  margin: 0;

  color:
    rgba(255, 255, 255, 0.64);

  font-size: 14px;

  line-height: 1.7;
}


/* ==========================================================
   LIGHTBOX BUTTONS
========================================================== */

.project-lightbox-close,
.project-lightbox-nav {
  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  color: #000000;

  background:
    var(
      --lr-cyan,
      #90f7f9
    );

  border:
    2px solid
    var(
      --lr-cyan-light,
      #cafeff
    );

  border-radius: 50%;

  cursor: pointer;

  transition:
    background-color
    250ms
    ease,
    transform
    250ms
    ease;
}


.project-lightbox-close:hover,
.project-lightbox-nav:hover {
  background:
    var(
      --lr-cyan-light,
      #cafeff
    );
}


.project-lightbox-close {
  position: absolute;

  top: 24px;
  right: 27px;

  width: 48px;
  height: 48px;

  font-size: 17px;
}


.project-lightbox-nav {
  position: absolute;

  top: 50%;

  width: 52px;
  height: 52px;

  font-size: 18px;

  transform:
    translateY(-50%);
}


.project-lightbox-nav:hover {
  transform:
    translateY(-50%)
    scale(1.06);
}


.project-lightbox-prev {
  left: 27px;
}


.project-lightbox-next {
  right: 27px;
}


/* ==========================================================
   LAPTOP
========================================================== */

@media
  (min-width: 992px)
  and
  (max-width: 1199px) {

  .project-gallery-hero {
    padding:
      135px
      0
      80px;
  }


  .project-gallery-hero-layout {
    grid-template-columns:
      minmax(0, 0.85fr)
      minmax(430px, 1.15fr);

    gap: 45px;
  }


  .project-gallery-hero-copy h1 {
    font-size:
      clamp(
        48px,
        5vw,
        66px
      );
  }


  .project-gallery-hero-copy p {
    font-size: 15px;
  }


  .project-gallery-hero-media {
    height: 570px;
  }


  .project-gallery-grid {
    column-count: 3;

    column-gap: 12px;
  }


  .project-gallery-item {
    margin-bottom: 12px;
  }


  .project-lightbox {
    padding:
      70px
      80px
      40px;
  }

}


/* ==========================================================
   TABLET
========================================================== */

@media
  (min-width: 768px)
  and
  (max-width: 991px) {

  .project-gallery-hero {
    padding:
      125px
      0
      75px;
  }


  .project-gallery-hero-layout {
    grid-template-columns: 1fr;

    gap: 40px;
  }


  .project-gallery-hero-copy {
    max-width: 760px;
  }


  .project-gallery-hero-media {
    height: 560px;
  }


  .project-gallery-heading {
    grid-template-columns: 1fr;

    gap: 20px;

    margin-bottom: 43px;
  }


  .project-gallery-heading > p {
    max-width: 680px;
  }


  .project-gallery-grid {
    column-count: 2;
  }


  .project-gallery-cta {
    grid-template-columns: 1fr;

    gap: 28px;
  }


  .project-gallery-cta-actions {
    flex-direction: row;

    min-width: 0;
  }


  .project-lightbox {
    padding:
      70px
      72px
      30px;
  }


  .project-lightbox-inner {
    grid-template-columns: 1fr;

    grid-template-rows:
      minmax(0, 1fr)
      auto;

    gap: 18px;

    height:
      calc(100vh - 105px);
  }


  .project-lightbox-caption {
    padding: 0;

    text-align: center;
  }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

  /* ======================================================
     HERO
  ====================================================== */

  .project-gallery-hero {
    padding:
      108px
      0
      58px;
  }


  .project-gallery-hero-layout {
    grid-template-columns: 1fr;

    gap: 34px;
  }


  .project-gallery-hero-copy {
    width: 100%;

    max-width: 610px;

    margin-inline: auto;

    text-align: center;
  }


  .project-gallery-kicker {
    margin-bottom: 13px;

    font-size: 9px;
  }


  .project-gallery-hero-copy h1 {
    font-size:
      clamp(
        37px,
        10.2vw,
        49px
      );

    line-height: 1;
  }


  .project-gallery-hero-copy p {
    margin:
      19px
      auto
      26px;

    font-size: 15px;

    line-height: 1.64;
  }


  .project-gallery-scroll-button {
    min-height: 49px;

    font-size: 12px;
  }


  /* ======================================================
     MOBILE HERO COLLAGE

     Two images rather than vertically stacking three.
  ====================================================== */

  .project-gallery-hero-media {
    grid-template-columns:
      minmax(0, 1.2fr)
      minmax(0, 0.8fr);

    grid-template-rows: 320px;

    gap: 9px;

    height: auto;
  }


  .project-gallery-hero-image {
    height: 320px;

    border-radius: 19px;
  }


  .project-gallery-hero-image-main {
    grid-row: auto;
  }


  .project-gallery-hero-image-main img {
    object-position:
      center
      55%;
  }


  .project-gallery-hero-image-small:last-child {
    display: none;
  }


  /* ======================================================
     MAIN GALLERY
  ====================================================== */

  .project-gallery-section {
    padding:
      68px
      0;
  }


  .project-gallery-heading {
    grid-template-columns: 1fr;

    gap: 18px;

    margin-bottom: 35px;
  }


  .project-gallery-heading h2 {
    font-size:
      clamp(
        34px,
        9vw,
        45px
      );
  }


  .project-gallery-heading > p {
    font-size: 15px;
  }


  /*
     Keep two columns on normal phones.
     This prevents a huge single vertical stack.
  */

  .project-gallery-grid {
    column-count: 2;

    column-gap: 9px;
  }


  .project-gallery-item {
    margin-bottom: 9px;
  }


  .project-gallery-tile {
    border-radius: 15px;
  }


  .project-gallery-tile-copy {
    right: 12px;
    bottom: 12px;
    left: 12px;

    padding-right: 36px;
  }


  .project-gallery-tile-copy small {
    margin-bottom: 4px;

    font-size: 7px;
  }


  .project-gallery-tile-copy strong {
    font-size:
      clamp(
        13px,
        3.7vw,
        17px
      );

    line-height: 1.13;
  }


  .project-gallery-expand {
    right: 10px;
    bottom: 10px;

    width: 32px;
    height: 32px;

    font-size: 11px;

    border-width: 1.5px;
  }


  /* ======================================================
     CTA
  ====================================================== */

  .project-gallery-cta-section {
    padding:
      10px
      0
      65px;
  }


  .project-gallery-cta {
    grid-template-columns: 1fr;

    gap: 27px;

    padding:
      35px
      20px;

    border-radius: 23px;
  }


  .project-gallery-cta h2 {
    font-size:
      clamp(
        36px,
        9.5vw,
        48px
      );
  }


  .project-gallery-cta p {
    font-size: 14px;
  }


  .project-gallery-cta-actions {
    display: grid;

    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 8px;

    width: 100%;

    min-width: 0;
  }


  .project-gallery-cta-primary,
  .project-gallery-cta-secondary {
    min-height: 48px;

    padding:
      0
      12px;

    font-size: 11px;

    white-space: normal;

    text-align: center;
  }


  /* ======================================================
     MOBILE LIGHTBOX
  ====================================================== */

  .project-lightbox {
    align-items: stretch;

    padding:
      69px
      15px
      21px;
  }


  .project-lightbox-inner {
    display: flex;

    flex-direction: column;

    justify-content: center;

    gap: 17px;

    width: 100%;
    height: 100%;
  }


  .project-lightbox-image-wrap {
    height:
      calc(100vh - 230px);
  }


  .project-lightbox-image-wrap img {
    border-radius: 13px;
  }


  .project-lightbox-caption {
    padding:
      0
      52px;

    text-align: center;
  }


  .project-lightbox-caption > span {
    margin-bottom: 6px;

    font-size: 8px;
  }


  .project-lightbox-caption h2 {
    margin-bottom: 7px;

    font-size: 21px;
  }


  .project-lightbox-caption p {
    display: none;
  }


  .project-lightbox-close {
    top: 13px;
    right: 14px;

    width: 42px;
    height: 42px;

    font-size: 15px;
  }


  .project-lightbox-nav {
    top: auto;

    bottom: 24px;

    width: 43px;
    height: 43px;

    font-size: 15px;

    transform: none;
  }


  .project-lightbox-nav:hover {
    transform:
      scale(1.04);
  }


  .project-lightbox-prev {
    left: 15px;
  }


  .project-lightbox-next {
    right: 15px;
  }

}


/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 479px) {

  .project-gallery-hero {
    padding-top: 103px;
  }


  .project-gallery-hero-copy h1 {
    font-size:
      clamp(
        34px,
        10.2vw,
        42px
      );
  }


  .project-gallery-hero-copy p {
    font-size: 14px;
  }


  .project-gallery-hero-media {
    grid-template-rows: 270px;
  }


  .project-gallery-hero-image {
    height: 270px;
  }


  .project-gallery-section {
    padding:
      60px
      0;
  }


  .project-gallery-cta-actions {
    grid-template-columns: 1fr;
  }

}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 359px) {

  .project-gallery-grid {
    column-count: 1;
  }


  .project-gallery-tile-copy strong {
    font-size: 18px;
  }


  .project-gallery-expand {
    width: 38px;
    height: 38px;

    font-size: 13px;
  }

}


/* ==========================================================
   TOUCH DEVICES
========================================================== */

@media (hover: none) {

  .project-gallery-tile:hover,
  .project-gallery-hero-image:hover {
    transform: none;
  }


  .project-gallery-tile img,
  .project-gallery-hero-image img {
    transform: none;
  }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }


  .project-gallery-tile,
  .project-gallery-tile img,
  .project-gallery-expand,
  .project-gallery-hero-image img,
  .project-gallery-scroll-button,
  .project-gallery-cta-primary,
  .project-gallery-cta-secondary,
  .project-lightbox,
  .project-lightbox-close,
  .project-lightbox-nav {
    transition: none !important;
  }

}