/* =================================================================
   IT'S A FAKE WEDDING — album.css
   Full-edition photo album: head, thumbnail grid, viewer.
   Loaded only by /album/* pages. Uses the tokens from styles.css.
   ================================================================= */

/* ---------- head ---------- */
.alb__head { padding-bottom: 0; text-align: center; }
.alb__city {
  font-family: var(--display, "Bebas Neue", Impact, sans-serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 9rem);
  line-height: .92;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--cream);
  margin: .5rem 0 0;
}
.alb__date {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(.95rem, 3.4vw, 1.3rem);
  letter-spacing: .34em;
  color: var(--accent);
  margin: .2rem 0 1.4rem;
}
.alb__lede {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  line-height: 1.45;
  color: var(--cream);
  max-width: 34rem;
  margin: 0 auto .7rem;
}
.alb__lede strong { color: var(--accent); font-weight: 600; font-style: italic; }
.alb__meta {
  font-size: .64rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--cream-3);
  margin: 0 0 1.6rem;
}
.alb__howto {
  font-size: .9rem;
  color: var(--cream-2);
  max-width: 30rem;
  margin: 0 auto;
}
.alb__howto a { color: var(--cream); border-bottom: 1px solid var(--accent); }
.alb__howto a:hover { color: var(--accent); }

/* ---------- grid ---------- */
.alb__section { padding-top: clamp(2.2rem, 6vw, 3.4rem); }
.alb__loading { text-align: center; color: var(--cream-3); font-size: .85rem; padding: 3rem 0; }

/* the tabs follow you down: 529 photos is a long scroll.
   --navh is measured by album.js, because .nav is fixed and shrinks on phones. */
.alb__section .gal-tabs {
  position: sticky;
  top: var(--navh, 86px);
  z-index: 60;
  margin: 0 calc(var(--gut) * -1) 1.3rem;
  padding: .85rem var(--gut);
  background: rgba(10,10,10,.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
/* on a phone the tabs would wrap to two rows and eat a fifth of the screen,
   so they become one swipeable row instead */
@media (max-width: 720px) {
  .alb__section .gal-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .alb__section .gal-tabs::-webkit-scrollbar { display: none; }
  .alb__section .gal-tab { flex: 0 0 auto; }
}
.alb__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(104px, 13.5vw, 184px), 1fr));
  gap: 6px;
}
.alb__tile {
  display: block;
  padding: 0;
  border: 0;
  background: var(--bg-3);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.alb__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s var(--ease-out), opacity .4s var(--ease-out);
}
.alb__tile:hover img { transform: scale(1.07); }
.alb__tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alb__tile[hidden] { display: none; }

.alb__back { text-align: center; margin-top: clamp(2.2rem, 5vw, 3.4rem); }

/* ---------- viewer ---------- */
.alb__lb {
  position: fixed; inset: 0; z-index: 1200;
  display: none; place-items: center;
  background: rgba(6,6,6,.985);
  padding: clamp(1rem, 4vw, 3rem);
}
.alb__lb.is-open { display: grid; }
.alb__stage { margin: 0; display: grid; place-items: center; width: 100%; height: 100%; }
.alb__lb img {
  max-width: 100%;
  max-height: 82vh;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
}
.alb__btn {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line-2);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.4rem;
  color: var(--cream);
  transition: background .3s var(--ease-out);
}
.alb__btn:hover { background: rgba(255,255,255,.18); }
.alb__close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.alb__prev { left: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.alb__next { right: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }

.alb__bar {
  position: absolute;
  bottom: clamp(.8rem, 3vw, 1.8rem);
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream-3);
}
.alb__dl {
  color: var(--cream);
  border: 1px solid var(--line-2);
  padding: .6rem 1.1rem;
  letter-spacing: .18em;
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out);
}
.alb__dl:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* keep the arrows off the photo on small screens */
@media (max-width: 560px) {
  .alb__btn { width: 40px; height: 40px; font-size: 1.15rem; }
  .alb__lb img { max-height: 72vh; }
}

@media (prefers-reduced-motion: reduce) {
  .alb__tile img { transition: none; }
  .alb__tile:hover img { transform: none; }
}
