:root {
  --bg: #ffffff;
  --bg-soft: #faf8f5;
  --ink: #211d1a;
  --muted: #7a716a;
  --line: #ece7e0;
  --accent: #c8963e; /* Bodhi's golden fur */
  --accent-deep: #a9761f;
  --home: #3d7a6e; /* muted teal for homes */
  --shadow: 0 18px 50px rgba(40, 32, 22, 0.12);
  --radius: 18px;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sep {
  color: var(--accent);
  padding: 0 0.15em;
  font-weight: 500;
}

/* ---------- HERO ---------- */
.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 88px) 24px 24px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: clamp(30px, 4.5vw, 64px);
  align-items: center;
}
.hero-text {
  text-align: left;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
  margin: 0 0 18px;
}

.name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  margin: 0;
}

.dates {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(15px, 1.9vw, 19px);
  color: var(--muted);
  margin: 12px 0 26px;
  font-weight: 400;
}

.hero-photo {
  margin: 0;
  width: 100%;
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1444 / 1800;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lede {
  max-width: 600px;
  margin: 38px auto 0;
  font-size: clamp(17px, 2.3vw, 20px);
  color: #4a433d;
  line-height: 1.7;
}

/* ---------- STORY ---------- */
.story {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 40px;
  padding: clamp(40px, 6vw, 64px) 24px;
}

.story-inner {
  max-width: 620px;
  margin: 0 auto;
}

.story-inner p {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.5;
  color: #3a332e;
  margin: 0 0 8px;
  font-weight: 400;
}

.signoff {
  color: var(--accent-deep) !important;
  font-style: italic;
}

/* ---------- TRIBUTE NOTE (right side of hero) ---------- */
.tribute {
  margin-top: 4px;
}
.tribute-lead {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.7vw, 30px);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
  text-wrap: balance;
}
.tribute p {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 1.85vw, 19px);
  line-height: 1.6;
  color: #3a332e;
  margin: 0 0 10px;
  text-wrap: pretty;
}
.tribute .signoff {
  color: var(--accent-deep);
  margin-top: 18px;
}

/* Stack the hero on narrow screens */
@media (max-width: 880px) {
  .hero {
    padding-top: clamp(40px, 10vw, 64px);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero-photo {
    max-width: 400px;
    margin: 0 auto;
  }
  .hero-text {
    text-align: center;
  }
  .tribute p,
  .tribute-lead,
  .tribute .signoff {
    text-wrap: balance;
  }
}

/* ---------- SECTION HEADINGS ---------- */
.section-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 44px);
  text-align: center;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 10px auto 0;
  max-width: 520px;
}

/* ---------- MAP ---------- */
.map-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(45px, 6.3vw, 70px) 20px 40px;
}

#map {
  height: 620px;
  margin-top: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #dbe7ea;
  z-index: 0;
}

.leaflet-container {
  border-radius: var(--radius);
  font-family: "Inter", sans-serif;
  background: #dbe7ea; /* ocean */
}

/* City-name labels on the hand-drawn map */
.place-label {
  background: rgba(255, 255, 255, 0.82);
  border: none;
  box-shadow: none;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}
.place-label.is-home {
  color: var(--home);
  background: rgba(255, 255, 255, 0.9);
}
.place-label::before {
  display: none !important; /* hide Leaflet's tooltip arrow */
}

.legend {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
}

.dot-travel {
  background: var(--accent);
}

.dot-home {
  background: var(--home);
}

/* Custom map markers */
.pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  border: 2.5px solid #fff;
}
.pin-travel {
  width: 20px;
  height: 20px;
  background: var(--accent);
}
.pin-home {
  width: 22px;
  height: 22px;
  background: var(--home);
}
.pin-home span {
  transform: rotate(45deg);
  font-size: 11px;
  line-height: 1;
}
.leaflet-popup-content-wrapper {
  border-radius: 12px;
}
.leaflet-popup-content {
  font-family: "Inter", sans-serif;
  margin: 12px 16px;
}
.popup-place {
  font-weight: 600;
  color: var(--ink);
}
.popup-tag {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.popup-tag.home {
  color: var(--home);
}
.popup-tag.travel {
  color: var(--accent-deep);
}

/* ---------- PAW MAP PINS ---------- */
.paw-pin {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paw-pin-svg {
  fill: var(--accent);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* ---------- GALLERY CAROUSEL ---------- */
.gallery-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 88px) 0 28px;
}
.gallery-section .section-title,
.gallery-section .section-sub {
  padding: 0 16px;
}

.carousel {
  position: relative;
  margin-top: 40px;
}
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 6px clamp(16px, 6vw, 64px) 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track.grabbing {
  cursor: grabbing;
  scroll-behavior: auto;
}

.car-card {
  flex: 0 0 22%;
  margin: 0;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-soft);
  box-shadow: 0 6px 18px rgba(40, 32, 22, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(40, 32, 22, 0.18);
}
.car-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.car-btn {
  position: absolute;
  top: calc(50% - 12px);
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(40, 32, 22, 0.18);
  transition: background 0.15s ease, transform 0.15s ease;
}
.car-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}
.car-prev {
  left: 10px;
}
.car-next {
  right: 10px;
}

/* ---------- VIDEOS ---------- */
.video-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) 16px 40px;
}
.video-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.video-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.video-box {
  border-radius: 16px;
  overflow: hidden;
  background: #0e0b08;
  box-shadow: 0 10px 30px rgba(40, 32, 22, 0.16);
}
.video-box video {
  width: 100%;
  height: auto;
  display: block;
  background: #0e0b08;
}

@media (max-width: 1000px) {
  .car-card {
    flex-basis: 30%;
  }
  .video-grid {
    gap: 12px;
  }
}
@media (max-width: 680px) {
  .car-card {
    flex-basis: 46%;
  }
  .car-btn {
    display: none;
  }
  #map {
    height: 440px;
  }
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .car-card {
    flex-basis: 74%;
  }
  .video-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: clamp(70px, 10vw, 110px) 24px 90px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-tattoo {
  margin: 0 auto 24px;
  max-width: 210px;
}
.footer-tattoo img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(40, 32, 22, 0.2);
}

.footer-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  margin: 0;
}

.footer-dates {
  color: var(--muted);
  margin: 4px 0 0;
  font-family: "Fraunces", Georgia, serif;
}

.footer-note {
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 0;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}
.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.28);
}
.lb-close {
  top: 20px;
  right: 20px;
  font-size: 34px;
}
.lb-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.lb-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 680px) {
  /* Bigger photo, and move the arrows off the image to the bottom so they
     never cover Bodhi's face on a phone. */
  .lb-img {
    max-width: 94vw;
    max-height: 80vh;
  }
  .lb-close {
    top: calc(14px + env(safe-area-inset-top));
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  .lb-prev,
  .lb-next {
    width: 46px;
    height: 46px;
    font-size: 26px;
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: none;
  }
  .lb-prev {
    left: 50%;
    margin-left: -58px;
  }
  .lb-next {
    right: 50%;
    margin-right: -58px;
  }
}

/* ---------- SMALL PHONE HARDENING ---------- */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding: clamp(40px, 12vw, 64px) 18px 32px;
  }
  .hero-photo {
    max-width: 100%;
  }
  .story {
    margin-top: 32px;
    padding: 40px 20px;
  }
  .story-inner p {
    font-size: 19px;
    margin-bottom: 8px;
  }
  .map-section {
    padding: 56px 16px 32px;
  }
  #map {
    height: 380px;
  }
  .legend {
    gap: 18px;
    flex-wrap: wrap;
  }
  .gallery-section {
    padding: 56px 12px 32px;
  }
  .footer {
    padding: 64px 20px calc(72px + env(safe-area-inset-bottom));
  }
}
