/* Joondalup Fencing Experts project pages (/projects/ and each project). Loaded after /styles.css (tokens, cards).
   The rest of the site is a WordPress mirror, so these pages bring their own frame:
   base, nav (logo + call), footer, lightbox. Nothing here touches the WordPress pages. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); background: var(--paper); color: var(--text-2);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--rule); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 56px; width: auto; }
.call-btn-nav {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--teal); color: var(--white); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 15px; transition: background 0.2s;
}
.call-btn-nav:hover { background: var(--teal-dark); }
.call-btn-nav .lbl { display: none; }

.footer { background: var(--dark); color: #c9c9c9; padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--white); }
.footer-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 14.5px; }
.footer-info a { color: var(--white); font-weight: 500; text-decoration: none; }
.footer-info a:hover { color: var(--sage); }
.footer-legal { font-size: 13px; color: #8a8a8a; }

/* Project page. Mobile first: headline, then the video capped so the
   start of the write-up shows under it; desktop puts the video in a
   sticky column beside the text. */
.pj-head { padding: 40px 0 0; }
.pj-crumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.pj-crumb a { color: var(--text-2); text-decoration: none; }
.pj-crumb a:hover { color: var(--teal); }
.pj-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px;
}
.pj-head h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--text); max-width: 22ch;
}
.pj-sub { margin-top: 14px; font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 60ch; }

.pj-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.pj-facts li {
  font-size: 14px; line-height: 1.3; padding: 9px 14px; border: 1px solid var(--rule);
  background: var(--white); border-radius: var(--r-md); color: var(--text);
}
.pj-facts strong { font-weight: 600; }

.pj-layout { display: grid; gap: 36px; padding: 28px 0 72px; }
.pj-video {
  width: min(100%, calc(64svh * 9 / 16)); margin: 0 auto; aspect-ratio: 9 / 16;
  border-radius: var(--r-lg); overflow: hidden; background: #000;
}
.pj-video mux-player { display: block; width: 100%; height: 100%; --media-object-fit: cover; }
.pj-video-label { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 10px; }

.pj-story section + section { margin-top: 36px; }
.pj-story h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(23px, 2.3vw, 28px); line-height: 1.2;
  color: var(--text); margin-bottom: 12px;
}
.pj-story p { color: var(--text-2); max-width: 62ch; }
.pj-story p + p { margin-top: 12px; }
.pj-story ul { list-style: none; margin-top: 4px; max-width: 62ch; }
.pj-story li { position: relative; padding-left: 22px; color: var(--text-2); }
.pj-story li + li { margin-top: 10px; }
.pj-story li::before {
  content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--teal);
}
.pj-story li strong { color: var(--text); font-weight: 600; }
.pj-story .pj-facts li { padding: 9px 14px; margin: 0; color: var(--text); }
.pj-story .pj-facts li::before { display: none; }
.pj-quote {
  margin-top: 28px; padding: 20px 22px; background: var(--white); border-left: 3px solid var(--sage-dark);
  border-radius: var(--r-md); color: var(--text); font-size: 17px; line-height: 1.6;
}
.pj-quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 13.5px; color: var(--text-muted); }

.pj-band { background: var(--white); padding: 72px 0; }
.pj-band h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.15;
  color: var(--text); margin-bottom: 10px;
}
.pj-band .pj-lede { color: var(--text-2); max-width: 60ch; margin-bottom: 28px; }
.pj-band .pj-more { color: var(--teal); font-weight: 600; text-decoration: none; }

.pj-reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 240px)); gap: 18px; }
.pj-reel { margin: 0; }
.pj-reel .pj-video { width: 100%; }
.pj-reel figcaption { font-size: 14px; color: var(--text-2); margin-top: 10px; }

.pj-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 44px; }
.pj-photos img {
  width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block;
  border-radius: var(--r-md); cursor: zoom-in; background: var(--rule);
}
.pj-photos img.wide { grid-column: span 2; aspect-ratio: 16 / 10; }

.pj-cta { background: var(--teal); color: var(--white); padding: 72px 0; text-align: center; }
.pj-cta h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.15;
  max-width: 24ch; margin: 0 auto 14px;
}
.pj-cta p { color: #d7e3e7; max-width: 54ch; margin: 0 auto 26px; }
.pj-cta-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pj-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-sm); font-weight: 600; font-size: 16px; text-decoration: none;
}
.pj-btn.primary { background: var(--sage); color: var(--white); }
.pj-btn.primary:hover { background: var(--sage-dark); }
.pj-btn.ghost { border: 1px solid rgba(255, 255, 255, 0.45); color: var(--white); }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-inner { height: 60px; }
  .brand-logo { height: 40px; }
  .pj-head { padding-top: 28px; }
  .pj-sub { font-size: 16px; line-height: 1.55; }
  .pj-head h1 { font-size: 28px; }
  .pj-layout { padding-top: 22px; gap: 28px; }
  .pj-facts li { font-size: 13px; padding: 7px 11px; }
  .pj-band, .pj-cta { padding: 56px 0; }
  .pj-reels { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 900px) {
  .pj-layout { grid-template-columns: minmax(300px, calc(78vh * 9 / 16)) 1fr; gap: 56px; align-items: start; padding-top: 40px; }
  .pj-video-col { position: sticky; top: 92px; }
  .pj-layout .pj-video { width: 100%; max-height: 78vh; }
  .pj-photos { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .pj-photos img.wide { grid-column: span 2; aspect-ratio: auto; }
  /* A short page (video, no write-up): the video alone, centred. */
  .pj-layout-solo { grid-template-columns: 1fr; justify-items: center; }
  .pj-layout-solo .pj-video-col { position: static; width: max(300px, calc(78vh * 9 / 16)); max-width: 100%; }
}

/* Lightbox (photos on a project page). */
.lightbox {
  position: fixed; inset: 0; background: rgba(8, 9, 11, 0.94);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lightbox[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.lightbox-stage { position: relative; max-width: 92vw; max-height: 88vh; display: flex; align-items: center; justify-content: center; }
.lightbox-image {
  max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); object-fit: contain; user-select: none;
}
.lightbox-caption {
  position: absolute; left: 0; right: 0; bottom: -42px; text-align: center; font-size: 13px;
  letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.65); padding: 0 12px;
}
.lightbox-btn {
  position: absolute; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff;
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, transform 0.15s ease; padding: 0;
}
.lightbox-btn:hover { background: rgba(0, 0, 0, 0.85); transform: scale(1.06); }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-counter {
  position: absolute; top: 28px; left: 28px; font-size: 13px; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums;
}
body.lightbox-open { overflow: hidden; }
@media (max-width: 768px) {
  .lightbox-btn { width: 42px; height: 42px; font-size: 18px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-counter { top: 16px; left: 16px; font-size: 11px; }
  .lightbox-caption { bottom: -36px; font-size: 12px; }
  .lightbox-image { max-height: 72vh; }
}
