/* =========================================================
   NEXT LEVEL RENOVATIONS & SERVICES
   GALLERY (public page) — folders / albums, photos only
   Dark navy, white type, blue accents, photos first.
   ========================================================= */

.gallery-public-page {
  --gl-bg: #061724;
  --gl-bg-2: #071c2d;
  --gl-panel: #0b2438;
  --gl-line: rgba(255, 255, 255, 0.1);
  --gl-line-strong: rgba(255, 255, 255, 0.2);
  --gl-text: #ffffff;
  --gl-muted: rgba(225, 235, 245, 0.68);
  --gl-blue: #3d8fe0;
  --gl-blue-soft: rgba(61, 143, 224, 0.16);
  --gl-blue-text: #8ec3f5;
  --gl-radius: 6px;
  --gl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  overflow-x: clip;
  background: var(--gl-bg);
}

.gallery-public-page [hidden] {
  display: none !important;
}

.gl *,
.gl *::before,
.gl *::after {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* ---------- SECTION ---------- */

.gl {
  padding: 64px 0 104px;
  background:
    radial-gradient(ellipse 80% 420px at 50% 0, rgba(61, 143, 224, 0.1), transparent 70%),
    linear-gradient(180deg, var(--gl-bg-2) 0, var(--gl-bg) 520px);
  color: var(--gl-text);
  scroll-margin-top: 0;
}


/* ---------- TITLE + DESCRIPTION + FILTERS ---------- */

.gl-intro {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.gl-eyebrow {
  margin: 0 0 14px;
  color: var(--gl-blue-text);
  font: 700 12px/1 var(--font-main);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.gl-intro h1 {
  margin: 0;
  color: var(--gl-text);
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.gl-lead {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--gl-muted);
  font-size: 16px;
  line-height: 1.7;
}

.gl-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px auto 0;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gl-filters::-webkit-scrollbar {
  display: none;
}

.gl-filter {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid var(--gl-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.82);
  font: 600 13px/1 var(--font-main);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s var(--gl-ease), border-color 0.25s var(--gl-ease), color 0.25s var(--gl-ease);
}

.gl-filter:hover {
  border-color: rgba(142, 195, 245, 0.6);
  color: #ffffff;
}

.gl-filter.is-active {
  background: var(--gl-blue);
  border-color: var(--gl-blue);
  color: #ffffff;
}

.gl-filter:focus-visible,
.gl-back:focus-visible,
.gl-card:focus-visible,
.gl-thumb:focus-visible,
.gl-photo:focus-visible,
.gl-icon-button:focus-visible,
.gl-arrow:focus-visible,
.gl-open-album:focus-visible {
  outline: 2px solid var(--gl-blue-text);
  outline-offset: 3px;
}


/* ---------- STATES ---------- */

.gl-state {
  margin-top: 6px;
}

.gl-skeleton {
  display: block;
  border-radius: var(--gl-radius);
  background: linear-gradient(100deg, #0b2438 30%, #12324c 50%, #0b2438 70%);
  background-size: 200% 100%;
  animation: gl-shimmer 1.4s linear infinite;
}

.gl-skeleton-stage {
  aspect-ratio: 16 / 8;
  max-height: 70vh;
}

.gl-skeleton-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.gl-skeleton-row .gl-skeleton {
  aspect-ratio: 4 / 3;
}

@keyframes gl-shimmer {
  to { background-position: -200% 0; }
}

.gl-message {
  max-width: 560px;
  margin: 10px auto 0;
  padding: 56px 28px;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-radius);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.gl-message svg {
  width: 34px;
  height: 34px;
  color: var(--gl-blue-text);
}

.gl-message h2 {
  margin: 16px 0 8px;
  font-family: var(--font-heading);
  font-size: 22px;
}

.gl-message p {
  margin: 0;
  color: var(--gl-muted);
}

.gl-message a,
.gl-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gl-blue-text);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}


/* ---------- VIEWER (featured carousel + album viewer) ---------- */

.gl-viewer {
  position: relative;
}

.gl-stage {
  position: relative;
  overflow: hidden;
  overflow: clip; /* never scrolls internally (the blurred backdrop is larger than the frame) */
  width: 100%;
  aspect-ratio: 16 / 8;
  max-height: min(74vh, 720px);
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-radius);
  background: #030d15;
  isolation: isolate;
  outline: none;
  touch-action: pan-y;
}

.gl-stage:focus-visible {
  box-shadow: 0 0 0 2px var(--gl-blue-text);
}

.gl-backdrop {
  position: absolute;
  inset: -40px;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(32px) brightness(0.42) saturate(1.1);
  transform: scale(1.08);
  transition: opacity 0.6s var(--gl-ease);
}

.gl-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.gl-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.55s var(--gl-ease);
}

.gl-slide.is-visible {
  opacity: 1;
}

.gl-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 6s var(--gl-ease);
}

.gl-slide.is-visible img {
  transform: scale(1);
}

/* Photos whose shape is very different from the frame are shown whole. */
.gl-slide.is-contain img {
  object-fit: contain;
  transform: none;
}

.gl-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(3, 13, 21, 0.9) 0%, rgba(3, 13, 21, 0.55) 22%, rgba(3, 13, 21, 0) 52%),
    linear-gradient(180deg, rgba(3, 13, 21, 0.45) 0%, rgba(3, 13, 21, 0) 18%);
}

.gl-viewer.no-caption .gl-shade {
  background: linear-gradient(180deg, rgba(3, 13, 21, 0.4) 0%, rgba(3, 13, 21, 0) 18%);
}

.gl-top {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gl-counter {
  min-width: 64px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 13, 21, 0.55);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font: 700 12px/1 var(--font-main);
  letter-spacing: 0.06em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.gl-icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 13, 21, 0.55);
  backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gl-icon-button:hover {
  background: var(--gl-blue);
  border-color: var(--gl-blue);
}

.gl-icon-button svg {
  width: 17px;
  height: 17px;
}

.gl-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(3, 13, 21, 0.45);
  backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.gl-arrow:hover {
  background: var(--gl-blue);
  border-color: var(--gl-blue);
}

.gl-arrow svg {
  width: 24px;
  height: 24px;
}

.gl-arrow.prev { left: 18px; }
.gl-arrow.next { right: 18px; }

.gl-viewer.is-single .gl-arrow {
  display: none;
}

.gl-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: min(640px, 100%);
  padding: 0 32px 30px;
  transition: opacity 0.4s var(--gl-ease), transform 0.4s var(--gl-ease);
}

.gl-caption.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.gl-category {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid rgba(142, 195, 245, 0.45);
  border-radius: 999px;
  background: rgba(61, 143, 224, 0.2);
  color: #d6eaff;
  font: 700 11px/1 var(--font-main);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gl-caption-title {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gl-caption-text {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gl-open-album {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gl-blue-text);
  font: 700 13px/1 var(--font-main);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.gl-open-album svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.gl-open-album:hover {
  color: #ffffff;
}

.gl-open-album:hover svg {
  transform: translateX(3px);
}

/* Thumbnails */

.gl-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.gl-viewer.is-single .gl-thumbs {
  display: none;
}

.gl-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--gl-panel);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gl-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gl-thumb:hover {
  opacity: 0.9;
}

.gl-thumb.is-active {
  border-color: var(--gl-blue);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--gl-blue), 0 6px 18px rgba(61, 143, 224, 0.28);
}

/* Full screen */

.gl-viewer.is-pseudo-full {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  background: #02090f;
}

.gl-viewer.is-pseudo-full .gl-stage {
  flex: 1 1 auto;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
}

.gl-viewer.is-pseudo-full .gl-slide img,
.gl-viewer.is-pseudo-full .gl-slide video {
  object-fit: contain;
  transform: none;
}

html.gl-lock,
html.gl-lock body {
  overflow: hidden;
}

.gl-viewer:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: #02090f;
}

.gl-viewer:fullscreen .gl-stage {
  flex: 1 1 auto;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
}

.gl-viewer:fullscreen .gl-slide img,
.gl-viewer:fullscreen .gl-slide video {
  object-fit: contain;
  transform: none;
}

.gl-viewer:-webkit-full-screen {
  width: 100%;
  height: 100%;
  padding: 18px;
  background: #02090f;
}

.gl-viewer:-webkit-full-screen .gl-stage {
  height: calc(100% - 100px);
  max-height: none;
  aspect-ratio: auto;
}

.gl-viewer:-webkit-full-screen .gl-slide img,
.gl-viewer:-webkit-full-screen .gl-slide video {
  object-fit: contain;
}


/* Videos inside the viewer: moving pictures (no controls, muted, autoplay, loop).
   The cover image stays underneath until the first frames really play. */

.gl-media {
  position: relative;
  width: 100%;
  height: 100%;
}

.gl-media > img,
.gl-media > video {
  position: absolute;
  inset: 0;
}

.gl-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--gl-ease);
}

.gl-slide.is-contain .gl-video {
  object-fit: contain;
}

.gl-slide.is-video-ready .gl-video {
  opacity: 1;
}

/* Never show any native player UI (including the iPhone start button). */
.gl-video::-webkit-media-controls,
.gl-video::-webkit-media-controls-enclosure,
.gl-video::-webkit-media-controls-panel,
.gl-video::-webkit-media-controls-overlay-play-button,
.gl-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
}

.gl-thumb.is-video,
.gl-card-video-mark {
  background: linear-gradient(135deg, #0b2438, #12324c);
}

.gl-card-video-mark {
  display: block;
  width: 100%;
  height: 100%;
}


/* ---------- FOLDER CARDS ---------- */

.gl-home .gl-featured {
  margin-bottom: 50px;
}

.gl-folders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.gl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-radius);
  background: var(--gl-panel);
  color: #ffffff;
  text-decoration: none;
  transition: border-color 0.3s var(--gl-ease), transform 0.3s var(--gl-ease), box-shadow 0.3s var(--gl-ease);
  animation: gl-in 0.5s var(--gl-ease) both;
}

.gl-card:hover {
  border-color: rgba(142, 195, 245, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.gl-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #030d15;
}

.gl-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--gl-ease);
}

.gl-card:hover .gl-card-cover img {
  transform: scale(1.05);
}

.gl-card-count {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(3, 13, 21, 0.66);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font: 700 11px/1 var(--font-main);
  letter-spacing: 0.04em;
}

.gl-card-count svg {
  width: 13px;
  height: 13px;
}

.gl-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
  padding: 18px 18px 20px;
  border-top: 1px solid var(--gl-line);
}

.gl-card-category {
  color: var(--gl-blue-text);
  font: 700 11px/1.2 var(--font-main);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gl-card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.gl-card-text {
  margin: 0;
  color: var(--gl-muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gl-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font: 700 13px/1 var(--font-main);
}

.gl-card-link svg {
  width: 15px;
  height: 15px;
  color: var(--gl-blue-text);
  transition: transform 0.2s ease;
}

.gl-card:hover .gl-card-link svg {
  transform: translateX(3px);
}

@keyframes gl-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}


/* ---------- ALBUM VIEW ---------- */

.gl-album {
  animation: gl-in 0.45s var(--gl-ease) both;
}

.gl-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--gl-line-strong);
  border-radius: 999px;
  color: #ffffff;
  font: 700 13px/1 var(--font-main);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gl-back:hover {
  background: var(--gl-blue);
  border-color: var(--gl-blue);
}

.gl-back svg {
  width: 16px;
  height: 16px;
}

.gl-album-head {
  max-width: 760px;
  margin: 26px 0 26px;
}

.gl-album-meta {
  margin: 0 0 10px;
  color: var(--gl-blue-text);
  font: 700 12px/1.3 var(--font-main);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gl-album-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  outline: none;
  overflow-wrap: anywhere;
}

.gl-album-description {
  margin: 12px 0 0;
  color: var(--gl-muted);
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-line;
}


/* ---------- RESPONSIVE ---------- */

@media (max-width: 1100px) {
  .gl-folders {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .gl {
    padding: 44px 0 80px;
  }

  .gl-folders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .gl-stage {
    aspect-ratio: 4 / 3;
  }

  .gl-skeleton-stage {
    aspect-ratio: 4 / 3;
  }

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

  .gl-arrow {
    width: 42px;
    height: 42px;
  }

  .gl-arrow.prev { left: 10px; }
  .gl-arrow.next { right: 10px; }

  .gl-caption {
    padding: 0 20px 20px;
  }

  .gl-thumb {
    width: 92px;
  }
}

@media (max-width: 600px) {
  .gl-intro {
    margin-bottom: 26px;
  }

  .gl-lead {
    font-size: 15px;
  }

  /* Filters scroll sideways on the phone. */
  .gl-filters {
    justify-content: flex-start;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding-inline: 16px;
  }

  .gl-stage {
    aspect-ratio: 1 / 1;
    max-height: 70vh;
  }

  .gl-top {
    top: 12px;
    right: 12px;
  }

  .gl-arrow {
    top: 42%;
    width: 38px;
    height: 38px;
  }

  .gl-arrow svg {
    width: 20px;
    height: 20px;
  }

  .gl-caption {
    padding: 0 16px 18px;
  }

  .gl-caption-title {
    font-size: 19px;
  }

  .gl-caption-text {
    margin-top: 6px;
    font-size: 13px;
    -webkit-line-clamp: 1;
  }

  .gl-category {
    margin-bottom: 8px;
    padding: 5px 8px;
    font-size: 10px;
  }

  .gl-open-album {
    margin-top: 10px;
  }

  .gl-thumb {
    width: 72px;
  }

  .gl-home .gl-featured {
    margin-bottom: 36px;
  }
}

@media (max-width: 360px) {
  .gl-filters {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 479px) {
  .gl-skeleton-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gl *,
  .gl *::before,
  .gl *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* =========================================================
   FOLDER CARDS — compact swipe carousel on phones and tablets
   (desktop keeps the grid above; the large featured carousel
   is not affected)
   ========================================================= */

@media (max-width: 900px) {
  .gl-folders {
    --gl-gutter: 24px;
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 36%;
    gap: 14px;
    margin-inline: calc(var(--gl-gutter) * -1);
    padding: 4px var(--gl-gutter) 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gl-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .gl-folders::-webkit-scrollbar {
    display: none;
  }

  .gl-card {
    scroll-snap-align: start;
  }

  .gl-card:hover {
    transform: none;
  }

  .gl-card-body {
    gap: 5px;
    padding: 12px 13px 14px;
  }

  .gl-card-title {
    font-size: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .gl-card-category {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Short cards: no long descriptions; the photo count stays on the cover. */
  .gl-card-text,
  .gl-card-link {
    display: none;
  }

  .gl-card-count {
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .gl-folders {
    --gl-gutter: 16px;
    grid-auto-columns: 58%;
    gap: 12px;
  }

  .gl-home .gl-featured {
    margin-bottom: 30px;
  }
}

@media (max-width: 360px) {
  .gl-folders {
    --gl-gutter: 12px;
    grid-auto-columns: 62%;
  }
}


/* =========================================================
   PHONE — vertical composition (portrait / 9:16 screens)
   The featured carousel becomes a tall 4:5 frame: wide photos
   sit at the top of the frame, whole and uncropped, and the
   caption fills the band below them instead of covering them.
   ========================================================= */

@media (max-width: 600px) {
  .gl {
    padding: 34px 0 44px;
  }



  .gl-intro {
    margin-bottom: 22px;
  }

  .gl-eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .gl-intro h1 {
    font-size: clamp(30px, 8.6vw, 38px);
  }

  .gl-lead {
    max-width: 34ch;
    margin-top: 12px;
    font-size: 14.5px;
    line-height: 1.6;
  }

  .gl-filters {
    margin-top: 20px;
    gap: 7px;
  }

  .gl-filter {
    min-height: 36px;
    padding: 9px 15px;
    font-size: 12.5px;
  }

  .gl-stage {
    aspect-ratio: 4 / 5;
    max-height: 72vh;
  }

  .gl-skeleton-stage {
    aspect-ratio: 4 / 5;
  }

  .gl-viewer:not(.no-caption) .gl-slide.is-contain {
    align-items: flex-start;
    padding-top: 58px;
  }

  .gl-viewer:not(.no-caption) .gl-slide.is-contain img,
  .gl-viewer:not(.no-caption) .gl-slide.is-contain video {
    object-position: center top;
  }

  .gl-viewer:not(.no-caption) .gl-arrow {
    top: 36%;
  }

  .gl-caption {
    padding: 0 18px 20px;
  }

  .gl-caption-text {
    -webkit-line-clamp: 2;
  }

  .gl-thumbs {
    gap: 8px;
    margin-top: 12px;
  }

  .gl-thumb {
    width: 64px;
    border-radius: 3px;
  }

  .gl-home .gl-featured {
    margin-bottom: 28px;
  }

  .gl-back {
    min-height: 36px;
    padding: 8px 14px 8px 10px;
  }

  .gl-album-head {
    margin: 18px 0 18px;
  }

  .gl-album-head h2 {
    font-size: clamp(24px, 7vw, 30px);
  }

  .gl-album-description {
    font-size: 14.5px;
    line-height: 1.6;
  }
}


/* =========================================================
   MAIN SCREEN — automatic slideshow (all published photos and
   videos, folder by folder). Albums are not affected: every rule
   below applies only to .gl-viewer.is-slideshow.
   ========================================================= */

/* Cinematic cross-fade between items */
.gl-viewer.is-slideshow .gl-slide {
  transition: opacity 1.1s cubic-bezier(0.45, 0, 0.2, 1);
}

/* Slow, subtle push-in on photos while they are shown (no effect on
   photos shown whole, or on videos) */
.gl-viewer.is-slideshow .gl-slide img {
  transform: scale(1);
  transition: transform 7s linear;
  will-change: transform;
}

.gl-viewer.is-slideshow .gl-slide.is-visible:not(.is-contain):not(.is-video) img {
  transform: scale(1.06);
}

.gl-viewer.is-slideshow .gl-slide.is-contain img,
.gl-viewer.is-slideshow .gl-slide.is-video img {
  transform: none;
}

/* Discreet caption: project / folder name */
.gl-viewer.is-slideshow .gl-caption-title {
  font-size: clamp(18px, 1.9vw, 26px);
}

.gl-viewer.is-slideshow .gl-caption-text {
  font-size: 14px;
  -webkit-line-clamp: 1;
}

.gl-viewer.is-slideshow .gl-open-album {
  margin-top: 10px;
}

/* Thumbnail strip under the main screen (thumbnails load only when they
   scroll into the strip; see js/gallery.js) */
.gl-viewer.is-slideshow .gl-thumbs {
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.gl-viewer.is-slideshow .gl-thumb {
  scroll-snap-align: center;
}

/* Small "video" badge on video thumbnails (a camera icon, never a play button) */
.gl-thumb-badge {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(3, 13, 21, 0.72);
  color: #ffffff;
  pointer-events: none;
}

.gl-thumb-badge svg {
  width: 13px;
  height: 13px;
}

/* Thin progress line along the bottom edge of the screen */
.gl-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.gl-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gl-blue), var(--gl-blue-text));
  transform: scaleX(0);
  transform-origin: left center;
}

.gl-viewer.is-single .gl-progress {
  display: none;
}

@media (max-width: 600px) {
  .gl-viewer.is-slideshow .gl-caption-title {
    font-size: 18px;
  }

  .gl-viewer.is-slideshow .gl-caption-text {
    font-size: 13px;
  }

  .gl-viewer.is-slideshow .gl-open-album {
    margin-top: 8px;
  }
}

/* Reduced motion: plain fade-free change, no push-in (timing is slower in JS) */
@media (prefers-reduced-motion: reduce) {
  .gl-viewer.is-slideshow .gl-slide,
  .gl-viewer.is-slideshow .gl-slide img {
    transition: none !important;
    transform: none !important;
  }

  .gl-progress {
    display: none;
  }
}


/* =========================================================
   SLIDESHOW MODES — ALL | PHOTOS | VIDEOS | FOLDERS
   (segmented control above the main screen; folder selector
   only in FOLDERS mode)
   ========================================================= */

.gl-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.gl-mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--gl-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.gl-mode {
  min-height: 34px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gl-muted);
  font: 700 11.5px/1 var(--font-main);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s var(--gl-ease), color 0.25s var(--gl-ease);
}

.gl-mode:hover {
  color: #ffffff;
}

.gl-mode:focus-visible,
.gl-mode-folder:focus-visible {
  outline: 2px solid var(--gl-blue-text);
  outline-offset: 2px;
}

.gl-mode.is-active {
  background: var(--gl-blue);
  color: #ffffff;
}

.gl-mode-folder-wrap {
  position: relative;
  flex: 0 1 340px;
  min-width: 0;
}

.gl-mode-folder-wrap[hidden] {
  display: none !important;
}

.gl-mode-folder {
  width: 100%;
  min-height: 42px;
  padding: 10px 42px 10px 18px;
  border: 1px solid var(--gl-line-strong);
  border-radius: 999px;
  background: var(--gl-panel);
  color: #ffffff;
  font: 600 13.5px/1.2 var(--font-main);
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gl-mode-folder option {
  background: var(--gl-bg-2);
  color: #ffffff;
}

.gl-mode-folder-wrap svg {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  color: var(--gl-blue-text);
  transform: translateY(-50%);
  pointer-events: none;
}

.gl-mode-empty {
  margin: 0 0 40px;
  padding: 34px 24px;
  border: 1px dashed var(--gl-line-strong);
  border-radius: var(--gl-radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--gl-muted);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 600px) {
  .gl-modes {
    gap: 10px;
    margin-bottom: 12px;
  }

  .gl-mode-tabs {
    display: flex;
    justify-content: space-between;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .gl-mode-tabs::-webkit-scrollbar {
    display: none;
  }

  .gl-mode-tabs.is-scrollable:not(.is-at-end) {
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
    mask-image: linear-gradient(to right, #000 82%, transparent);
  }

  .gl-mode {
    flex: 1 0 auto;
    padding: 9px 10px;
    font-size: 10.5px;
    letter-spacing: 0.06em;
  }

  .gl-mode-folder-wrap {
    flex: 1 1 100%;
  }

  /* 16px: iPhone does not zoom the page when the selector is tapped */
  .gl-mode-folder {
    font-size: 16px;
  }

  .gl-mode-empty {
    margin-bottom: 28px;
    padding: 26px 18px;
    font-size: 14px;
  }
}

/* Small phones (320–380 px): the five options fit on one line */
@media (max-width: 380px) {
  .gl-mode {
    padding: 9px 6px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 330px) {
  .gl-mode {
    padding: 9px 4px;
  }
}
