/* =========================================================================
   DigiDors — Portfolio page (portfolio.html)
   Loads after styles.css and reuses its design tokens (:root).
   ========================================================================= */

.px-page {
  --px-bg:     #030B1C;
  --px-raised: #071431;
  --px-violet: #6D5BFF;
  --px-glass:  rgba(255, 255, 255, 0.05);
  --px-border: rgba(255, 255, 255, 0.1);
  background: var(--px-bg);
  color: var(--on-dark-muted);
}
/* subtle film grain over the whole page */
.px-page::after {
  content: ""; position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.px-page h1, .px-page h2, .px-page h3 { color: #fff; }
/* Transparent header over the hero; turns into dark glass once the page scrolls (main.js adds .is-scrolled) */
.px-page .site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent; border-bottom: 1px solid transparent; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background 300ms var(--ease), border-color 300ms, box-shadow 300ms;
}
.px-page .site-header.is-scrolled, .px-page.nav-open .site-header {
  background: rgba(3, 11, 28, 0.78); border-bottom-color: var(--px-border);
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.px-page .logo img { height: 42px; }
.px-page .nav-links a { color: #E6EEFA; }
.px-page .nav-links a::after { background: var(--accent-light); }
.px-page .nav-links a:hover, .px-page .nav-links a.is-active, .px-page .nav-links a[aria-current="page"] { color: var(--accent-light); }
.px-page .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.px-page .nav-toggle { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.px-page .nav-toggle span, .px-page .nav-toggle span::before, .px-page .nav-toggle span::after { background: #fff; }
.px-page.nav-open .nav-toggle span { background: transparent; }
@media (max-width: 900px) {
  .px-page .nav { background: #071431; border-bottom-color: var(--px-border); }
  .px-page .nav-links a { border-bottom-color: var(--px-border); }
  .px-page .logo img { height: 36px; }
}

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.px-accent {
  background: linear-gradient(100deg, #9BD6FF 0%, var(--accent) 45%, #8C7CFF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em; /* keeps the italic's last letter from clipping */
}

/* Hero ------------------------------------------------------------------ */
.px-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(40px, 6vw, 72px);
  padding: calc(var(--header-h) + clamp(40px, 6vw, 88px)) 0 clamp(40px, 5vw, 64px);
}
.px-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.px-aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: px-blob 20s ease-in-out infinite alternate; }
.px-aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -14vw; top: -18vw; background: var(--brand); }
.px-aurora span:nth-child(2) { width: 36vw; height: 36vw; right: -10vw; top: -4vw; background: var(--accent); opacity: 0.4; animation-duration: 24s; }
.px-aurora span:nth-child(3) { width: 30vw; height: 30vw; left: 38%; bottom: -18vw; background: var(--px-violet); opacity: 0.38; animation-duration: 28s; }
@keyframes px-blob {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vw) scale(1.12); }
  100% { transform: translate(-4vw, 6vw) scale(0.94); }
}
.px-gridlines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.px-hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(40px, 5vw, 72px); }
.px-hero-copy { display: flex; flex-direction: column; gap: 28px; }
.px-kicker {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px; background: var(--px-glass); border: 1px solid var(--px-border);
  color: #DCE8FA; font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.px-pulse { width: 8px; height: 8px; border-radius: 50%; background: #2BD17E; box-shadow: 0 0 0 0 rgba(43, 209, 126, 0.6); animation: px-pulse 2s infinite; }
@keyframes px-pulse { 70% { box-shadow: 0 0 0 10px rgba(43, 209, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 209, 126, 0); } }
.px-title { font-size: clamp(32px, 4vw, 56px); font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.px-title .serif { font-size: 1.12em; line-height: 0.8; letter-spacing: -0.02em; }
.px-line { display: block; animation: px-rise 1s var(--ease) both; }
.px-line:nth-child(2) { animation-delay: 0.12s; }
.px-line:nth-child(3) { animation-delay: 0.24s; }
@keyframes px-rise { from { opacity: 0; transform: translateY(40px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.px-rotator { display: inline-block; height: 1.08em; overflow: hidden; vertical-align: bottom; }
.px-rotator-track { display: flex; flex-direction: column; animation: px-rotate 10s var(--ease) infinite; }
.px-rotator-track span {
  display: block; height: 1.08em; line-height: 1.08em;
  background: linear-gradient(100deg, #9BD6FF, var(--accent) 50%, #8C7CFF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes px-rotate {
  0%, 20%   { transform: translateY(0); }
  25%, 45%  { transform: translateY(-1.08em); }
  50%, 70%  { transform: translateY(-2.16em); }
  75%, 95%  { transform: translateY(-3.24em); }
  100%      { transform: translateY(-4.32em); }
}
.px-lead { max-width: 520px; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.6; animation: px-rise 1s 0.36s var(--ease) both; }
.px-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.px-hero .px-actions { animation: px-rise 1s 0.48s var(--ease) both; }
.px-magnetic { transition: transform 300ms var(--ease), background 200ms, box-shadow 200ms; }
.px-page .btn--accent { box-shadow: 0 18px 40px -14px rgba(30, 155, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

/* 3D project stack */
.px-stage { position: relative; aspect-ratio: 1 / 1.02; perspective: 1600px; animation: px-rise 1.2s 0.3s var(--ease) both; }
.px-stage-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(var(--ry, -16deg)) rotateX(var(--rx, 8deg));
  transition: transform 700ms var(--ease);
}
.px-shot {
  position: absolute; margin: 0; border-radius: 18px; overflow: hidden; background: #0B1A3A;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.px-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.px-shot--1 { left: 0; top: 16%; width: 66%; transform: translateZ(40px); }
.px-shot--2 { right: 0; top: 0; width: 50%; transform: translateZ(-60px); }
.px-shot--2 img { aspect-ratio: 4 / 5; }
.px-shot--3 { right: 4%; bottom: 2%; width: 56%; transform: translateZ(110px); }
.px-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: rgba(255, 255, 255, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.px-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.px-bar i:nth-child(1) { background: #FF6159; }
.px-bar i:nth-child(2) { background: #FFBD2E; }
.px-bar i:nth-child(3) { background: #28C941; }
.px-bar span { margin-left: 10px; font-size: 11px; color: #8FA3C4; letter-spacing: 0.02em; }
.px-chip {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.95); color: var(--ink); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.7);
}
.px-chip strong { display: block; font-family: var(--font-display); font-size: 14px; line-height: 1.25; }
.px-chip span { font-size: 12px; color: var(--muted); }
.px-chip .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #DDF8EA; color: #139B57; font-weight: 800; font-size: 16px;
}
.px-chip .ico--up { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; }
.px-chip .ico svg { width: 18px; height: 18px; }
.px-chip--1 { left: -6%; bottom: 20%; transform: translateZ(160px); animation: px-bob 6s ease-in-out infinite; }
.px-chip--2 { right: -4%; top: 44%; transform: translateZ(180px); animation: px-bob 7s ease-in-out -2s infinite; }
@keyframes px-bob { 50% { translate: 0 -12px; } }

/* stats */
.px-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 0;
  border: 1px solid var(--px-border); border-radius: var(--radius-lg); overflow: hidden;
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: px-rise 1s 0.6s var(--ease) both;
}
.px-stats > div { padding: 26px 28px; }
.px-stats > div + div { border-left: 1px solid var(--px-border); }
.px-stats dt {
  font-family: var(--font-display); font-size: clamp(28px, 2.8vw, 40px); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  color: #fff;
}
.px-stats dd { margin: 10px 0 0; font-size: 14px; line-height: 1.45; }

/* Marquee --------------------------------------------------------------- */
.px-marquee { overflow: hidden; padding: 30px 0; border-block: 1px solid var(--px-border); background: var(--px-bg); }
.px-marquee-track { display: flex; width: max-content; animation: px-marquee 42s linear infinite; }
.px-marquee:hover .px-marquee-track { animation-play-state: paused; }
.px-marquee span {
  display: inline-flex; align-items: center; gap: 40px; padding-right: 40px; white-space: nowrap;
  font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 38px); font-weight: 800; letter-spacing: -0.03em; color: rgba(255, 255, 255, 0.9);
}
.px-marquee span.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; color: var(--accent-light); font-size: clamp(26px, 3vw, 44px); }
.px-marquee span::after { content: "✦"; font-family: var(--font-body); font-style: normal; font-size: 0.45em; color: var(--accent); }
@keyframes px-marquee { to { transform: translateX(-50%); } }

/* Sections -------------------------------------------------------------- */
.px-section { position: relative; padding: clamp(80px, 10vw, 150px) 0; }
.px-section--raised {
  background: var(--px-raised); border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0;
  box-shadow: 0 -1px 0 var(--px-border);
}
.px-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px; margin-bottom: clamp(48px, 6vw, 88px); }
.px-head > div:first-child { display: flex; flex-direction: column; gap: 20px; }
.px-head h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.px-head h2 .serif { font-size: 1.1em; }
.px-head > p { max-width: 400px; font-size: 16px; line-height: 1.65; }
.px-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-light); }
.px-eyebrow b {
  display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(124, 200, 255, 0.4); font-size: 12px; letter-spacing: 0.06em; color: #fff;
}

/* Featured case studies ------------------------------------------------- */
.px-cases { display: flex; flex-direction: column; gap: clamp(88px, 11vw, 160px); }
.px-case { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(40px, 6vw, 96px); }
.px-case:nth-child(even) .px-case-media { order: 2; }
.px-case-media { position: relative; }
.px-case-media::before {
  content: ""; position: absolute; inset: 10% 6% -4%; z-index: -1; border-radius: 40px; filter: blur(60px); opacity: 0.55;
  background: linear-gradient(135deg, var(--brand), var(--accent) 50%, var(--px-violet));
}
.px-frame {
  border-radius: 22px; overflow: hidden; background: #0B1A3A; border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 60px 100px -40px rgba(0, 0, 0, 0.85);
  transform: perspective(1400px) rotateY(-5deg) rotateX(3deg); transition: transform 900ms var(--ease);
}
.px-case:nth-child(even) .px-frame { transform: perspective(1400px) rotateY(5deg) rotateX(3deg); }
.px-case:hover .px-frame { transform: perspective(1400px) rotateY(0) rotateX(0); }
.px-frame img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; transition: transform 1.2s var(--ease); }
.px-case:hover .px-frame img { transform: scale(1.05); }
.px-badge {
  position: absolute; left: -28px; bottom: -32px; z-index: 2;
  display: flex; flex-direction: column; padding: 20px 24px; border-radius: 18px;
  background: #fff; color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  animation: px-bob 7s ease-in-out infinite;
}
.px-case:nth-child(even) .px-badge { left: auto; right: -28px; }
.px-badge strong {
  font-family: var(--font-display); font-size: clamp(28px, 2.6vw, 36px); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.px-badge span { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.px-case-body { position: relative; display: flex; flex-direction: column; gap: 18px; }
.px-num {
  position: absolute; right: 0; top: -0.55em; z-index: -1;
  font-family: var(--font-display); font-size: clamp(76px, 8vw, 120px); font-weight: 800; line-height: 1; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(124, 200, 255, 0.22);
}
.px-page .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-light); }
.px-case h3 { font-size: clamp(21px, 1.9vw, 28px); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
.px-case .px-desc { font-size: 16px; line-height: 1.65; }
.px-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 6px 0 0; border-block: 1px solid var(--px-border); }
.px-metrics > div { padding: 20px 0; }
.px-metrics > div + div { padding-left: 20px; border-left: 1px solid var(--px-border); }
.px-metrics dt {
  font-family: var(--font-display); font-size: clamp(22px, 2vw, 28px); font-weight: 800; line-height: 1; letter-spacing: -0.035em;
  background: linear-gradient(100deg, #fff, #9BD6FF); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.px-metrics dd { margin: 8px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.px-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.px-tags li {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #DCE8FA;
  background: var(--px-glass); border: 1px solid var(--px-border);
}
.px-open {
  all: unset; box-sizing: border-box; cursor: pointer; align-self: flex-start; margin-top: 8px;
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #fff;
}
.px-open-ico {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25); transition: background 300ms var(--ease), transform 400ms var(--ease), border-color 300ms;
}
.px-open-ico svg { width: 20px; height: 20px; }
.px-open:hover .px-open-ico, .px-open:focus-visible .px-open-ico { background: var(--accent); border-color: var(--accent); color: var(--navy-950); transform: rotate(45deg); }
.px-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 999px; }
.px-open.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* More work (bento) ----------------------------------------------------- */
.px-filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 6px; border-radius: 999px; background: var(--px-glass); border: 1px solid var(--px-border); }
.px-filter {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 10px 20px; border-radius: 999px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: #C9D6EC;
  transition: background 250ms var(--ease), color 250ms var(--ease);
}
.px-filter:hover { color: #fff; }
.px-filter:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.px-filter[aria-pressed="true"] { background: #fff; color: var(--navy-950); }
.px-bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 340px; grid-auto-flow: dense; gap: 20px; }
.px-card {
  position: relative; border-radius: 24px; overflow: hidden; isolation: isolate; cursor: pointer;
  background: #0B1A3A; border: 1px solid var(--px-border);
  transition: transform 500ms var(--ease), border-color 400ms;
}
.px-card[hidden] { display: none; }
.px-card--wide { grid-column: span 2; }
.px-card--tall { grid-row: span 2; }
.px-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter 600ms; filter: saturate(0.9); }
.px-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(3, 11, 28, 0) 30%, rgba(3, 11, 28, 0.65) 64%, rgba(3, 11, 28, 0.97) 100%);
}
/* cursor spotlight */
.px-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 400ms;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 200, 255, 0.22), transparent 45%);
}
.px-card:hover { transform: translateY(-6px); border-color: rgba(124, 200, 255, 0.45); }
.px-card:hover::before { opacity: 1; }
.px-card:hover img { transform: scale(1.07); filter: saturate(1.1); }
.px-card .body { position: absolute; z-index: 2; inset: auto 0 0 0; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.px-card h3 { font-size: clamp(17px, 1.3vw, 19px); font-weight: 800; letter-spacing: -0.03em; }
.px-card--wide h3, .px-card--tall h3 { font-size: clamp(20px, 1.7vw, 24px); }
.px-card .px-desc { font-size: 15px; line-height: 1.55; color: #D5DFEE; max-width: 460px; }
.px-card .px-desc, .px-card .px-tags {
  max-height: 0; opacity: 0; overflow: hidden; transform: translateY(10px);
  transition: max-height 600ms var(--ease), opacity 400ms var(--ease), transform 600ms var(--ease);
}
.px-card:hover .px-desc, .px-card:hover .px-tags, .px-card:focus-within .px-desc, .px-card:focus-within .px-tags {
  max-height: 140px; opacity: 1; transform: none;
}
.px-card .px-tags li { background: rgba(255, 255, 255, 0.12); }
.px-card-go {
  position: absolute; z-index: 2; top: 20px; right: 20px; width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 300ms var(--ease), color 300ms, transform 500ms var(--ease), opacity 300ms var(--ease);
}
.px-card-go svg { width: 20px; height: 20px; }
.px-card:hover .px-card-go { background: var(--accent); border-color: var(--accent); color: var(--navy-950); transform: rotate(45deg) scale(1.08); }
.px-card:has(.px-open:focus-visible) { outline: 3px solid var(--accent); outline-offset: 4px; }
.px-card.px-pop { animation: px-pop 600ms var(--ease) both; }
@keyframes px-pop { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
.px-empty { text-align: center; padding: 40px 0; }
.px-empty[hidden] { display: none; }

/* Capabilities hover list ---------------------------------------------- */
.px-services { border-top: 1px solid var(--px-border); }
.px-services a {
  position: relative; display: grid; grid-template-columns: 70px 1fr auto 60px; align-items: center; gap: 24px;
  padding: clamp(22px, 3vw, 36px) 8px; border-bottom: 1px solid var(--px-border); color: #fff; overflow: hidden; isolation: isolate;
}
.px-services a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleY(0); transform-origin: bottom;
  background: linear-gradient(90deg, rgba(10, 75, 214, 0.35), rgba(30, 155, 255, 0.12));
  transition: transform 500ms var(--ease);
}
.px-services a:hover::before, .px-services a:focus-visible::before { transform: scaleY(1); }
.px-services .n { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #7F92B2; }
.px-services .name {
  font-family: var(--font-display); font-size: clamp(20px, 2.5vw, 34px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05;
  transition: transform 500ms var(--ease), color 300ms;
}
.px-services a:hover .name { transform: translateX(18px); color: var(--accent-light); }
.px-services .desc { font-size: 15px; color: var(--on-dark-muted); text-align: right; }
.px-services .arrow {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22); transition: all 400ms var(--ease);
}
.px-services .arrow svg { width: 22px; height: 22px; }
.px-services a:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--navy-950); transform: rotate(45deg); }
.px-hover-img {
  position: fixed; left: 0; top: 0; z-index: 40; width: 340px; pointer-events: none;
  border-radius: 20px; overflow: hidden; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.8);
  opacity: 0; transform: translate(-50%, -50%) scale(0.6) rotate(-6deg);
  transition: opacity 300ms var(--ease), transform 500ms var(--ease);
}
.px-hover-img.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
.px-hover-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Quote ----------------------------------------------------------------- */
.px-quote-wrap { padding-top: 0; }
.px-quote {
  position: relative; margin: 0 auto; max-width: 1000px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
  padding: clamp(48px, 6vw, 80px) clamp(24px, 5vw, 72px); border-radius: 36px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)); border: 1px solid var(--px-border);
}
.px-quote-mark {
  display: block; font-family: "Instrument Serif", Georgia, serif; font-size: 150px; line-height: 1; margin: -24px 0 -72px;
  background: linear-gradient(135deg, var(--accent-light), var(--px-violet)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.px-quote blockquote {
  margin: 0; font-family: var(--font-display); font-size: clamp(18px, 2vw, 26px); font-weight: 700; line-height: 1.35; letter-spacing: -0.03em; color: #fff;
}
.px-quote blockquote .serif { font-size: 1.12em; font-weight: 400; }
.px-quote figcaption { display: flex; align-items: center; gap: 14px; text-align: left; }
.px-quote figcaption strong { display: block; color: #fff; font-size: 15px; }
.px-quote figcaption span span { font-size: 14px; color: #93A6C6; }

/* CTA ------------------------------------------------------------------- */
.px-cta { position: relative; overflow: hidden; isolation: isolate; padding: clamp(100px, 13vw, 190px) 0; border-top: 1px solid var(--px-border); }
.px-aurora--cta span:nth-child(1) { left: 10%; top: auto; bottom: -30vw; }
.px-aurora--cta span:nth-child(2) { right: 5%; top: -20vw; }
.px-cta-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.px-cta h2 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 800; line-height: 1.05; letter-spacing: -0.045em; max-width: 1050px; }
.px-cta h2 .serif { font-size: 1.1em; }
.px-cta p { max-width: 520px; font-size: 16px; }
.px-cta .px-actions { justify-content: center; }
.px-badge-spin {
  position: absolute; right: 2%; top: -40px; width: 170px; height: 170px; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.px-badge-spin > svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: px-spin 16s linear infinite; }
.px-badge-spin text { fill: currentColor; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 2px; }
.px-badge-spin .core {
  width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--navy-950); transition: transform 400ms var(--ease);
}
.px-badge-spin .core svg { width: 28px; height: 28px; }
.px-badge-spin:hover { color: var(--accent-light); }
.px-badge-spin:hover .core { transform: scale(1.1) rotate(45deg); }
@keyframes px-spin { to { transform: rotate(360deg); } }

/* Pop-up ---------------------------------------------------------------- */
.px-modal {
  width: min(1000px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 28px; overflow: hidden;
  background: #0A1733; color: var(--on-dark-muted); box-shadow: 0 60px 120px -30px rgba(0, 0, 0, 0.9);
}
.px-modal[open] { display: grid; grid-template-columns: 1fr 1.05fr; animation: px-pop 450ms var(--ease); }
.px-modal::backdrop { background: rgba(2, 8, 20, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.px-modal-img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.px-modal-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.px-modal-title { font-size: clamp(20px, 1.9vw, 24px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.px-modal-desc { font-size: 16px; color: #DCE8FA; }
.px-modal-metrics:empty { display: none; }
.px-modal-more h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-light); margin: 10px 0 4px; }
.px-modal-more p { font-size: 15px; line-height: 1.6; }
.px-modal .btn { align-self: flex-start; margin-top: 8px; }
.px-modal-close {
  all: unset; box-sizing: border-box; cursor: pointer; position: absolute; z-index: 2; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.95); color: var(--ink); transition: transform 300ms var(--ease);
}
.px-modal-close:hover { transform: rotate(90deg); }
.px-modal-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.px-modal-close svg { width: 18px; height: 18px; }
body.px-lock { overflow: hidden; }

/* Motion & responsive --------------------------------------------------- */
@media (hover: none) {
  .px-card .px-desc, .px-card .px-tags { max-height: 140px; opacity: 1; transform: none; }
  .px-hover-img { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .px-rotator-track { animation: none; }
  .px-marquee-track { animation: none; }
}
@media (max-width: 1080px) {
  .px-bento { grid-template-columns: repeat(2, 1fr); }
  .px-services .desc { display: none; }
  .px-services a { grid-template-columns: 56px 1fr 56px; }
}
@media (max-width: 900px) {
  .px-hero { min-height: 0; }
  .px-hero-inner, .px-case { grid-template-columns: 1fr; }
  .px-stage { max-width: 560px; width: 100%; margin: 0 auto; }
  .px-stats { grid-template-columns: 1fr 1fr; }
  .px-stats > div:nth-child(3) { border-left: 0; }
  .px-stats > div:nth-child(n+3) { border-top: 1px solid var(--px-border); }
  .px-case:nth-child(even) .px-case-media { order: 0; }
  .px-case:nth-child(even) .px-badge { right: 16px; left: auto; }
  .px-badge { left: 16px; }
  .px-badge-spin { position: static; margin-top: 12px; }
}
@media (max-width: 640px) {
  .px-title { font-size: clamp(30px, 8.6vw, 40px); }
  .px-hero .px-actions .btn, .px-cta .px-actions .btn { width: 100%; }
  .px-chip--2 { display: none; }
  .px-chip--1 { left: 0; }
  .px-stats > div { padding: 20px; }
  .px-bento { grid-template-columns: 1fr; grid-auto-rows: 420px; }
  .px-card--wide, .px-card--tall { grid-column: auto; grid-row: auto; }
  .px-metrics > div + div { padding-left: 12px; }
  .px-badge { padding: 14px 18px; bottom: -24px; }
  .px-filters { border-radius: 20px; }
  .px-services a { grid-template-columns: 36px 1fr 44px; gap: 12px; }
  .px-services .arrow { width: 44px; height: 44px; }
  .px-modal[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .px-modal-img { min-height: 0; height: auto; aspect-ratio: 16 / 10; }
  .px-modal-body { overflow: visible; }
}
.px-card.reveal { transition: opacity 700ms var(--ease), transform 600ms var(--ease), border-color 400ms; }

/* More projects: image-only tiles. The text stays in the HTML (hidden) because
   the pop-up reads the title/description from it, and screen readers still announce it. */
.px-card::after { display: none; }
.px-card img { filter: none; }
.px-card .body { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px-card-go { opacity: 0; transform: scale(0.8); }
.px-card:hover .px-card-go, .px-card:focus-within .px-card-go { opacity: 1; }

/* Website screenshots (portfolio/ folder): larger 2-column tiles, cropped from the top of the page */
.px-bento--shots { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; gap: 24px; }
.px-bento--shots .px-card { aspect-ratio: 16 / 13; }
.px-card img, .px-shot img, .px-modal-img { object-position: top center; }
@media (max-width: 640px) { .px-bento--shots { grid-template-columns: 1fr; } }
.px-filters[hidden], .px-filter[hidden] { display: none; }

/* Compact, text-only hero (portfolio page) */
.px-hero--compact {
  min-height: 0; gap: clamp(40px, 5vw, 56px);
  padding: calc(var(--header-h) + clamp(56px, 7vw, 96px)) 0 clamp(48px, 6vw, 72px);
}
.px-hero--compact .px-hero-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.px-hero--compact .px-hero-copy { align-items: center; max-width: 820px; }
.px-hero--compact .px-kicker { align-self: center; }
.px-hero--compact .px-lead { margin: 0 auto; }
.px-hero--compact .px-actions { justify-content: center; }
.px-rotator { transition: width 600ms var(--ease); }

/* Tighter desktop menu on small laptops / tablets (7 links + button) */
@media (min-width: 901px) and (max-width: 1080px) {
  .px-page .nav { gap: 18px; }
  .px-page .nav-links { gap: 18px; }
  .px-page .nav-links a { font-size: 14px; }
  .px-page .nav .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
  .px-page .logo img { height: 36px; }
}

/* Recent clients (all pages) ------------------------------------------- */
.cl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cl-card {
  display: flex; flex-direction: column; overflow: hidden; color: inherit;
  border: 1px solid var(--px-border); border-radius: 22px; background: rgba(255, 255, 255, 0.035);
  transition: transform 400ms var(--ease), border-color 300ms, background 300ms;
}
.cl-card:hover { color: inherit; transform: translateY(-6px); border-color: rgba(124, 200, 255, 0.45); background: rgba(30, 155, 255, 0.07); }
.cl-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--px-border); transition: transform 900ms var(--ease); }
.cl-card:hover img { transform: scale(1.04); }
.cl-body { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px; background: inherit; }
.cl-name { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.025em; color: #fff; }
.cl-meta { display: block; margin-top: 2px; font-size: 13.5px; color: var(--on-dark-muted); }
.cl-go {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; transition: all 400ms var(--ease);
}
.cl-go svg { width: 16px; height: 16px; }
.cl-card:hover .cl-go { background: var(--accent); border-color: var(--accent); color: var(--navy-950); transform: rotate(45deg); }
.cl-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
/* compact: names only (used on the portfolio page, where the screenshots already appear above) */
.cl-grid--compact .cl-card img { display: none; }
.cl-grid--compact .cl-body { padding: 26px; }
.cl-grid--compact .cl-name { font-size: 22px; }
@media (max-width: 1080px) { .cl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cl-grid { grid-template-columns: 1fr; } }

/* All projects: Websites + Social media groups (portfolio page) ---------- */
.px-group + .px-group { margin-top: clamp(56px, 7vw, 96px); }
.px-group[hidden] { display: none; }
.px-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.px-group-label {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  background: var(--px-glass); border: 1px solid var(--px-border);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-light);
}
.px-group-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.px-group-count { font-size: 14px; color: var(--on-dark-muted); }
.px-social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.px-social-grid .px-card { aspect-ratio: 4 / 5; }
.px-social-grid .px-card img { object-position: center; }
@media (max-width: 1080px) { .px-social-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .px-social-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* Websites grid: 3 per row (portfolio page) */
.px-group .px-bento--shots { grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1080px) { .px-group .px-bento--shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .px-group .px-bento--shots { grid-template-columns: 1fr; } }
