/* FreshAir — patterns added with the database-driven site: photo gallery + lightbox, video, document list,
   filled certificate frames, vacancy items. Loaded after site.css and built only from its tokens. */

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery__item { margin: 0; }
.gallery__item a { display: block; border-radius: var(--r-img); overflow: hidden; background: var(--card); }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease, opacity .2s ease; }
.gallery__item a:hover img { transform: scale(1.03); }
.gallery__item a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.prose > .gallery, .prose > .video { margin-top: 4px; }
@media (max-width: 899px) { .gallery, .gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 599px) { .gallery, .gallery--2, .gallery--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- lightbox (site-ext.js) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center;
  padding: 56px 16px 20px; background: rgba(2, 18, 31, .96); color: var(--fg); }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(100%, 1600px); max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-img);
  touch-action: pan-y; user-select: none; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 46px; margin-top: 14px;
  color: var(--muted); font-size: .875rem; text-align: center; }
.lightbox__caption { color: var(--text); max-width: 60ch; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: rgba(14, 16, 17, .6); color: var(--fg); cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.lightbox__btn:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.lightbox__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.lightbox__btn .ico { width: 22px; height: 22px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__prev .ico { transform: scaleX(-1); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox--single .lightbox__prev, .lightbox--single .lightbox__next { display: none; }
.lb-open, .lb-open body { overflow: hidden; }
/* the lightbox keeps its dark backdrop in the light theme: re-scope the text tokens inside it */
html[data-theme="light"] .lightbox { --fg: #F4F5F2; --text: #D2D5D2; --muted: #9EA3A0; --line-2: rgba(255, 255, 255, .28); --focus: #D3FA44; }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; } .lightbox { padding-bottom: 76px; } }

/* ---------- video ---------- */
.video { margin: 0; }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-img); background: var(--bg-2); }
.video figcaption { margin-top: 8px; color: var(--muted); font-size: .875rem; }

/* ---------- document downloads ---------- */
.prose .docs { list-style: none; padding: 0; gap: 0; }
.docs__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.docs__item:first-child { padding-top: 0; }
.docs__item:last-child { border-bottom: 0; }
.docs__meta { color: var(--muted); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
.docs__item p { flex-basis: 100%; color: var(--text); font-size: .9375rem; }

/* ---------- director quotes: swipe between slides ---------- */
.quote-card { touch-action: pan-y; }
.quote-card.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.quote-card.is-dragging .quote-card__body { transition: none; }
.quote-card__body { transition: transform .18s ease-out; will-change: transform; }
.quote-slide.is-in-right { animation: quote-in-right .28s ease-out; }
.quote-slide.is-in-left { animation: quote-in-left .28s ease-out; }
@keyframes quote-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes quote-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .quote-slide.is-in-right, .quote-slide.is-in-left { animation: none; } .quote-card__body { transition: none; } }

/* ---------- press kit: logo previews on fixed swatches (white / dark in both themes, by design) ---------- */
.prose .logo-pack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* min-width: 0 everywhere: the logo's intrinsic width (640px) must never widen the tile beyond its column */
.logo-tile { margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.logo-tile__canvas { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; min-width: 0; padding: clamp(18px, 4vw, 36px); border-radius: var(--r-card); border: 1px solid var(--line); overflow: hidden; }
.logo-tile--light .logo-tile__canvas { background: #FFFFFF; }
.logo-tile--dark .logo-tile__canvas { background: #0E1011; }
.logo-tile__canvas img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; object-fit: contain; }
.logo-tile figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-width: 0; color: var(--muted); font-size: .8125rem; }
.logo-tile figcaption span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .prose .logo-pack { grid-template-columns: 1fr; } }

/* ---------- certificate frames with real images ---------- */
.cert { margin: 0; display: grid; gap: 8px; align-content: start; }
.frame--filled { padding: 10px; overflow: hidden; }
.frame--filled a { display: block; width: 100%; height: 100%; border-radius: calc(var(--r-card) - 4px); }
.frame--filled img { width: 100%; height: 100%; object-fit: contain; }
.cert figcaption { color: var(--muted); font-size: .8125rem; text-align: center; }

/* ---------- vacancies (reuse .faq details) ---------- */
.vacancies .faq__a { display: grid; gap: 12px; }
.vacancy__meta { margin-bottom: 2px; }
.vacancies .faq__a ul:not(.tags) { display: grid; gap: 8px; padding-left: 1.2em; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .gallery__item img, .lightbox__btn { transition: none; }
  .gallery__item a:hover img { transform: none; }
}

/* ---------- footer "made by" credit (settings.footer.credit_label) ---------- */
.footer-credit { color: var(--muted); font-size: inherit; min-width: 0; overflow-wrap: anywhere; }
.footer-credit .link { color: inherit; }
.footer-credit .link:hover { color: var(--text); }
@media (max-width: 560px) { .footer-credit { flex-basis: 100%; } }
