/* =========================================================
   Jory&Co — Who we work with: sector pages
   (Climatetech & Cleantech, Environmental Charities & NGOs, Health & Wellbeing)
   Builds on main.css (section head, project cards, buttons, CTA ticker)
   Figma: Design AW (Updated) › Climatetech & cleantech_A (7237:16288),
          Environmental Charities & NGOs_A (7237:17362), Health & Wellbeing_A (7237:17605)
   ========================================================= */

/* line-split heading reveal */
[data-lines] .line { display: block; overflow: hidden; padding: .16em .08em .26em; margin: -.16em -.08em -.26em; }
[data-lines] .line + .line { margin-top: -.42em; } /* adjoining line margins collapse (-.26 vs -.16): restore the full overlap so a multi-line heading keeps its height */
[data-lines] { display: flow-root; }
[data-lines] .line__inner { display: block; will-change: transform, opacity; }
html.js .ph__title { visibility: hidden; }
html.js .page-sector [data-fade] { opacity: 0; }

/* ---------- Header ---------- */
.ph { position: relative; padding: 236px 20px 0; }
.ph .hero__bar { position: absolute; }
.ph__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sc-title {
  margin: 0; max-width: 1212px;
  font-weight: 600; font-size: clamp(48px, 6.25vw, 90px); line-height: 1; letter-spacing: -0.03em;
}
.sc-media {
  margin: 200px 0 0; position: relative; overflow: hidden;
  aspect-ratio: 1400 / 787.5; border-radius: var(--radius);
}
.sc-media .sc-media__video { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); will-change: transform; }
.sc-media img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); will-change: transform; position: relative; z-index: 1; }

/* ---------- Body column ---------- */
.sc { display: flex; flex-direction: column; align-items: center; }
.sc > * { margin-top: 200px; }
.sc > .sc-work, .sc > .sc-tiles, .sc > .ticker-box--cta { width: 100%; }

.sc-intro, .sc-close { width: min(690px, 100%); text-align: center; }
.sc-intro p, .sc-close p { margin: 0; }
.sc-intro__lead, .sc-close__lead { font-weight: 600; font-size: 22px; line-height: 1.3; }
.sc-intro p + p { margin-top: 30px; font-size: 18px; line-height: 1.3; }
.sc-close__more { margin-top: 30px !important; font-size: 18px; line-height: 1.3; }
.sc-close__more a {
  color: var(--white); text-decoration: underline; text-decoration-color: var(--new-green);
  text-decoration-thickness: 1px; text-underline-offset: .18em; transition: color .3s ease;
}
.sc-close__more a:hover { color: var(--new-green); }

/* ---------- Challenge tiles: solid green on hover, like the About tiles ---------- */
.sc-tiles { list-style: none; margin-bottom: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sc-tile {
  position: relative; isolation: isolate; min-height: calc((min(100vw, 1440px) - 100px) / 4); padding: 20px;
  border-radius: var(--radius); background: var(--white-10);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  outline: none; transition: color .4s ease;
}
.sc-tile__glow {
  position: absolute; inset: 0; z-index: -1; border-radius: var(--radius);
  background: var(--new-green); opacity: 0; transition: opacity .4s var(--ease-out);
}
.sc-tile__title { margin: 0; font-weight: 600; font-size: clamp(22px, 2.08vw, 30px); line-height: 1.2; }
.sc-tile__num { color: var(--new-green); transition: color .4s ease; }
.sc-tile__text { margin: 0; font-size: 16px; line-height: 1.4; }
.sc-tile:hover, .sc-tile:focus-visible { color: var(--black); }
.sc-tile:hover .sc-tile__glow, .sc-tile:focus-visible .sc-tile__glow { opacity: 1; }
.sc-tile:hover .sc-tile__num, .sc-tile:focus-visible .sc-tile__num { color: var(--black); }

/* ---------- Featured work ---------- */

.sc-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 100px; }
.sc-links .btn-pill { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sc-tile { min-height: calc((100vw - 60px) / 2); }
  .sc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ph { padding-top: 140px; }
  .sc-media { margin-top: 100px; }
  .sc > * { margin-top: 120px; }
  .sc-tiles { grid-template-columns: 1fr; }
  .sc-tile { min-height: 260px; }
  .sc-links { grid-template-columns: 1fr; margin-top: 60px; }
}


/* =========================================================
   Related-projects slider (replaces the hero video) — the same carousel as
   About › Life at Jory&Co: centre slide sharp, neighbours scaled and blurred.
   ========================================================= */
.ab-cap {
  position: absolute; z-index: 2;
  padding: 5px; line-height: 1.2;
  background: rgba(0,0,0,.4);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  color: var(--white); white-space: nowrap;
}
/* ---------- Studio carousel ---------- */
.ab-car { margin: 200px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); overflow: hidden; }
.ab-car__stage {
  position: relative; outline: none;
  /* centre slide is 790×445 of 1400 */
  height: calc((100vw - 2 * var(--gutter)) * 0.5643 * 445 / 790);
  max-height: 445px; touch-action: pan-y; cursor: grab;
}
.ab-car__stage.is-drag { cursor: grabbing; }
.ab-car__slide {
  position: absolute; top: 0; left: 50%; margin: 0;
  width: min(56.43%, 790px); aspect-ratio: 790 / 445;
  border-radius: var(--radius); overflow: hidden;
  transform-origin: 50% 50%; will-change: transform; backface-visibility: hidden;
  user-select: none; -webkit-user-drag: none;
}
.ab-car__slide img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* pre-blurred copy: its opacity (not an animated filter) gives the neighbour blur */
.ab-car__slide .ab-car__blur {
  position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px);
  filter: blur(10px); opacity: var(--near, 0); z-index: 2; will-change: opacity;
}
.ab-car__slide .ab-cap { z-index: 3; }
.ab-car__slide .ab-cap { left: 10px; bottom: 10px; transition: opacity .4s ease; }
.ab-car__slide:not(.is-active) .ab-cap { opacity: 0; }
.ab-car__slide:not(.is-active) { cursor: pointer; }
.ab-car .quotes__arrows { margin-top: 20px; }
.sc-car { margin-top: 200px; }
.ab-car__slide img { position: relative; z-index: 1; }
@media (max-width: 1100px) { .sc-car { margin-top: 100px; } }
@media (max-width: 760px) {
  .ab-car__stage { height: calc((100vw - 2 * var(--gutter)) * 0.8 * 445 / 790); }
  .ab-car__slide { width: 80%; }
}
/* project loops inside the slides: over the poster, under the neighbour blur and caption */
.ab-car__slide .project__vimeo, .ab-car__slide .ab-car__video { z-index: 1; pointer-events: none; }
.ab-car__slide .ab-car__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ab-car__slide .project__vimeo { position: absolute; }
/* the centre slide links through to its project */
.sc-car .ab-car__slide[data-href].is-active { cursor: pointer; }
.sc-car .ab-cap { display: inline-flex; align-items: center; gap: 8px; transition: opacity .4s ease, background-color .3s ease, color .3s ease; }
.ab-cap__go { transform: rotate(180deg) scaleY(-1); transition: transform .35s var(--ease-out); }
.sc-car .ab-car__slide.is-active:hover .ab-cap { background: var(--new-green); color: var(--black); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sc-car .ab-car__slide.is-active:hover .ab-cap__go { transform: rotate(180deg) scaleY(-1) translate(-2px, 0); }
/* captions: a dark frosted box (darker than the default .4, so it reads on light shots) */
.sc-car .ab-cap { background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: 6px 8px; left: 10px; bottom: 10px; text-shadow: none; }
.sc-car .ab-car__slide.is-active:hover .ab-cap { background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--new-green); }
/* secondary copy under the title, as on What we do / Our impact */
.sc-sub { max-width: 690px; margin: 50px 0 0; font-size: 17px; line-height: 1.4; }
@media (max-width: 760px) { .sc-sub { margin-top: 30px; } }
