/* ============================================================
   TCOMM — partners.css
   Rakan / Partners page. Sections namespaced (.rk-*) so each maps
   to a WordPress template-part. Tokens + atoms come from base.css;
   the CTA (.s9) + footer (.ft) are reused from sections.css.

   The partner card (.rk-card) is the repeatable unit — it renders
   cleanly WITH a logo (deployment partners) or WITHOUT one
   (registered consultants → monogram fallback). One pattern, two
   groups, any count.
   ============================================================ */

.rk-page { background: var(--bg); }

/* nav over the dark hero: white logo while not collapsed ------ */
.rk-page .site-nav:not(.scrolled) .brand-logo {
  filter: brightness(0) invert(1) drop-shadow(0 1px 5px rgba(0,0,0,0.45));
}
/* collapsed nav sits over LIGHT sections here → keep logo + burger dark */
.rk-page .site-nav.scrolled .brand-logo {
  filter: drop-shadow(0 2px 8px rgba(20,40,30,0.16));
}
.rk-page .site-nav.scrolled .nav-burger .bars i { background: var(--ink-dark); filter: none; }
.nav-links a.is-active { color: #fff; }
.site-nav.scrolled .nav-links a.is-active { color: var(--green-deep); }
.drawer-links a.is-active { color: var(--green-deep); }

/* ============================================================
   HERO — dark scene, orbiting-ecosystem motif
   ============================================================ */
.rk-hero {
  position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(132% 120% at 74% 38%, var(--scene-2) 0%, var(--scene-1) 56%, var(--scene-0) 100%);
}
.rk-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* central hub + orbit rings on the right — "a coordinated network" */
.rk-orbits {
  position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
  width: min(70vw, 760px); aspect-ratio: 1;
}
.rk-orbits .ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(86,224,138,0.16);
}
.rk-orbits .ring.r1 { width: 34%; height: 34%; }
.rk-orbits .ring.r2 { width: 60%; height: 60%; border-style: dashed; border-color: rgba(86,224,138,0.13); }
.rk-orbits .ring.r3 { width: 88%; height: 88%; border-color: rgba(86,224,138,0.09); }
.rk-orbits .hub {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-bright) 0%, var(--green) 58%, transparent 78%);
  box-shadow: 0 0 26px 7px rgba(86,224,138,0.5);
}
.rk-orbits .hub::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #eafff1; }
/* nodes orbit on each ring (rotation carries the dot around) */
.rk-orbits .orbit { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transform-origin: center; }
.rk-orbits .orbit.o1 { width: 34%; height: 34%; }
.rk-orbits .orbit.o2 { width: 60%; height: 60%; }
.rk-orbits .orbit.o3 { width: 88%; height: 88%; }
.rk-orbits .node {
  position: absolute; top: 50%; left: 100%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--green-bright); box-shadow: 0 0 12px 2px rgba(86,224,138,0.55);
}
.rk-orbits .orbit.o2 .node:nth-child(2) { left: 12%; top: 8%; }
.rk-orbits .orbit.o3 .node:nth-child(2) { left: 6%; top: 64%; opacity: .8; }
.rk-orbits .orbit.o3 .node:nth-child(3) { left: 78%; top: 4%; opacity: .7; }
@media (prefers-reduced-motion: no-preference) {
  .rk-orbits .orbit.o1 { animation: rk-spin 42s linear infinite; }
  .rk-orbits .orbit.o2 { animation: rk-spin 78s linear infinite reverse; }
  .rk-orbits .orbit.o3 { animation: rk-spin 120s linear infinite; }
}
@keyframes rk-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.rk-hero-grade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(20,26,24,0.84) 0%, rgba(20,26,24,0.48) 36%, rgba(22,28,25,0.06) 64%, transparent 80%),
    linear-gradient(to top, rgba(20,26,24,0.62) 0%, transparent 40%);
}
.rk-hero-inner {
  position: relative; z-index: 2; width: 100%;
  padding-top: clamp(132px, 20vh, 200px); padding-bottom: clamp(72px, 11vh, 120px);
}
.rk-breadcrumb {
  display: flex; align-items: center; gap: 9px; margin-bottom: 22px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--grey-dim);
}
.rk-breadcrumb a { color: var(--grey); text-decoration: none; transition: color .2s; }
.rk-breadcrumb a:hover { color: var(--green); }
.rk-breadcrumb .sep { opacity: 0.6; }
.rk-breadcrumb .here { color: var(--green); }
.rk-hero .eyebrow { margin-bottom: 22px; }
.rk-hero h1 { font-size: clamp(38px, 6vw, 84px); line-height: 1.02; color: var(--ink); max-width: 15ch; }
.rk-hero h1 .accent { color: var(--green); }
.rk-hero .subhead { margin-top: 22px; max-width: 54ch; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.62; color: var(--grey); }

/* ecosystem stat row */
.rk-stats { margin-top: clamp(36px, 6vh, 56px); display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px); }
.rk-stat { display: flex; flex-direction: column; gap: 7px; }
.rk-stat .val {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 5vw, 60px); line-height: 0.92;
  letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.rk-stat .val .sfx { color: var(--green); }
.rk-stat .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); }

/* ============================================================
   Shared section scaffolding
   ============================================================ */
.rk-sec { padding: var(--section-y) 0; }
.rk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.rk-head .ht { max-width: 46ch; }
.rk-head h2 { font-size: clamp(28px, 3.6vw, 50px); line-height: 1.04; color: var(--ink-dark); margin-top: 14px; }
.rk-head .sub { margin-top: 16px; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.7; color: var(--grey-dark); max-width: 52ch; }
.rk-count {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green-deep);
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding-bottom: 4px;
}
.rk-count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-deep); box-shadow: 0 0 8px rgba(31,138,82,0.5); }

/* ============================================================
   THE PARTNER CARD — repeatable unit (logo OR monogram)
   ============================================================ */
.rk-grid { margin-top: clamp(36px, 6vh, 56px); display: grid; gap: 18px; }
.rk-grid--4 { grid-template-columns: repeat(4, 1fr); }
.rk-grid--3 { grid-template-columns: repeat(3, 1fr); }

.rk-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--hair-dark); border-radius: 16px; background: var(--surface-3);
  box-shadow: 0 30px 72px -52px rgba(30,60,45,0.28);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, opacity .3s;
}
.rk-card:hover { transform: translateY(-4px); border-color: rgba(31,138,82,0.30); box-shadow: 0 42px 88px -48px rgba(30,60,45,0.34); }

/* identity zone — logo on a clean tile, or a monogram */
.rk-card-top {
  height: 122px; flex: 0 0 auto; display: grid; place-items: center; padding: 24px 26px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  border-bottom: 1px solid var(--hair-dark);
}
.rk-logo { max-width: 100%; max-height: 64px; width: auto; object-fit: contain; }
.rk-mono {
  width: 60px; height: 60px; display: grid; place-items: center; border-radius: 15px;
  font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em;
  color: var(--green-deep); background: rgba(31,138,82,0.07); border: 1px solid rgba(31,138,82,0.20);
}

.rk-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 11px; flex: 1 1 auto; }
.rk-type { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green-deep); display: inline-flex; align-items: center; gap: 8px; }
.rk-type::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green-deep); }
.rk-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.18; letter-spacing: -0.01em; color: var(--ink-dark); }
.rk-addr {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hair-dark);
  font-size: 13.5px; line-height: 1.55; color: var(--grey-dark); position: relative; padding-left: 18px;
}
.rk-addr::before { content: ""; position: absolute; left: 0; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: rgba(31,138,82,0.55); }

/* no-result message for the consultant filter */
.rk-empty {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-dark);
  display: none;
}
.rk-grid.is-empty .rk-empty { display: block; }

/* ============================================================
   SECTION — Rakan Pelaksana (Deployment Partners) · white
   ============================================================ */
.rk-deploy { background: var(--surface-3); }

/* ============================================================
   SECTION — Perunding Berdaftar (Registered Consultants) · grey-green
   ============================================================ */
.rk-cons { background: var(--bg-light-2); border-top: 1px solid var(--hair-dark); }
.rk-cons .rk-card-top { background: linear-gradient(180deg, #ffffff 0%, #f6faf7 100%); }

/* toolbar: live search filter */
.rk-tools { margin-top: clamp(28px, 4vh, 40px); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.rk-search { position: relative; flex: 1 1 320px; max-width: 420px; }
.rk-search input {
  width: 100%; appearance: none; font-family: var(--font-body); font-size: 14.5px; color: var(--ink-dark);
  padding: 14px 18px 14px 44px; border-radius: 999px; border: 1px solid var(--hair-dark);
  background: var(--surface-3); transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.rk-search input::placeholder { color: var(--grey-dark); }
.rk-search input:focus { outline: none; border-color: rgba(31,138,82,0.5); box-shadow: 0 0 0 4px rgba(31,138,82,0.10); }
.rk-search .ic {
  position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px;
  border: 1.8px solid var(--grey-dark); border-radius: 50%; pointer-events: none;
}
.rk-search .ic::after { content: ""; position: absolute; right: -5px; bottom: -4px; width: 7px; height: 1.8px; background: var(--grey-dark); transform: rotate(45deg); border-radius: 2px; }
.rk-showing { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-dark); white-space: nowrap; }
.rk-showing b { color: var(--green-deep); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .rk-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .rk-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .rk-hero h1 { font-size: clamp(34px, 9vw, 52px); }
  .rk-orbits { right: -28%; opacity: 0.6; }
  .rk-grid--4, .rk-grid--3 { grid-template-columns: 1fr; }
  .rk-tools { flex-direction: column; align-items: stretch; }
  .rk-search { max-width: none; }
  .rk-showing { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .rk-orbits .orbit { animation: none !important; }
}
