/* ==========================================================================
   Rinjani Atlas — about.css  (About Us page only; requires main.css)
   Shared patterns used here (main.css): .page-hero, .h1, .split-head, .car-track/.car-nav,
   .glass-pill, .photo-caption, .cta
   Sections: Hero · Our Story · How We Climb · Meet the Crew · Giving Back · Basecamp · Closing CTA
   ========================================================================== */

/* Intro elements stay hidden until about.js animates them */
.js-motion:not(.ra-ready) :is(
  .site-header > *, .page-hero__title > *, .page-hero__side > *, .page-hero__photo, .photo-caption, .glass-pill
) { visibility: hidden; }

/* ==========================================================================
   2. OUR STORY — timeline on a slanted-tick rail
   ========================================================================== */
.story { position: relative; padding: clamp(80px, 14vw, 112px) var(--gutter) clamp(64px, 12vw, 104px); scroll-margin-top: 0; }
.story::before, .story::after {
  content: ''; position: absolute; top: 28px; width: 22px; height: 22px; background: var(--ink);
  -webkit-mask: var(--i-cross) center / contain no-repeat; mask: var(--i-cross) center / contain no-repeat;
}
.story::before { left: var(--gutter); }
.story::after { right: var(--gutter); }
.story__head { max-width: 680px; }
.story__title { line-height: 1.16; }

.tl { margin: 52px 0 0; display: flex; flex-direction: column; }
/* mobile: vertical rail on the left (the rail is added on the server, see inc/blocks.php) */
.tl__item { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 22px; align-content: start; }
.tl__item > * { grid-column: 2; }
.tl__rail { grid-column: 1; grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: center; padding-top: 16px; }
.tl__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.tl__item:last-child .tl__dot { background: var(--white); border: 1.4px solid var(--ink); }
.tl__ticks { flex: 1; display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 12px 0 4px; }
.tl__ticks .tick { height: 10px; background: var(--tick-off); }
.tl__ticks .tick:nth-child(n+9) { display: none; }
.tl__item:last-child .tl__ticks { flex: none; height: 120px; padding-bottom: 0; -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent); mask-image: linear-gradient(180deg, #000 20%, transparent); }
.tl__item:last-child .tl__ticks .tick:nth-child(n+6) { display: none; }
.tl__year { font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1; }
.tl__title { margin-top: 16px; font-size: 20px; font-weight: 500; line-height: normal; letter-spacing: -0.02em; }
.tl__text { margin-top: 8px; padding-bottom: 40px; font-size: 15px; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }

@media (min-width: 700px) {
  /* tablet: 2×2, horizontal rails */
  .tl { margin-top: 72px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 56px; }
  .tl__item { display: flex; flex-direction: column; }
  .tl__rail { flex-direction: row; padding-top: 0; }
  .tl__ticks, .tl__item:last-child .tl__ticks { flex: 1; height: auto; flex-direction: row; justify-content: space-between; padding: 0 0 0 20px; }
  .tl__ticks .tick { height: 12px; }
  .tl__ticks .tick:nth-child(n+9), .tl__item:last-child .tl__ticks .tick:nth-child(n+6) { display: block; }
  .tl__ticks .tick:nth-child(n+15), .tl__item:last-child .tl__ticks .tick:nth-child(n+15) { display: none; }
  .tl__item:last-child .tl__ticks { -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent); mask-image: linear-gradient(90deg, #000 30%, transparent); }
  .tl__text { padding-bottom: 0; }
  .tl__year { margin-top: 30px; font-size: 50px; }
  .tl__title { margin-top: 18px; font-size: 21px; }
}
@media (min-width: 1280px) {
  .story { padding: 128px 48px 136px; }
  .story::before, .story::after { top: 48px; width: 28px; height: 28px; }
  .story .story__head { padding-top: 32px; max-width: none; } /* the static design had max-width: 680px here too, which squeezed the title into a 176px column — fixed */
  .story__title { line-height: 1.14; }
  .story__title img { width: 120px !important; height: 58px !important; margin: -8px 4px 0; }
  /* desktop: 4 columns, one continuous rail */
  .tl { margin-top: 88px; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; }
  .tl__item { padding-right: 40px; }
  .tl__item .tl__rail { margin-right: -40px; }
  .tl__item:last-child { padding-right: 0; }
  .tl__item:last-child .tl__rail { margin-right: 0; }
  .tl__ticks { padding: 0 22px; }
  .tl__item:last-child .tl__ticks { padding: 0 0 0 22px; }
  .tl__ticks .tick:nth-child(n+15), .tl__item:last-child .tl__ticks .tick:nth-child(n+15) { display: block; }
  .tl__year { margin-top: 36px; font-size: 56px; }
  .tl__title { margin-top: 22px; font-size: 22px; }
  .tl__text { margin-top: 10px; }
}

/* ==========================================================================
   3. HOW WE CLIMB — 4 promise cards (carousel on mobile)
   ========================================================================== */
.climb { padding: 0 var(--inset) var(--inset); }
.climb__panel { border-radius: var(--r-panel); background: var(--cream); padding: clamp(56px, 10vw, 88px) 0 clamp(24px, 5vw, 40px); }
.climb__head { padding: 0 var(--gutter); }
.climb__track { margin-top: 36px; counter-reset: climb; }
.climb-card { position: relative; counter-increment: climb; width: min(80vw, 330px); min-height: 300px; padding: 22px 22px 24px; border-radius: 26px; background: var(--white); display: flex; flex-direction: column; align-items: flex-start; }
.climb-card::before { content: counter(climb, decimal-leading-zero); position: absolute; top: 22px; right: 22px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: normal; color: var(--muted); }
.climb-card .wp-block-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--pill); color: var(--ink); display: flex; align-items: center; justify-content: center; transition: background .5s, color .5s; }
.climb-card .wp-block-icon svg { width: 26px; height: 26px; }
.climb-card.is-current .wp-block-icon { background: var(--ink); color: var(--white); }
.climb-card__title { margin-top: auto; padding-top: 40px; font-size: 22px; font-weight: 500; line-height: normal; letter-spacing: -0.025em; }
.climb-card__text { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }

@media (min-width: 700px) {
  .climb__track { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; overflow: visible; padding: 0 var(--gutter); }
  .climb-card { width: auto; min-height: 290px; padding: 26px 26px 28px; }
  .climb-card::before { top: 26px; right: 26px; font-size: 18px; }
  .climb-card.is-current .wp-block-icon { background: var(--pill); color: var(--ink); }
  .climb-card .wp-block-icon { width: 56px; height: 56px; }
  .climb-card .wp-block-icon svg { width: 28px; height: 28px; }
  .climb-card__title { font-size: 23px; }
}
@media (min-width: 1280px) {
  .climb__panel { padding: 96px 40px 40px; }
  .climb__head { padding: 0; }
  .climb__track { margin-top: 64px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; }
  .climb-card { min-height: 340px; padding: 28px 26px 30px; transition: translate .6s var(--ease), box-shadow .6s var(--ease); }
  .climb-card::before { top: 28px; }
  .climb-card:hover { translate: 0 -6px; box-shadow: 0 28px 50px -30px rgba(20,20,18,.35); }
  .climb-card:hover .wp-block-icon { background: var(--ink); color: var(--white); }
  .climb-card__title { padding-top: 0; font-size: 24px; }
  .climb-card__text { margin-top: 12px; }
}

/* ==========================================================================
   4. MEET THE CREW — portrait cards (carousel on mobile) + "24 more" strip
   ========================================================================== */
.crew { padding: clamp(80px, 14vw, 112px) 0 clamp(72px, 12vw, 104px); scroll-margin-top: 24px; }
.crew__head { padding: 0 var(--gutter); }
.crew__track { margin-top: 36px; }
.crew-card { width: min(72vw, 300px); display: flex; flex-direction: column; gap: 16px; }
/* Portrait = Cover block (click "Add media" / "Replace" to set the photo) */
.crew-card__photo.wp-block-cover {
  position: relative; display: block; min-height: 0; padding: 0; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden;
  background: repeating-linear-gradient(135deg, #D6CFC2 0 10px, #DED8CC 10px 20px);
}
.crew-card__photo:not(:has(> .wp-block-cover__image-background))::after {
  content: 'Crew portrait'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
}
.crew-card__photo > .wp-block-cover__inner-container { position: static; }
.crew-card__role { position: absolute; z-index: 2; left: 14px; top: 14px; height: 30px; padding: 0 13px; border-radius: 999px; background: var(--white); display: flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink); }
.crew-card__cap { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 4px; }
.crew-card__who { display: flex; flex-direction: column; gap: 3px; }
.crew-card__name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.crew-card__from { font-size: 14px; color: var(--text-3); }
.crew-card__since { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--kicker); white-space: nowrap; }

.crew-more {
  margin: clamp(36px, 6vw, 48px) var(--gutter) 0; padding: 22px 2px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 32px; row-gap: 16px;
}
.crew .crew-more { margin-top: clamp(36px, 6vw, 48px); }
.crew-more p { flex: 1 1 320px; font-size: 16px; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; text-wrap: pretty; }
.crew-more em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px; letter-spacing: 0; }
.crew-more__ticks { flex: 1 1 220px; max-width: 300px; display: flex; align-items: center; justify-content: space-between; }

@media (min-width: 700px) {
  .crew__track { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 36px; overflow: visible; padding: 0 var(--gutter); }
  .crew-card { width: auto; gap: 18px; }
  .crew-card__photo.wp-block-cover { border-radius: 26px; }
  .crew-card__role { left: 16px; top: 16px; height: 32px; padding: 0 14px; font-size: 13px; }
  .crew-card__who { gap: 4px; }
  .crew-card__name { font-size: 20px; }
  .crew-card__since { font-size: 16px; }
}
@media (min-width: 1280px) {
  .crew { padding: 128px 48px; }
  .crew__head { padding: 0; }
  .crew__track { margin-top: 64px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0; }
  .crew-card { gap: 20px; transition: translate .6s var(--ease); }
  .crew-card:hover { translate: 0 -6px; }
  .crew .crew-more { margin: 48px 0 0; padding: 26px 4px; flex-wrap: nowrap; gap: 40px; }
  .crew-more p { flex: none; font-size: 17px; }
  .crew-more em { font-size: 20px; }
  .crew-more__ticks { flex: none; max-width: none; gap: 7px; }
  .crew-more__ticks .tick { height: 16px; }
}

/* ==========================================================================
   5. GIVING BACK — photo + 3 numbered rows
   ========================================================================== */
.giving { padding: 0 var(--inset) var(--inset); }
.giving__panel { border-radius: var(--r-panel); background: var(--cream); padding: clamp(8px, 1.6vw, 12px); }
.giving__photo.wp-block-cover { display: block; min-height: 0; padding: 0; height: clamp(260px, 60vw, 480px); border-radius: clamp(20px, 3vw, 24px); }
.giving__photo > .wp-block-cover__background { background: linear-gradient(180deg, rgba(28,24,18,0) 50%, rgba(28,24,18,.45) 100%) !important; }
.giving__photo > .wp-block-cover__inner-container { position: static; }
.giving__photo > .wp-block-cover__inner-container::before {
  content: ''; position: absolute; z-index: 2; left: clamp(16px, 3vw, 24px); top: clamp(16px, 3vw, 24px); width: 22px; height: 22px; background: var(--white);
  -webkit-mask: var(--i-cross) center / contain no-repeat; mask: var(--i-cross) center / contain no-repeat;
}
.giving__chip { position: absolute; z-index: 2; left: clamp(14px, 3vw, 22px); bottom: clamp(14px, 3vw, 22px); height: 34px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.giving__text { padding: clamp(40px, 8vw, 56px) clamp(12px, 3.6vw, 28px) clamp(16px, 3.6vw, 28px); }
.giving__title { margin-top: 18px; max-width: 640px; }

.num-rows { margin: clamp(32px, 6vw, 44px) 0 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); counter-reset: num; }
.giving__text .num-rows { margin-top: clamp(32px, 6vw, 44px); }
.num-row { counter-increment: num; display: grid; grid-template-columns: clamp(40px, 7vw, 56px) minmax(0, 1fr); row-gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); }
.num-row::before { content: counter(num, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.4; }
.num-row > * { grid-column: 2; }
.num-row__title { font-size: clamp(19px, 2.8vw, 22px); font-weight: 500; line-height: normal; letter-spacing: -0.02em; }
.num-row__text { font-size: 15px; line-height: 1.6; color: var(--text-3); text-wrap: pretty; }

@media (min-width: 1280px) {
  .giving__panel { padding: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: stretch; }
  .giving__photo.wp-block-cover { height: auto; min-height: 660px; border-radius: 28px; }
  .giving__photo > .wp-block-cover__background { background: linear-gradient(180deg, rgba(28,24,18,0) 55%, rgba(28,24,18,.42) 100%) !important; }
  .giving__photo > .wp-block-cover__inner-container::before { left: 28px; top: 28px; width: 28px; height: 28px; }
  .giving__chip { left: 24px; bottom: 24px; height: 36px; padding: 0 16px; }
  .giving__text { padding: 56px 24px 56px 0; display: flex; flex-direction: column; justify-content: center; }
  .giving__title { margin-top: 24px; }
  .giving__text .num-rows { margin-top: 48px; }
  .num-row { padding: 24px 0; row-gap: 8px; }
  .num-row::before { line-height: 1.5; }
}

/* ==========================================================================
   6. BASECAMP — text, travel times (Table block), buttons + photo with address card
   ========================================================================== */
.basecamp { padding: clamp(80px, 14vw, 112px) var(--gutter) clamp(72px, 12vw, 104px); }
.basecamp__text { display: flex; flex-direction: column; max-width: 640px; }
.basecamp__title { margin-top: 18px; }
.basecamp__lead { margin-top: 20px; max-width: 500px; }

.travel { margin-top: 36px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.travel__label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--kicker); margin-bottom: 8px; }
.travel .wp-block-table { margin: 0; overflow: visible; }
.travel table { width: 100%; border-collapse: collapse; }
.travel tbody { display: flex; flex-direction: column; }
.travel tr { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.travel td { border: 0; padding: 0; }
.travel td:first-child { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 16px; font-size: 15px; line-height: 1.4; font-weight: 500; }
.travel td:first-child::after { content: ''; flex: 1 1 24px; min-width: 24px; height: 1.2px; background: repeating-linear-gradient(90deg, var(--line-3) 0 2px, transparent 2px 6px); }
.travel td:last-child { flex: none; font-family: var(--serif); font-style: italic; font-size: 17px; white-space: nowrap; }

.basecamp__actions.wp-block-buttons { margin-top: 28px; max-width: 480px; display: flex; flex-wrap: wrap; gap: 10px; }
.basecamp__actions .wp-block-button { flex: 1 1 200px; display: flex; }
.basecamp__actions .wp-block-button__link { width: 100%; padding: 0 20px; }
/* "Ask about pickup": grey pill below 1280, underlined text link on desktop */
.basecamp__ask .wp-block-button__link { gap: 12px; background: var(--pill); color: var(--ink); }
.basecamp__ask .wp-block-button__link:hover { background: var(--pill-hover); color: var(--ink); }
.basecamp__actions .basecamp__ask .wp-block-button__link::before { display: none; }
.basecamp__ask .wp-block-button__link::after {
  content: ''; flex: none; width: 24px; height: 11px; background: currentColor;
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat; transition: transform .55s var(--ease);
}

.basecamp__media { margin-top: clamp(40px, 7vw, 56px); position: relative; }
.basecamp__photo.wp-block-cover { display: block; min-height: 0; padding: 0; height: clamp(340px, 78vw, 560px); border-radius: var(--r-panel); }
.basecamp__photo > .wp-block-cover__background { background: linear-gradient(180deg, rgba(28,24,18,.16) 0%, rgba(28,24,18,0) 30%, rgba(28,24,18,0) 60%, rgba(28,24,18,.4) 100%) !important; }
.basecamp__photo > .wp-block-cover__inner-container { position: static; }
.basecamp__photo > .wp-block-cover__inner-container::before {
  content: ''; position: absolute; z-index: 2; left: clamp(18px, 4vw, 28px); top: clamp(18px, 4vw, 28px); width: 22px; height: 22px; background: var(--white);
  -webkit-mask: var(--i-cross) center / contain no-repeat; mask: var(--i-cross) center / contain no-repeat;
}
.basecamp__hours { position: absolute; z-index: 2; right: clamp(14px, 3.4vw, 24px); top: clamp(14px, 3.4vw, 24px); height: 34px; text-transform: none; letter-spacing: 0; font-size: 13px; }

.addr-card { margin-top: 8px; padding: 20px 20px 18px; border-radius: 22px; background: var(--cream); display: flex; flex-direction: column; gap: 6px; }
.addr-card__name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.addr-card__addr { font-size: 15px; line-height: 1.5; color: var(--text-3); }
.addr-card__elev { font-family: var(--serif); font-style: italic; font-size: 16px; }
.addr-card__elev::before { content: ''; display: block; height: 1px; background: var(--line); margin: 12px 0 14px; }

@media (min-width: 700px) {
  .basecamp__media .addr-card { position: absolute; z-index: 2; left: 20px; bottom: 20px; width: 330px; margin: 0; padding: 22px 22px 20px; background: rgba(251,250,247,.95); }
  .addr-card__name { font-size: 20px; }
  .addr-card__addr { font-size: 14px; }
}
@media (min-width: 1280px) {
  .basecamp { padding: 128px 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 80px; align-items: center; }
  .basecamp__text { max-width: none; }
  .basecamp__title { margin-top: 24px; }
  .basecamp__lead { margin-top: 24px; max-width: 460px; }
  .travel { margin-top: 44px; }
  .travel__label { font-size: 13px; margin-bottom: 10px; }
  .travel tr { gap: 20px; padding: 18px 0; }
  .travel td:first-child { gap: 20px; font-size: 16px; white-space: nowrap; }
  .travel td:first-child::after { min-width: 40px; }
  .travel td:last-child { font-size: 18px; }
  .basecamp__actions.wp-block-buttons { margin-top: 36px; max-width: none; flex-wrap: nowrap; align-items: center; gap: 28px; }
  .basecamp__actions .wp-block-button { flex: none; }
  .basecamp__actions .wp-block-button__link { width: auto; padding: 0 24px 0 20px; }
  .basecamp__actions .basecamp__ask .wp-block-button__link { height: auto; padding: 0 0 6px; line-height: normal; border-radius: 0; background: none; border-bottom: 1px solid var(--ink); }
  .basecamp__ask .wp-block-button__link:hover { background: none; }
  .basecamp__ask .wp-block-button__link:hover::after { transform: translateX(6px); }
  .basecamp__ask .wp-block-button__link::after { width: 26px; height: 12px; }
  .basecamp__media { margin-top: 0; }
  .basecamp .basecamp__media { margin-top: 0; }
  .basecamp__photo.wp-block-cover { height: 680px; }
  .basecamp__photo > .wp-block-cover__inner-container::before { left: 32px; top: 32px; width: 28px; height: 28px; }
  .basecamp__hours { right: 28px; top: 28px; height: 36px; padding: 0 16px; }
  .basecamp__media .addr-card { left: 24px; bottom: 24px; width: 340px; }
}

/* ==========================================================================
   7. CLOSING CTA — page-specific tweaks on the shared .cta
   ========================================================================== */
.cta--about .cta__panel.wp-block-cover { min-height: clamp(520px, 80vw, 620px); }
.cta--about .cta__title { max-width: 640px; font-size: clamp(44px, 11vw, 72px); line-height: 1.02; }
.cta--about .cta__actions.wp-block-buttons { margin-top: 36px; }
.cta--about .cta__actions .wp-block-button.is-style-glass { flex-basis: 200px; }
@media (min-width: 1280px) {
  .cta--about .cta__panel.wp-block-cover { height: 620px; min-height: 0; }
  .cta--about .cta__title { max-width: 900px; font-size: 84px; }
  .cta--about .cta__actions.wp-block-buttons { margin-top: 40px; }
}

/* Reveal-on-scroll targets (about.js) */
.js-motion :is(
  .story__head .is-style-kicker, .story__head .is-style-section, .story__head .is-style-lead, .tl__item,
  .climb__head .is-style-kicker, .climb__head .is-style-section, .climb__head .is-style-lead, .climb-card,
  .crew__head .is-style-kicker, .crew__head .is-style-section, .crew__head .is-style-lead, .crew-card, .crew-more,
  .giving__photo, .giving__text .is-style-kicker, .giving__title, .num-row,
  .basecamp__text .is-style-kicker, .basecamp__title, .basecamp__lead, .travel, .basecamp__actions, .basecamp__media,
  .cta__panel
):not(.is-in) { opacity: 0; }
