@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400&display=swap');

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

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --accent: #111111;
  --card-bg: #f0f0f0;
  --gap: 18px;
  --max-width: 1100px;
  --edge: 40px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Zilla Slab', serif;
  font-weight: 400;
  min-height: 100vh;
}

/* ── shared max-width wrapper ── */
.inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

/* ── Header ── */
header {
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.logo-illustration {
  width: 68px;
  height: 95px;
  flex-shrink: 0;
}

.logo-illustration img { width: 100%; height: 100%; display: block; }

.logo-box {
  background: var(--ink);
  padding: 16px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}

.logo-box span {
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #fff;
}

nav a {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.10);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.2s;
}

nav a:hover { color: var(--accent); }

.nav-paw {
  width: 42px;
  height: 40px;
  flex-shrink: 0;
  animation: nav-heart-beat 3s ease-in-out infinite;
  transform-origin: center;
}

@keyframes nav-heart-beat {
  0%,  100% { transform: scale(1)    rotate(0deg);   }
  10%        { transform: scale(0.88) rotate(-6deg);  }
  20%        { transform: scale(1)    rotate(0deg);   }
  32%        { transform: scale(0.92) rotate(5deg);   }
  42%        { transform: scale(1)    rotate(0deg);   }
  65%        { transform: scale(1)    rotate(-3deg);  }
  75%        { transform: scale(1)    rotate(0deg);   }
}

/* ── Gallery ── */
.gallery-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px var(--edge);
}

.masonry {
  columns: 3;
  column-gap: var(--gap);
}

@media (max-width: 900px) { .masonry { columns: 2; } }
@media (max-width: 820px) { .connect-graphic { display: none; } }
@media (max-width: 560px) {
  :root { --edge: 20px; }
  .masonry { columns: 1; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .logo-box { padding: 8px 14px; }
  .logo-box span { font-size: 1.35rem; }
  .logo-illustration { width: 44px; height: 61px; }
  nav a { font-size: 1rem; gap: 8px; }
  .nav-paw { width: 32px; height: 30px; }
}

.card {
  break-inside: avoid;
  margin-bottom: var(--gap);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.10);
}

.card-img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.25, 0, 0, 1);
}

/* placeholder shown when no real image */
.card-img[src=""],
.card-img:not([src]) {
  display: none;
}


.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.card:hover .card-img { transform: scale(1.05); }

.card-label {
  color: #fff;
}

.card-label h3 {
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.2;
}

.card-caption {
  padding: 16px 14px 22px;
  text-align: center;
}

.card-caption h3 {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.card-caption p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.lb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  transform: translateY(12px);
  transition: transform 0.35s cubic-bezier(0.25, 0, 0, 1);
}

.lightbox.open .lb-inner {
  transform: translateY(0);
}

.lb-img-wrap {
  flex-shrink: 0;
  max-width: 60vw;
  max-height: 85vh;
}

.lb-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}


.lb-info {
  padding: 0 0 8px 36px;
  max-width: 240px;
  color: #fff;
  align-self: flex-end;
}

.lb-info h2 {
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 12px;
}

.lb-info p {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
}

.lb-counter {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.55);
  margin-top: 20px;
  text-transform: uppercase;
}

.lb-close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  padding: 4px;
}

.lb-close:hover { color: #fff; }

.lb-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 16px 12px;
  transition: color 0.2s;
}

.lb-nav:hover { color: #fff; }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }

.lb-nav svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

@media (max-width: 640px) {
  .lb-inner {
    flex-direction: column;
    align-items: center;
    max-width: 88vw;
    max-height: 88vh;
    overflow-y: auto;
  }

  .lb-img-wrap {
    max-width: 88vw;
    max-height: 55vh;
  }

  .lb-img-wrap img {
    max-height: 55vh;
  }

  .lb-info {
    align-self: center;
    padding: 20px 8px 24px;
    max-width: 88vw;
    text-align: center;
  }
}


/* ── Connect Footer ── */
.connect {
  margin-top: 40px;
  background: var(--ink);
  position: relative;
}

.connect-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px var(--edge) 96px;
  position: relative;
}

/* heart + trail locked together, anchored to the content container's
   top-right so they never drift apart */
.connect-graphic {
  position: absolute;
  top: -6px;
  right: -24px;
  bottom: 0;                /* extend all the way to the bottom of .connect */
  width: 300px;
  pointer-events: none;
  z-index: 1;
}

/* pulsating heart sitting at the start (top-left) of the trail */
.connect-heart {
  position: absolute;
  top: -18px;
  left: -28px;
  width: 56px;
  height: 52px;
  transform: rotate(45deg);
  z-index: 2;
  animation: heart-pulse 2.8s ease-in-out infinite;
}

@keyframes heart-pulse {
  0%, 46%, 100% { transform: rotate(15deg) scale(1); }
  12% { transform: rotate(15deg) scale(0.9); }
  20% { transform: rotate(15deg) scale(1); }
  33% { transform: rotate(15deg) scale(0.93); }
}

/* dashed trail fills the graphic group, flowing from the heart down-right */
.connect-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.connect-trail img {
  width: 100%;
  height: 100%;
  display: block;
}

.hiw-line {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.connect h2 {
  font-size: 2rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 8px;
  position: relative;
}

.hiw-line + * {
  margin-top: 24px;
}

.connect-tagline {
  font-size: 1.1rem;
  color: #fff;
  max-width: 560px;
  margin: 0 0 6px;
  line-height: 1.6;
  position: relative;
}

.connect-email {
  margin-top: 22px;
  display: inline-block;
  font-size: 1.1rem;
  font-style: italic;
  color: #fff;
  text-decoration: underline;
  position: relative;
  transition: color 0.2s;
}

.connect-email:hover { color: rgba(255,255,255,0.75); }

footer {
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--edge);
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-paw {
  width: 22px;
  height: 25px;
  transform: rotate(33deg);
  flex-shrink: 0;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeUp 0.5s ease both;
}

/* stagger first 9 cards */
.card:nth-child(1)  { animation-delay: 0.05s; }
.card:nth-child(2)  { animation-delay: 0.10s; }
.card:nth-child(3)  { animation-delay: 0.15s; }
.card:nth-child(4)  { animation-delay: 0.20s; }
.card:nth-child(5)  { animation-delay: 0.25s; }
.card:nth-child(6)  { animation-delay: 0.30s; }
.card:nth-child(7)  { animation-delay: 0.35s; }
.card:nth-child(8)  { animation-delay: 0.40s; }
.card:nth-child(9)  { animation-delay: 0.45s; }
