/* Unified card layer — mirrors the homepage service card (.hm-card) surface, motion and numbering.
   Loaded last on every page so it can normalise the page-specific card systems. */

:root{
  --card-radius:20px;
  --card-line:#e4edfb;
  --card-line-hover:#bcd0ff;
  --card-surface:linear-gradient(155deg,#ffffff,#f6faff);
  --card-shadow:0 18px 40px -32px #35507f4d;
  --card-shadow-hover:0 28px 56px -30px #35507f5c;
  --card-ease:cubic-bezier(.22,1,.36,1);
  --card-badge:linear-gradient(135deg,#2868f6,#6c63f7);
  --card-badge-shadow:0 10px 20px -12px #2563eb99;
}

/* ---------- 1. card surface ---------- */
:is(.pd-card,.ab-value,.ab-team-point,.ab-contact-card,
    .pf-trio-card,.pf-scenes article,.dt-case,.dt-cap article,
    .pp-rows article,.pp-lifecycle article,.pp-integration>div,.pp-engagement article,
    .pp-career-flow article,.pp-simple-list li,.pp-product-pair article,.pp-overview-path a,
    .ip-flow>div,.ip-agent-grid article,.ip-two-col article,.ip-service-path article,
    .ip-training>div,.ip-ad-actions article,.ip-industry-entry,.ip-risk>div,.ip-policy,
    .ip-education-roles article){
  border-radius:var(--card-radius);
  border:1px solid var(--card-line);
  background:var(--card-surface);
  box-shadow:var(--card-shadow);
  transition:transform .3s var(--card-ease),box-shadow .3s var(--card-ease),
    border-color .3s var(--card-ease),background .3s var(--card-ease);
}

/* the tinted sections keep a white card, matching the homepage contrast */
:is(.pp-tint,.ip-tinted) :is(.pp-lifecycle article,.ip-flow>div),.pp-integration>div{
  background:linear-gradient(155deg,#ffffff,#f7faff)
}

/* ---------- 2. hover: lift + soft shadow + accent border ---------- */
@media(hover:hover){
  :is(.pd-card,.ab-value,.ab-team-point,.ab-contact-card,
      .pf-trio-card,.pf-scenes article,.dt-case,.dt-cap article,
      .pp-rows article,.pp-lifecycle article,.pp-integration>div,.pp-engagement article,
      .pp-career-flow article,.pp-simple-list li,.pp-product-pair article,.pp-overview-path a,
      .ip-flow>div,.ip-agent-grid article,.ip-two-col article,.ip-service-path article,
      .ip-training>div,.ip-ad-actions article,.ip-industry-entry,.ip-risk>div,.ip-policy,
      .ip-education-roles article):hover{
    transform:translateY(-4px);
    border-color:var(--card-line-hover);
    background:linear-gradient(155deg,#ffffff,#f2f8ff);
    box-shadow:var(--card-shadow-hover);
  }
}

/* ---------- 3. index badges: one gradient tile ---------- */
:is(.pd-num,.pp-index,.pp-step,
    .pp-lifecycle article>span,.pp-career-flow article>span,
    .ip-flow>div>span,.ip-agent-grid article>span,.ip-service-path article>span){
  display:grid;place-items:center;
  width:40px;height:40px;min-width:40px;
  border-radius:12px;
  background:var(--card-badge);
  color:#fff!important;
  font-size:14px;font-weight:500;line-height:1;
  letter-spacing:0;
  border:0;
  box-shadow:var(--card-badge-shadow);
  -webkit-text-fill-color:#fff;
}
/* about page currently renders the number as plain grey text */
.pd-card .pd-num{margin-bottom:14px}

/* products overview list uses a CSS counter — render it as the same tile */
.pp-simple-list li{color:#1b2c46;font-size:17px;font-weight:500;line-height:1.65}
.pp-simple-list li::before{
  display:grid;place-items:center;
  width:40px;height:40px;border-radius:12px;
  background:var(--card-badge);color:#fff;
  font-size:14px;font-weight:500;line-height:1;
  margin:0 0 14px;
  box-shadow:var(--card-badge-shadow);
  content:'0' counter(service);
}

/* industry entry keeps "01 / 金融" as a readable pill instead of a square tile */
.ip-entry-num{
  display:inline-flex;align-items:center;gap:6px;align-self:flex-start;
  width:auto;height:auto;min-width:0;
  padding:6px 12px;border-radius:999px;
  background:#eaf2ff;border:1px solid #dbe8ff;
  color:#2b62d6;font-size:12.5px;font-weight:500;line-height:1.4;
  box-shadow:none;
}

/* ---------- 4. evidence bands ---------- */
:is(.pp-facts,.pf-stats){
  border-radius:var(--card-radius);
  border:1px solid var(--card-line);
  background:linear-gradient(155deg,#f8fbff,#f1f7ff);
  box-shadow:var(--card-shadow);
}
.pp-facts b{color:#2463eb}
:is(.pp-results,.ip-metrics){border-radius:var(--card-radius)}

/* ---------- 5. hover affordance for link cards ---------- */
@media(hover:hover){
  :is(.pd-card,.pf-trio-card,.pp-simple-list li,.pp-product-pair article,.ip-two-col article,.ip-training>div)
    :is(h3,b){transition:color .3s var(--card-ease)}
}

/* ---------- 6. touch devices skip lift ---------- */
@media(hover:none){
  :is(.pd-card,.pf-trio-card,.pp-rows article,.ip-industry-entry){transform:none!important}
}
@media(prefers-reduced-motion:reduce){
  :is(.pd-card,.ab-value,.ab-team-point,.ab-contact-card,.pf-trio-card,.pf-scenes article,
      .dt-case,.dt-cap article,.pp-rows article,.pp-lifecycle article,.pp-integration>div,
      .pp-engagement article,.pp-career-flow article,.pp-simple-list li,.pp-product-pair article,
      .pp-overview-path a,.ip-flow>div,.ip-agent-grid article,.ip-two-col article,
      .ip-service-path article,.ip-training>div,.ip-ad-actions article,.ip-industry-entry,
      .ip-risk>div,.ip-policy,.ip-education-roles article){transition:none}
}

/* ---------- unified CTA component: left icon + label + right arrow ---------- */
:is(.pp-button,.hw-cta,.hw-ghost,.hm-cta,.hi-btn,.header-contact,.footer-cta,.button-primary){
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
}
:is(.pp-button,.hw-cta,.hw-ghost,.hm-cta,.hi-btn,.header-contact,.footer-cta,.button-primary) :is(.cta-ico,.cta-arrow){
  width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;
}
:is(.pp-button,.hw-cta,.hw-ghost,.hm-cta,.hi-btn,.header-contact,.footer-cta,.button-primary) .cta-arrow{
  transition:transform .24s ease;
}
:is(.pp-button,.hw-cta,.hw-ghost,.hm-cta,.hi-btn,.header-contact,.footer-cta,.button-primary):hover .cta-arrow{
  transform:translateX(3px);
}
:is(.pp-button,.hw-cta,.hw-ghost,.hm-cta,.hi-btn,.header-contact,.footer-cta,.button-primary):hover .cta-arrow.cta-down{
  transform:translateY(3px);
}
/* compact placements */
.header-contact,.hi-btn,.footer-cta{gap:7px}
:is(.header-contact,.hi-btn,.footer-cta) :is(.cta-ico,.cta-arrow){width:13px;height:13px}
@media(prefers-reduced-motion:reduce){
  :is(.pp-button,.hw-cta,.hw-ghost,.hm-cta,.hi-btn,.header-contact,.footer-cta,.button-primary):hover .cta-arrow{transform:none}
}
