/* ==========================================================================
   Transition page. Markup: transition-to-assisted-living.php.
   Banner: page-banner.css. Motion: assets/js/page-transition.js.
   ========================================================================== */
.jh-tr {
  --tr-ink: #1f2a1c; --tr-body: #3a4436; --tr-muted: #5f695a;
  --tr-green: hsl(109, 37%, 33%); --tr-forest: #12261a; --tr-leaf: #b5d29a;
  --tr-cream: #f7f3ec; --tr-sand: #efe8da; --tr-line: rgba(31, 42, 28, .12);
  --tr-serif: var(--heading-font-font-family, "Cormorant Garamond"), Georgia, serif;
  --tr-sans: var(--body-font-font-family, "adelle-sans"), "Helvetica Neue", Arial, sans-serif;
  --tr-gutter: clamp(20px, 5vw, 72px);
  --tr-ease: cubic-bezier(.22, 1, .36, 1);
  background: var(--tr-cream); color: var(--tr-ink); font-family: var(--tr-sans);
}
.jh-tr *, .jh-tr *::before, .jh-tr *::after { box-sizing: border-box; }
.jh-tr h2, .jh-tr h3, .jh-tr p { margin: 0; }
#siteWrapper:has(.jh-tr) { background: #f7f3ec; }

.jh-tr .jh-tr__eyebrow { margin-bottom: 14px; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--tr-green); }
.jh-tr .jh-tr__eyebrow--light { color: var(--tr-leaf); }
.jh-tr h2 { font-family: var(--tr-serif) !important; font-weight: 700 !important; font-size: clamp(32px, 3.8vw, 54px) !important; line-height: 1.05 !important; letter-spacing: -0.015em !important; color: inherit !important; }
.jh-tr h2 em { font-style: italic; font-weight: 500; color: var(--tr-green); }

/* ---------- intro ---------- */
.jh-tr__intro { padding: clamp(72px, 11vh, 120px) var(--tr-gutter); }
.jh-tr__intro-in { width: min(1180px, 100%); margin-inline: auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.jh-tr__intro-text > p { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.75; color: var(--tr-body); }
.jh-tr__callout {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 22px 24px;
  border-radius: 18px; background: #fff; border: 1px solid var(--tr-line); border-left: 4px solid var(--tr-green);
}
.jh-tr__callout-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #eef4e7; color: var(--tr-green); }
.jh-tr__callout p { font-size: 16px; line-height: 1.65; color: var(--tr-body); }
.jh-tr__callout b { color: var(--tr-ink); }

/* ---------- steps ---------- */
.jh-steps { background: var(--tr-sand); padding: clamp(72px, 11vh, 120px) var(--tr-gutter); }
.jh-steps__in { width: min(1180px, 100%); margin-inline: auto; display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 88px); }
.jh-steps__side-in { position: sticky; top: calc(var(--jh-nav-space, 96px) + 32px); }
.jh-tr .jh-steps__lead { margin-top: 16px; max-width: 34ch; font-size: 17px; line-height: 1.7; color: var(--tr-body); }
.jh-steps__progress { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.jh-steps__count { font-family: var(--tr-serif); font-size: 18px; color: var(--tr-muted); font-variant-numeric: tabular-nums; }
.jh-steps__count b { font-size: 34px; color: var(--tr-green); }
.jh-steps__bar { flex: 1; max-width: 200px; height: 3px; border-radius: 3px; background: rgba(31, 42, 28, .12); overflow: hidden; }
.jh-steps__bar span { display: block; height: 100%; background: var(--tr-green); transform: scaleX(var(--p, .2)); transform-origin: left; transition: transform .5s var(--tr-ease); }

.jh-steps__list { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 22px; }
.jh-steps__list::before { content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px; background: rgba(31, 42, 28, .12); }
.jh-steps__list::after { content: ""; position: absolute; left: 23px; top: 24px; width: 2px; height: var(--fill, 0px); background: var(--tr-green); transition: height .5s var(--tr-ease); }
.jh-steps__item { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 22px; margin: 0; padding: 0; }
.jh-steps__item::before { display: none; }
.jh-steps__dot {
  position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--tr-serif); font-weight: 700; font-size: 17px;
  background: var(--tr-sand); border: 2px solid rgba(31, 42, 28, .18); color: var(--tr-muted);
  transition: background-color .4s ease, border-color .4s ease, color .4s ease, transform .5s var(--tr-ease);
}
.jh-steps__card {
  padding: 26px 28px; border-radius: 22px; background: rgba(255, 255, 255, .55); border: 1px solid transparent;
  transition: background-color .5s ease, border-color .5s ease, box-shadow .5s var(--tr-ease), transform .5s var(--tr-ease), opacity .5s ease;
  opacity: .55;
}
.jh-steps__ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #eef4e7; color: var(--tr-green); margin-bottom: 16px; }
.jh-steps__stage { display: block; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--tr-green); }
.jh-tr .jh-steps__card h3 { margin-top: 6px; font-family: var(--tr-serif) !important; font-weight: 700 !important; font-size: 28px !important; line-height: 1.1 !important; color: var(--tr-ink) !important; }
.jh-steps__card p { margin-top: 10px; font-size: 17px; line-height: 1.65; color: var(--tr-body); }
.jh-steps__item.is-active .jh-steps__dot, .jh-steps__item.is-done .jh-steps__dot { background: var(--tr-green); border-color: var(--tr-green); color: #fff; }
.jh-steps__item.is-active .jh-steps__dot { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(70, 126, 58, .15); }
.jh-steps__item.is-active .jh-steps__card { opacity: 1; background: #fff; border-color: rgba(70, 126, 58, .25); box-shadow: 0 24px 50px rgba(31, 42, 28, .1); transform: translateX(6px); }
.jh-steps__item.is-done .jh-steps__card { opacity: .8; }

/* ---------- tour ---------- */
.jh-tr__tour { padding: clamp(72px, 11vh, 120px) var(--tr-gutter); }
.jh-tr__tour-card {
  width: min(1180px, 100%); margin-inline: auto; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; border-radius: 28px;
  background: radial-gradient(120% 120% at 0% 0%, #24412b, var(--tr-forest) 60%); color: #f3ede1;
}
.jh-tr__tour-copy { padding: clamp(36px, 5vw, 64px); }
.jh-tr__tour h2 em { color: var(--tr-leaf); }
.jh-tr__tour-copy > p:not(.jh-tr__eyebrow) { margin-top: 16px; max-width: 44ch; font-size: 17px; line-height: 1.7; color: rgba(243, 237, 225, .78); }
.jh-tr__tour-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.jh-tr__tour-photo { margin: 0; min-height: 320px; }
.jh-tr__tour-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; }
/* the banner buttons are styled for a dark background; reuse them here */
.jh-tr__tour .jh-pb__btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; background: #f3ede1; color: var(--tr-forest) !important; font-size: 15px; font-weight: 600; text-decoration: none !important; border: 1.5px solid #f3ede1; transition: background-color .3s ease, transform .3s ease; }
.jh-tr__tour .jh-pb__btn:hover { background: var(--tr-leaf); border-color: var(--tr-leaf); transform: translateY(-2px); }
.jh-tr__tour .jh-pb__btn--ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .45); }
.jh-tr__tour .jh-pb__btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ---------- rise-in (page-transition.js adds .jh-tr-motion) ---------- */
.jh-tr-motion .jh-tr-rise { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform 1s var(--tr-ease); }
.jh-tr-motion .jh-tr-rise.is-in { opacity: 1; transform: none; }
.jh-tr-motion .jh-tr__intro-text.jh-tr-rise { transition-delay: .12s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .jh-tr__intro-in, .jh-steps__in, .jh-tr__tour-card { grid-template-columns: 1fr; }
  .jh-steps__side-in { position: static; }
  .jh-steps__progress { display: none; }
  .jh-tr__tour-photo { min-height: 240px; }
}
@media (max-width: 520px) {
  .jh-steps__item { grid-template-columns: 40px 1fr; gap: 14px; }
  .jh-steps__dot { width: 40px; height: 40px; font-size: 15px; }
  .jh-steps__list::before, .jh-steps__list::after { left: 19px; }
  .jh-steps__card { padding: 20px; }
}

/* original-text layout: the question heads the steps, each card is one idea */
.jh-tr .jh-steps__q { font-size: clamp(28px, 2.8vw, 40px) !important; line-height: 1.15 !important; }
.jh-tr .jh-steps__text { margin: 0; font-family: var(--tr-serif); font-weight: 600; font-size: clamp(21px, 1.8vw, 25px); line-height: 1.35; color: var(--tr-ink); }
.jh-tr .jh-tr__more { margin-top: 24px; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.75; color: var(--tr-body); }
.jh-tr__tour-copy { display: flex; flex-direction: column; justify-content: center; }


/* ==========================================================================
   Our Family is Here to Serve Yours — split section. Motion classes come from
   page-transition.js (.jh-tr-motion on <html>, .is-in on the section).
   ========================================================================== */
.jh-ab { padding: clamp(80px, 13vh, 140px) var(--tr-gutter); overflow: hidden; }
.jh-ab__in { width: min(1180px, 100%); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 104px); align-items: center; }

/* photo composition */
.jh-ab__media { position: relative; padding: 0 12% 14% 0; }
.jh-ab__main { margin: 0; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px rgba(31, 42, 28, .16); }
.jh-ab__main img, .jh-ab__small img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jh-ab__main img { object-position: 30% 50%; }
.jh-ab__small {
  position: absolute; right: 0; bottom: 0; width: 52%; margin: 0;
  aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
  border: 6px solid var(--tr-cream); box-shadow: 0 24px 50px rgba(31, 42, 28, .2);
}
.jh-ab__small img { object-position: 50% 30%; }
.jh-ab__card {
  position: absolute; left: -24px; bottom: 9%; width: min(300px, 62%);
  display: flex; gap: 12px; align-items: flex-start;
  padding: 18px 20px; border-radius: 18px;
  background: #fff; box-shadow: 0 24px 50px rgba(31, 42, 28, .16);
}
.jh-ab__card-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tr-green); color: #fff; }
.jh-ab__card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--tr-body); }
.jh-ab__card b { color: var(--tr-ink); }

/* copy */
.jh-tr .jh-ab__title { font-size: clamp(36px, 4.2vw, 60px) !important; line-height: 1.04 !important; }
.jh-ab__title em { color: var(--tr-green); }
.jh-tr .jh-ab__lead { margin-top: 26px; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.65; color: var(--tr-ink); }
.jh-tr .jh-ab__text { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--tr-line); font-size: 17px; line-height: 1.7; color: var(--tr-body); }
.jh-ab__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 32px; }
.jh-ab__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--tr-forest); color: #fff !important; font-size: 15px; font-weight: 600; text-decoration: none !important;
  transition: background-color .3s ease, transform .3s ease;
}
.jh-ab__btn:hover { background: var(--tr-green); transform: translateY(-2px); }
.jh-ab__btn span { transition: transform .3s ease; }
.jh-ab__btn:hover span { transform: translateX(4px); }
.jh-ab__link { font-weight: 600; color: var(--tr-ink) !important; text-decoration: none !important; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.jh-ab__link:hover { color: var(--tr-green) !important; }
.jh-ab a:focus-visible { outline: 3px solid var(--tr-green); outline-offset: 3px; }

/* ---------- motion ---------- */
.jh-ab__w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.jh-ab__w > span { display: inline-block; }
.jh-tr-motion .jh-ab:not(.is-in) .jh-ab__w > span { transform: translateY(110%); }
.jh-tr-motion .jh-ab__w > span { transition: transform 1s var(--tr-ease); transition-delay: calc(var(--w) * 60ms + 150ms); }
.jh-tr-motion .jh-ab:not(.is-in) .jh-ab-up { opacity: 0; transform: translateY(24px); }
.jh-tr-motion .jh-ab-up { transition: opacity .9s ease, transform 1s var(--tr-ease); }
.jh-tr-motion .jh-ab__lead { transition-delay: .45s; }
.jh-tr-motion .jh-ab__text { transition-delay: .6s; }
.jh-tr-motion .jh-ab__actions { transition-delay: .75s; }
/* photos wipe open, the small one a beat later, then the card pops in */
.jh-tr-motion .jh-ab__main, .jh-tr-motion .jh-ab__small { transition: clip-path 1.3s cubic-bezier(.65, 0, .35, 1); clip-path: inset(0 0 0 0 round 22px); }
.jh-tr-motion .jh-ab:not(.is-in) .jh-ab__main { clip-path: inset(100% 0 0 0 round 22px); }
.jh-tr-motion .jh-ab:not(.is-in) .jh-ab__small { clip-path: inset(0 0 0 100% round 22px); }
.jh-tr-motion .jh-ab__small { transition-delay: .35s; }
.jh-tr-motion .jh-ab__main img, .jh-tr-motion .jh-ab__small img { transition: transform 1.8s var(--tr-ease); }
.jh-tr-motion .jh-ab:not(.is-in) .jh-ab__main img, .jh-tr-motion .jh-ab:not(.is-in) .jh-ab__small img { transform: scale(1.2); }
.jh-tr-motion .jh-ab__card { transition: opacity .6s ease .9s, transform .8s cubic-bezier(.34, 1.56, .64, 1) .9s; }
.jh-tr-motion .jh-ab:not(.is-in) .jh-ab__card { opacity: 0; transform: translateY(20px) scale(.9); }

@media (max-width: 900px) {
  .jh-ab__in { grid-template-columns: 1fr; }
  .jh-ab__media { order: 2; max-width: 520px; }
  .jh-ab__card { position: relative; left: auto; bottom: auto; width: auto; margin-top: 18px; }
  .jh-ab__media { padding: 0; }
  .jh-ab__small { display: none; }
}

/* ==========================================================================
   Tour card: contour-line pattern drifting on the green, a glow that follows
   the cursor, word-by-word heading, drawn underline, and a parallax photo.
   Motion: page-transition.js (adds .is-in to the card; sets --mx/--my, --py).
   ========================================================================== */
.jh-tr__tour-copy { position: relative; isolation: isolate; overflow: hidden; }
.jh-tr__topo {
  position: absolute; inset: -40px; z-index: -1; pointer-events: none;
  background: url("../images/pattern-topo.svg") 0 0 / 520px 520px repeat;
  opacity: .26;
  animation: jh-tr-topo 60s linear infinite;
  -webkit-mask-image: radial-gradient(120% 100% at 0% 0%, #000 30%, transparent 85%);
          mask-image: radial-gradient(120% 100% at 0% 0%, #000 30%, transparent 85%);
}
@keyframes jh-tr-topo { to { background-position: 520px 260px; } }
.jh-tr__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(340px circle at var(--mx, 30%) var(--my, 40%), rgba(168, 201, 140, .2), transparent 70%);
}
.jh-tr__tour-copy:hover .jh-tr__glow { opacity: 1; }

/* heading: words slide up; the accent words get a drawn underline */
.jh-tr__tour-title em { position: relative; }
.jh-tr__tour-title em::after {
  content: ""; position: absolute; left: 0; right: .1em; bottom: .02em; height: .07em; border-radius: 1em;
  background: linear-gradient(90deg, #a8c98c, #d9c58a);
  transform-origin: left; transition: transform 1.1s cubic-bezier(.65, 0, .35, 1) 1s;
}
.jh-tr-motion .jh-tr__tour-card:not(.is-in) .jh-tr__tour-title em::after { transform: scaleX(0); }
.jh-tr__tw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.jh-tr__tw > span { display: inline-block; transition: transform 1s var(--tr-ease); transition-delay: calc(var(--w) * 60ms + 200ms); }
.jh-tr-motion .jh-tr__tour-card:not(.is-in) .jh-tr__tw > span { transform: translateY(110%); }
.jh-tr-motion .jh-tr__tour-actions > * { transition: opacity .8s ease, transform .9s var(--tr-ease), background-color .3s ease; }
.jh-tr-motion .jh-tr__tour-actions > :nth-child(1) { transition-delay: .9s, .9s, 0s; }
.jh-tr-motion .jh-tr__tour-actions > :nth-child(2) { transition-delay: 1s, 1s, 0s; }
.jh-tr-motion .jh-tr__tour-card:not(.is-in) .jh-tr__tour-actions > * { opacity: 0; transform: translateY(18px); }

/* photo: wipes open, then drifts with the scroll and zooms a touch on hover */
.jh-tr__tour-photo { position: relative; overflow: hidden; }
.jh-tr__tour-photo img {
  position: absolute; left: 0; top: -12%; width: 100%; height: 124% !important;
  transform: translate3d(0, var(--py, 0px), 0) scale(var(--ps, 1));
  transition: --ps 0s; will-change: transform;
}
.jh-tr__tour-card:hover .jh-tr__tour-photo img { --ps: 1.04; }
.jh-tr-motion .jh-tr__tour-photo { transition: clip-path 1.3s cubic-bezier(.65, 0, .35, 1) .2s; clip-path: inset(0 0 0 0); }
.jh-tr-motion .jh-tr__tour-card:not(.is-in) .jh-tr__tour-photo { clip-path: inset(0 0 0 100%); }
/* the card itself should not fade as a whole now that its parts animate */
.jh-tr-motion .jh-tr__tour-card.jh-tr-rise { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .jh-tr__topo { animation: none; }
}
