/* ============================================
   THE DE-TOURISTS — A Saunders Family Adventure
   Parchment theme — matched to Website title image
   ============================================ */

/* --- Colour Palette (matched to parchment texture) --- */
:root {
  --parchment:       #e8e0d0;
  --parchment-light: #eee7d8;
  --parchment-dark:  #ddd5c3;
  --parchment-edge:  #d0c8b5;
  --brown:           #5C3D2E;
  --brown-light:     #7a6450;
  --brown-dark:      #3d2a1e;
  --accent:          #c17f3e;
  --accent-light:    #d9a86c;
  --green:           #5a8a6a;
  --white:           #ffffff;
  --text:            #4a3728;
  --text-light:      #7a6a58;
  --shadow:          rgba(60,40,20,0.12);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Matches the body parchment so the overscroll bounce never flashes white */
  background-color: #e8e0d0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  /* Parchment background — tiled from actual texture image */
  background-color: #e8e0d0;
  background-image: url('images/parchment.jpg');
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brown-dark);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Wider variant — lets the gallery grid fit four photos per row */
.container--wide {
  max-width: 1400px;
}

/* =============================================
   HEADER — parchment background,
   nav left, Website title image right (large)
   ============================================= */
.site-header {
  background-color: #e8e0d0;
  background-image: url('images/parchment.jpg');
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  padding: 6px 24px 10px 0;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

/* Navigation (left side) */
.main-nav {
  display: flex;
  gap: 4px;
  list-style: none;
  flex-wrap: nowrap;
  min-width: 0;
}

.main-nav {
  margin-left: 0;
}

.main-nav a {
  white-space: nowrap;
  color: var(--brown);
  font-size: min(21px, 1.05vw + 4.5px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: min(1.2px, 0.1vw);
  padding: 8px min(14px, 0.85vw);
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #9B4A2F;
  border-bottom: 4px solid #9B4A2F;
  background: none;
}

/* Website title image (top-left corner) */
.header-title-img {
  height: auto;
  width: 780px;
  max-width: min(38vw, 620px);
  flex-shrink: 1;
  min-width: 200px;
  display: block;
  margin: 8px 0 8px 12px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brown);
  margin: 6px 0;
  transition: 0.3s;
}

/* =============================================
   HEADER LINE & TAGLINE (inside header banner)
   ============================================= */
.header-tagline {
  font-family: "Caveat", cursive;
  font-weight: 700;
  color: #8B4328;
  text-align: right;
  padding: 0;
  margin: 8px 0 0;
  line-height: 1.3;
}

/* =============================================
   SCROLL-SCRUBBED HEADER — the script sets --p
   from scroll position (0 = page top, full
   banner; 1 = scrolled, slim bar). Every asset
   interpolates continuously between its start
   and end, so the header tracks the scroll
   instead of flipping between two states.
   Pages without the script stay at --p: 0.
   ============================================= */
.site-header {
  --p: 0;
}

.header-title-img {
  width: calc(780px - 470px * var(--p));
  max-width: calc(min(38vw, 620px) - 8vw * var(--p));
  margin-top: calc(8px - 4px * var(--p));
  margin-bottom: calc(8px - 4px * var(--p));
}

.main-nav a {
  font-size: calc(min(21px, 1.05vw + 4.5px) - 5px * var(--p));
  padding: calc(8px - 3px * var(--p)) calc(min(14px, 0.85vw) - 4px * var(--p));
  letter-spacing: calc(min(1.2px, 0.1vw) - 0.4px * var(--p));
}

.header-tagline {
  /* Sits beneath the nav links; always one line on desktop, shrinking
     to a 15px signature as the header collapses */
  --tagline-max: min(30px, calc((60vw - 60px) / 22));
  font-size: calc(var(--tagline-max) - (var(--tagline-max) - 15px) * var(--p));
  white-space: nowrap;
  overflow: hidden;
  margin-top: calc(8px - 4px * var(--p));
}

@media (max-width: 768px) {
  .header-tagline {
    --tagline-max: min(34px, 6.5vw + 8px);
    white-space: normal;
  }
}



/* =============================================
   HERO — full-width image with family overlay
   ============================================= */
.hero {
  position: relative;
  height: 55vh;
  min-height: 350px;
  max-height: 550px;
  overflow: visible;
}

.hero img.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Stick figure family — overlaid at bottom of hero */
.hero-family-overlay {
  position: absolute;
  bottom: -180px;
  left: 15%;
  transform: translateX(-50%);
  height: 500px;
  width: auto;
  z-index: 50;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 50px 0;
}

.section--alt {
  background: #b5a882;
  border-top: 2px solid #a99c76;
  border-bottom: 2px solid #a99c76;
}

.section-title {
  font-family: "Lora", serif;
  font-size: 36px;
  text-align: center;
  margin-bottom: 12px;
  color: var(--brown);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 20px;
  font-family: "Nunito", sans-serif;
}

/* =============================================
   WELCOME / INTRO
   ============================================= */
.welcome {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.welcome p {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.8;
  color: var(--text);
}

.welcome p.welcome-text {
  font-family: "Nunito", sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--brown);
}

.welcome .buttons {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================
   CARDS
   ============================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.card {
  background: var(--parchment-light);
  border-radius: 4px;
  overflow: hidden;
  border: 3px solid var(--brown);
  box-shadow: 0 2px 8px rgba(60,40,20,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 6px 16px rgba(60,40,20,0.2);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--parchment-dark);
}

.card-body { padding: 20px; }

.card-body h3 {
  font-family: "Caveat", cursive;
  font-size: 26px;
  margin-bottom: 6px;
  color: #9B4A2F;
}

.card-body .meta {
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.card-body p {
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

/* =============================================
   CREW PROFILES
   ============================================= */
/* =============================================
   SCRAPBOOK — family intro section
   ============================================= */
.scrapbook {
  display: flex;
  justify-content: center;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto 20px;
  align-items: center;
}

.scrapbook-photo {
  border-radius: 6px;
  box-shadow: 3px 3px 10px rgba(60,40,20,0.2);
  overflow: hidden;
  height: 250px;
}

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

.scrapbook-photo.left {
  flex: 0.7;
  transform: rotate(-2deg);
}

.scrapbook-photo.centre {
  flex: 1.2;
  height: auto;
  transform: rotate(0deg);
}

.scrapbook-photo.centre img {
  object-fit: contain;
  height: auto;
}

.scrapbook-photo.right {
  flex: 0.7;
  transform: rotate(1.5deg);
}

.scrapbook-single {
  max-width: 550px;
  margin: 0 auto 20px;
  background: #fff;
  padding: 16px 16px 48px;
  box-shadow: 4px 6px 16px rgba(60,40,20,0.25);
  transform: rotate(-1.5deg);
}

.scrapbook-single img {
  width: 100%;
  height: auto;
  display: block;
}

.scrapbook-caption {
  font-family: "Caveat", cursive;
  font-size: 26px;
  color: var(--brown);
  text-align: center;
  margin-top: 12px;
}

.scrapbook-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 10px 0 0;
}

.scrapbook-intro p {
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  color: var(--brown);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .scrapbook {
    flex-direction: column;
  }
  .scrapbook-photo {
    height: 240px;
    transform: none;
  }
  .scrapbook-photo.left { transform: rotate(-1deg); }
  .scrapbook-photo.centre { transform: rotate(0.5deg); }
  .scrapbook-photo.right { transform: rotate(-0.5deg); }
}

/* =============================================
   CREW PROFILES — alternating magazine layout
   ============================================= */
.crew-profile {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 48px;
  background: var(--parchment-light);
  border: 3px solid var(--brown);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(60,40,20,0.15);
  overflow: hidden;
}

.crew-profile--reverse {
  flex-direction: row-reverse;
}

.crew-profile-photo {
  flex: 0 0 340px;
  height: 380px;
  overflow: hidden;
}

.crew-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crew-profile-bio {
  flex: 1;
  padding: 32px 32px 32px 0;
}

.crew-profile--reverse .crew-profile-bio {
  padding: 32px 0 32px 32px;
}

.crew-profile-bio h3 {
  font-family: "Caveat", cursive;
  font-size: 42px;
  color: #9B4A2F;
  margin-bottom: 6px;
}

.crew-profile-bio .role {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.crew-profile-bio .crew-tagline {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 19px;
  color: var(--brown);
  margin-bottom: 14px;
}

.crew-profile-bio p {
  font-family: "Nunito", sans-serif;
  font-size: 19px;
  color: var(--text);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .crew-profile,
  .crew-profile--reverse {
    flex-direction: column;
  }

  .crew-profile-photo {
    flex: none;
    width: 100%;
    height: 280px;
  }

  .crew-profile-bio,
  .crew-profile--reverse .crew-profile-bio {
    padding: 20px;
  }
}

.crew-card { text-align: center; }

.crew-tagline {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--brown);
  margin-bottom: 8px;
}
.crew-card:hover { transform: translateY(-3px); }
.crew-card .card-img { height: 330px; }
.crew-card .card-body h3 { color: var(--accent); }

.crew-card .role {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

/* =============================================
   JOURNAL POSTS
   ============================================= */

/* Scrapbook snapshots — polaroid-style photos taped into journal text */
.post-snapshot {
  width: 280px;
  background: #fff;
  padding: 12px 12px 44px;
  box-shadow: 4px 6px 16px rgba(60,40,20,0.25);
  margin-bottom: 14px;
}

.post-snapshot img {
  width: 100%;
  height: auto;
  display: block;
}

.post-snapshot .snapshot-caption {
  font-family: "Caveat", cursive;
  font-size: 24px;
  color: var(--brown);
  text-align: center;
  margin-top: 10px;
}

.post-snapshot.tilt-left  { float: left; margin: 4px 28px 14px 0; transform: rotate(-2deg); }
.post-snapshot.tilt-right { float: right; margin: 4px 0 14px 28px; transform: rotate(2.5deg); }
.post-snapshot.tilt-slight { float: left; margin: 4px 28px 14px 0; transform: rotate(-1deg); }
.post-snapshot.tilt-flat  { float: right; margin: 4px 0 14px 28px; transform: rotate(1.5deg); }
.post-snapshot.tilt-right-neg { float: right; margin: 4px 0 14px 28px; transform: rotate(-1.5deg); }

.post {
  background: var(--parchment-light);
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--parchment-edge);
  margin-bottom: 36px;
  overflow: hidden;
}

.post-header { padding: 28px 28px 0; }

.post-header h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.post-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 18px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.post-body {
  padding: 0 28px 28px;
  font-size: 16px;
  line-height: 1.8;
}

.post-body p { margin-bottom: 14px; }

.post-body h3 {
  font-family: "Caveat", cursive;
  font-size: 24px;
  color: #9B4A2F;
  margin: 20px 0 10px;
}

.post-body ul {
  list-style: none;
  padding: 0;
  margin-bottom: 18px;
}

.post-body ul li {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  padding: 4px 0 4px 24px;
  position: relative;
}

.post-body ul li::before {
  content: "\2022";
  color: var(--accent);
  font-size: 20px;
  position: absolute;
  left: 6px;
  top: 3px;
}

.post-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding: 0 28px 28px;
}

.post-photos > img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-photos > img:hover { opacity: 0.85; }

.post-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.post-photo-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}

.post-photo-wrap img:hover { opacity: 0.85; }

.photo-location {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(30, 30, 30, 0.6);
  color: rgba(255, 255, 255, 0.85);
  font-family: "Nunito", sans-serif;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

/* =============================================
   GALLERY
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.gallery-grid .post-photo-wrap {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid .post-photo-wrap:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 14px var(--shadow);
}

.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  cursor: pointer;
}

/* Diary-style day heading before each day's photos; spans the full
   grid width and links to that day's journal post */
.gallery-day-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 14px;
  text-decoration: none;
}

.gallery-day-label:first-child {
  margin-top: 0;
}

.gallery-day-label .day-name {
  font-family: "Caveat", cursive;
  font-size: 32px;
  font-weight: 700;
  color: #8B4328;
  white-space: nowrap;
}

.gallery-day-label .day-loc {
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brown);
  opacity: 0.75;
  white-space: nowrap;
}

/* Video tiles in the gallery grid — YouTube thumbnail + play badge */
.post-video-wrap::after {
  content: "\25B6";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  padding-left: 5px;
  border-radius: 50%;
  background: rgba(61, 42, 30, 0.75);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Video playback inside the lightbox */
.lightbox-video {
  display: none;
  width: min(85vw, 960px);
  aspect-ratio: 16 / 9;
}

.lightbox-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Trailing rule line, echoing the header's */
.gallery-day-label::after {
  content: "";
  flex: 1;
  border-top: 3px solid var(--brown);
  opacity: 0.2;
  transform: translateY(-6px);
}

.gallery-day-label:hover .day-name {
  color: #9B4A2F;
}

/* =============================================
   ROUTE / MAP
   ============================================= */
.map-container {
  background: var(--parchment-light);
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--parchment-edge);
  padding: 24px;
  text-align: center;
}

.map-placeholder {
  background: var(--parchment-dark);
  border: 2px dashed var(--accent-light);
  border-radius: 8px;
  padding: 80px 24px;
  color: var(--text-light);
  font-size: 18px;
}

.route-map-embed {
  width: 100%;
  height: 80vh;
  border: none;
  border-radius: 8px;
}

.route-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.stat-box {
  text-align: center;
  padding: 20px;
  background: var(--parchment-light);
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--parchment-edge);
}

.stat-box .number {
  font-family: Georgia, serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-box .label {
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

/* =============================================
   PLACEHOLDER IMAGES
   ============================================= */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
}

.placeholder-img.warm   { background: #d9c8ac; }
.placeholder-img.cool   { background: #b8c9b8; }
.placeholder-img.sand   { background: #cfc4ac; }
.placeholder-img.sky    { background: #adbfcc; }
.placeholder-img.sunset { background: #d4b898; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: #9B4A2F;
  color: var(--white);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 16px;
  border-radius: 6px;
  border: 2px solid #9B4A2F;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: #7A3B22;
  border-color: #7A3B22;
  color: var(--white);
}

.btn--outline {
  background: transparent;
  border: 2px solid #9B4A2F;
  color: #9B4A2F;
}

.btn--outline:hover {
  background: #9B4A2F;
  color: var(--white);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--brown-dark);
  color: var(--parchment);
  text-align: center;
  padding: 36px 24px;
  font-size: 14px;
}

.site-footer p { opacity: 0.7; }

.footer-nav {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
}

.footer-nav a {
  color: var(--parchment);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

/* =============================================
   PAGE HEADER (non-home pages)
   ============================================= */
.page-header {
  background: var(--brown-dark);
  padding: 44px 0;
  text-align: center;
}

.page-header h1 {
  color: var(--parchment-light);
  font-size: 36px;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--accent-light);
  font-size: 17px;
  font-style: italic;
}

/* Slim page header variant — compact with accent border */
.page-header--bold {
  padding: 32px 0;
  border-bottom: 4px solid var(--accent);
}

.page-header--bold h1 {
  font-size: 40px;
  margin-bottom: 4px;
}

.page-header--bold p {
  font-size: 16px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .header-inner {
    min-height: 70px;
    padding: 8px 16px;
  }

  .header-title-img { width: calc(55vw - 22vw * var(--p)); }

  .menu-toggle { display: block; order: 3; }

  .header-right { order: 2; flex: 1; align-items: flex-end; margin-right: 4px; }

  .header-tagline { display: none; }   /* phones: the banner tagline covers it */

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--parchment);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    box-shadow: 0 4px 12px var(--shadow);
    border-bottom: 1px solid var(--parchment-edge);
  }

  .main-nav.open { display: flex; }

  .main-nav a {
    padding: 12px 16px;
    font-size: 14px;
  }

  .tagline-banner { padding: 16px 20px; }
  .tagline-banner p { font-size: 17px; }

  .hero { height: 40vh; min-height: 260px; }
  .hero-family-overlay { height: 100px; }

  .section { padding: 36px 0; }
  .section-title { font-size: 24px; }

  .post-snapshot {
    float: none !important;
    width: 260px;
    margin: 20px auto !important;
    padding: 10px 10px 36px;
  }

  .post-header { padding: 20px 18px 0; }
  .post-body   { padding: 0 18px 20px; }
  .post-photos { padding: 0 18px 20px; }

  .page-header { padding: 28px 0; }
  .page-header h1 { font-size: 26px; }
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 16px;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-location {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.6);
  color: rgba(255, 255, 255, 0.85);
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 10px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  opacity: 0.6;
}

.lightbox-story {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}

.lightbox-story:hover { background: var(--brown); }

/* =============================================
   POST VIDEO — responsive YouTube embed
   ============================================= */
.post-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 20px;
  border-radius: 6px;
  overflow: hidden;
}

/* Mini variant for embedding a video inline mid-story */
.post-video--inline {
  max-width: 440px;
  margin: 4px auto 24px;
}

.post-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.post-photos .post-video {
  height: 200px;
  padding-bottom: 0;
  margin-bottom: 0;
}

.post-photos .post-video iframe {
  width: 100%;
  height: 100%;
}

.gallery-video-wrap {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-video-wrap:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 14px var(--shadow);
}

.gallery-video-wrap .post-video {
  height: 240px;
  padding-bottom: 0;
  margin-bottom: 0;
  border-radius: 0;
}


/* =============================================
   SNAPSHOT NOTE — sticky note pinned to top-right
   ============================================= */
.snapshot-note {
  float: right;
  width: 240px;
  margin: 0 0 16px 24px;
  padding: 20px 18px 16px;
  background: #f5ecd0;
  border: 1px solid var(--parchment-edge);
  border-radius: 2px;
  box-shadow: 2px 3px 8px rgba(60,40,20,0.18);
  transform: rotate(1.5deg);
}

.snapshot-note h3 {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: #9B4A2F;
  margin-bottom: 10px;
}

.snapshot-note ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.snapshot-note ul li {
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  padding: 3px 0 3px 16px;
  position: relative;
}

.snapshot-note ul li::before {
  content: "\2022";
  color: var(--accent);
  font-size: 14px;
  position: absolute;
  left: 2px;
  top: 2px;
}

@media (max-width: 768px) {
  .snapshot-note {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
    transform: rotate(0deg);
  }
}

/* =============================================
   RIG CARDS — stacked photo on top, text below
   ============================================= */
.rig-card {
  background: var(--parchment-light);
  border: 3px solid var(--brown);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(60,40,20,0.15);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

.rig-card-photo {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.rig-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rig-card-body {
  padding: 32px;
}

.rig-card-body h3 {
  font-family: "Caveat", cursive;
  font-size: 42px;
  color: #9B4A2F;
  margin-bottom: 6px;
}

.rig-card-body .role {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.rig-card-body .crew-tagline {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 19px;
  color: var(--brown);
  margin-bottom: 14px;
}

.rig-card-body p {
  font-family: "Nunito", sans-serif;
  font-size: 19px;
  color: var(--text);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .rig-card-photo {
    height: 260px;
  }

  .rig-card-body {
    padding: 20px;
  }
}

/* =============================================
   COMMENTS
   ============================================= */
.comments-section {
  padding: 28px;
  border-top: 2px solid var(--parchment-edge);
}

.comments-section h3 {
  font-family: "Caveat", cursive;
  font-size: 28px;
  color: #9B4A2F;
  margin-bottom: 20px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.comment-form input,
.comment-form textarea {
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  border: 2px solid var(--parchment-edge);
  border-radius: 6px;
  background: var(--parchment);
  color: var(--text);
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-form textarea {
  min-height: 80px;
}

.comment-form button {
  align-self: flex-start;
  padding: 10px 28px;
  background: #9B4A2F;
  color: var(--white);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s;
}

.comment-form button:hover {
  background: #7A3B22;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment {
  background: var(--parchment);
  border: 1px solid var(--parchment-edge);
  border-radius: 6px;
  padding: 16px 20px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.comment-author {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--brown);
  font-weight: 700;
}

.comment-date {
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  color: var(--text-light);
}

.comment-text {
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.no-comments {
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  color: var(--text-light);
  font-style: italic;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .header-title-img { width: calc(70vw - 28vw * var(--p)); }
  .card-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img { height: 160px; }
  .hero-family-overlay { height: 80px; }
}

/* =============================================
   JOURNAL: COLLAPSIBLE LEG SECTIONS -> POST
   ============================================= */
/* With JS on (body.grid-mode), posts hide behind the leg sections;
   leg headers expand/collapse their day cards; clicking a day card
   opens the post. Without JS, all posts show as a plain page. */
body.grid-mode .post { display: none; }
body.grid-mode .post.post-open { display: block; }
body.viewing-post .journal-legs-wrap { display: none; }
body.viewing-post .journal-intro { display: none; }

.journal-back {
  display: none;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
body.viewing-post .journal-back { display: flex; }
.journal-back--bottom { margin: 28px 0 0; }

.post-nav { display: flex; gap: 10px; }
.journal-back .btn { padding: 8px 16px; font-size: 14px; }

.journal-leg { margin-bottom: 24px; }

.leg-header {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  min-height: 150px;
  padding: 18px 20px;
  background-color: var(--brown);
  background-size: cover;
  background-position: center 35%;
  border: 3px solid var(--brown);
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 2px 8px rgba(60,40,20,0.15);
}

.leg-header:hover { border-color: var(--accent); }

.leg-title {
  font-family: "Caveat", cursive;
  font-size: 38px;
  line-height: 1;
  color: var(--parchment-light);
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.leg-meta {
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  color: var(--parchment-light);
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  white-space: nowrap;
}

.leg-toggle {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  font-weight: 600;
  color: var(--parchment-light);
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.leg-toggle::before { content: "+"; }
.journal-leg.open .leg-toggle::before { content: "\2212"; }

.journal-leg .journal-grid { display: none; }
body.grid-mode .journal-leg.open .journal-grid { display: grid; margin-top: 18px; }

/* Gallery sort toggle */
.gallery-sort {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.gallery-sort .btn {
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .leg-header { min-height: 110px; padding: 14px 16px; }
  .leg-title { font-size: 30px; }
  .leg-meta { white-space: normal; }
}


/* Post lists (What did we learn / Highlights / Low points): tight rhythm */
.post-body > ul {
  list-style-type: none;
  margin: 0.25rem 0 1.5rem;
  padding: 0 0 0 1.5rem;
}

.post-body > ul li {
  position: relative;
  padding: 0 0 0 1rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.post-body > ul li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  top: 0;                 /* tied to the first line, not the block middle */
  color: #9B4A2F;
  font-weight: 700;
}

.post-body > h3 {
  margin: 2rem 0 0.75rem;
}


/* Post intro row: map postcard | reading column | snapshot. Text never
   squashes below 400px — the side cards wrap instead. */
.post-intro {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 6px;
}

.post-intro .intro-side {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-intro .intro-text {
  flex: 1 1 0;
  min-width: 0;
}

.post-intro .trip-scrolly.ts-float,
.post-intro .snapshot-note {
  float: none;
  width: 100%;
  max-width: 340px;
  margin: 0;
}

@media (max-width: 900px) {
  .post-intro { flex-direction: column; }
  .post-intro .intro-side { flex: none; width: min(100%, 380px); margin: 0 auto; }
}


/* Snapshot postcard internals: heading anchors its list; wrapped lines
   tight (1.25), items clearly separated (0.75rem), last item flush */
.snapshot-note h3 { margin-bottom: 0.75rem; }

.snapshot-note li {
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.snapshot-note li:last-child { margin-bottom: 0; }
