/*
 * single-ewt_trek.css — styles for single-ewt_trek.php (v2.9.2)
 * Loaded after v2.css only on single treks (ewt_template_styles()).
 * Shared parts (hero, intro grid, pillars, guide table, journey cards,
 * FAQ, closing band) come from v2.css / v23.css; this file holds the
 * trek-only pieces in the same language: hairlines, Quine, ember labels.
 * EWT tokens only. Square corners throughout.
 *
 *   1. Section rhythm
 *   2. 01 The climb — facts under the heading
 *   3. 02 The route — altitude profile + table
 *   4. 03 Day by day
 *   5. 04 In pictures
 *   6. 05 Included / 06 What to bring — shared list
 *   7. Lightbox
 *   8. Responsive
 *   9. Reduced motion
 */


/* ==========================================================================
   1. SECTION RHYTHM — every section opens with the same space; the FAQ
   and closing band keep their v2.css spacing.
   ========================================================================== */
.ewt-trek-route,
.ewt-trek-days,
.ewt-trek-gallery,
.ewt-trek-inex,
.ewt-trek-gear { padding-top: var(--ewt-space); }
.ewt-trek .ewt-trek-safaris { padding-bottom: 0; }
.ewt-trek .ewt-faq { margin-top: var(--ewt-space); }

.ewt-trek-route__head,
.ewt-trek-days__head,
.ewt-trek-inex__head { max-width: 760px; }
.ewt-trek-route__head .ewt-h2,
.ewt-trek-days__head .ewt-h2,
.ewt-trek-gallery__head .ewt-h2,
.ewt-trek-inex__head .ewt-h2,
.ewt-trek-gear__head .ewt-h2 { margin-top: 28px; }
.ewt-trek-route__head .ewt-body-copy,
.ewt-trek-gear__head .ewt-body-copy { margin-top: 24px; }
.ewt-trek-safaris .ewt-split-head .ewt-body-copy { margin-top: 24px; }


/* ==========================================================================
   2. 01 THE CLIMB — quick facts under the heading
   ========================================================================== */
.ewt-trek-intro__facts { margin: 40px 0 0; max-width: 420px; border-top: 1px solid var(--ewt-line); }
.ewt-trek-intro__facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--ewt-line-soft); }
.ewt-trek-intro__facts dt { font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--ewt-muted); white-space: nowrap; }
.ewt-trek-intro__facts dd { margin: 0; font-family: var(--ewt-font-display); font-size: 18px; line-height: 1.35; color: var(--ewt-ink); text-align: right; }


/* ==========================================================================
   3. 02 THE ROUTE — altitude profile (SVG) + route table
   ========================================================================== */
.ewt-trek-profile { margin: var(--ewt-stack) 0 0; padding-top: 28px; border-top: 1px solid var(--ewt-ink); }
.ewt-trek-profile__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ewt-trek-profile__scroll:focus-visible { outline: 1px solid var(--ewt-ember); outline-offset: 4px; }
.ewt-trek-profile__svg { display: block; width: 100%; min-width: 680px; height: auto; overflow: visible; }

.ewt-trek-profile__grid { stroke: var(--ewt-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ewt-trek-profile__axis { font-family: var(--ewt-font-body); font-size: 13px; letter-spacing: .04em; fill: var(--ewt-muted); }
.ewt-trek-profile__area { fill: var(--ewt-surface-2); }
.ewt-trek-profile__line { fill: none; stroke: var(--ewt-ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ewt-trek-profile__camp { fill: var(--ewt-canvas); stroke: var(--ewt-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ewt-trek-profile__peak { fill: var(--ewt-bronze); }
.ewt-trek-profile__camp.is-top { fill: var(--ewt-bronze); stroke: var(--ewt-bronze); }
.ewt-trek-profile__val { font-family: var(--ewt-font-body); font-size: 13px; fill: var(--ewt-ink-soft); }
.ewt-trek-profile__val.is-top { font-family: var(--ewt-font-display); font-size: 20px; fill: var(--ewt-ember); }
.ewt-trek-profile__day { font-family: var(--ewt-font-body); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; fill: var(--ewt-muted); }

.ewt-trek-profile__key { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; font-size: 13px; color: var(--ewt-muted); }
.ewt-trek-profile__key span { display: inline-flex; align-items: center; gap: 10px; }
.ewt-trek-profile__key span::before { content: ""; width: 9px; height: 9px; }
.ewt-trek-profile__key-camp::before { border: 1.5px solid var(--ewt-ink); background: var(--ewt-canvas); }
.ewt-trek-profile__key-peak::before { background: var(--ewt-bronze); transform: rotate(45deg) scale(.9); }

/* Table: v2.css .ewt-style-guide__table, with a narrow day column */
.ewt-trek-route__table { margin-top: var(--ewt-stack); }
.ewt-trek-route__table .ewt-style-guide__table { min-width: 760px; }
.ewt-trek-route__table .ewt-style-guide__table tbody th { width: 96px; white-space: nowrap; }
.ewt-trek-route__table .ewt-style-guide__table tbody th a { color: var(--ewt-ink); transition: color .3s ease; }
.ewt-trek-route__table .ewt-style-guide__table tbody th a:hover,
.ewt-trek-route__table .ewt-style-guide__table tbody th a:focus-visible { color: var(--ewt-ember); }
.ewt-trek-route__table .ewt-style-guide__table tbody td:nth-child(2) { width: auto; }
.ewt-trek-route__table .ewt-style-guide__table td { white-space: normal; }


/* ==========================================================================
   4. 03 DAY BY DAY — every day open, editorial two columns
   ========================================================================== */
.ewt-trek-days__list { margin: var(--ewt-stack) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ewt-ink); }
.ewt-trek-day {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  padding: clamp(36px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--ewt-line);
}
.ewt-trek-day__head { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.ewt-trek-day__num { font-size: 11px; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; color: var(--ewt-ember); }
.ewt-trek-day__title { font-size: clamp(22px, .8vw + 17px, 28px); line-height: 1.2; letter-spacing: -.008em; color: var(--ewt-ink); text-wrap: balance; }
.ewt-trek-day__camp { font-size: 14px; line-height: 1.6; color: var(--ewt-muted); }
.ewt-trek-day__body { grid-column: 6 / span 7; min-width: 0; }

.ewt-trek-day__photos { display: grid; gap: 12px; margin-top: 28px; }
.ewt-trek-day__photos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ewt-trek-day__photos--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ewt-trek-day__photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ewt-photo-ground); }
.ewt-trek-day__photos--1 .ewt-trek-day__photo { aspect-ratio: 16 / 9; }
.ewt-trek-day__photo img { width: 100%; height: 100%; object-fit: cover; max-width: none; transition: transform 1.2s var(--ewt-ease-soft); }
.ewt-trek-day__photo:hover img { transform: scale(1.03); }
.ewt-trek-day__photo:focus-visible { outline: 1px solid var(--ewt-bronze); outline-offset: 4px; }

.ewt-trek-day__facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px 24px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--ewt-line-soft);
}
.ewt-trek-day__facts dt { font-size: 10.5px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--ewt-muted); }
.ewt-trek-day__facts dd { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ewt-ink); }


/* ==========================================================================
   5. 04 IN PICTURES — first photo large, the rest beside and below
   ========================================================================== */
.ewt-trek-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: var(--ewt-stack); }
.ewt-trek-gallery__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ewt-trek-gallery__item { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ewt-photo-ground); }
.ewt-trek-gallery__grid--2 .ewt-trek-gallery__item { aspect-ratio: 3 / 2; }
.ewt-trek-gallery__item--lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.ewt-trek-gallery__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; transition: transform 1.2s var(--ewt-ease-soft); }
.ewt-trek-gallery__item:hover img { transform: scale(1.03); }
.ewt-trek-gallery__all { color: var(--ewt-ink); }
.ewt-trek-gallery__item:focus-visible { outline: 1px solid var(--ewt-bronze); outline-offset: 4px; }


/* ==========================================================================
   6. 05 INCLUDED · 06 WHAT TO BRING
   ========================================================================== */
.ewt-trek-inex__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 80px; margin-top: var(--ewt-stack); }
.ewt-trek-inex__col { padding-top: 30px; border-top: 1px solid var(--ewt-line-strong); }
.ewt-trek-inex__col--in { border-top-color: var(--ewt-ink); }
.ewt-trek-inex__col h3,
.ewt-trek-gear__group h3 { font-size: 24px; line-height: 1.2; letter-spacing: -.005em; color: var(--ewt-ink); }
.ewt-trek-inex__col:not(.ewt-trek-inex__col--in) h3 { color: var(--ewt-bark); }

.ewt-trek-gear__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; align-items: start; }
.ewt-trek-gear__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--ewt-header-h, 96px) + 32px); }
.ewt-trek-gear__groups { grid-column: 6 / span 7; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
.ewt-trek-gear__group { padding-top: 22px; border-top: 1px solid var(--ewt-line-strong); }

/* Shared hairline list: bronze rule for "in", quiet rule for "out" */
.ewt-trek-list { margin: 18px 0 0; padding: 0; list-style: none; }
.ewt-trek-list li { position: relative; padding: 13px 0 13px 24px; border-bottom: 1px solid var(--ewt-line-soft); font-size: 15px; line-height: 1.6; color: var(--ewt-ink-soft); }
.ewt-trek-list li::before { content: ""; position: absolute; left: 0; top: 25px; width: 10px; height: 1px; background: var(--ewt-bronze); }
.ewt-trek-list--out li { color: var(--ewt-muted); }
.ewt-trek-list--out li::before { background: var(--ewt-line-strong); }
.ewt-trek-list li.is-essential { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--ewt-ink); }
.ewt-trek-list__tag { flex: 0 0 auto; font-size: 10px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--ewt-ember); white-space: nowrap; }


/* ==========================================================================
   7. LIGHTBOX (assets/js/trek.js)
   ========================================================================== */
.ewt-lb { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .35s var(--ewt-ease-soft); }
.ewt-lb[hidden] { display: none; }
.ewt-lb.is-open { opacity: 1; }
.ewt-lb__backdrop { position: absolute; inset: 0; background: var(--ewt-espresso); opacity: .96; }
.ewt-lb__stage { position: relative; z-index: 1; margin: 0; max-width: min(1400px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ewt-lb__img { display: block; max-width: 100%; max-height: 82vh; width: auto; height: auto; object-fit: contain; }
.ewt-lb__count { font-size: 11px; letter-spacing: .22em; color: var(--ewt-on-dark-muted); min-height: 1em; }
.ewt-lb__btn {
  position: absolute;
  z-index: 2;
  min-height: 44px;
  padding: 0 4px 4px;
  border: 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  color: var(--ewt-on-dark);
  font-family: var(--ewt-font-body);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
}
.ewt-lb__btn:hover { color: var(--ewt-bronze); }
.ewt-lb__btn:focus-visible { outline: 1px solid var(--ewt-bronze); outline-offset: 6px; }
.ewt-lb__close { top: 24px; right: var(--ewt-gutter); }
.ewt-lb__prev { left: var(--ewt-gutter); top: 50%; transform: translateY(-50%); }
.ewt-lb__next { right: var(--ewt-gutter); top: 50%; transform: translateY(-50%); }
.ewt-lb__btn[hidden] { display: none; }
html.ewt-lb-open { overflow: hidden; }


/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .ewt-trek-gear__groups { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .ewt-trek-day__head,
  .ewt-trek-day__body,
  .ewt-trek-gear__head,
  .ewt-trek-gear__groups { grid-column: 1 / -1; }
  .ewt-trek-gear__head { position: static; }
  .ewt-trek-intro__facts { max-width: none; }
}
@media (max-width: 760px) {
  .ewt-trek-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ewt-trek-gallery__item--lead { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .ewt-trek-gallery__grid--6 .ewt-trek-gallery__item:nth-child(6) { display: none; } /* lead + 4 = even rows; still in the lightbox */
  .ewt-trek-inex__grid { grid-template-columns: 1fr; }
  .ewt-trek-day__photos--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ewt-trek-day__photos--3 .ewt-trek-day__photo:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .ewt-trek-route__table .ewt-style-guide__table { min-width: 0; }
  .ewt-lb__prev, .ewt-lb__next { top: auto; bottom: 24px; transform: none; }
}
@media (max-width: 600px) {
  .ewt-trek-gear__groups { grid-template-columns: 1fr; gap: 36px; }
  .ewt-trek-day__facts { grid-template-columns: 1fr 1fr; }
}
/* Table rows stack on phones (v2.css, 720px); keep the day label tidy */
@media (max-width: 720px) {
  .ewt-trek-route__table .ewt-style-guide__table tbody th { width: auto; }
  /* Compact: stage across the row, the other facts two by two */
  .ewt-trek-route__table .ewt-style-guide__table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .ewt-trek-route__table .ewt-style-guide__table tbody th,
  .ewt-trek-route__table .ewt-style-guide__table tbody td:nth-child(2) { grid-column: 1 / -1; }
  .ewt-trek-route__table .ewt-style-guide__table tbody th { margin-bottom: 0; }
  .ewt-trek-route__table .ewt-style-guide__table tbody td + td { margin-top: 0; }
}


/* ==========================================================================
   9. REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ewt-trek-day__photo img,
  .ewt-trek-gallery__item img,
  .ewt-lb { transition: none; }
  .ewt-trek-day__photo:hover img,
  .ewt-trek-gallery__item:hover img { transform: none; }
}
