/*
Theme Name: Purpose Built
Theme URI: https://purposebuilt.construction
Description: Purpose Built Construction — dark editorial design-build theme. Ported from a Claude Design landing page. JSON-in-postmeta (_pbc) rendered by PHP. SiteForge testbed.
Author: BlueCrane Venture Studio
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.1
*/

/* ============================================================= TOKENS */
:root {
  /* palette — kept verbatim from the design (oklch, native browser support) */
  --ink:        oklch(16% 0.012 250);
  --ink-2:      oklch(12% 0.01 250);
  --ink-3:      oklch(20% 0.012 250);
  --paper:      oklch(97% 0.004 250);
  --paper-2:    oklch(93% 0.004 250);
  --green:      oklch(70% 0.05 155);
  --green-mid:  oklch(58% 0.08 155);
  --green-deep: oklch(52% 0.08 155);
  --amber:      oklch(65% 0.09 70);
  --dim:        oklch(80% 0.008 250);
  --dim-2:      oklch(87% 0.006 250);
  --muted:      oklch(65% 0.012 250);
  --label:      oklch(58% 0.02 250);
  --line-dark:  oklch(35% 0.012 250);
  --line-dark-2:oklch(28% 0.012 250);
  --line-light: oklch(80% 0.005 250);

  --f-display: 'Archivo', system-ui, sans-serif;
  --f-serif:   'Bodoni Moda', Georgia, serif;
  --f-serif-2: 'Cormorant', Georgia, serif;
  --f-label:   'Schibsted Grotesk', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: oklch(58% 0.08 155 / 0.35); }

.pbc-wrap { max-width: 1200px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

@keyframes pbc-grain {
  0%,100% { transform: translate(0,0); } 10% { transform: translate(-1%,-2%); }
  20% { transform: translate(-3%,1%); } 30% { transform: translate(2%,-3%); }
  40% { transform: translate(-2%,2%); } 50% { transform: translate(3%,1%); }
  60% { transform: translate(-1%,3%); } 70% { transform: translate(1%,-1%); }
  80% { transform: translate(-3%,-2%); } 90% { transform: translate(2%,3%); }
}
.pbc-grain {
  position: absolute; inset: -10%; pointer-events: none;
  background-image: radial-gradient(oklch(97% 0.004 250 / 0.9) 0.7px, transparent 0.7px);
  background-size: 3px 3px; animation: pbc-grain 1.2s steps(10) infinite;
}

/* scroll-reveal */
.pbc-reveal { opacity: 0; transform: translateY(30px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.pbc-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .pbc-reveal { opacity: 1; transform: none; transition: none; }
  .pbc-grain { animation: none; }
}

/* ============================================================= BUTTONS */
.pbc-btn { display: inline-block; font-family: var(--f-label); font-weight: 700;
  font-size: 13.5px; letter-spacing: .03em; text-transform: uppercase;
  padding: 16px 30px; border-radius: 5px; text-decoration: none; cursor: pointer; border: none; }
.pbc-btn--primary { color: oklch(14% 0.01 250);
  background: linear-gradient(155deg, oklch(70% 0.07 155), oklch(52% 0.08 155));
  box-shadow: 0 14px 30px -12px oklch(30% 0.05 155 / 0.6); }
.pbc-btn--ghost { color: var(--paper); border: 1px solid oklch(50% 0.01 250); font-weight: 600; background: none; }
.pbc-btn--ghost:hover { border-color: var(--green); }

/* ============================================================= NAV */
.pbc-nav { position: sticky; top: 0; z-index: 100;
  background: oklch(16% 0.012 250 / 0.97); backdrop-filter: blur(14px); }
.pbc-nav__strip { padding: 14px 40px 0; display: flex; justify-content: space-between;
  font-family: var(--f-label); font-weight: 500; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--label); }
.pbc-nav__logo { padding: 2px 40px 10px; text-align: center; text-decoration: none; display: block; }
.pbc-logo-a { font-family: var(--f-display); font-weight: 800; font-size: 34px; letter-spacing: -.01em; color: var(--paper); }
.pbc-logo-b { font-family: var(--f-serif); font-weight: 500; font-style: italic; font-size: 34px; color: var(--green); }
.pbc-nav__bar { padding: 12px 40px; border-top: 1px solid oklch(35% 0.012 250 / 0.6);
  display: flex; align-items: center; justify-content: center; gap: 24px; }
.pbc-nav__link { font-family: var(--f-label); font-weight: 500; font-size: 12.5px;
  color: oklch(78% 0.012 250); text-decoration: none; }
.pbc-nav__link:hover { color: var(--green); }
.pbc-nav__sep { color: oklch(40% 0.012 250); }
.pbc-nav__cta { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--green);
  display: flex; align-items: center; justify-content: center; text-align: center; margin-left: 14px;
  flex: none; text-decoration: none; }
.pbc-nav__cta span { font-family: var(--f-label); font-weight: 700; font-size: 10px; letter-spacing: .03em;
  text-transform: uppercase; color: var(--green); line-height: 1.15; }
.pbc-nav__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--green-mid), var(--amber)); }
.pbc-nav__toggle { display: none; }

/* ============================================================= HERO */
.pbc-hero { position: relative; min-height: 100vh; background: var(--ink); overflow: hidden; }
.pbc-hero__bg { position: absolute; inset: 0; opacity: .45; filter: grayscale(.3) contrast(1.1); }
.pbc-hero__grade { position: absolute; inset: 0;
  background: linear-gradient(185deg, oklch(16% 0.012 250 / 0.15) 35%, oklch(16% 0.012 250 / 0.94) 100%); }
.pbc-hero__glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px circle at 50% 40%, oklch(58% 0.08 155 / 0.22), transparent 60%); }
.pbc-hero__side { position: absolute; left: 0; top: 0; bottom: 0; width: 48px; display: flex;
  align-items: center; justify-content: center; z-index: 2; }
.pbc-hero__side span { writing-mode: vertical-rl; font-family: var(--f-label); font-weight: 700;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper);
  background: oklch(16% 0.012 250 / 0.55); padding: 14px 8px; }
.pbc-hero__inner { position: relative; z-index: 2; min-height: 100vh; display: flex;
  flex-direction: column; justify-content: center; padding: 150px 40px 40px 13%; }
.pbc-hero__eyebrow { font-family: var(--f-label); font-weight: 500; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--green); margin-bottom: 18px; }
.pbc-hero h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02; letter-spacing: -.02em; color: var(--paper); margin: 0 0 22px; max-width: 15ch; }
.pbc-hero h1 em { font-family: var(--f-serif); font-weight: 500; font-style: italic; color: var(--green); }
.pbc-hero__sub { font-size: 17px; line-height: 1.6; color: var(--dim); max-width: 540px; margin: 0 0 34px; }
.pbc-hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }
.pbc-hero__stats { position: relative; z-index: 2; display: flex; gap: 44px; flex-wrap: wrap;
  background: oklch(16% 0.012 250 / 0.7); backdrop-filter: blur(10px); padding: 22px 40px; border-radius: 6px;
  border: 1px solid oklch(97% 0.004 250 / 0.1); margin: 0 40px 40px; justify-content: center; }
.pbc-stat { text-align: center; }
.pbc-stat__v { font-family: var(--f-display); font-weight: 800; font-size: 26px; color: var(--paper); letter-spacing: -.01em; }
.pbc-stat__l { font-family: var(--f-label); font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

/* ============================================================= SECTION HEADS */
.pbc-sec { padding: 140px 0; }
.pbc-sec--dark { background: var(--ink); }
.pbc-sec--darker { background: var(--ink-2); }
.pbc-sec--paper { background: var(--paper); }
.pbc-sec--paper2 { background: var(--paper-2); }
.pbc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: 56px; padding-bottom: 20px; border-bottom: 1px solid var(--line-light); }
.pbc-sec--dark .pbc-head, .pbc-sec--darker .pbc-head { border-bottom-color: var(--line-dark); }
.pbc-head__l { display: flex; align-items: baseline; gap: 16px; }
.pbc-head__num { font-family: var(--f-label); font-weight: 800; font-size: 13px; color: oklch(55% 0.01 250); }
.pbc-head h2 { font-family: var(--f-serif-2); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px);
  font-style: italic; margin: 0; color: var(--ink); }
.pbc-sec--dark .pbc-head h2, .pbc-sec--darker .pbc-head h2 { color: var(--paper); }
.pbc-head__desc { font-size: 15px; color: oklch(42% 0.01 250); max-width: 380px; text-align: right; line-height: 1.55; }
.pbc-sec--dark .pbc-head__desc, .pbc-sec--darker .pbc-head__desc { color: var(--muted); }

/* ============================================================= PROCESS */
.pbc-process { display: flex; flex-direction: column; gap: 22px; }
.pbc-pcard { position: relative; overflow: hidden; border-radius: 10px; min-height: 380px;
  box-shadow: 0 34px 64px -30px oklch(0% 0 0 / 0.4); }
.pbc-pcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pbc-pcard__ph { position: absolute; inset: 0; background:
  linear-gradient(135deg, oklch(28% 0.02 250), oklch(18% 0.015 250)); }
.pbc-pcard__grade { position: absolute; inset: 0;
  background: linear-gradient(180deg, oklch(16% 0.012 250 / 0.1) 0%, oklch(16% 0.012 250 / 0.94) 82%); }
.pbc-pcard__body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 48px 52px; min-height: 380px; }
.pbc-pcard__row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pbc-pcard__num { font-family: var(--f-label); font-weight: 800; font-size: 13px; color: oklch(70% 0.09 155); }
.pbc-pcard h3 { font-family: var(--f-display); font-weight: 700; font-size: 28px; color: var(--paper);
  margin: 0; letter-spacing: -.01em; }
.pbc-pcard p { font-size: 16px; line-height: 1.65; color: var(--dim-2); max-width: 580px; margin: 0 0 10px; }
.pbc-pcard__tag { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(74% 0.01 250); }

/* ============================================================= SERVICES */
.pbc-services { display: flex; flex-direction: column; }
.pbc-svc { display: flex; align-items: center; gap: 56px; padding: 48px 0; border-top: 1px solid var(--line-dark-2); }
.pbc-svc:first-child { border-top: none; }
.pbc-svc--rev { flex-direction: row-reverse; }
.pbc-svc__img { position: relative; flex: 0 0 54%; width: 54%; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: 4px; box-shadow: 0 44px 84px -30px oklch(0% 0 0 / 0.65); }
.pbc-svc__img img { width: 100%; height: 100%; object-fit: cover; }
.pbc-svc__ph { position: absolute; inset: 0; background: linear-gradient(120deg, oklch(30% 0.02 250), oklch(18% 0.015 250)); }
.pbc-svc__grade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, oklch(0% 0 0 / 0.75) 100%); pointer-events: none; }
.pbc-svc__cap { position: absolute; bottom: 16px; left: 18px; right: 18px; font-family: ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .03em; color: oklch(94% 0.004 250); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbc-svc__text { flex: 1 1 auto; min-width: 0; }
.pbc-svc__tag { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(65% 0.08 40); margin-bottom: 12px; }
.pbc-svc h3 { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 30px; line-height: 1.12;
  color: var(--paper); margin: 0 0 14px; letter-spacing: -.01em; }
.pbc-svc p { font-size: 15px; line-height: 1.65; color: oklch(75% 0.008 250); max-width: 420px; margin: 0; }

/* ============================================================= PROJECTS */
.pbc-projects { display: flex; flex-direction: column; }
.pbc-proj { display: grid; grid-template-columns: 340px 1fr; gap: 32px; padding: 40px 0;
  align-items: center; border-top: 1px solid var(--line-dark-2); }
.pbc-proj:first-child { border-top: none; }
.pbc-proj__img { width: 100%; height: 220px; border-radius: 6px; overflow: hidden; }
.pbc-proj__img img { width: 100%; height: 100%; object-fit: cover; }
.pbc-proj__ph { width: 100%; height: 220px; border-radius: 6px; background: linear-gradient(135deg, oklch(30% 0.02 250), oklch(18% 0.015 250)); }
.pbc-proj__meta { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(58% 0.06 155); margin-bottom: 10px; }
.pbc-proj h3 { font-family: var(--f-display); font-weight: 700; font-size: 26px; color: var(--paper); margin: 0 0 14px; letter-spacing: -.01em; }
.pbc-proj__stats { font-size: 14.5px; color: oklch(70% 0.01 250); line-height: 1.6; max-width: 480px; }

/* ============================================================= TESTIMONIALS */
.pbc-tms { display: flex; flex-direction: column; }
.pbc-tm { display: grid; grid-template-columns: 340px 1fr; gap: 32px; padding: 36px 0; border-top: 1px solid var(--line-light); }
.pbc-tm:first-child { border-top: none; }
.pbc-tm__who { display: flex; align-items: center; gap: 14px; }
.pbc-tm__av { width: 56px; height: 56px; border-radius: 50%; flex: none; background: linear-gradient(135deg, oklch(70% 0.05 155), oklch(52% 0.08 155)); }
.pbc-tm__name { font-family: var(--f-label); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.pbc-tm__quote { font-family: var(--f-serif-2); font-style: italic; font-weight: 600; font-size: 24px; line-height: 1.4; color: oklch(20% 0.012 250); margin: 0 0 12px; max-width: 680px; }
.pbc-tm__role { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(52% 0.008 250); }

/* ============================================================= FAQ */
.pbc-faq { max-width: 900px; margin: 0 auto; }
.pbc-faq__item { border-top: 1px solid oklch(78% 0.005 250); position: relative; overflow: hidden; }
.pbc-faq__ghost { position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-display); font-weight: 900; font-size: 76px; line-height: 1; color: oklch(88% 0.005 250);
  z-index: 0; user-select: none; pointer-events: none; }
.pbc-faq__q { position: relative; z-index: 1; width: 100%; background: none; border: none; text-align: left;
  padding: 30px 0 30px 96px; display: grid; grid-template-columns: 1fr 24px; align-items: baseline; gap: 20px; cursor: pointer; }
.pbc-faq__q span:first-child { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 26px; color: var(--ink); }
.pbc-faq__icon { font-family: var(--f-display); font-weight: 700; font-size: 22px; color: oklch(48% 0.06 155); transition: transform .3s ease; justify-self: end; }
.pbc-faq__item.is-open .pbc-faq__icon { transform: rotate(45deg); }
.pbc-faq__a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.16,1,.3,1); position: relative; z-index: 1; }
.pbc-faq__item.is-open .pbc-faq__a { max-height: 320px; }
.pbc-faq__a p { font-size: 15px; line-height: 1.65; color: oklch(42% 0.01 250); margin: 0 0 30px 96px; max-width: 580px; }

/* ============================================================= CONTACT */
.pbc-contact { position: relative; overflow: hidden; }
.pbc-contact__grid { display: grid; grid-template-columns: 340px 1fr; gap: 32px; }
.pbc-contact__info { display: flex; flex-direction: column; gap: 22px; }
.pbc-contact__k { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(58% 0.06 155); margin-bottom: 4px; }
.pbc-contact__v { font-size: 16px; color: oklch(93% 0.004 250); line-height: 1.5; text-decoration: none; }
a.pbc-contact__v:hover { color: var(--green); }
.pbc-form { background: var(--ink-3); border-radius: 10px; padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pbc-field { display: flex; flex-direction: column; gap: 8px; }
.pbc-field--full { grid-column: span 2; }
.pbc-field label { font-family: var(--f-label); font-weight: 600; font-size: 12px; color: oklch(70% 0.01 250); }
.pbc-field input, .pbc-field select, .pbc-field textarea { background: var(--ink); border: 1px solid var(--line-dark);
  border-radius: 5px; padding: 12px 14px; color: var(--paper); font-size: 14px; font-family: var(--f-body); }
.pbc-field textarea { resize: vertical; }
.pbc-form__submit { grid-column: span 2; margin-top: 8px; padding: 15px; width: 100%; }
.pbc-form__note { grid-column: span 2; font-size: 13px; }
.pbc-form__note--ok { color: var(--green); }
.pbc-form__note--err { color: oklch(65% 0.12 25); }

/* ============================================================= FOOTER */
.pbc-footer { background: var(--ink-2); padding: 64px 0 32px; }
.pbc-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; padding-bottom: 48px; border-bottom: 1px solid oklch(30% 0.012 250); }
.pbc-footer__brand { font-size: 19px; margin-bottom: 14px; }
.pbc-footer__brand .pbc-logo-b { color: var(--paper); }
.pbc-footer__blurb { font-size: 14px; line-height: 1.6; color: oklch(55% 0.01 250); max-width: 320px; margin: 0; }
.pbc-footer__h { font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: oklch(55% 0.01 250); margin-bottom: 18px; }
.pbc-footer__col { display: flex; flex-direction: column; gap: 12px; }
.pbc-footer__col a, .pbc-footer__col div { font-size: 14px; color: var(--dim); text-decoration: none; }
.pbc-footer__col a:hover { color: var(--green); }
.pbc-footer__copy { padding-top: 24px; font-size: 12.5px; color: oklch(42% 0.01 250); }

/* ============================================================= RESPONSIVE */
@media (max-width: 900px) {
  .pbc-wrap { padding-left: 24px; padding-right: 24px; }
  .pbc-sec { padding: 90px 0; }
  .pbc-hero__inner { padding: 130px 24px 40px; }
  .pbc-hero__side { display: none; }
  .pbc-hero__stats { margin: 0 24px 32px; gap: 24px 32px; padding: 20px 24px; }
  .pbc-head { flex-direction: column; }
  .pbc-head__desc { text-align: left; max-width: none; }
  .pbc-svc, .pbc-svc--rev { flex-direction: column; gap: 24px; }
  .pbc-svc__img { flex-basis: auto; width: 100%; }
  .pbc-proj, .pbc-tm { grid-template-columns: 1fr; gap: 18px; }
  .pbc-contact__grid { grid-template-columns: 1fr; }
  .pbc-form { grid-template-columns: 1fr; padding: 28px; }
  .pbc-field--full, .pbc-form__submit, .pbc-form__note { grid-column: span 1; }
  .pbc-footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .pbc-faq__q span:first-child { font-size: 21px; }
  .pbc-faq__ghost { font-size: 56px; }
  .pbc-pcard__body { padding: 36px 28px; }
}
@media (max-width: 640px) {
  .pbc-nav__strip { font-size: 9px; padding: 12px 20px 0; }
  .pbc-nav__bar { gap: 14px; flex-wrap: wrap; padding: 12px 20px; }
  .pbc-logo-a, .pbc-logo-b { font-size: 28px; }
  .pbc-hero h1 { font-size: clamp(34px, 9vw, 52px); }
}
