/*
Theme Name: PhaseBound Community
Theme URI: https://phasebound.co.uk/
Author: Abacus AI Agent
Description: Fresh custom WordPress theme migrated from the React PhaseBound community website design. Includes a static React-inspired homepage and full Posts/Pages support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: phasebound-community
*/

:root {
  --pb-bg: #050a14;
  --pb-bg-2: #080d1c;
  --pb-panel: rgba(10, 15, 30, 0.86);
  --pb-panel-2: rgba(6, 182, 212, 0.08);
  --pb-cyan: #06b6d4;
  --pb-cyan-bright: #22d3ee;
  --pb-teal: #2dd4bf;
  --pb-white: #ffffff;
  --pb-text: #e5e7eb;
  --pb-muted: #94a3b8;
  --pb-border: rgba(6, 182, 212, 0.28);
  --pb-border-soft: rgba(22, 78, 99, 0.35);
  --pb-shadow: 0 24px 80px rgba(6, 182, 212, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pb-bg);
  color: var(--pb-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}
body.admin-bar .pb-site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.pb-grid-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: var(--pb-bg);
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(6,182,212,0.14), transparent 38%);
  background-size: 56px 56px, 56px 56px, 100% 100%;
}
.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.pb-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(22, 78, 99, 0.35);
}
.pb-nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pb-logo { display: inline-flex; align-items: center; gap: 10px; }
.pb-logo img { height: 44px; width: auto; object-fit: contain; }
.pb-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-size: 14px; font-weight: 700; color: var(--pb-muted); }
.pb-menu a:hover { color: var(--pb-cyan-bright); }
.pb-button, .pb-menu .pb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border-radius: 10px;
  border: 1px solid rgba(6, 182, 212, 0.65);
  background: linear-gradient(135deg, var(--pb-cyan), var(--pb-cyan-bright));
  color: #04111c;
  font-weight: 900;
  letter-spacing: .01em;
  box-shadow: 0 14px 35px rgba(6, 182, 212, 0.25);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.pb-button:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(6, 182, 212, 0.35); }
.pb-button.secondary {
  background: rgba(6, 182, 212, 0.04);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: none;
}

.pb-section { padding: 96px 0; position: relative; }
.pb-section.alt { background: var(--pb-bg-2); }
.pb-eyebrow {
  margin: 0 0 12px;
  color: var(--pb-cyan-bright);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.pb-title {
  margin: 0 0 20px;
  color: var(--pb-white);
  font-size: clamp(36px, 6vw, 70px);
  line-height: .96;
  letter-spacing: -.04em;
  font-weight: 900;
}
.pb-title .accent, .accent { color: var(--pb-cyan-bright); }
.pb-section-title {
  margin: 0;
  color: var(--pb-white);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 900;
}
.pb-lead {
  margin: 18px auto 0;
  max-width: 790px;
  color: #cbd5e1;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.35;
}
.pb-center { text-align: center; }

.pb-hero {
  min-height: 100vh;
  padding-top: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0f1e;
}
.pb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,10,20,0.72), rgba(5,10,20,0.58), rgba(5,10,20,0.94)), url('assets/images/hero-bg.webp') center / cover no-repeat;
  opacity: .78;
}
.pb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(6, 182, 212, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(6, 182, 212, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
}
.pb-hero-inner { position: relative; z-index: 2; text-align: center; padding-bottom: 64px; }
.pb-hero-logo { width: min(260px, 55vw); margin: 0 auto 28px; filter: drop-shadow(0 0 30px rgba(34,211,238,0.2)); }
.pb-hero-actions { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.pb-scroll { margin-top: 54px; color: #64748b; font-size: 12px; letter-spacing: .2em; font-weight: 800; text-transform: uppercase; display: inline-flex; flex-direction: column; gap: 6px; }

.pb-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.pb-card, .pb-person-card, .pb-legal-card {
  border: 1px solid var(--pb-border-soft);
  background: linear-gradient(145deg, rgba(10, 15, 30, .72), rgba(6, 182, 212, .055));
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}
.pb-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.pb-list li { padding-left: 30px; position: relative; color: #dbeafe; }
.pb-list li::before { content: "✓"; color: var(--pb-cyan-bright); position: absolute; left: 0; top: 0; font-weight: 900; }
.pb-quote { margin: 0; padding: 34px; border-left: 4px solid var(--pb-cyan); background: rgba(6,182,212,.08); border-radius: 20px; color: #e2e8f0; font-size: 22px; font-weight: 700; }
.pb-quote cite { display: block; margin-top: 18px; color: var(--pb-muted); font-size: 14px; font-weight: 600; font-style: normal; }

.pb-grid { display: grid; gap: 24px; margin-top: 48px; }
.pb-grid.values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-grid.people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pb-grid.members { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-grid.legal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pb-card h3, .pb-person-card h3, .pb-legal-card h3 { margin: 0 0 12px; color: var(--pb-white); font-size: 24px; line-height: 1.1; }
.pb-card p, .pb-person-card p, .pb-legal-card p { margin: 0; color: #cbd5e1; }
.pb-person-card { display: flex; flex-direction: column; gap: 18px; }
.pb-person-img { width: 144px; height: 144px; border-radius: 20px; object-fit: cover; border: 2px solid rgba(6, 182, 212, 0.45); box-shadow: 0 20px 45px rgba(0,0,0,.3); }
.pb-tag { display: inline-flex; width: max-content; color: var(--pb-cyan-bright); border: 1px solid rgba(6,182,212,.3); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.pb-location { color: var(--pb-muted); font-weight: 700; margin-top: -8px !important; }
.pb-credentials { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: #dbeafe; }
.pb-credentials li::before { content: "— "; color: var(--pb-cyan-bright); }
.pb-link { display: inline-flex; width: max-content; color: var(--pb-cyan-bright); font-weight: 800; border-bottom: 1px solid rgba(34,211,238,.45); }

.pb-community-panel { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; border: 1px solid var(--pb-border); background: rgba(6, 182, 212, .07); border-radius: 28px; padding: 34px; margin-top: 46px; }
.pb-community-panel img { width: 144px; height: 144px; border-radius: 20px; object-fit: cover; border: 1px solid var(--pb-border); box-shadow: var(--pb-shadow); }
.pb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.pb-stat { text-align: center; padding: 24px 14px; border: 1px solid rgba(6,182,212,.22); border-radius: 20px; background: rgba(10, 15, 30, .6); }
.pb-stat strong { display: block; color: var(--pb-cyan-bright); font-size: 38px; line-height: 1; font-weight: 900; }
.pb-stat span { display: block; margin-top: 10px; color: var(--pb-muted); font-size: 13px; font-weight: 800; }

.pb-content-page { padding: 120px 0 80px; min-height: 75vh; }
.pb-content-card { max-width: 900px; margin: 0 auto; border: 1px solid var(--pb-border-soft); border-radius: 24px; padding: 42px; background: rgba(10,15,30,.78); }
.pb-content-card h1, .pb-content-card h2, .pb-content-card h3 { color: var(--pb-white); line-height: 1.1; }
.pb-content-card a { color: var(--pb-cyan-bright); text-decoration: underline; }
.pb-post-meta { color: var(--pb-muted); font-size: 14px; margin-bottom: 20px; }

.pb-footer { background: #050a14; border-top: 1px solid rgba(22, 78, 99, 0.28); padding: 46px 0; color: var(--pb-muted); }
.pb-footer-inner { display: flex; justify-content: space-between; gap: 30px; align-items: center; flex-wrap: wrap; }
.pb-footer img { height: 44px; width: auto; }
.pb-footer-menu { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 700; }
.pb-footer-menu a:hover { color: var(--pb-cyan-bright); }

@media (max-width: 900px) {
  body.admin-bar .pb-site-header { top: 46px; }
  .pb-nav { align-items: flex-start; padding: 12px 0; }
  .pb-menu { justify-content: flex-end; gap: 12px; font-size: 12px; }
  .pb-two-col, .pb-grid.values, .pb-grid.people, .pb-grid.members, .pb-grid.legal, .pb-stats { grid-template-columns: 1fr; }
  .pb-community-panel { grid-template-columns: 1fr; text-align: center; }
  .pb-community-panel img { margin: 0 auto; }
}
@media (max-width: 600px) {
  .container { width: min(100% - 28px, 1120px); }
  .pb-section { padding: 72px 0; }
  .pb-hero { padding-top: 130px; }
  .pb-menu .pb-button { display: none; }
  .pb-title { font-size: 44px; }
  .pb-card, .pb-person-card, .pb-legal-card, .pb-content-card { padding: 24px; }
}


/* Mentors layout: 3rd mentor (John Fairest) centered on second row (desktop) */
.pb-grid.people > *:nth-child(3){grid-column:1 / -1;max-width:calc(50% - 12px);margin-left:auto;margin-right:auto;}
@media (max-width: 900px){.pb-grid.people > *:nth-child(3){grid-column:auto;max-width:none;}}
