/* ============================================================
   Projek Terkini — "Midnight Gold Estate" (matches Perkhidmatan section)
   NOTE: All rules are scoped under .pj so nothing leaks to other pages.
   ============================================================ */
body.projek-page { background: #071427; }

.pj {
  --gold: #ffc736;
  --gold-soft: #ffe3a1;
  --navy: #071427;
  --navy-2: #0b2140;
  --glass: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
  position: relative;
  color: #e8eef7;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 90% 0%, rgba(255, 199, 54, .14), transparent 60%),
    radial-gradient(900px 600px at 0% 35%, rgba(54, 122, 214, .2), transparent 60%),
    linear-gradient(180deg, #071427 0%, #0b2140 50%, #071427 100%);
  overflow: hidden;
}
.pj::before { /* blueprint grid */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.pj > * { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.pj-hero { padding: 168px 0 70px; overflow: hidden; }
.pj-orb { position: absolute; z-index: 0; border-radius: 50%; filter: blur(80px); pointer-events: none; animation: pj-float 14s ease-in-out infinite alternate; }
.pj-orb--gold { width: 380px; height: 380px; right: 4%; top: 10%; background: rgba(255,199,54,.22); }
.pj-orb--blue { width: 440px; height: 440px; left: -6%; top: 40%; background: rgba(48,120,220,.28); animation-delay: -6s; }
@keyframes pj-float { to { transform: translate3d(30px, -40px, 0) scale(1.15); } }
.pj-hero__mark {
  position: absolute; z-index: 0; left: 50%; top: 96px; transform: translateX(-50%);
  font: 800 clamp(5rem, 18vw, 15rem)/1 "Plus Jakarta Sans", sans-serif; letter-spacing: -.04em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.06); pointer-events: none; user-select: none;
}
.pj-hero .container { position: relative; z-index: 1; text-align: center; max-width: 900px; }

.pj-crumb { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 26px; font-size: .8rem; color: #9fb2cb; }
.pj-crumb a { color: #c9d6e6; text-decoration: none; transition: color .2s; }
.pj-crumb a:hover { color: var(--gold); }
.pj-crumb i { font-size: .65rem; opacity: .6; }
.pj-crumb span { color: var(--gold); font-weight: 600; }

.pj-label {
  display: inline-flex; align-items: center; gap: .6rem; padding: 8px 18px;
  font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(255,199,54,.35); border-radius: 999px; background: rgba(255,199,54,.08); backdrop-filter: blur(8px);
}
.pj-label--sm { padding: 5px 14px; font-size: .66rem; letter-spacing: .2em; }
.pj-title {
  margin: 20px 0 16px; font: 700 clamp(2.8rem, 7vw, 5.4rem)/1.02 "Fraunces", Georgia, serif; letter-spacing: -.035em; color: #fff;
}
.pj-title em {
  font-style: italic; font-weight: 600;
  background: linear-gradient(100deg, var(--gold-soft), var(--gold) 50%, var(--gold-soft)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: pj-sheen 6s ease-in-out infinite alternate;
}
@keyframes pj-sheen { to { background-position: 100% 0; } }
.pj-lead { max-width: 680px; margin: 0 auto; font-size: 1.08rem; line-height: 1.7; color: #c9d6e6; }

.pj-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
.pj-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); font-size: .86rem; font-weight: 600; }
.pj-steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ffd35c, #ffb71f); color: #1a1204; font-size: .8rem; }

/* ---------- section heads ---------- */
.pj-section { padding: 36px 0 70px; }
.pj-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.pj-head h2 { margin: 12px 0 0; font: 700 clamp(1.8rem, 3.4vw, 2.6rem)/1.1 "Fraunces", Georgia, serif; letter-spacing: -.02em; color: #fff; }
.pj-head p { max-width: 420px; margin: 0; color: #aebfd4; font-size: .95rem; line-height: 1.6; }

/* ---------- cards ---------- */
.pj-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pj-card { position: relative; animation: pj-rise .8s var(--ease) both; animation-delay: calc(var(--i) * .1s + .1s); }
@keyframes pj-rise { from { opacity: 0; transform: translateY(36px) scale(.97); } to { opacity: 1; transform: none; } }
.pj-card__radio { position: absolute; opacity: 0; pointer-events: none; }
.pj-card__face {
  position: relative; display: flex; align-items: flex-end; height: 100%; min-height: 440px; cursor: pointer; overflow: hidden;
  border-radius: 28px; background-size: cover; background-position: center; isolation: isolate;
  box-shadow: 0 26px 60px -22px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .5s var(--ease), box-shadow .5s ease;
}
.pj-card__face::before { /* grade + fade */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,20,39,.25) 0%, rgba(7,20,39,.1) 28%, rgba(7,20,39,.82) 62%, #071427 100%), linear-gradient(120deg, rgba(255,199,54,.14), transparent 45%);
}
.pj-card__face::after { /* gold hairline when active */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--gold); opacity: 0; transition: opacity .35s ease;
}
.pj-card__face:hover { transform: translateY(-8px); box-shadow: 0 40px 80px -24px rgba(0,0,0,.8), 0 0 0 1px rgba(255,199,54,.5); }
.pj-card__radio:focus-visible + .pj-card__face { outline: 3px solid var(--gold); outline-offset: 4px; }
.pj-card__radio:checked + .pj-card__face { transform: translateY(-8px); box-shadow: 0 40px 90px -20px rgba(0,0,0,.85), 0 0 60px -12px rgba(255,199,54,.5); }
.pj-card__radio:checked + .pj-card__face::after { opacity: 1; }

.pj-card__no {
  position: absolute; top: 8px; right: 18px; font: 700 4rem/1 "Fraunces", Georgia, serif; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.5);
  transition: -webkit-text-stroke-color .35s ease;
}
.pj-card__face:hover .pj-card__no, .pj-card__radio:checked + .pj-card__face .pj-card__no { -webkit-text-stroke-color: var(--gold); }
.pj-card__tick {
  position: absolute; top: 20px; left: 20px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); color: #1a1204; font-size: 1.2rem; transform: scale(0) rotate(-90deg); transition: transform .45s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 8px 20px -4px rgba(255,183,31,.7);
}
.pj-card__radio:checked + .pj-card__face .pj-card__tick { transform: none; }

.pj-card__body { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 22px 22px 20px; }
.pj-card__type { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #1a1204; background: linear-gradient(100deg, #ffd35c, #ffb71f); }
.pj-card__name { font: 700 1.5rem/1.15 "Fraunces", Georgia, serif; color: #fff; letter-spacing: -.01em; }
.pj-card__desc { font-size: .84rem; line-height: 1.55; color: #cfdbea; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pj-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.pj-card__status { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; color: #cfe9d8; }
.pj-card__status i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: pj-ping 2s infinite; }
@keyframes pj-ping { 70% { box-shadow: 0 0 0 9px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.pj-card__cta { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--gold); }
.pj-card__cta i { transition: transform .35s var(--ease); }
.pj-card__face:hover .pj-card__cta i { transform: translateX(4px); }
.pj-cta-on { display: none; }
.pj-card__radio:checked + .pj-card__face .pj-cta-on { display: inline; }
.pj-card__radio:checked + .pj-card__face .pj-cta-off { display: none; }

/* ---------- form panel ---------- */
.pj-section--form { padding-top: 20px; padding-bottom: 110px; }
.pj-panel {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 560px; border-radius: 32px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  backdrop-filter: blur(16px); box-shadow: 0 40px 90px -30px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.18);
}

/* left side: chosen project */
.pj-chosen { position: relative; display: flex; align-items: flex-end; min-height: 420px; overflow: hidden; isolation: isolate; background: #0d2442; }
.pj-chosen__bg {
  position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: 0; transform: scale(1.12);
  transition: opacity .7s ease, transform 1.4s var(--ease);
}
.pj-chosen::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,20,39,.25), rgba(7,20,39,.9) 78%); }
.pj-chosen[data-state="filled"] .pj-chosen__bg { opacity: 1; transform: scale(1); }
.pj-chosen::after { /* viewfinder corners */
  content: ""; position: absolute; inset: 20px; pointer-events: none; border: 2px solid transparent;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 34px 2px no-repeat, linear-gradient(var(--gold), var(--gold)) top left / 2px 34px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 34px 2px no-repeat, linear-gradient(var(--gold), var(--gold)) bottom right / 2px 34px no-repeat;
  opacity: .8;
}
.pj-chosen__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px; text-align: center; color: #aebfd4; transition: opacity .4s ease; }
.pj-chosen__empty i { font-size: 2.6rem; color: var(--gold); animation: pj-nudge 2s ease-in-out infinite; }
.pj-chosen__empty strong { color: #fff; font: 700 1.4rem "Fraunces", Georgia, serif; }
@keyframes pj-nudge { 50% { transform: translateY(-8px); } }
.pj-chosen[data-state="filled"] .pj-chosen__empty { opacity: 0; pointer-events: none; }
.pj-chosen__info { position: relative; width: 100%; padding: 34px 32px; opacity: 0; transform: translateY(16px); transition: opacity .5s ease .1s, transform .6s var(--ease) .1s; }
.pj-chosen[data-state="filled"] .pj-chosen__info { opacity: 1; transform: none; }
.pj-chosen__tag { display: inline-block; margin-bottom: 12px; padding: 5px 13px; font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #1a1204; border-radius: 999px; background: linear-gradient(100deg, #ffd35c, #ffb71f); }
.pj-chosen__info h3 { margin: 0 0 14px; font: 700 clamp(1.8rem, 2.6vw, 2.4rem)/1.1 "Fraunces", Georgia, serif; color: #fff; }
.pj-chosen__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.pj-chosen__facts li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; font-size: .76rem; font-weight: 600; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(7,20,39,.5); }
.pj-chosen__facts li[hidden] { display: none; }
.pj-chosen__facts i { color: var(--gold); font-size: .8rem; }
.pj-chosen__info p { margin: 0 0 16px; font-size: .92rem; line-height: 1.6; color: #d4e0ee; }
.pj-change { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; font: 600 .8rem "Plus Jakarta Sans", sans-serif; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(255,255,255,.08); cursor: pointer; transition: background .25s, color .25s; }
.pj-change:hover { background: var(--gold); color: #1a1204; }

/* right side: form */
.pj-formwrap { position: relative; padding: 44px 46px; display: flex; align-items: center; }
.pj-form { width: 100%; display: grid; gap: 22px; }
.pj-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pj-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pj-field { position: relative; }
.pj-field input {
  width: 100%; height: 60px; padding: 24px 44px 8px 18px; font: 500 1rem "Plus Jakarta Sans", sans-serif; color: #fff;
  border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(7,20,39,.55); outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
}
.pj-field label { position: absolute; left: 18px; top: 19px; font-size: .95rem; color: #9fb2cb; pointer-events: none; transition: all .25s var(--ease); transform-origin: left; }
.pj-field input:focus + label, .pj-field input:not(:placeholder-shown) + label { top: 9px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.pj-field > i { position: absolute; right: 16px; top: 19px; color: #7f95b2; transition: color .25s; }
.pj-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255,199,54,.16); background: rgba(7,20,39,.8); }
.pj-field input:focus ~ i { color: var(--gold); }
.pj-field.is-bad input { border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255,107,107,.14); }
.pj-err { display: block; min-height: 0; margin-top: 6px; padding-left: 4px; font-size: .76rem; color: #ff9b9b; }
.pj-err:empty { display: none; }
.pj-err--form { padding: 10px 14px; border-radius: 12px; background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.35); }

.pj-interest { margin: 0; padding: 0; border: 0; min-width: 0; }
.pj-interest legend { float: none; width: auto; margin: 0 0 10px; padding: 0; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.pj-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pj-chips label { margin: 0; cursor: pointer; }
.pj-chips input { position: absolute; opacity: 0; pointer-events: none; }
.pj-chips span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: .86rem; font-weight: 600; color: #dbe6f3; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(7,20,39,.5); transition: all .25s var(--ease); }
.pj-chips span i { color: var(--gold); transition: color .25s; }
.pj-chips label:hover span { border-color: var(--gold); transform: translateY(-2px); }
.pj-chips input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }
.pj-chips input:checked + span { color: #1a1204; background: linear-gradient(100deg, #ffd35c, #ffb71f); border-color: transparent; box-shadow: 0 10px 22px -8px rgba(255,183,31,.65); }
.pj-chips input:checked + span i { color: #1a1204; }

.pj-consent { margin: 0; display: flex; gap: 8px; align-items: center; font-size: .76rem; color: #8fa4be; }
.pj-consent i { color: var(--gold); }

/* buttons */
.pj-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 28px; height: 58px; font: 700 .98rem "Plus Jakarta Sans", sans-serif; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer; position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s ease; }
.pj-btn--gold { color: #1a1204; background: linear-gradient(100deg, #ffd35c, #ffb71f); box-shadow: 0 16px 34px -12px rgba(255,183,31,.7); }
.pj-btn--gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.pj-btn--gold:hover::after { transform: translateX(120%); }
.pj-btn--gold:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -12px rgba(255,183,31,.85); }
.pj-btn--gold i { transition: transform .4s var(--ease); }
.pj-btn--gold:hover i { transform: translate(4px, -4px) rotate(10deg); }
.pj-btn--ghost { height: 48px; margin-top: 10px; color: #fff; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.pj-btn--ghost:hover { background: var(--gold); color: #1a1204; }
.pj-btn__spin { display: none; width: 20px; height: 20px; border: 3px solid rgba(26,18,4,.25); border-top-color: #1a1204; border-radius: 50%; animation: pj-spin .7s linear infinite; }
@keyframes pj-spin { to { transform: rotate(360deg); } }
.pj-btn.is-loading { pointer-events: none; opacity: .85; }
.pj-btn.is-loading .pj-btn__spin { display: inline-block; }
.pj-btn.is-loading i { display: none; }

/* success */
.pj-done { width: 100%; text-align: center; padding: 30px 10px; }
.pj-done[hidden] { display: none; }
.pj-done h3 { margin: 18px 0 10px; font: 700 2.1rem "Fraunces", Georgia, serif; color: #fff; }
.pj-done p { max-width: 420px; margin: 0 auto 18px; color: #c9d6e6; line-height: 1.65; }
.pj-done strong { color: var(--gold); }
.pj-done__tick { width: 96px; height: 96px; }
.pj-done__tick circle { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 160; stroke-dashoffset: 160; animation: pj-draw .8s var(--ease) forwards; }
.pj-done__tick path { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: pj-draw .5s var(--ease) .6s forwards; }
@keyframes pj-draw { to { stroke-dashoffset: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1199px) { .pj-grid { grid-template-columns: repeat(2, 1fr); } .pj-card__face { min-height: 400px; } }
@media (max-width: 991px) {
  .pj-panel { grid-template-columns: 1fr; }
  .pj-chosen { min-height: 360px; }
  .pj-formwrap { padding: 34px 28px; }
}
@media (max-width: 767px) {
  .pj-hero { padding: 130px 0 44px; }
  .pj-grid { grid-template-columns: 1fr; }
  .pj-card__face { min-height: 380px; }
  .pj-row { grid-template-columns: 1fr; }
  .pj-formwrap { padding: 28px 18px; }
  .pj-head { margin-bottom: 24px; }
  .pj-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pj *, .pj *::before, .pj *::after { animation: none !important; transition: none !important; }
}

/* ---------- fixes ---------- */
.pj .pj-section { background: transparent !important; }
.pj-crumb { display: flex; justify-content: center; }
.pj-hero .pj-label { margin-top: 0; }
.projek-page .tm-skip-link { position: absolute; left: 12px; top: -60px; z-index: 3000; padding: 10px 16px; border-radius: 10px; background: #ffc736; color: #1a1204; font-weight: 700; text-decoration: none; transition: top .2s; }
.projek-page .tm-skip-link:focus { top: 12px; }
.pj-hint { display: block; margin-top: 6px; padding-left: 4px; font-size: .74rem; color: #8fa4be; }
/* NOTE: italic overhang was clipped by background-clip:text — give the gradient box room */
.pj-title em { display: inline-block; padding: 0 .14em .08em .04em; margin-right: -.1em; }
