/* =====================================================================
   Glimpses page — hero, edition filter, bento photo wall, films, CTA
   Builds on css/style.css tokens (--ink, --accent, --plate, --r …) and
   reuses its .lightbox and .legacy film styles untouched.
   ===================================================================== */

/* ---------- Hero ---------- */
.gl-hero {
  position: relative;
  padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 112px);
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(4, 183, 216, 0.22), transparent 70%),
    radial-gradient(50% 70% at 0% 100%, rgba(0, 110, 166, 0.35), transparent 70%),
    var(--plate);
  color: var(--on-plate);
  overflow: hidden;
  isolation: isolate;
}

/* the city skyline the rest of the site uses, faint behind the type */
.gl-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: var(--bg) bottom center / cover no-repeat;
  opacity: 0.08;
  z-index: -1;
}

.gl-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.gl-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--on-plate-muted);
}

.gl-crumbs a { color: var(--sky); }
.gl-crumbs a:hover { color: #fff; text-decoration: underline; }
.gl-crumbs span[aria-hidden] { opacity: 0.5; }

.gl-hero .eyebrow { color: var(--sky); }

.gl-hero__title {
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #fff;
}

.gl-hero__title em {
  font-style: normal;
  background-image: linear-gradient(92deg, #ffffff 0%, #a1e7f3 50%, #04b7d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gl-hero__lead {
  margin-top: 22px;
  max-width: 54ch;
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.7;
  color: var(--on-plate-muted);
}

.gl-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.gl-stat {
  min-width: 128px;
  padding: 14px 18px;
  border: 1px solid var(--line-plate);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.05);
}

.gl-stat b {
  display: block;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.gl-stat span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
}

.gl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* three photographs fanned out, the middle one on top */
.gl-collage {
  position: relative;
  aspect-ratio: 5 / 4;
}

.gl-collage figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.7);
  background: var(--plate-2);
}

.gl-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gl-collage figure:nth-child(1) { width: 58%; aspect-ratio: 3 / 2; top: 0; left: 0; rotate: -5deg; }
.gl-collage figure:nth-child(2) { width: 64%; aspect-ratio: 3 / 2; top: 22%; left: 20%; z-index: 2; rotate: 2deg; }
.gl-collage figure:nth-child(3) { width: 52%; aspect-ratio: 3 / 2; bottom: 0; right: 0; rotate: 6deg; }

.gl-collage__badge {
  position: absolute;
  z-index: 3;
  left: 4%;
  bottom: 6%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}

.gl-collage__badge i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.gl-collage__badge svg { width: 16px; height: 16px; }

/* ---------- Facebook glimpses ----------
   A masonry of cards (CSS columns, so tall posts and short videos pack
   without gaps). Each card: title row, the Facebook frame, a link out. */
.gl-gallery { background: var(--wash); }

.gl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.gl-bar .shead { margin: 0; }
.gl-bar .h2 { margin-inline: 0; }

.gl-fb-follow { gap: 10px; min-height: 48px; padding: 0 22px; }
.gl-fb-follow svg { width: 18px; height: 18px; color: #1877f2; }

/* A sideways strip that glides on its own (js/glimpses.js → marquee). */
.gl-fb {
  display: flex;
  gap: clamp(14px, 1.6vw, 22px);
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 8px 4px 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.gl-fb::-webkit-scrollbar { display: none; }
.gl-fb:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r); }
.gl-fb > .gl-fb__card { flex: 0 0 clamp(270px, 78vw, 370px); }

.gl-fb__ctrl {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.gl-fb__ctrl[hidden] { display: none; }

.gl-fb__btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gl-fb__btn svg { width: 18px; height: 18px; }
.gl-fb__btn:hover,
.gl-fb__btn:focus-visible { background: var(--ink); color: #fff; transform: translateY(-2px); }
.gl-fb__toggle .i-play,
.gl-fb__toggle[aria-pressed="true"] .i-pause { display: none; }
.gl-fb__toggle[aria-pressed="true"] .i-play { display: block; }

.gl-fb__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.35s ease;
}

.gl-fb__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.gl-fb__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.gl-fb__badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
}

.gl-fb__badge svg { width: 16px; height: 16px; }

.gl-fb__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.gl-fb__frame {
  position: relative;
  width: 100%;
  background:
    linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%) var(--tint-1);
  background-size: 200% 100%;
  animation: glShimmer 1.4s linear infinite;
}

.gl-fb__card.is-loaded .gl-fb__frame { animation: none; background: #fff; }

.gl-fb__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.gl-fb__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  transition: background 0.2s ease, color 0.2s ease;
}

.gl-fb__link svg { width: 15px; height: 15px; }
.gl-fb__link:hover,
.gl-fb__link:focus-visible { background: var(--ink); color: #fff; }

/* placeholders while the sheet is read */
.gl-fb__card--skel {
  height: 380px;
  background:
    linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%) var(--tint-1);
  background-size: 200% 100%;
  animation: glShimmer 1.4s linear infinite;
}

.gl-fb__card--skel:nth-child(2) { height: 260px; }

@keyframes glShimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

.gl-empty {
  padding: 48px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.gl-empty a { color: var(--accent); font-weight: 700; text-decoration: underline; }

/* ---------- Films ---------- */
.gl-films .legacy__grid { margin-top: 0; }

/* ---------- CTA band ---------- */
.gl-cta {
  padding-block: var(--pad-sm);
  background: #fff;
}

.gl-cta__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(4, 183, 216, 0.3), transparent 60%),
    linear-gradient(120deg, var(--plate) 0%, var(--plate-2) 100%);
  color: var(--on-plate);
  overflow: hidden;
}

.gl-cta__card h2 {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
}

.gl-cta__card p {
  margin-top: 12px;
  max-width: 56ch;
  line-height: 1.65;
  color: var(--on-plate-muted);
}

.gl-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .gl-hero__grid { grid-template-columns: 1fr; }
  .gl-collage { max-width: 620px; width: 100%; margin-inline: auto; }
}

@media (max-width: 900px) {
  .gl-cta__card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .gl-stat { min-width: 0; flex: 1 1 30%; padding: 12px 14px; }
  .gl-stat span { font-size: 10px; letter-spacing: 0.06em; }
  .gl-fb-follow { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .gl-fb__card { transition: none; }
  .gl-fb__card:hover { transform: none; }
  .gl-fb__frame, .gl-fb__card--skel { animation: none; }
}

/* =====================================================================
   Photo gallery — edition filter, bento wall, lightbox caption
   ===================================================================== */
.gl-photos { background: #fff; }

.gl-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.gl-filter button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.gl-filter button:hover { color: var(--accent); background: var(--accent-soft); }
.gl-filter button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.gl-filter small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--tint-1);
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gl-filter button[aria-pressed="true"] small { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* Four columns of equal rows; js/glimpses.js sets .is-big / .is-wide on
   the visible photos after each filter and closes the last row. */
.gl-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 15vw, 210px);
  grid-auto-flow: dense;
  gap: clamp(10px, 1.2vw, 16px);
}

.gl-tile {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--tint-1);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  transition: transform 0.4s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.4s ease, opacity 0.35s ease;
}

.gl-tile.is-big { grid-column: span 2; grid-row: span 2; }
.gl-tile.is-wide { grid-column: span 2; }
.gl-tile[hidden] { display: none; }

.gl-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.gl-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(3, 4, 60, 0.88) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gl-tile__cap {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px;
  color: #fff;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.35s ease, translate 0.35s ease;
}

.gl-tile__tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-bright);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gl-tag-s { display: none; }

.gl-tile__txt {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.gl-tile__zoom {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  opacity: 0;
  scale: 0.8;
  transition: opacity 0.3s ease, scale 0.3s ease;
}

.gl-tile__zoom svg { width: 18px; height: 18px; }

.gl-tile:hover,
.gl-tile:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gl-tile:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; }
.gl-tile:hover img,
.gl-tile:focus-visible img { transform: scale(1.06); }
.gl-tile:hover::after,
.gl-tile:focus-visible::after,
.gl-tile:hover .gl-tile__cap,
.gl-tile:focus-visible .gl-tile__cap,
.gl-tile:hover .gl-tile__zoom,
.gl-tile:focus-visible .gl-tile__zoom { opacity: 1; translate: 0 0; scale: 1; }

.gl-wall.is-swapping .gl-tile { opacity: 0; }

.lightbox__cap {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

.lightbox__cap + .lightbox__meta { margin-top: 6px; }

@media (max-width: 900px) {
  .gl-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .gl-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44vw; }
  .gl-tile.is-big { grid-row: span 1; }
  .gl-filter { border-radius: var(--r); width: 100%; }
  .gl-filter button { flex: 1 1 auto; justify-content: center; padding: 0 12px; }
  .gl-tile::after { opacity: 0.7; }
  .gl-tile__cap { opacity: 1; translate: 0 0; padding: 10px 12px; }
  .gl-tile__txt { display: none; }
  .gl-tile__tag { margin-bottom: 0; padding: 3px 8px; font-size: 9.5px; letter-spacing: 0.08em; }
  .gl-tile:not(.is-big) .gl-tag-l { display: none; }
  .gl-tile:not(.is-big) .gl-tag-s { display: inline; }
  .gl-tile.is-big .gl-tile__tag { margin-bottom: 4px; }
  .gl-tile.is-big .gl-tile__txt { display: block; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .gl-tile, .gl-tile img, .gl-tile::after, .gl-tile__cap, .gl-tile__zoom { transition: none; }
  .gl-tile:hover, .gl-tile:focus-visible { transform: none; }
  .gl-tile:hover img, .gl-tile:focus-visible img { transform: none; }
}
