/* ==========================================================================
   JOSI Adventure — shared stylesheet
   Used by index.html (homepage) and adventures.html
   ========================================================================== */

:root {
  --cream: #FCF8EA;
  --cream-deep: #F4EFDC;
  --sage: #C9D5D2;
  --sage-deep: #B6C6C2;
  --green: #36544D;
  --green-deep: #2A423C;
  --orange: #F2724E;
  --orange-deep: #DC5D39;
  --ink: #36544D;
  --muted: #5E7771;
  --maxw: 1180px;

  /* --- Hero tuning ---------------------------------------------------
     hero-focus:      which part of the photo stays in frame when cropped.
                      "center" keeps the middle. "center 70%" shows more of
                      the bottom, "center 30%" more of the top.
     hero-cta-offset: gap between the subtitle and the button. Increase it to
                      push the button further down and open up the middle of
                      the photo, so people in the shot aren't covered.
     ------------------------------------------------------------------- */
  --hero-focus: center;
  --hero-cta-offset: 11rem;

  /* Height of one Glimpses gallery row. At 500px the two-column tile is
     exactly 3:2 (classic landscape) and a single column is ~3:4 (portrait).
     The grid fixes the wide tile at 2.04x the narrow aspect, so these two
     move together — raising this makes portraits taller AND landscapes
     narrower. 450px would instead give 5:3 wide / 4:5 narrow. */
  --gallery-row: 500px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  color: var(--green);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { color: var(--ink); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 820px; margin: 0 auto; }
section { padding: 6rem 0; position: relative; }
.lead { font-size: 1.08rem; }

/* ---------- WAVES ---------- */
.wave { line-height: 0; display: block; }
.wave svg { width: 100%; height: 72px; display: block; }
.wave--to-sage { background: var(--cream); }
.wave--to-sage path { fill: var(--sage); }
.wave--to-cream { background: var(--sage); }
.wave--to-cream path { fill: var(--cream); }

/* ---------- BUTTONS ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.7rem 0.7rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.pill:hover { transform: translateY(-2px); }
.pill-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.pill-arrow svg { width: 17px; height: 17px; }

.pill--orange { background: var(--orange); color: #fff; }
.pill--orange:hover { background: var(--orange-deep); }
.pill--orange .pill-arrow { background: #fff; color: var(--orange); }

.pill--sage { background: var(--sage); color: var(--green); }
.pill--sage:hover { background: #fff; }
.pill--sage .pill-arrow { background: var(--green); color: var(--cream); }

.text-link {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}
.text-link:hover { color: var(--orange); }

/* ---------- NAV ---------- */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 20; padding: 1.6rem 0; }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-decoration: none;
}
.logo .logo-sub {
  font-weight: 500;
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: .9;
}
.nav-right { display: flex; align-items: center; gap: 1.1rem; }
.nav-link {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: .9rem;
  color: rgba(252,248,234,.88);
  text-decoration: none;
}
.nav-link:hover { color: var(--cream); }
.lang-toggle { display: flex; align-items: center; gap: 0.1rem; }
.lang-btn {
  background: none;
  border: 1.5px solid transparent;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font: 600 0.82rem 'Poppins', sans-serif;
  color: rgba(252,248,234,.72);
  cursor: pointer;
  transition: all .2s;
  line-height: 1;
}
.lang-btn:hover { color: var(--cream); }
.lang-btn.active { color: var(--cream); border-color: rgba(252,248,234,.7); }
.lang-sep { color: rgba(252,248,234,.35); font-size: .82rem; }

/* ---------- HERO (homepage) ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8rem 0 5rem;
  overflow: hidden;
  background: var(--green-deep);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-focus); }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,35,36,.42) 0%, rgba(26,35,36,.30) 45%, rgba(26,35,36,.55) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 0 1.5rem; max-width: 900px; }
.hero h1 {
  color: var(--cream);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.03;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.25);
}
.hero-sub {
  color: rgba(252,248,234,.94);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 30ch;
  /* the gap below is what pushes the button down — see --hero-cta-offset */
  margin: 0 auto var(--hero-cta-offset);
  text-shadow: 0 1px 12px rgba(0,0,0,.3);
}

/* ---------- PAGE HERO (sub-pages: shorter banner) ---------- */
.page-hero {
  position: relative;
  min-height: 46vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 9rem 0 4rem;
  overflow: hidden;
  background: var(--green-deep);
}
.page-hero .hero-bg img { object-position: var(--hero-focus); }
.page-hero h1 {
  position: relative;
  z-index: 2;
  color: var(--cream);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  padding: 0 1.5rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.3);
}

/* ---------- WHAT IS ---------- */
.whatis { background: var(--cream); }
.whatis-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 4.5rem; align-items: center; }
.whatis-text p + p { margin-top: 1.1rem; }
.whatis-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem 2rem; margin-top: 2.8rem; }
.whatis-tag {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: 'Poppins', sans-serif; font-weight: 600;
  color: var(--green); font-size: 1.02rem;
}
.whatis-tag svg { width: 30px; height: 30px; flex-shrink: 0; }
.whatis-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }
.whatis-photos figure {
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: var(--sage);
}
.whatis-photos figure img { width: 100%; height: 100%; object-fit: cover; }
.whatis-photos figure:nth-child(1) { margin-top: 2.5rem; }
.whatis-photos figure:nth-child(2) { margin-top: 7rem; }

/* ---------- ADVENTURE CARDS (shared) ---------- */
.adventures { background: var(--sage); padding: 4.5rem 0 5rem; text-align: center; }
.adventures h2 { margin-bottom: 2.8rem; }

.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.8rem;
  margin: 0 auto;
  text-align: left;
}
.adv-grid[data-count="1"] { max-width: 400px; }
.adv-grid[data-count="2"] { max-width: 790px; }
/* on the sub-page the grid is always a full 3-up, never narrowed */
.adv-grid--page { max-width: none !important; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.adv-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--green);
  transition: transform .25s ease;
}
.adv-card:hover { transform: translateY(-4px); }
.adv-card-bg { position: absolute; inset: 0; z-index: 0; }
.adv-card-bg img { width: 100%; height: 100%; object-fit: cover; }
.adv-card-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,66,60,.30) 0%, rgba(42,66,60,.38) 40%, rgba(42,66,60,.80) 100%);
}
.adv-card-body { position: relative; z-index: 2; padding: 1.8rem; }
.adv-meta { color: rgba(252,248,234,.92); font-size: 0.95rem; margin-bottom: 0.5rem; }
.adv-title {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 1.45rem; color: var(--cream);
  line-height: 1.15; margin-bottom: 0.35rem;
}
.adv-desc { color: rgba(252,248,234,.90); font-size: 0.98rem; line-height: 1.45; margin-bottom: 1.4rem; }
.adv-card .pill { font-size: 0.82rem; padding: 0.55rem 0.55rem 0.55rem 1.3rem; gap: 0.7rem; }
.adv-card .pill-arrow { width: 30px; height: 30px; }
.adv-badge {
  position: absolute; top: 1.1rem; right: 1.1rem; z-index: 3;
  background: var(--cream); color: var(--green);
  padding: 0.4rem 0.9rem; border-radius: 999px;
  font: 600 0.68rem 'Poppins', sans-serif;
  letter-spacing: .14em; text-transform: uppercase;
}
.adv-empty {
  max-width: 540px; margin: 0 auto;
  background: rgba(252,248,234,.55);
  border-radius: 20px; padding: 2.6rem 2rem;
}
.adv-empty h3 { margin-bottom: .6rem; font-size: 1.25rem; }
.adv-empty p { color: var(--muted); margin-bottom: 1.6rem; }
.adv-status { color: var(--muted); font-size: .95rem; padding: 2rem 0; }
.adventures-footer { margin-top: 2.6rem; }

/* empty state on cream (sub-page) rather than sage */
.adv-empty--cream { background: var(--sage); }

/* ---------- SUB-PAGE TOOLBAR (results count + month filter) ---------- */
.adv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}
.adv-count { color: var(--ink); font-size: 1.05rem; }
.adv-count strong { font-family: 'Poppins', sans-serif; font-weight: 700; }
.select-wrap { position: relative; display: inline-block; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--sage);
  border: none;
  border-radius: 999px;
  color: var(--green);
  font: 600 1rem 'Poppins', sans-serif;
  padding: 0.85rem 3.1rem 0.85rem 1.6rem;
  cursor: pointer;
  min-width: 190px;
}
.select-wrap select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 1.35rem; top: 50%;
  width: 11px; height: 11px;
  border-right: 2.4px solid var(--green);
  border-bottom: 2.4px solid var(--green);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---------- WHO IS IT FOR ---------- */
.who { background: var(--cream); }
.who-intro { max-width: 78ch; margin-bottom: 3rem; }
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.who-tile {
  background: var(--sage);
  border-radius: 22px;
  padding: 2.2rem 1.6rem;
  text-align: center;
  transition: transform .2s ease;
}
.who-tile:hover { transform: translateY(-3px); }
.who-tile svg { width: 34px; height: 34px; margin: 0 auto 1.1rem; color: var(--green); display: block; }
.who-tile p { color: var(--green); line-height: 1.45; font-size: 1rem; }
.who-pull {
  text-align: center; margin-top: 3rem;
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 1.12rem; color: var(--green);
}

/* ---------- ABOUT ---------- */
/* Sage, so it separates from the cream sections either side of it.
   Change to var(--cream) if you'd rather it matched them again — but
   then add something else to break up the three cream blocks in a row. */
.about { background: var(--sage); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.about-text p + p { margin-top: 1.15rem; }
.about-sign { margin-top: 1.6rem; font-family: 'Poppins', sans-serif; font-weight: 500; color: var(--green); opacity: .8; }
.about-photo { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.4; background: var(--cream-deep); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* cream circles, because the section behind them is sage */
.social-links { display: flex; gap: .7rem; margin-top: 1.5rem; }
.social-links a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--green);
  display: grid; place-items: center;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.social-links a:hover { background: var(--green); color: var(--cream); transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; }

/* ---------- WHATSAPP ---------- */
.wa { background: var(--cream); padding-bottom: 7rem; }
.wa-card { background: var(--green); border-radius: 28px; padding: 3.6rem 3.4rem; color: var(--cream); position: relative; }
.wa-card h2 { color: var(--cream); margin-bottom: 1.4rem; }
.wa-body { max-width: 60ch; }
.wa-body p { color: rgba(252,248,234,.92); }
.wa-body p + p { margin-top: 1.1rem; }
.wa-card .pill { margin-top: 2.2rem; }
.wa-photo {
  position: absolute; right: -46px; bottom: -48px;
  width: 330px; aspect-ratio: 4 / 3.6;
  border-radius: 20px; overflow: hidden;
  transform: rotate(-7deg);
  box-shadow: 0 18px 44px rgba(42,66,60,.28);
  background: var(--sage);
}
.wa-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- REVIEWS ---------- */
.reviews { background: var(--sage); text-align: center; padding: 4.5rem 0 5rem; }
.reviews h2 { margin-bottom: 3rem; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.4rem; text-align: left; }
.review-stars { color: var(--orange); letter-spacing: .12em; margin-bottom: .9rem; font-size: 1.05rem; }
.review-text { color: var(--green); margin-bottom: 1.1rem; line-height: 1.6; }
.review-name { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--green); }
.review-date { color: var(--muted); font-size: .9rem; }

/* ---------- GLIMPSES (sub-page) ---------- */
/* Sits directly under the adventure list, both on cream — so the run between
   them is tightened and a hairline marks where one ends and the next starts. */
#all-adventures { padding-bottom: 3.5rem; }
.glimpses {
  background: var(--cream);
  padding-top: 3.5rem;
  border-top: 1px solid rgba(54,84,77,.16);
}
.glimpses h2 { margin-bottom: 0; }

/* Section header: pill label + heading left, short description right */
.gal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.gal-head h2 { margin-bottom: 0; }
.gal-head-sub {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
  text-align: right;
  max-width: 28ch;
}
/* skeleton tiles + message shown while the photos are being located */
.gal-skel {
  background: var(--sage);
  animation: galPulse 1.3s ease-in-out infinite;
}
.gal-skel:nth-child(2) { animation-delay: .15s; }
.gal-skel:nth-child(3) { animation-delay: .3s; }
.gal-skel:nth-child(4) { animation-delay: .45s; }
.gal-skel:nth-child(5) { animation-delay: .6s; }
@keyframes galPulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .gal-skel { animation: none; opacity: .6; }
}
.gal-loading {
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
  margin-top: 1.2rem;
}

/* Grid for the Glimpses photos. Three columns; row height is set so a single
   column reads as a PORTRAIT frame and a two-column tile as a LANDSCAPE one.
   Spans are worked out in site.js — see the comment above galleryLayout(). */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: var(--gallery-row);
  gap: .9rem;
}
.gal-tile {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sage);
  text-decoration: none;
}
.gal-tile[data-span="2"] { grid-column: span 2; }
.gal-spacer { display: block; }   /* empty cell, pads an incomplete group */
.gal-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gal-tile:hover img { transform: scale(1.04); }

/* A photo listed in the sheet with an instagram_url becomes a reel:
   play button on top, click opens Instagram. No caption. */
.gal-tile--reel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,66,60,.05) 45%, rgba(42,66,60,.34) 100%);
  pointer-events: none;
}
.gal-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(252,248,234,.94);
  display: grid; place-items: center;
  z-index: 2;
  box-shadow: 0 4px 18px rgba(42,66,60,.22);
  transition: transform .25s ease;
}
.gal-tile--reel:hover .gal-play { transform: translate(-50%, -50%) scale(1.09); }
.gal-play svg { width: 23px; height: 23px; color: var(--green); margin-left: 3px; }


/* ---------- FAQ ---------- */
.faq { background: var(--cream); }
.faq h2 { margin-bottom: 2.4rem; }
.faq-list { max-width: 880px; }
details { border-bottom: 1px solid rgba(54,84,77,.18); padding: 1.35rem 0; }
details:first-of-type { border-top: 1px solid rgba(54,84,77,.18); }
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--green);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-weight: 400; font-size: 1.7rem; line-height: 1;
  color: var(--green);
  transition: transform .22s ease;
  flex-shrink: 0;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: .95rem; color: var(--muted); line-height: 1.68; max-width: 72ch; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--green-deep);
  color: rgba(252,248,234,.72);
  padding: 3.2rem 0 2.4rem;
  text-align: center;
  font-size: .92rem;
}
footer .logo { color: var(--cream); margin-bottom: 1rem; }
footer a { color: rgba(252,248,234,.9); }
.footer-social { display: flex; gap: .6rem; justify-content: center; margin: 1.2rem 0 .4rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(252,248,234,.12);
  color: var(--cream);
  display: grid; place-items: center;
  transition: background .2s ease;
}
.footer-social a:hover { background: rgba(252,248,234,.26); }
.footer-social svg { width: 17px; height: 17px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  section { padding: 4.5rem 0; }
  .whatis-grid, .about-grid { grid-template-columns: 1fr; gap: 2.8rem; }
  .whatis-photos figure:nth-child(1),
  .whatis-photos figure:nth-child(2),
  .whatis-photos figure:nth-child(3) { margin-top: 0; }
  .who-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .wa-card { padding: 2.6rem 1.8rem 3rem; }
  .wa-photo { position: static; width: 100%; max-width: 330px; margin: 2.4rem auto 0; transform: rotate(-4deg); }
  .wa { padding-bottom: 4.5rem; }
  .hero { min-height: 82vh; }
  :root { --hero-cta-offset: 7rem; }
  .page-hero { min-height: 38vh; padding: 7.5rem 0 3rem; }
  :root { --gallery-row: 470px; }   /* keeps ~3:4 portraits in a 2-col grid */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gal-tile[data-span="2"] { grid-column: span 2; }
  .gal-head { gap: 1rem; }
  .gal-head-sub { text-align: left; max-width: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  :root { --hero-cta-offset: 5rem; }
  .who-grid { grid-template-columns: 1fr; }
  .whatis-tags { grid-template-columns: 1fr; gap: 1rem; }
  .adv-grid[data-count="1"], .adv-grid[data-count="2"] { max-width: 100%; }
  .logo { font-size: 1.15rem; }
  .logo .logo-sub { display: none; }
  .pill { font-size: .8rem; padding-left: 1.2rem; }
  .adv-toolbar { flex-direction: column; align-items: stretch; }
  .select-wrap select { width: 100%; }
  /* One column: drop fixed rows and let each tile keep its own shape, so a
     landscape photo stays 3:2 instead of being squeezed into a portrait slot. */
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gal-tile { aspect-ratio: 3 / 4; }
  .gal-tile[data-span="2"] { grid-column: span 1; aspect-ratio: 3 / 2; }
  .gal-spacer { display: none; }
}
