/* ==========================================================================
   kapm.uk home (v6): finance-first layout for Dragon Finance.
   Builds on styles.css tokens; only the new sections are styled here.
   ========================================================================== */

/* ---------- Hero: text left, product screen right ---------- */
.hx { min-height: auto; padding: clamp(2.4rem, 5vw, 4.2rem) 0 clamp(3rem, 6vw, 5rem); }
.hx-scrim {
  background: radial-gradient(ellipse 80% 90% at 30% 45%, rgba(5, 6, 10, 0.95) 0%, rgba(5, 6, 10, 0.82) 45%, rgba(5, 6, 10, 0.5) 80%, rgba(5, 6, 10, 0.3) 100%);
}
.hx-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 3.6rem);
  align-items: center;
}
.hx-text { text-align: left; }
.hx-text h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
}
.hx-lead { color: var(--muted); font-size: clamp(1.02rem, 1.3vw, 1.16rem); line-height: 1.65; margin: 0 0 1.8rem; max-width: 560px; }
.hx-actions { justify-content: flex-start !important; margin-bottom: 1rem; }
.hx-note { color: var(--muted-soft); font-size: 0.86rem; margin: 0; }

/* ---------- Product screenshots ---------- */
.shot { margin: 0; position: relative; }
.shot-frame {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(124, 201, 255, 0.16);
  background: #0b0f1a;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: #0e1322;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted-soft);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #262c40; display: inline-block; }
.shot-bar span { margin-left: 8px; letter-spacing: 0.04em; }
.shot-tag {
  margin-top: 0.7rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-soft);
}
.hx-shot .shot-frame { transform: perspective(1600px) rotateY(-5deg) rotateX(2deg); transform-origin: left center; }
.hx-shot::before {
  content: ""; position: absolute; inset: -10% -6% -10% 10%; z-index: -1;
  background: radial-gradient(closest-side, rgba(46, 168, 255, 0.22), transparent 70%);
  filter: blur(20px);
}
.shot-wide { max-width: 1040px; margin: 0 auto; }

/* ---------- Problem ---------- */
.px-problem { padding-top: clamp(2.6rem, 5vw, 4rem); }
.px-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.px-pain {
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 106, 46, 0.06), rgba(255, 106, 46, 0.01));
  border: 1px solid rgba(255, 106, 46, 0.16);
}
.px-pain p { margin: 0.9rem 0 0; font-size: 1.06rem; line-height: 1.5; color: var(--text); }
.px-pain-ico {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--accent-soft); background: rgba(255, 106, 46, 0.1);
}
.px-pain-ico svg { width: 21px; height: 21px; }

/* ---------- What you get: alternating rows ---------- */
.px-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.8rem, 4vw, 3.4rem);
  align-items: center;
  margin: 0 0 clamp(3rem, 6vw, 4.6rem);
}
.px-feature:last-child { margin-bottom: 0; }
.px-feature.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.px-feature.flip .px-feature-text { order: 2; }
.px-feature.flip .shot { order: 1; }
.px-num { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.18em; color: var(--accent-blue-soft); }
.px-feature h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; margin: 0.6rem 0 0.9rem; }
.px-feature p { color: var(--muted); line-height: 1.7; margin: 0; font-size: 1.02rem; }

/* ---------- How a month works ---------- */
.px-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; position: relative; }
.px-steps::before {
  content: ""; position: absolute; top: 30px; left: 16%; right: 16%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 201, 255, 0.35), transparent);
}
.px-step { position: relative; text-align: center; padding: 0 1rem; }
.px-step-n {
  display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--text);
  background: radial-gradient(circle at 35% 30%, #1d2a48, #0d1222);
  border: 1px solid rgba(124, 201, 255, 0.3);
  box-shadow: 0 0 30px rgba(46, 168, 255, 0.15);
  position: relative; z-index: 1;
}
.px-step h3 { margin: 1rem 0 0.5rem; font-size: 1.25rem; }
.px-step p { color: var(--muted); margin: 0 auto; max-width: 300px; line-height: 1.6; }

/* ---------- Comparison ---------- */
.px-compare { max-width: 860px; margin: 0 auto; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.px-compare-head, .px-compare-row { display: grid; grid-template-columns: 1fr 1fr; }
.px-compare-head span { padding: 1rem 1.4rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-soft); background: var(--bg-alt); }
.px-compare-row span { padding: 1.15rem 1.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 1.02rem; }
.px-compare .us { color: var(--text); background: rgba(46, 168, 255, 0.05); border-left: 1px solid rgba(124, 201, 255, 0.2); }
.px-compare-head .us { color: var(--accent-blue-soft); }
.px-compare-row .us { font-weight: 600; }

/* ---------- Pilot ---------- */
.px-pilot {
  max-width: 980px; margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 106, 46, 0.09), rgba(46, 168, 255, 0.05) 60%, rgba(17, 20, 31, 0.9));
  border: 1px solid rgba(255, 154, 75, 0.22);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.px-pilot h2 { margin: 0 0 0.9rem; }
.px-pilot .section-lead { max-width: 640px; margin: 0 auto; }
.px-pilot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; text-align: left; }
.px-pilot-col { padding: 1.3rem 1.4rem; border-radius: var(--radius-md); background: rgba(5, 6, 10, 0.45); border: 1px solid var(--border-soft); }
.px-pilot-col h3 { margin: 0 0 0.45rem; font-size: 1.05rem; color: var(--accent-soft); }
.px-pilot-col p { margin: 0; color: var(--muted); line-height: 1.6; }

/* ---------- Contact ---------- */
.px-contact {
  max-width: 980px; margin: 0 auto;
  display: flex; gap: 2rem; align-items: center; justify-content: space-between;
  padding: 1.8rem 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--card);
}
.px-contact h2 { font-size: 1.5rem; margin: 0 0 0.4rem; }
.px-contact p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 600px; }

/* ---------- Chinese: use the CJK face for headings ---------- */
html[lang="zh-Hans"] .hx-text h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3 { font-family: "Noto Sans SC", var(--font-display); letter-spacing: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hx-inner { grid-template-columns: minmax(0, 1fr); }
  .hx-text { text-align: center; }
  .hx-lead { margin-left: auto; margin-right: auto; }
  .hx-actions { justify-content: center !important; }
  .hx-shot .shot-frame { transform: none; }
  .px-feature, .px-feature.flip { grid-template-columns: minmax(0, 1fr); }
  .px-feature.flip .px-feature-text { order: 0; }
  .px-feature.flip .shot { order: 1; }
}
@media (max-width: 760px) {
  .px-grid3, .px-steps, .px-pilot-cols { grid-template-columns: minmax(0, 1fr); }
  .px-steps::before { display: none; }
  .px-step { text-align: left; padding: 0; display: grid; grid-template-columns: 60px 1fr; column-gap: 1rem; }
  .px-step-n { grid-row: span 2; }
  .px-step h3 { margin: 0.4rem 0 0.2rem; }
  .px-step p { margin: 0; }
  .px-contact { flex-direction: column; align-items: flex-start; }
  .px-compare-row span, .px-compare-head span { padding: 0.9rem 1rem; font-size: 0.95rem; }
}
