/* ============================================================
   R3 GLOBAL — PORTFOLIO PAGE
   Editorial layout, deliberately card-light. Scoped to .pf-page
   so nothing here can reach the other pages.
   ============================================================ */

/* the shared page background is dialled right back so the
   editorial layout reads clean rather than busy */
.pf-page .pf-bg img { filter: brightness(0.62) saturate(0.72); }
.pf-page .pf-bg::after {
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(37,99,235,0.18) 0%, transparent 60%),
    linear-gradient(180deg, rgba(4,9,20,0.88) 0%, rgba(4,9,20,0.93) 45%, rgba(3,7,16,0.97) 100%);
}

/* ---- shared bits ---------------------------------------- */
.pf-page .pfx-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7FB0FF;
  margin-bottom: 20px;
}

.pf-page .pfx-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--fs-btn);
  font-weight: 600;
  color: #E5E7EB;
  min-height: 54px;
  padding: 16px 4px;
  transition: color 200ms ease, gap 200ms var(--ease);
}
.pf-page .pfx-btn-ghost:hover { color: #FFFFFF; gap: 14px; }

.pf-page .pfx-section { padding-block: clamp(56px, 6vw, 104px); }

.pf-page .pfx-head { max-width: 640px; margin-bottom: clamp(36px, 4vw, 56px); }
.pf-page .pfx-head--wide { max-width: 900px; }
.pf-page .pfx-head h2 { margin-bottom: 16px; }
.pf-page .pfx-head p { color: var(--t-secondary); margin: 0; }

/* ---- 1. HERO --------------------------------------------- */
.pf-page .pfx-hero {
  position: relative;
  padding-block: clamp(116px, 11vw, 168px) clamp(56px, 6vw, 96px);
}
.pf-page .pfx-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.pf-page .pfx-hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}
.pf-page .pfx-lead {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.6;
  color: var(--t-body);
  max-width: 560px;
  margin-bottom: 36px;
}
.pf-page .pfx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

/* ---- 2. SELECTED WORK ------------------------------------ */

/* ---- 3. WHAT WE BUILD ------------------------------------ */
.pf-page .pfx-rows { list-style: none; margin: 0; padding: 0; }
.pf-page .pfx-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) 1.4fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: baseline;
  padding-block: clamp(22px, 2.6vw, 34px);
  border-top: 1px solid rgba(255,255,255,0.10);
  transition: border-color 260ms ease;
}
.pf-page .pfx-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.10); }
.pf-page .pfx-row:hover { border-top-color: rgba(96,165,250,0.5); }
.pf-page .pfx-row-num {
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}
.pf-page .pfx-row p { color: var(--t-secondary); margin: 0; }

/* ---- 4. APPROACH ----------------------------------------- */
.pf-page .pfx-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.4vw, 36px);
  position: relative;
}
/* the connecting line */
.pf-page .pfx-steps::before {
  content: "";
  position: absolute;
  top: 15px; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.45) 12%, rgba(96,165,250,0.45) 88%, transparent);
}
.pf-page .pfx-step { position: relative; padding-top: 46px; }
.pf-page .pfx-step::before {
  content: "";
  position: absolute;
  top: 9px; left: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #0B1730;
  border: 2px solid #3B82F6;
  box-shadow: 0 0 0 5px rgba(59,130,246,0.14);
}
.pf-page .pfx-step-no {
  position: absolute; top: 4px; left: 26px;
  font-family: var(--font-head);
  font-size: 0.9rem; font-weight: 800;
  letter-spacing: 0.08em;
  color: #7FB0FF;
}
.pf-page .pfx-step h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.375rem); margin-bottom: 10px; }
.pf-page .pfx-step p { color: var(--t-secondary); font-size: 1rem; margin: 0; }

/* ---- 6. CTA ---------------------------------------------- */
.pf-page .pfx-cta {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 7vw, 112px);
}
.pf-page .pfx-cta-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 150%;
  background:
    radial-gradient(ellipse 46% 46% at 30% 40%, rgba(37,99,235,0.30) 0%, transparent 65%),
    radial-gradient(ellipse 42% 42% at 72% 60%, rgba(96,165,250,0.20) 0%, transparent 68%);
  animation: pfx-glow 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes pfx-glow {
  0%   { transform: translate3d(-3%, 0, 0) scale(1); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.08); }
}
.pf-page .pfx-cta-inner {
  position: relative;
  max-width: 720px;
  padding: clamp(32px, 4vw, 56px);
  border-radius: 24px;
  background: rgba(7,16,36,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}
.pf-page .pfx-cta-inner h2 { margin-bottom: 16px; }
.pf-page .pfx-cta-inner p { color: var(--t-secondary); margin-bottom: 30px; }

/* ---- RESPONSIVE ------------------------------------------ */
@media (max-width: 1024px) {
  .pf-page .pfx-hero-inner { grid-template-columns: 1fr; }
  .pf-page .pfx-stage { min-height: 340px; order: -1; }
  .pf-page .pfx-steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .pf-page .pfx-steps::before { display: none; }
}

@media (max-width: 768px) {
  .pf-page .pfx-row { grid-template-columns: 1fr; gap: 10px; }
  .pf-page .pfx-hero h1 { letter-spacing: -0.035em; }
}

@media (max-width: 600px) {
  .pf-page .pfx-steps { grid-template-columns: 1fr; row-gap: 28px; }
  .pf-page .pfx-stage { min-height: 280px; }
  .pf-page .pfx-hero-actions { width: 100%; }
  .pf-page .pfx-hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-page .pfx-cta-glow { animation: none !important; }
}

/* ---- DENSITY PASS ----------------------------------------
   Section paddings were stacking top+bottom between bands and
   opening large voids. Tightened across the page.            */
.pf-page .pfx-section { padding-block: clamp(38px, 4vw, 62px); }
.pf-page .pfx-head    { margin-bottom: clamp(24px, 2.6vw, 36px); }
.pf-page .pfx-head h2 { margin-bottom: 14px; }

.pf-page .pfx-hero { padding-block: clamp(104px, 9.5vw, 136px) clamp(32px, 3.4vw, 52px); }
.pf-page .pfx-lead { margin-bottom: 28px; }
.pf-page .pfx-hero h1 { margin-bottom: 20px; }
.pf-page .pfx-eyebrow { margin-bottom: 16px; }
.pf-page .pfx-stage { min-height: 340px; }


.pf-page .pfx-row { padding-block: clamp(18px, 2vw, 26px); }
.pf-page .pfx-step { padding-top: 40px; }

.pf-page .pfx-cta { padding-block: clamp(40px, 4.4vw, 72px); }
.pf-page .pfx-cta-inner { padding: clamp(28px, 3.2vw, 44px); }
.pf-page .pfx-cta-inner h2 { margin-bottom: 14px; }
.pf-page .pfx-cta-inner p  { margin-bottom: 24px; }

/* the last band before the footer shouldn't trail off */
.pf-page main > section:last-of-type { padding-bottom: clamp(40px, 4.4vw, 68px); }

@media (max-width: 768px) {
  .pf-page .pfx-section { padding-block: clamp(30px, 5vw, 44px); }
  .pf-page .pfx-hero    { padding-block: 92px 28px; }
  .pf-page .pfx-head    { margin-bottom: 22px; }
  .pf-page .pfx-stage   { min-height: 260px; }
}

/* ============================================================
   SELECTED EXPERTISE — capability showcase
   Three editorial panels, each carrying an abstract interface
   composition drawn in CSS. Illustrative of the kind of work
   produced; never presented as a specific client project.
   ============================================================ */
.pf-page .pfx-show-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2vw, 28px);
}

.pf-page .pfx-show {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(14,30,64,0.58) 0%, rgba(7,16,36,0.52) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  transition: transform 300ms var(--ease), border-color 300ms ease, box-shadow 300ms ease;
}
.pf-page .pfx-show:hover {
  transform: translateY(-5px);
  border-color: rgba(96,165,250,0.42);
  box-shadow: 0 28px 60px -28px rgba(0,0,0,0.85), 0 0 44px -26px rgba(59,130,246,0.7);
}

/* ---- artwork stage ---- */
.pf-page .pfx-show-art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 26px 26px 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(37,99,235,0.26) 0%, transparent 62%),
    linear-gradient(175deg, rgba(10,22,48,0.9) 0%, rgba(5,12,28,0.95) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pf-page .pfx-show-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
}
.pf-page .pfx-show-art > * { position: relative; }

/* ---- panel copy ---- */
.pf-page .pfx-show-body { padding: clamp(20px, 2vw, 28px); }
.pf-page .pfx-show-cat {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #7FB0FF; margin-bottom: 10px;
}
.pf-page .pfx-show h3 {
  font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.45rem);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.pf-page .pfx-show p { color: var(--t-secondary); margin-bottom: 16px; }

.pf-page .pfx-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.pf-page .pfx-tags li {
  font-size: 0.78rem; font-weight: 500;
  padding: 6px 12px; border-radius: 100px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #CBD5E1;
}

@media (max-width: 1024px) {
  .pf-page .pfx-show-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-page .pfx-show:last-child { grid-column: 1 / -1; }
  .pf-page .pfx-show:last-child .pfx-show-art { aspect-ratio: 21 / 8; }
}
@media (max-width: 720px) {
  .pf-page .pfx-show-grid { grid-template-columns: 1fr; }
  .pf-page .pfx-show:last-child .pfx-show-art { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-page .pfx-show { transition: none !important; }
}

/* the showcase heading reads best as one line; the 900px head cap
   was forcing the wrap, so widen it and hold nowrap only at widths
   where the full line is guaranteed to fit */
.pf-page .pfx-showcase .pfx-head { max-width: none; }
.pf-page .pfx-showcase .pfx-head p { max-width: 720px; }
@media (min-width: 1100px) {
  .pf-page .pfx-showcase .pfx-head h2 {
    white-space: nowrap;
    font-size: clamp(2.4rem, 1.05rem + 2.7vw, 3.1rem);
  }
}

/* supporting line on one row too, at widths where it genuinely fits */
.pf-page .pfx-showcase .pfx-head p { max-width: none; }
@media (min-width: 1250px) {
  .pf-page .pfx-showcase .pfx-head p {
    white-space: nowrap;
    font-size: clamp(1rem, 0.72rem + 0.36vw, 1.125rem);
  }
}

/* ---- CTA: wide single row instead of a tall narrow panel ----
   Copy on the left, actions on the right, using grid areas so the
   markup stays as-is.                                            */
.pf-page .pfx-cta-inner {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title actions"
    "text  actions";
  column-gap: clamp(32px, 4vw, 72px);
  align-items: center;
}
.pf-page .pfx-cta-inner h2 {
  grid-area: title;
  align-self: end;
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 1.1rem + 1.9vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pf-page .pfx-cta-inner p {
  grid-area: text;
  align-self: start;
  margin-bottom: 0;
  max-width: 620px;
}
.pf-page .pfx-cta-inner .pfx-hero-actions {
  grid-area: actions;
  align-self: center;
  flex-wrap: nowrap;
}

@media (min-width: 1150px) {
  .pf-page .pfx-cta-inner h2 { white-space: nowrap; }
}

@media (max-width: 900px) {
  .pf-page .pfx-cta-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "text" "actions";
    row-gap: 18px;
  }
  .pf-page .pfx-cta-inner h2 { align-self: auto; margin-bottom: 0; }
  .pf-page .pfx-cta-inner .pfx-hero-actions { flex-wrap: wrap; }
}
/* the ghost link was breaking across two lines in the narrow action column */
.pf-page .pfx-btn-ghost { white-space: nowrap; }

/* ---- hero visual (image) ---------------------------------- */
.pf-page .pfx-stage {
  position: relative;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 40px 90px -34px rgba(0,0,0,0.9),
    0 0 90px -40px rgba(37,99,235,0.55);
}
.pf-page .pfx-stage img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 46%;
  filter: brightness(1.05) saturate(1.08);
  transition: transform 600ms var(--ease);
}
.pf-page .pfx-stage:hover img { transform: scale(1.03); }
/* soft inner falloff so it sits in the dark page rather than on it */
.pf-page .pfx-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 88% 88% at 50% 45%, transparent 55%, rgba(4,10,24,0.42) 100%);
}

@media (max-width: 1024px) {
  .pf-page .pfx-stage { max-width: 620px; margin-inline: auto; }
}

/* ---- panel 1 artwork: contact page blueprint as the backdrop ----
   Sits behind the browser/phone composition, dimmed so the mockup
   stays the focal point. CSS-only, no markup change.            */

/* ---- photo-backed showcase panel -------------------------- */
.pf-page .pfx-show-art--photo {
  padding: 0;
  background: #071022;
}
.pf-page .pfx-show-art--photo::before { content: none; }
.pf-page .pfx-show-art--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 600ms var(--ease);
}
.pf-page .pfx-show:hover .pfx-show-art--photo img { transform: scale(1.04); }
/* hero now carries the services schematic, which frames centred */
.pf-page .pfx-stage img { object-position: center; }
/* brighter hero visual */
.pf-page .pfx-stage img {
  filter: brightness(1.45) saturate(1.3) contrast(1.04);
}
.pf-page .pfx-stage::after {
  background: radial-gradient(ellipse 92% 92% at 50% 45%, transparent 68%, rgba(4,10,24,0.24) 100%);
}
/* hero now carries the home-page office photo; a photograph needs a
   far gentler lift than the schematic did or it blows out */
.pf-page .pfx-stage img {
  object-position: 68% center;
  filter: brightness(1.14) saturate(1.12) contrast(1.02);
}

/* ============================================================
   WHITE PAGE OVERRIDES
   portfolio.css loads after design-system.css, so the white
   treatment has to be re-stated here to win the cascade.
   ============================================================ */
.pf-page .pfx-section, .pf-page .pfx-cta { background: #FFFFFF; }

/* the hero image layer is positioned, so the copy needs lifting
   above it or it gets painted over */
.pf-page .pfx-hero > .container { position: relative; z-index: 2; }
.pf-page .pfx-hero .pfx-stage   { position: relative; z-index: 2; }

/* showcase panels: solid white, not translucent dark */
.pf-page .pfx-show {
  background: #FFFFFF;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  border: 1px solid #E3E8F0;
  box-shadow: 0 1px 2px rgba(11,18,32,0.04), 0 12px 28px -18px rgba(11,18,32,0.35);
}
.pf-page .pfx-show:hover {
  border-color: #C7D6EE;
  box-shadow: 0 2px 4px rgba(11,18,32,0.05), 0 20px 40px -20px rgba(37,99,235,0.35);
}
.pf-page .pfx-show h3 { color: #0B1220; }
.pf-page .pfx-show p  { color: #48566B; }
.pf-page .pfx-show-cat, .pf-page .pfx-eyebrow { color: #1D4ED8; }

.pf-page .pfx-head h2 { color: #0B1220; }
.pf-page .pfx-head p  { color: #48566B; }

.pf-page .pfx-row { border-top-color: #E3E8F0; }
.pf-page .pfx-row:last-child { border-bottom-color: #E3E8F0; }
.pf-page .pfx-row-num { color: #0B1220; }
.pf-page .pfx-row p   { color: #48566B; }
.pf-page .pfx-row:hover { border-top-color: rgba(37,99,235,0.5); }

.pf-page .pfx-step h3 { color: #0B1220; }
.pf-page .pfx-step p  { color: #48566B; }
.pf-page .pfx-step-no { color: #1D4ED8; }
.pf-page .pfx-step::before { background: #FFFFFF; border-color: #2563EB; box-shadow: 0 0 0 5px rgba(37,99,235,0.12); }
.pf-page .pfx-steps::before {
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.35) 12%, rgba(37,99,235,0.35) 88%, transparent);
}

.pf-page .pfx-tags li { background: #F2F6FC; border-color: #DCE6F5; color: #33445E; }

.pf-page .pfx-cta-inner {
  background: #FFFFFF;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  border: 1px solid #E3E8F0;
  box-shadow: 0 1px 2px rgba(11,18,32,0.04), 0 16px 36px -22px rgba(11,18,32,0.4);
}
.pf-page .pfx-cta-inner h2 { color: #0B1220; }
.pf-page .pfx-cta-inner p  { color: #48566B; }
.pf-page .pfx-cta-glow {
  background:
    radial-gradient(ellipse 46% 46% at 30% 40%, rgba(37,99,235,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 42% 42% at 72% 60%, rgba(96,165,250,0.11) 0%, transparent 68%);
}
.pf-page .pfx-btn-ghost { color: #1D4ED8; }
.pf-page .pfx-btn-ghost:hover { color: #0B1220; }

/* hero stays dark: keep its own copy light */
.pf-page .pfx-hero h1 { color: #FFFFFF; }
.pf-page .pfx-hero .pfx-lead { color: rgba(230,240,255,0.94); }
.pf-page .pfx-hero .pfx-eyebrow { color: #7FB0FF; }
.pf-page .pfx-hero .pfx-btn-ghost { color: #E5E7EB; }
.pf-page .pfx-hero .pfx-btn-ghost:hover { color: #FFFFFF; }

/* --- mobile: lift the small labels off 11.2px --- */
@media (max-width: 640px) {
  .pf-page .pfx-show-cat,
  .pf-page .pfx-eyebrow,
  .pf-page .pfx-tags li {
    font-size: 0.79rem;
  }
}
