/* Pi Solutions — dark, cinematic, jazz-inspired */

:root {
  --bg: #09090d;
  --bg-card: #0e0f15;
  --bg-elevated: #13141c;
  --text: #ede6d6;
  --text-muted: #7a7268;
  --text-dim: #3e3b36;
  --gold: #c4a24e;
  --gold-soft: rgba(196, 162, 78, 0.09);
  --gold-rule: rgba(196, 162, 78, 0.16);
  --teal: #3d8c8a;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 74rem;
  --pad: clamp(1.5rem, 5vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 30% 0%, rgba(196, 162, 78, 0.04), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(61, 140, 138, 0.04), transparent 45%);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.72; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

::selection { background: rgba(196, 162, 78, 0.22); color: var(--text); }

/* ---- CANVAS ---- */
#pi-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.pi-wrap { position: relative; z-index: 1; }

/* ---- INTRO OVERLAY ---- */
#pi-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  cursor: pointer;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
#pi-intro.is-exiting {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

.intro-rule {
  position: relative;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  transition: width 0.75s var(--ease);
  will-change: width;
  flex-shrink: 0;
}
.intro-rule.is-drawn { width: min(480px, 72vw); }

.intro-wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.2em;
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: clamp(2.6rem, 7.5vw, 5.8rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}

.intro-pi,
.intro-solutions {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.7rem);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.intro-pi.is-visible,
.intro-solutions.is-visible { opacity: 1; transform: translateY(0); }
.intro-pi { color: var(--gold); }
.intro-solutions { color: var(--text); }

.intro-tagline {
  font-family: var(--body);
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.intro-tagline.is-visible { opacity: 1; }

.intro-hint {
  position: absolute;
  bottom: 2.8rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.intro-hint.is-visible { opacity: 1; animation: hint-bob 2.8s ease-in-out infinite; }

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(-5px); opacity: 1; }
}

/* ---- NAVIGATION ---- */
.pi-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 9, 13, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-rule);
}

.pi-logo {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 1;
  transition: color 0.2s ease;
}
.pi-logo:hover { color: var(--gold); opacity: 1; }
.pi-logo span { color: var(--gold); }

.pi-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.4rem;
  flex-wrap: wrap;
}

.pi-nav-links a {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 1;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.pi-nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.pi-nav-links a:hover { color: var(--text); opacity: 1; }
.pi-nav-links a:hover::after { transform: scaleX(1); }

.pi-nav-links a.nav-cv {
  color: var(--gold);
  border: 1px solid var(--gold-rule);
  padding: 0.28rem 0.7rem;
  border-radius: 2px;
  letter-spacing: 0.12em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pi-nav-links a.nav-cv::after { display: none; }
.pi-nav-links a.nav-cv:hover { background: var(--gold-soft); border-color: rgba(196,162,78,0.35); opacity: 1; }

/* ---- HERO ---- */
.pi-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--pad) 6rem;
  max-width: var(--max);
  margin: 0 auto;
}

.pi-hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: pi-rise 0.9s var(--ease) 0.15s forwards;
}

.pi-hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.8rem, 6.5vw, 6rem);
  font-weight: 300;
  line-height: 1.07;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 13ch;
  opacity: 0;
  animation: pi-rise 1s var(--ease) 0.35s forwards;
}
.pi-hero h1 em { font-style: italic; color: var(--gold); font-weight: 300; }

.pi-hero-sub {
  margin-top: 1.75rem;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.75;
  opacity: 0;
  animation: pi-rise 0.9s var(--ease) 0.65s forwards;
}

.pi-hero-ctas {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  opacity: 0;
  animation: pi-rise 0.9s var(--ease) 0.9s forwards;
}

@keyframes pi-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-primary {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.8rem 1.75rem;
  background: var(--gold);
  color: var(--bg);
  border-radius: 2px;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover { opacity: 0.84; }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.8rem 1.75rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--gold-rule);
  border-radius: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(196,162,78,0.38); background: var(--gold-soft); opacity: 1; }

/* ---- STATS BAR ---- */
.pi-stats {
  border-top: 1px solid var(--gold-rule);
  border-bottom: 1px solid var(--gold-rule);
  padding: 3rem var(--pad);
}
.pi-stats-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 2rem 1.5rem;
}
.stat-num {
  font-family: var(--sans);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 300;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.45;
}

/* ---- MANIFESTO ---- */
.pi-manifesto {
  padding: 5.5rem var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.pi-manifesto blockquote {
  font-family: var(--sans);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text);
  max-width: 40ch;
  border: none;
  padding: 0;
}
.pi-manifesto blockquote em { color: var(--gold); font-style: normal; }
.pi-manifesto-sub {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.75;
}

/* ---- WORK SECTION ---- */
.pi-work {
  padding: 4rem var(--pad) 6rem;
  max-width: var(--max);
  margin: 0 auto;
}

.pi-section-eyebrow {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.pi-section-title {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 3rem;
}

/* ---- PROJECT GRID ---- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 31rem), 1fr));
  gap: 1.1rem;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid rgba(196, 162, 78, 0.07);
  border-top: 2px solid var(--gold);
  border-radius: 2px;
  padding: 1.65rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, background 0.35s ease,
              transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  cursor: default;
}

.proj-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 45% at 50% 0%, rgba(196,162,78,0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.proj-card:hover {
  border-color: rgba(196, 162, 78, 0.2);
  background: var(--bg-elevated);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(196,162,78,0.05);
}
.proj-card:hover::after { opacity: 1; }

.proj-card--teal { border-top-color: var(--teal); }
.proj-card--teal .proj-category { color: var(--teal); }
.proj-card--teal::after {
  background: radial-gradient(ellipse 55% 45% at 50% 0%, rgba(61,140,138,0.05), transparent 60%);
}

.proj-illus {
  height: 62px;
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.proj-illus svg { height: 100%; width: auto; overflow: visible; }

.proj-category {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.proj-title {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 0.65rem;
}

.proj-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.proj-foot {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(196,162,78,0.06);
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---- CONTACT ---- */
.pi-contact {
  border-top: 1px solid var(--gold-rule);
  padding: 5.5rem var(--pad) 7rem;
  max-width: var(--max);
  margin: 0 auto;
}

.pi-contact-heading {
  font-family: var(--sans);
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.pi-contact-heading em { color: var(--gold); font-style: normal; }

.pi-contact-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 44ch;
  line-height: 1.7;
}

.pi-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
}
.pi-contact-links a {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 1;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--gold-rule);
  border-radius: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.pi-contact-links a:hover { color: var(--text); border-color: rgba(196,162,78,0.36); background: var(--gold-soft); opacity: 1; }

/* ---- CONTACT FORM ---- */
.pi-form {
  margin-top: 2rem;
  max-width: 26rem;
}
.pi-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.9rem;
}
.pi-form input,
.pi-form textarea {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.62rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gold-rule);
  border-radius: 2px;
  font-family: var(--body);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pi-form input::placeholder,
.pi-form textarea::placeholder { color: var(--text-dim); }
.pi-form input:focus,
.pi-form textarea:focus {
  border-color: rgba(196, 162, 78, 0.38);
  background: rgba(255,255,255,0.055);
}
.pi-form button[type="submit"] {
  margin-top: 1.1rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.78rem 1.65rem;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.pi-form button[type="submit"]:hover    { opacity: 0.82; }
.pi-form button[type="submit"]:active   { transform: scale(0.98); }
.pi-form button[type="submit"]:disabled { opacity: 0.45; cursor: default; }

.pi-form-success {
  display: none;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* ---- TEAM SECTION ---- */
.pi-team {
  padding: 4.5rem var(--pad) 5.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-rule);
  border-radius: 4px;
  padding: 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.45);
  border-color: rgba(196,162,78,0.22);
}

.team-avatar-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: 1.6rem;
  flex-shrink: 0;
}

.team-avatar-photo {
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(196,162,78,0.07), 0 10px 36px rgba(0,0,0,0.45);
}

.team-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Maureen — scale 1.6 shows full face + hair, pixel-validated */
.team-avatar-photo--mau img {
  object-position: center 50%;
  transform: scale(1.6);
  transform-origin: 50% 30%;
}

.team-avatar-svg svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.team-role-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.22rem 0.48rem;
  border-radius: 2px;
  line-height: 1.2;
}

.team-role-badge--teal {
  background: var(--teal);
}

.team-name {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.team-role-label {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.team-bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 1.15rem;
  text-align: left;
  max-width: 36ch;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.team-tags li {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border: 1px solid var(--text-dim);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

.btn-sm {
  font-size: 0.7rem;
  padding: 0.55rem 1.3rem;
  letter-spacing: 0.12em;
}

/* ---- FOOTER ---- */
.pi-foot {
  padding: 2rem var(--pad) 3.5rem;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-top: 1px solid rgba(196,162,78,0.06);
}
.pi-foot a { color: var(--text-dim); opacity: 1; }
.pi-foot a:hover { color: var(--gold); opacity: 1; }

/* ---- SCROLL REVEAL ---- */
@media (prefers-reduced-motion: no-preference) {
  .pi-reveal {
    opacity: 0;
    transform: translateY(1.1rem);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  }
  .pi-reveal.is-visible { opacity: 1; transform: translateY(0); }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .pi-hero-eyebrow, .pi-hero h1, .pi-hero-sub, .pi-hero-ctas { opacity: 1 !important; transform: none !important; }
  .pi-reveal { opacity: 1 !important; transform: none !important; }
  #pi-intro { display: none !important; }
  #pi-canvas { display: none; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .pi-nav-links { gap: 0.5rem 0.8rem; }
  .proj-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .pi-hero { padding-top: 6rem; }
  .team-bio { max-width: none; }
}

@media print {
  #pi-intro, #pi-canvas { display: none; }
  body { background: #fff; color: #000; }
  .pi-reveal { opacity: 1 !important; transform: none !important; }
}
