/* ===========================================================
   airbag — archivo fotográfico
   =========================================================== */

:root {
  --black: #000000;
  --white: #ffffff;
  --grey: #8a8a8a;
  --grey-dim: #5c5c5c;
  --hairline: #1a1a1a;
  --gap: 7px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Archivo", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--white); color: var(--black); }

/* subtle film-grain overlay, signature texture of the site */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------- HOME ---------------- */

.hero {
  text-align: center;
  padding: 2vh 5vw 6vh;
  position: relative;
  z-index: 2;
}

.brand {
  margin: 0;
  font-weight: 900;
  font-style: normal;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  font-size: clamp(3rem, 12vw, 7rem);
  line-height: 0.9;
}

.brand-sub {
  margin: 1.6em 0 0;
  color: var(--grey);
  text-transform: uppercase;
  font-family: "Archivo Expanded", "Archivo", sans-serif;
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
}

.cards {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5vw;
  background: var(--black);
  max-width: 900px;
  margin: 0 auto;
  padding: 0 4vw 2vw;
}

.card {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
  display: block;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(35%) contrast(1.05);
  transform: scale(1.02);
  transition: transform 0.6s ease, filter 0.4s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.35) 100%);
  transition: background 0.4s ease;
}

.card:hover img {
  transform: scale(1.08);
  filter: grayscale(0%) contrast(1.05);
}

.card:hover::after {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.05) 55%, rgba(0,0,0,0.25) 100%);
}

.card-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 1.6rem 1.4rem 0.6rem;
  max-width: 90%;
  color: var(--white);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: clamp(0.8rem, 3.2vw, 1.5rem);
  line-height: 1.15;
}

.home-footer {
  text-align: center;
  color: var(--grey-dim);
  font-size: 0.7rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  padding: 2rem 8vw 0.2rem;
  max-width: 1000px;
  margin: auto auto 0;
  position: relative;
  z-index: 2;
}

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; gap: 10vw; padding: 0 6vw 2vw; }
  .card { aspect-ratio: 16 / 10; }
  .hero { padding: 10vh 6vw 5vh; }
}

/* ---------------- GALLERY ---------------- */

.gallery-page { background: var(--black); }

.gallery-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 4vw;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}

.back {
  font-size: 1.4rem;
  color: var(--grey);
  transition: color 0.2s ease, transform 0.2s ease;
}
.back:hover { color: var(--white); transform: translateX(-3px); }

.gallery-title {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
}

.grid {
  position: relative;
  padding: var(--gap);
  background: var(--black);
}

.thumb {
  position: absolute;
  border-radius: 3px;
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
  border: none;
  padding: 0;
  appearance: none;
  font: inherit;
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
  will-change: transform;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb:hover,
.thumb:focus-visible {
  transform: scale(1.12);
  z-index: 5;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
}

.thumb:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.sentinel { height: 1px; }

.loading-msg {
  text-align: center;
  color: var(--grey-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  padding: 2.5rem 0 4rem;
}
.loading-msg[hidden] { display: none; }


/* ---------------- LIGHTBOX ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}
.lightbox[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-stage {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: pop 0.2s ease;
}

.lightbox-caption {
  margin: 0.9rem 0 0;
  text-align: center;
  color: var(--grey-dim);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  opacity: 0.75;
}
.lightbox-caption[hidden] { display: none; }

@keyframes pop {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  z-index: 101;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { opacity: 1; }

.lightbox-close {
  top: 1.2rem;
  right: 1.4rem;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.6rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.8rem;
  padding: 0.5rem 0.9rem;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

@media (max-width: 640px) {
  .lightbox-nav { font-size: 2.1rem; padding: 0.4rem 0.6rem; }
  .lightbox-close { font-size: 1.3rem; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.lightbox-download {
  margin-top: 0.9rem;
  color: var(--grey);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.lightbox-download:hover {
  opacity: 1;
  color: var(--white);
}

.credit {
  margin-top: 0.8rem;
  opacity: 0.6;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.menu-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.2rem;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--grey);
}

.menu-dropdown {
  position: fixed;
  top: 3.4rem;
  right: 1.2rem;
  z-index: 30;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  min-width: 170px;
  padding: 0.4rem 0;
  backdrop-filter: blur(6px);
}
.menu-dropdown[hidden] { display: none; }

.menu-dropdown a {
  display: block;
  padding: 0.65rem 1.1rem;
  color: var(--grey);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  transition: color 0.2s ease, background 0.2s ease;
}
.menu-dropdown a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.thanks-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 6vw;
  text-align: center;
}

.thanks-back {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  font-size: 1.4rem;
  color: var(--grey);
  z-index: 30;
  transition: color 0.2s ease, transform 0.2s ease;
}
.thanks-back:hover { color: var(--white); transform: translateX(-3px); }

.thanks-title {
  font-weight: 700;
  text-transform: lowercase;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin: 0 0 1rem;
}

.thanks-text {
  color: var(--grey);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 2.4rem;
}

.thanks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.thanks-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  color: var(--grey);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.thanks-list a:hover { color: var(--white); }

.x-icon {
  width: 16px;
  height: 16px;
  fill: var(--grey);
  transition: fill 0.2s ease;
}
.thanks-list a:hover .x-icon { fill: var(--white); }

.credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.credit a:hover {
  color: var(--white);
}

.thanks-credit {
  margin-top: 2.5rem;
  color: var(--grey);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.thanks-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.thanks-credit a:hover {
  color: var(--white);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 4vw 0.4rem;
}
.filter-bar[hidden] { display: none; }

.filter-chip {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--grey);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.filter-chip:hover {
  color: var(--white);
  border-color: var(--grey-dim);
}
.filter-chip.active {
  color: var(--black);
  background: var(--white);
  border-color: var(--white);
}