/* Expanding Photo Panels: a row of tall photo strips; the open one widens and shows its words.
   Phones: stacked accordion (open one is tall). From 980 px: side-by-side strips.
   Copied from 05-Asset Showcase/Cards & Tiles/Expanding Photo Panels; site styles for "How it works" are in style.css (.how-xp). */
.xp {
  --xp-accent: #f2b33d;        /* button + number colour */
  --xp-ink: #fff;              /* text on the photos */
  --xp-shade: rgba(10, 14, 24, .78);
  --xp-radius: 18px;
  --xp-gap: 10px;
  --xp-closed: 76px;           /* phone: closed row height */
  --xp-open: 340px;            /* phone: open row height */
  --xp-height: 500px;          /* desktop: row height */
  --xp-speed: .55s;
  display: flex;
  flex-direction: column;
  gap: var(--xp-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.xp__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--xp-radius);
  height: var(--xp-closed);
  background: #1d2433;
  color: var(--xp-ink);
  transition: height var(--xp-speed) cubic-bezier(.3, .7, .2, 1), flex-grow var(--xp-speed) cubic-bezier(.3, .7, .2, 1);
  isolation: isolate;
}
.xp__panel.is-open { height: var(--xp-open); }
.xp__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12);
  filter: saturate(.75) brightness(.8);
  transition: transform calc(var(--xp-speed) * 1.6) ease, filter var(--xp-speed) ease;
}
.xp__panel.is-open .xp__img { transform: scale(1); filter: none; }
.xp__panel::after {               /* shade so the words read on any photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--xp-shade), rgba(10, 14, 24, .25) 55%, rgba(10, 14, 24, .45));
}

/* The tab: the whole closed strip is this button */
.xp__tab {
  all: unset;
  box-sizing: border-box;
  position: absolute; inset: 0 0 auto 0;
  height: var(--xp-closed);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.05rem;
  color: var(--xp-ink);
  -webkit-tap-highlight-color: transparent;
}
.xp__tab:focus-visible { outline: 3px solid var(--xp-accent); outline-offset: -5px; border-radius: var(--xp-radius); }
.xp__num {
  flex: none;
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7);
  font-size: .85rem; font-variant-numeric: tabular-nums;
  transition: background var(--xp-speed), color var(--xp-speed), border-color var(--xp-speed);
}
.xp__panel.is-open .xp__num { background: var(--xp-accent); border-color: var(--xp-accent); color: #1d2433; }
.xp__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp__chev { margin-left: auto; width: 22px; height: 22px; flex: none; transition: transform var(--xp-speed); }
.xp__panel.is-open .xp__chev { transform: rotate(180deg); }

/* The words shown once open */
.xp__body {
  position: absolute; inset: auto 0 0 0;
  padding: 18px 18px 20px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease;
  visibility: hidden;
}
.xp__panel.is-open .xp__body {
  opacity: 1; transform: none; visibility: visible;
  transition-delay: calc(var(--xp-speed) * .55);
}
.xp__kicker { margin: 0 0 4px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--xp-accent); font-weight: 700; }
.xp__title { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.15; }
.xp__text { margin: 0 0 14px; font-size: .95rem; line-height: 1.45; max-width: 34ch; color: rgba(255, 255, 255, .88); }
.xp__btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--xp-accent); color: #1d2433;
  font-weight: 700; text-decoration: none;
}
.xp__btn:hover { filter: brightness(1.08); }
.xp__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.xp__btn svg { width: 18px; height: 18px; }

/* Side by side from 980 px (the asset uses 720; changed for The Website Oom, 2026-10-31) */
@media (min-width: 980px) {
  .xp { flex-direction: row; height: var(--xp-height); }
  .xp__panel, .xp__panel.is-open { height: auto; flex: 1 1 0; min-width: 0; }
  .xp__panel.is-open { flex-grow: 5; }
  .xp__tab {
    inset: 0;
    height: auto;
    flex-direction: column; justify-content: flex-end; align-items: center;
    padding: 22px 0;
  }
  .xp__panel.is-open .xp__tab { pointer-events: none; }  /* open strip: the words take taps */
  .xp__label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    max-height: calc(var(--xp-height) - 120px);
    transition: opacity .25s;
  }
  .xp__panel.is-open .xp__label, .xp__panel.is-open .xp__chev { opacity: 0; }
  .xp__panel.is-open .xp__num { position: absolute; top: 22px; left: 24px; }
  .xp__chev { display: none; }
  .xp__body { padding: 28px 28px 30px; min-width: 300px; }
  .xp__title { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .xp, .xp * { transition: none !important; }
  .xp__img, .xp__panel.is-open .xp__img { transform: none; }
}
