/* Darby Clarke — minimal site styles */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: #fafaf8;
  color: #222;
  line-height: 1.5;
}

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

/* ---------- Landing page ---------- */

.landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  cursor: grab;
  touch-action: none;
}

.bg-layer.dragging {
  cursor: grabbing;
}

.landing-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  pointer-events: none;
}

.landing-content .hero-links a,
.landing-content .logo {
  pointer-events: auto;
}

.landing .logo {
  width: 160px;
  margin-bottom: 6vh;
  cursor: pointer;
}

.qr-link {
  display: block;
  width: 160px;
  margin: -4vh auto 6vh;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.35s ease, margin 0.35s ease;
  pointer-events: none;
}

.qr-link.visible {
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.qr-code {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 4px;
}

.hero-links {
  display: flex;
  gap: 2vw;
  width: 100%;
  max-width: 1100px;
}

.hero-item {
  position: relative;
  flex: 1;
  aspect-ratio: 4 / 5;
}

.hero-item:has(img[style*="display: none"]) {
  /* no cover image loaded — collapse to just the clickable label */
  aspect-ratio: auto;
  flex: 0 0 auto;
}

.hero-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: transform 0.4s ease;
}

.hero-item:hover img {
  transform: scale(1.04);
}

.hero-links a {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: block;
  pointer-events: auto;
}

.hero-item:has(img[style*="display: none"]) a {
  position: static;
}

.hero-links span {
  display: inline-block;
  padding: 0.6rem 0;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #222;
}

.hero-item img:not([style*="display: none"]) ~ a span {
  display: block;
  width: 100%;
  padding: 1.2rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
  border-radius: 0 0 4px 4px;
}

@media (max-width: 640px) {
  .hero-links { flex-direction: column; }
  .hero-links a { aspect-ratio: 3 / 2; }
}

/* ---------- Shared page header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5vw;
  border-bottom: 1px solid #e6e6e2;
}

.site-header .logo-link img {
  height: 36px;
  display: block;
}

.site-header nav a {
  margin-left: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav a:hover { opacity: 0.6; }

main { padding: 3rem 5vw 6rem; max-width: 1400px; margin: 0 auto; }

/* ---------- Gallery grid ---------- */

.category {
  margin-bottom: 3.5rem;
}

.category h2 {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: #555;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

@media (orientation: portrait) {
  .grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1rem;
    padding-bottom: 0.75rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .grid figure {
    flex: 0 0 78vw;
    scroll-snap-align: start;
  }
}

.grid figure {
  position: relative;
  margin: 0;
  padding: 2.5px;
  background: transparent;
  border: 1px solid rgba(34, 34, 34, 0.3);
  border-radius: 22px;
  cursor: zoom-in;
}

.grid figure::after {
  content: '';
  position: absolute;
  inset: 2.5px;
  border: 1px solid rgba(34, 34, 34, 0.3);
  border-radius: 19.5px;
  pointer-events: none;
}

.grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 19.5px;
  background: transparent;
}

.grid figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

/* ---------- Lightbox (pan/zoom image viewer) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(250, 250, 248, 0.96);
  overflow: hidden;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 0.05s linear;
}

.lightbox.dragging .lightbox-img {
  cursor: grabbing;
  transition: none;
}

.empty-note {
  color: #999;
  font-size: 0.9rem;
}

/* ---------- Architecture page ---------- */

.intro-block {
  max-width: 720px;
  margin-bottom: 4rem;
}

.intro-block h1 {
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.intro-block p {
  color: #555;
}

.section-block {
  max-width: 720px;
  margin-bottom: 3rem;
}

.section-block h2 {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.8rem;
}

.section-block p, .section-block li {
  color: #555;
}

.section-block ul {
  padding-left: 1.2rem;
}
