/*
 * Pangolin Journeys — archive templates stylesheet (handle: pj-tpl-archives).
 *
 * Merged page <style> blocks from destinations.html + ways-to-travel.html
 * (the duplicated .cta-band block is included once), plus the shared
 * .dest-card / .way-card part styles the archive grids reuse (these live in
 * index.html's page styles, which are not loaded on archives).
 *
 * Loaded with pj-base (pangolin-journeys.css) as a dependency on the
 * pj_journey / pj_destination / pj_way post type archives.
 */

/* ============================
   Destinations archive
   (from destinations.html)
   ============================ */

/* ---- Destinations grid ---- */
.dest-list { background: var(--cream); padding: clamp(4rem, 9vh, 7rem) 0 clamp(5rem, 10vh, 9rem); }

.dest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.dest-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3/2;
  color: #fff;
}
/* First tile spans full width — editorial emphasis */
.dest-tile--feature { grid-column: 1 / -1; aspect-ratio: 21/9; }

.dest-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 720ms var(--ease-out-quart);
}
.dest-tile:hover img { transform: scale(1.05); }
.dest-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(1,54,49,0.85) 0%, rgba(1,54,49,0.2) 50%, rgba(1,54,49,0.05) 100%);
}
.dest-tile__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}
.dest-tile__meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: block;
}
.dest-tile__name {
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.625rem, 2.5vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.dest-tile__desc {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  max-width: 46ch;
}
.dest-tile__arrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms var(--ease-out-quart), transform 320ms var(--ease-out-quart);
}
.dest-tile:hover .dest-tile__arrow { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .dest-grid { grid-template-columns: 1fr; }
  .dest-tile, .dest-tile--feature { aspect-ratio: 3/2; grid-column: auto; }
}

/* ---- Destination cards (shared part; base styles from index.html,
        adapted from the home carousel to a grid context) ---- */
.dest-card {
  display: block;
  cursor: pointer;
}
.dest-card__img-wrap { overflow: hidden; margin-bottom: 0.75rem; }
.dest-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 640ms var(--ease-out-quart);
}
.dest-card:hover img { transform: scale(1.05); }
.dest-card__name {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--green);
  transition: color 200ms;
}
.dest-card:hover .dest-card__name { color: var(--olive); }
.dest-card__meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  display: block;
  margin: 0.15rem 0 0.35rem;
}
.dest-card__blurb {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #555751;
  margin-top: 0.35rem;
}

/* Card-based archive grid (declared after the source .dest-grid rules so
   the modifier wins at equal specificity) */
.dest-grid--cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dest-grid--cards .dest-card { width: auto; flex-shrink: initial; }

@media (max-width: 720px) {
  .dest-grid--cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============================
   Ways to Travel archive
   (from ways-to-travel.html)
   ============================ */
.ways-rows { padding: clamp(4.5rem, 9vh, 8rem) 0; }
.ways-rows__intro {
  max-width: 56ch;
  margin: 0 auto clamp(3rem, 6vh, 5rem);
  text-align: center;
}
.ways-rows__intro p {
  font-style: italic;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  line-height: 1.5;
  color: #3a3c37;
  text-wrap: balance;
}

.way-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  padding: clamp(2.5rem, 6vh, 5rem) 0;
}
.way-row + .way-row { border-top: 1px solid rgba(1,54,49,0.1); }
.way-row:nth-child(even) .way-row__media { order: 2; }

.way-row__media { overflow: hidden; }
.way-row__media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 760ms var(--ease-out-quart);
}
.way-row:hover .way-row__media img { transform: scale(1.04); }

.way-row__index {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 1rem;
  display: block;
}
.way-row__title {
  font-weight: 700;
  font-size: clamp(2rem, 3.25vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.016em;
  color: var(--green);
  margin-bottom: 1rem;
}
.way-row__desc {
  font-size: clamp(1.0625rem, 1.2vw, 1.25rem);
  line-height: 1.7;
  color: #3a3c37;
  max-width: 50ch;
  margin-bottom: 1.75rem;
}
.way-row__link {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1.5px solid var(--green);
  padding-bottom: 0.35rem;
  transition: gap 240ms var(--ease-out-quart);
}
.way-row__link:hover { gap: 0.95rem; }

@media (max-width: 820px) {
  .way-row { grid-template-columns: 1fr; gap: 1.75rem; }
  .way-row:nth-child(even) .way-row__media { order: 0; }
  .way-row__media img { aspect-ratio: 16/9; }
}

/* ---- Way cards (shared part; styles from index.html) ---- */
.ways__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.625rem;
}

.way-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2/3;
  display: block;
  cursor: pointer;
}
.way-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 640ms var(--ease-out-quart);
}
.way-card:hover img { transform: scale(1.07); }
.way-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1,54,49,0.82) 0%, rgba(1,54,49,0.18) 45%, transparent 70%);
}
.way-card__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 1rem 0.625rem 1.125rem;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}
.way-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 1rem 0.75rem 1.125rem;
  text-align: center;
  color: #fff;
}
.way-card__body .way-card__label {
  position: static;
  padding: 0;
  margin-bottom: 0.35rem;
}
.way-card__name {
  display: block;
  font-style: italic;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.way-card__blurb {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  margin-top: 0.4rem;
}

@media (max-width: 1100px) { .ways__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .ways__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================
   Journeys archive
   ============================ */
/* Mirrors .jrn-grid from the base stylesheet so markup using only the
   .journeys-grid class still lays out correctly. */
.journeys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.journeys-empty {
  font-style: italic;
  font-size: clamp(1.0625rem, 1.2vw, 1.2rem);
  color: #555751;
}

/* ============================
   CTA band
   (identical in destinations.html + ways-to-travel.html — deduped)
   ============================ */
.cta-band {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: clamp(4.5rem, 9vh, 7rem) 0;
}
.cta-band .kicker { color: var(--gold); justify-content: center; display: flex; margin-bottom: 1rem; }
.cta-band h2 {
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin-bottom: 0.875rem;
  text-wrap: balance;
}
.cta-band p {
  font-style: italic;
  font-size: clamp(1.0625rem, 1.2vw, 1.2rem);
  color: rgba(255,255,255,0.68);
  margin-bottom: 2.25rem;
}
