/* ════════════════════════════════════════════════════════════════════
   OUR PROCESS CAROUSEL — index.html "From Raw Earth to Reinforced
   Tomorrow" section. Isolated component (see process-carousel.js).
   Class prefix .pcc. Same coverflow/background recipe as the "Why Join
   Us" carousel on careers.html (career-benefits-carousel.css, prefix
   .cbc) so both read as one carousel system across the site — only the
   slide size/height differ to fit the existing .pillar-card visual
   (image/icon panel + badge + body), which this component wraps rather
   than replaces, per the site's illustrated-process-card language.

   Positioning model: identical to .cbc — each .pcc-slide is absolutely
   centered and moved with translate3d/scale driven by CSS custom
   properties (--tx/--sc/--op/--z) that process-carousel.js updates per
   slide based on its circular distance from the active index.
   ════════════════════════════════════════════════════════════════════ */

.pcc {
  position: relative;
  margin-top: 3rem;
  padding: 2.5rem 0 2.25rem;
  border-radius: 2rem;
  isolation: isolate;
}

.pcc.is-visible .pcc-viewport { opacity: 1; transform: translateY(0); }
.pcc-viewport {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16, .84, .44, 1), transform .7s cubic-bezier(.16, .84, .44, 1);
}

/* ── ambient background (same recipe family as .cbc-mesh/.cbc-glow).
   Fixed-px bleed, not %: a percentage inset scales with .pcc's own
   height, which grows with the carousel/CTA content — that pushed the
   bottom edge down enough to intersect the market-presence section's
   own bled panel right below it. A fixed offset stays a constant
   card-edge overhang no matter how tall the content gets. ── */
.pcc-bg { position: absolute; top: -32px; right: -3%; bottom: -32px; left: -3%; z-index: -1; pointer-events: none; border-radius: 2rem; overflow: hidden; }

.pcc-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 82% 12%, rgba(255, 106, 31, .06), transparent 60%),
    radial-gradient(ellipse 55% 50% at 12% 22%, rgba(241, 243, 246, .8), transparent 60%),
    radial-gradient(ellipse 60% 55% at 50% 100%, rgba(228, 231, 236, .45), transparent 65%),
    linear-gradient(180deg, #FCFCFD 0%, #F5F6F8 100%);
}

.pcc-texture {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(15, 23, 42, .5) 0, rgba(15, 23, 42, .5) 1px, transparent 1px, transparent 44px),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, .5) 0, rgba(15, 23, 42, .5) 1px, transparent 1px, transparent 44px);
  opacity: .025;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 90%);
}

.pcc-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 60%; height: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(255, 106, 31, .09), transparent 65%);
  filter: blur(46px);
  animation: pccGlowBreathe 9s ease-in-out infinite;
}
@keyframes pccGlowBreathe {
  0%, 100% { opacity: .7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.pcc-shape { position: absolute; border-radius: 50%; filter: blur(28px); opacity: .35; pointer-events: none; }
.pcc-shape.s1 { left: 6%; top: 18%; width: 130px; height: 130px; background: rgba(255, 106, 31, .16); animation: pccFloat 13s ease-in-out infinite; }
.pcc-shape.s2 { right: 8%; top: 55%; width: 90px; height: 90px; background: rgba(255, 194, 75, .18); animation: pccFloat 16s ease-in-out infinite 2s; }
.pcc-shape.s3 { left: 30%; bottom: 6%; width: 70px; height: 70px; background: rgba(255, 106, 31, .12); animation: pccFloat 11s ease-in-out infinite 4s; }
@keyframes pccFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, -24px); }
}

/* ── viewport + track ── */
.pcc-viewport {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 2.5rem 0 3rem;
}

.pcc-track-wrap { position: relative; width: 100%; min-width: 0; overflow-x: hidden; overflow-y: visible; }
.pcc-track-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 1rem; }

.pcc-track {
  position: relative;
  height: 460px;
  touch-action: pan-y;
  cursor: grab;
  transform: translate3d(var(--drag, 0px), 0, 0);
  transition: transform .3s cubic-bezier(.16, .84, .44, 1);
}
.pcc-track.is-dragging { cursor: grabbing; transition: none; }

.pcc-slide {
  position: absolute;
  top: 0; left: 50%;
  width: min(340px, 84vw);
  margin-left: calc(min(340px, 84vw) / -2);
  transform: translate3d(var(--tx, 0px), 0, 0) scale(var(--sc, 1));
  opacity: var(--op, 1);
  z-index: var(--z, 1);
  transition: transform .7s cubic-bezier(.16, .84, .44, 1), opacity .7s cubic-bezier(.16, .84, .44, 1), filter .7s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.pcc-slide.is-hidden-visual { pointer-events: none; }
.pcc-slide.is-far { filter: saturate(.7); }

/* the shared .pillar-card already provides the card's own background/
   border/hover-lift/accent-underline (index.html inline styles) — .pcc-card
   only layers carousel-specific flourishes on top: cursor spotlight (via
   ::before, since .pillar-card already owns ::after for its underline
   bar) and a stronger glow/border when centered. */
.pcc-card {
  position: relative;
  display: flex;
  height: 100%;
  cursor: pointer;
}

.pcc-card::before {
  /* cursor spotlight, position set via --mx/--my by process-carousel.js */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle 200px at var(--mx, 50%) var(--my, 0%), rgba(255, 145, 40, .12), transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
}
@media (hover: hover) and (pointer: fine) {
  .pcc-card:hover::before { opacity: 1; }
}
.pcc-card:focus-visible::before { opacity: 1; }
.pcc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.pcc-slide.is-center .pcc-card .pillar-img-wrap.icon-wrap { animation: pccIconPulse 3.2s ease-in-out infinite; }
@keyframes pccIconPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 106, 31, 0) inset; }
  50% { box-shadow: 0 0 0 8px rgba(255, 106, 31, .07) inset; }
}

/* ── center-card focus: stronger shadow + accent border, same values as .cbc ── */
.pcc-slide.is-center .pcc-card {
  border-color: rgba(255, 106, 31, .4);
  box-shadow: 0 30px 60px -18px rgba(20, 22, 28, .18), 0 0 46px rgba(255, 106, 31, .16);
}

/* ── nav buttons ── */
.pcc-nav {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.16, .84, .44, 1), box-shadow .3s ease, border-color .3s ease, background .3s ease;
}
.pcc-nav svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) {
  .pcc-nav:hover {
    transform: scale(1.08);
    border-color: var(--accent);
    box-shadow: 0 10px 26px rgba(255, 106, 31, .28);
    outline: none;
  }
}
.pcc-nav:focus-visible {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(255, 106, 31, .28);
  outline: none;
}
.pcc-nav:active { transform: scale(.96); }

/* ── bottom controls: prev arrow · dots · next arrow ── */
.pcc-controls { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: .5rem; }

/* ── CTA: lives inside .pcc so it shares the carousel's own rounded
   panel/background instead of floating as a separate block beneath it ── */
.pcc-cta {
  text-align: center;
  margin: 1.75rem 1.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── pagination ── */
.pcc-dots { display: flex; align-items: center; justify-content: center; gap: .55rem; }
/* visible dot stays 8px (26px pill when active) — padding + content-box
   clipping grows only the invisible tap target to the ~32px minimum. */
.pcc-dot {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: none;
  padding: 12px;
  background: var(--border);
  background-clip: content-box;
  cursor: pointer;
  transition: width .35s cubic-bezier(.16, .84, .44, 1), background .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .pcc-dot:hover { background: var(--accent-hot); }
}
.pcc-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pcc-dot.is-active { width: 50px; background: linear-gradient(90deg, var(--accent-hot), var(--accent)); }

.pcc-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── .pcc-bg bleed vs. the section gap below it: .section's own
   padding (styles.css) shrinks at these same two breakpoints (760px,
   480px), so the fixed bleed has to shrink in step or it eats back
   into the market-presence panel below. ── */
@media (max-width: 760px) {
  .pcc-bg { top: -16px; bottom: -16px; }
}
@media (max-width: 480px) {
  .pcc-bg { top: -12px; bottom: -12px; }
}

/* ── responsive step/scale tuning is computed in JS from measured card
   width; these breakpoints only resize the card + track height ── */
@media (max-width: 1024px) {
  .pcc-track { height: 480px; }
  .pcc-nav { width: 42px; height: 42px; }
}
@media (max-width: 640px) {
  .pcc-slide { width: min(300px, 82vw); margin-left: calc(min(300px, 82vw) / -2); }
  .pcc-track { height: 430px; }
  .pcc-viewport { padding: 1.75rem 0 2rem; gap: .25rem; }
  .pcc-nav { width: 38px; height: 38px; }
  .pcc-nav svg { width: 17px; height: 17px; }
  .pcc-cta { margin: 1.25rem 1rem 0; padding-top: 1.25rem; }
}
@media (max-width: 420px) {
  /* same gentler step-down as quality-carousel.css's .qcc-slide — a flat
     250px cap left the card looking thin against an 18:9 phone's width */
  .pcc-slide { width: min(288px, 88vw); margin-left: calc(min(288px, 88vw) / -2); }
  .pcc-track { height: 415px; }
}

/* ── low-end mobile: trim the always-on blur+animation background
   layers behind the coverflow — see the matching note in
   quality-carousel.css ── */
@media (max-width: 640px) {
  .pcc-glow { filter: blur(24px); animation: none; opacity: .8; }
  .pcc-shape { display: none; }
  .pcc-nav { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}

/* ══ LOW-POWER MODE: same background-layer trim as the mobile breakpoint
   above (skip .pcc-nav — pure backdrop-filter, already killed sitewide),
   keyed off device capability (.low-power-mode) instead of viewport width ══ */
.low-power-mode .pcc-glow { filter: blur(24px); animation: none; opacity: .8; }
.low-power-mode .pcc-shape { display: none; }

/* ══ DARK MODE — same recipe as career-benefits-carousel.css's
   html[data-theme="dark"] overrides ══ */
html[data-theme="dark"] .pcc-mesh {
  background:
    radial-gradient(ellipse 55% 45% at 82% 12%, rgba(255, 145, 40, .08), transparent 60%),
    radial-gradient(ellipse 55% 50% at 12% 22%, rgba(32, 36, 44, .5), transparent 60%),
    radial-gradient(ellipse 60% 55% at 50% 100%, rgba(18, 21, 26, .5), transparent 65%),
    linear-gradient(180deg, #12151A 0%, #161A20 100%);
}
html[data-theme="dark"] .pcc-texture {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 44px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0, rgba(255, 255, 255, .5) 1px, transparent 1px, transparent 44px);
  opacity: .02;
}
html[data-theme="dark"] .pcc-nav {
  background: rgba(27, 31, 38, .7);
}
html[data-theme="dark"] .pcc-slide.is-center .pcc-card {
  border-color: rgba(255, 106, 31, .5);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .45), 0 0 46px rgba(255, 106, 31, .18);
}
