:root {
  --background: #101010;
  --foreground: #f8f7f2;
  --accent: #f15f4b;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

.photo-wall-shell {
  position: relative;
  min-height: 100vh;
  padding: 6px;
  background: var(--background);
}

.goliad-wordmark {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  color: rgba(248, 191, 72, 0.35);
  font-family: "Arial Black", Impact, Haettenschweiler, "Franklin Gothic Heavy", sans-serif;
  font-weight: 900;
  line-height: 0.8;
  pointer-events: none;
  text-transform: uppercase;
  user-select: none;
}

.wordmark-grid {
  display: grid;
  width: 100%;
  height: 100dvh;
  align-items: center;
  justify-items: center;
}

.wordmark-landscape {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.wordmark-portrait {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.wordmark-letter {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: min(52vh, 34rem);
  letter-spacing: 0;
}

.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.gallery-row {
  display: flex;
  width: 100%;
}

.gallery-tile {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #242424;
  cursor: pointer;
  isolation: isolate;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
}

.gallery-tile.is-active {
  z-index: 30;
}

.gallery-tile::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.2));
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.gallery-tile:focus-visible::after {
  opacity: 1;
}

.gallery-tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.tile-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: scale(1.002);
  transition:
    opacity 420ms ease,
    transform 650ms ease;
}

.tile-image-alt {
  z-index: 2;
  opacity: 0;
}

.tile-image-alt.is-visible {
  opacity: 1;
  transform: scale(1.035);
}

.scroll-sentinel {
  width: 100%;
  height: 1px;
}

@media (max-width: 640px) {
  .photo-wall-shell {
    padding: 4px;
  }

  .gallery-grid {
    gap: 4px;
  }

  .gallery-tile:focus-visible {
    outline-width: 2px;
    outline-offset: 2px;
  }
}

@media (orientation: portrait) {
  .wordmark-landscape {
    display: none;
  }

  .wordmark-portrait {
    display: grid;
  }

  .wordmark-letter {
    font-size: min(31vh, 19rem);
  }
}

@media (max-width: 420px) {
  .photo-wall-shell {
    padding: 3px;
  }

  .gallery-grid {
    gap: 3px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .gallery-tile:hover::after {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile-image,
  .gallery-tile::after {
    transition-duration: 1ms;
  }
}
