/* Work page (/portfolio/). Loaded after site.css and page-motif.css.
   Each area is a two-column band: heading left, cards right, joined by one pathway down the left edge.
   Colour = pillar (Systems / Presence / Visual / Insight), as on the homepage. */

/* ---------- hero + jump chips (same chip language as the homepage picker) ---------- */
.pf-hero { padding-bottom: 56px; }
.pf-hero .lede { max-width: 56ch; }
.pf-jump { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pf-jump a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--line-on-navy);
  border-radius: 999px;
  color: #e6ebf7;
  text-decoration: none;
  font-size: 0.92rem; font-weight: 500; line-height: 1.2;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pf-jump a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc-l, var(--accent-on-navy)); flex: none; transition: box-shadow 0.2s var(--ease); }
.pf-jump a:hover { border-color: var(--pc-l); background: rgba(255, 255, 255, 0.07); color: #fff; transform: translateY(-1px); }
.pf-jump a:hover::before { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1); }
.pf-jump a:focus-visible { outline: 2px solid var(--pc-l, var(--accent-on-navy)); outline-offset: 3px; }

/* ---------- area bands ---------- */
.pf-section {
  position: relative;
  padding: 72px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
  /* a soft glow in the pillar colour, top right, echoing the hero */
  background-image: radial-gradient(52% 90% at 100% 0%, color-mix(in srgb, var(--pc) 9%, transparent), transparent 65%);
}
.pf-section:nth-of-type(odd) { background-color: var(--paper-deep); }   /* hero is section 1, so bands start at the second area */

.pf-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
/* the pathway: one line through every band, a lit node at each heading */
.pf-layout::before { content: ""; position: absolute; left: 10px; top: -72px; bottom: -72px; width: 1px; background: var(--rule); opacity: 0.85; }
.pf-layout::after {
  content: ""; position: absolute; left: 9px; top: -72px; bottom: -72px; width: 3px; border-radius: 3px; opacity: 0.55; pointer-events: none;
  background-image: linear-gradient(180deg, transparent, var(--pc), transparent);
  background-repeat: no-repeat; background-size: 100% 120px;
  animation: pathway 9s linear infinite;
}

.pf-head { position: sticky; top: 104px; }
.pf-head::before {
  content: ""; position: absolute; left: -23px; top: 9px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--pc); border: 2px solid var(--paper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 18%, transparent);
  box-sizing: border-box;
}
.pf-head h2 { font-size: clamp(1.5rem, 2.3vw, 1.85rem); line-height: 1.18; margin: 0 0 12px; }
.pf-head p { margin: 0 0 18px; font-size: 0.97rem; color: var(--ink-soft); }
.pf-head .text-link { font-size: 0.93rem; color: var(--pc-t); }
.pf-head::after { content: ""; display: block; height: 110px; margin-top: 26px; background: no-repeat left top / 200px auto; }   /* art per pillar in page-motif.css */

/* ---------- cards: same anatomy, same height within a row, pillar-coloured ---------- */
.pf-body .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  align-items: stretch;
}
.pf-body .index-card { padding: 0; overflow: hidden; border-top: 2px solid var(--pc); }
.pf-body .index-card:hover { transform: none; border-color: var(--pc); box-shadow: 0 22px 40px -28px color-mix(in srgb, var(--pc) 55%, #0e1a33); }

.card-copy { display: flex; flex-direction: column; flex: 1; padding: 28px; }
.pf-body .card-copy .label { margin-bottom: 12px; color: var(--pc-t); }
.card-copy h3 { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.28; }
.card-copy p { flex: 1; margin: 0; font-size: 0.97rem; line-height: 1.6; color: var(--ink-soft); }   /* flex: 1 pushes tags and footer to the bottom */
.card-copy .tags { margin: 20px 0 0; }
.pf-body .tags li {
  color: var(--pc-t);
  background: color-mix(in srgb, var(--pc) 9%, var(--card));
  border-color: color-mix(in srgb, var(--pc) 24%, var(--line));
}

.card-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 20px; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--pc) 20%, var(--line-soft));
}
.card-foot .text-link { font-size: 0.93rem; color: var(--pc-t); }

/* image cards: fixed ratio so a picture never makes one card taller than its neighbour */
.pf-body .card-image {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 0;
  border-radius: 0; object-fit: cover; border-bottom: 1px solid var(--line-soft);
}

/* a card left alone on its row spans it; an image card then sits picture-left, text-right */
.pf-body .card-grid > .index-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 761px) {
  .pf-body .card-grid > .index-card.has-image:last-child:nth-child(odd) { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .pf-body .card-grid > .index-card.has-image:last-child:nth-child(odd) .card-image {
    height: 100%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line-soft);
  }
}

/* ---------- Studio concept demos ---------- */
.pf-studio { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.pf-studio h3 { margin: 0 0 8px; font-size: 1.3rem; }
.pf-studio > p { max-width: 60ch; margin: 0 0 28px; font-size: 0.97rem; color: var(--ink-soft); }
.pf-demo .card-copy { padding: 24px; }
.pf-demo h3 { font-size: 1.15rem; }
.pf-demo .card-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
.pf-domain { font-size: 0.84rem; color: var(--ink-faint); }
.pf-domain span { font-style: italic; }
.pf-studio > p.pf-studio-cta { max-width: none; margin: 32px 0 0; }

/* ---------- "Also available": compact rows ---------- */
.pf-also { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.pf-also a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 24px;
  height: 100%; padding: 22px 26px;
  background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--pc); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.pf-also a::after { content: "→"; grid-column: 2; grid-row: 1 / span 2; color: var(--pc-t); font-weight: 600; transition: transform 0.2s var(--ease); }
.pf-also a:hover { border-color: var(--pc); box-shadow: 0 16px 32px -24px color-mix(in srgb, var(--pc) 55%, #0e1a33); }
.pf-also a:hover::after { transform: translateX(4px); }
.pf-also strong { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.pf-also span { font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }

/* ---------- closing band ---------- */
.pf-cta { padding: 80px 0; }
.pf-cta h2 { margin-bottom: 12px; }
.pf-cta p { margin-bottom: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .pf-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pf-head { position: static; }
  .pf-head::before { left: 5px; }   /* head is no longer positioned, so the node anchors to the layout */
  .pf-head p { max-width: 60ch; }
}
@media (max-width: 760px) {
  .pf-hero { padding: 56px 0 44px; }
  .pf-section { padding: 52px 0; }
  .pf-layout::before, .pf-layout::after { top: -52px; bottom: -52px; }
  .pf-body .card-grid { gap: 18px; }
  .card-copy { padding: 24px; }
  .pf-demo .card-copy { padding: 22px; }
  .pf-studio { margin-top: 40px; padding-top: 32px; }
  .pf-cta { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-layout::after { display: none; }
  .pf-also a::after, .pf-also a:hover::after { transition: none; transform: none; }
}
