/* ============ Gallery page: mosaic of tiles, each opening in a lightbox ============ */
.gallery-hero { position: relative; z-index: 1; padding: 220px var(--pad) 100px; text-align: center; }
.gallery-hero h1 { font-size: 82px; line-height: 1; letter-spacing: -0.04em; font-weight: 500; }
.gallery-hero p { width: 520px; max-width: 100%; margin: 28px auto 0; font-size: 20px; line-height: 1.3; letter-spacing: -0.03em; color: var(--text-2); }

.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; grid-auto-flow: dense; gap: 16px;
  width: 1360px; max-width: calc(100% - 2 * var(--pad)); margin: 0 auto; padding-bottom: 200px; }
.tile { position: relative; display: block; overflow: hidden; border-radius: 24px; background: var(--surface-2); text-align: left;
  isolation: isolate; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile--big { grid-column: span 2; grid-row: span 2; }
.tile:hover { transform: scale(.985); box-shadow: 0 30px 70px rgba(29,54,85,.16); }
.tile:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }

.tile__img, .tile__art { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1s var(--ease); }
.tile__img { object-fit: cover; }
.tile:hover .tile__img, .tile:hover .tile__art { transform: scale(1.05); }

/* placeholder art in the brand palette: a rising sun over a two-tone wash */
.tile__art, .lightbox__art { display: block; background: linear-gradient(160deg, var(--c1), var(--c2)); }
.tile__sun, .lightbox__art::after { position: absolute; left: 50%; bottom: -28%; width: 70%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,246,223,.95) 0 34%, rgba(254,217,112,.55) 35% 52%, transparent 70%); opacity: .7; }
.lightbox__art::after { content: ""; }
.tile__soon { position: absolute; top: 18px; left: 18px; padding: 7px 12px; border-radius: 99px; font-style: normal; font-size: 12px; line-height: 1;
  font-weight: 500; letter-spacing: -0.01em; color: var(--navy); background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

.tile__cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: 60px 64px 22px 22px;
  color: #fff; background: linear-gradient(to top, rgba(19,37,60,.78), rgba(19,37,60,0)); }
.tile__cap small { font-size: 12px; line-height: 1; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; opacity: .8; }
.tile__cap b { font-size: 22px; line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; }
.tile--big .tile__cap b { font-size: 32px; }
.tile__plus { position: absolute; right: 18px; bottom: 20px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  color: var(--navy); background: var(--gold); transition: transform .6s var(--ease); }
.tile__plus svg { width: 12px; height: 12px; }
.tile:hover .tile__plus { transform: rotate(90deg); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; margin: auto; width: min(1120px, calc(100% - 2 * var(--pad))); max-height: calc(100dvh - 80px);
  padding: 0; border: 0; border-radius: 28px; background: var(--surface); color: var(--fg); overflow: hidden;
  box-shadow: 0 40px 120px rgba(19,37,60,.35); }
.lightbox::backdrop { background: rgba(19,37,60,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lightbox[open] { animation: lb-in .5s var(--ease); }
.lightbox[open]::backdrop { animation: lb-fade .4s var(--ease); }
.lightbox.is-closing { animation: lb-out .26s var(--ease-io) forwards; }
.lightbox.is-closing::backdrop { animation: lb-fade .26s var(--ease-io) reverse forwards; }
@keyframes lb-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes lb-out { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes lb-fade { from { opacity: 0; } }

.lightbox__card { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 560px; max-height: inherit; }
.lightbox__media { position: relative; margin: 0; min-height: 320px; background: var(--surface-2); }
.lightbox__media img, .lightbox__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lightbox__art { overflow: hidden; }
.lightbox__media [hidden] { display: none; }
.lightbox__text { display: flex; flex-direction: column; padding: 56px 44px 36px; overflow-y: auto; }
.lightbox__text small { font-size: 12px; line-height: 1; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.lightbox__text h2 { margin-top: 16px; font-size: 40px; line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; }
.lightbox__text p { margin-top: 20px; font-size: 18px; line-height: 1.45; letter-spacing: -0.02em; font-weight: 400; color: var(--text-2); }
.lightbox__nav { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 32px; }
.lightbox__nav span { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.lightbox__btn, .lightbox__close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2);
  transition: background .3s var(--ease); }
.lightbox__btn:hover, .lightbox__close:hover { background: var(--surface-3); }
.lightbox__btn svg, .lightbox__close svg { width: 12px; height: 12px; }
.lightbox__close { position: absolute; top: 16px; right: 16px; z-index: 2; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

@media (max-width: 1100px) {
  .gallery-hero h1 { font-size: 54px; }
  .mosaic { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; }
}
@media (max-width: 809px) {
  .gallery-hero { padding: 160px 20px 60px; }
  .gallery-hero h1 { font-size: 42px; }
  .gallery-hero p { font-size: 17px; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; gap: 10px; max-width: calc(100% - 40px); padding-bottom: 140px; }
  .tile { border-radius: 18px; }
  .tile__cap { padding: 40px 50px 14px 14px; }
  .tile__cap b, .tile--big .tile__cap b { font-size: 17px; }
  .tile__cap small { font-size: 10px; }
  .tile__soon { top: 12px; left: 12px; font-size: 11px; padding: 6px 10px; }
  .tile__plus { right: 12px; bottom: 14px; width: 28px; height: 28px; }

  .lightbox { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 22px; }
  .lightbox__card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 0; }
  .lightbox__media { min-height: 0; aspect-ratio: 4 / 3; }
  .lightbox__text { padding: 26px 22px 22px; }
  .lightbox__text h2 { font-size: 28px; }
  .lightbox__text p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox[open], .lightbox[open]::backdrop, .lightbox.is-closing, .lightbox.is-closing::backdrop { animation-duration: 1ms; }
}
