/* Shared gallery styles. Each page sets the colour tokens in its own :root block. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Futura", "Futura PT", "Jost", "Century Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

/* ---------- Header ---------- */
.g-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
  padding: 0 32px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.g-nav__logo img {
  display: block;
  height: 44px;
  width: auto;
  filter: var(--logo-filter, none);
}
.g-nav ul {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.g-nav ul a {
  position: relative;
  display: block;
  padding: 10px 14px;
  color: var(--nav-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}
.g-nav ul a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.g-nav ul a:hover::after,
.g-nav ul a[aria-current="page"]::after {
  transform: scaleX(1);
}
.g-nav__cta {
  padding: 11px 20px;
  border: 2px solid var(--nav-text);
  border-radius: 999px;
  color: var(--nav-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.g-nav__cta:hover {
  background: var(--nav-text);
  color: var(--nav-bg);
}

/* ---------- Hero ---------- */
.g-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 32px 56px;
  text-align: center;
}
.g-hero__kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.g-hero h1 {
  margin: 0 auto;
  max-width: 1000px;
  font-size: clamp(42px, 7vw, 104px);
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
}
/* Each word slides up from behind a mask */
.g-hero h1 .w {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
  vertical-align: top;
}
.g-hero h1 .w > span {
  display: inline-block;
  transform: translateY(105%);
  animation: word-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 90ms + 150ms);
}
@keyframes word-rise {
  to {
    transform: none;
  }
}
.g-hero p {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  opacity: 0;
  animation: fade-up 0.8s ease 0.7s forwards;
}
.g-count {
  display: inline-flex;
  gap: 36px;
  margin-top: 32px;
  opacity: 0;
  animation: fade-up 0.8s ease 0.85s forwards;
}
.g-count b {
  display: block;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}
.g-count span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Filters ---------- */
.g-filters {
  position: sticky;
  top: 76px;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 14px 16px;
  background: var(--filter-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.g-filters__track {
  position: relative;
  display: flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  scrollbar-width: none;
}
.g-filters__track::-webkit-scrollbar {
  display: none;
}
/* Pill that slides to the active filter */
.g-filters__pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 999px;
  background: var(--accent);
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.g-filters button {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.3s ease;
}
.g-filters button[aria-pressed="true"] {
  color: var(--accent-text);
}
.g-filters button small {
  margin-left: 6px;
  opacity: 0.6;
  font-size: 11px;
}

/* ---------- Grid (masonry columns) ---------- */
.g-grid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 32px 32px 96px;
  columns: 4 300px;
  column-gap: 14px;
}
.g-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  cursor: zoom-in;
  break-inside: avoid;
  /* Start hidden; revealed as it scrolls into view */
  opacity: 0;
  clip-path: inset(18% 0 0 0);
  transform: translateY(40px);
  transition:
    opacity 0.7s ease,
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    clip-path 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.g-item.is-in {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: none;
}
.g-item.is-out {
  opacity: 0;
  transform: scale(0.94);
  transition-duration: 0.25s;
  transition-delay: 0ms;
}
.g-item[hidden] {
  display: none;
}
.g-item img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.08);
  transition:
    transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.5s ease;
}
.g-item.is-in img {
  transform: scale(1);
}
.g-item:hover img,
.g-item:focus-visible img {
  transform: scale(1.06);
}
.g-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.65));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.g-item:hover::after,
.g-item:focus-visible::after {
  opacity: 1;
}
.g-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.g-item__cap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.g-item:hover .g-item__cap,
.g-item:focus-visible .g-item__cap {
  opacity: 1;
  transform: none;
}
.g-item__cap svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ---------- Lightbox ---------- */
.g-lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.g-lb.is-open {
  display: block;
}
.g-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.94);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.g-lb.is-shown .g-lb__backdrop {
  opacity: 1;
}
.g-lb__img {
  position: fixed;
  top: 0;
  left: 0;
  object-fit: contain;
  transform-origin: 0 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity;
}
.g-lb__img.is-animating {
  transition:
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.35s ease;
}
.g-lb__ui {
  opacity: 0;
  transition: opacity 0.35s ease 0.2s;
}
.g-lb.is-shown .g-lb__ui {
  opacity: 1;
}
.g-lb__btn {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.g-lb__btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}
.g-lb__btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.g-lb__close {
  top: 20px;
  right: 20px;
}
.g-lb__prev {
  top: 50%;
  left: 20px;
  margin-top: -26px;
}
.g-lb__next {
  top: 50%;
  right: 20px;
  margin-top: -26px;
}
.g-lb__meta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
}
.g-lb__meta b {
  color: #fff;
}

/* ---------- Sticky "Let's build your story" bar ---------- */
.g-pass {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(820px, calc(100% - 32px));
  padding: 12px 12px 12px 24px;
  border-radius: 999px;
  background: var(--pass-bg);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  /* Slides up shortly after the page loads */
  opacity: 0;
  transform: translate(-50%, 140%);
  transition:
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.4s ease;
}
.g-pass.is-up {
  opacity: 1;
  transform: translate(-50%, 0);
}
.g-pass[hidden] {
  display: none;
}
.g-pass p {
  flex: 1;
  margin: 0;
  font-size: 15px;
}
.g-pass b {
  color: var(--pass-accent);
}
.g-pass a {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--pass-accent);
  color: var(--pass-accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.2s ease;
}
.g-pass a:hover {
  transform: scale(1.04);
}
.g-pass button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.g-pass button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* ---------- Footer ---------- */
.g-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px;
  background: var(--nav-bg);
  color: var(--nav-text);
  font-size: 14px;
}
.g-foot a {
  text-decoration: none;
}
.g-foot a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .g-nav ul {
    display: none;
  }
  .g-nav__cta {
    margin-left: auto;
  }
  .g-pass__more {
    display: none;
  }
}
@media (max-width: 640px) {
  .g-nav {
    height: 64px;
    padding: 0 16px;
  }
  .g-nav__logo img {
    height: 34px;
  }
  .g-filters {
    top: 64px;
    justify-content: flex-start;
  }
  .g-hero {
    padding: 64px 16px 40px;
  }
  .g-grid {
    padding: 20px 12px 72px;
    columns: 2;
    column-gap: 8px;
  }
  .g-item {
    margin-bottom: 8px;
  }
  .g-lb__prev,
  .g-lb__next {
    top: auto;
    bottom: 64px;
    margin-top: 0;
  }
  .g-foot {
    padding: 24px 16px 96px;
  }
  /* Phones: one tidy row with the short message only */
  .g-pass {
    width: calc(100% - 24px);
    bottom: 12px;
    gap: 10px;
    padding: 8px 8px 8px 16px;
    border-radius: 16px;
  }
  .g-pass__more {
    display: none;
  }
  .g-pass p {
    font-size: 14px;
    line-height: 1.3;
  }
  .g-pass a {
    padding: 9px 14px;
    font-size: 11px;
  }
  .g-pass button {
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 380px) {
  .g-pass {
    gap: 8px;
    padding-left: 12px;
  }
  .g-pass p {
    font-size: 13px;
  }
  .g-pass a {
    padding: 9px 10px;
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
