/* =========================================================
   Serahin — Pengajuan Seller page
   Loaded after style.css (tokens, header, footer, buttons).
   ========================================================= */

/* ---------- 1. Hero ---------- */
.ps-hero { padding: 8px var(--edge) 0; }
.ps-hero__card {
  position: relative; overflow: hidden;
  max-width: var(--max); margin: 0 auto;
  min-height: min(780px, calc(100vh - var(--header-h) - 20px));
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(56px, 10vh, 140px) clamp(16px, 3vw, 20px) clamp(16px, 2vw, 20px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(55% 40% at 50% 104%, rgba(255, 226, 110, .85), transparent 70%),
    linear-gradient(180deg, #f1f5f2 0%, #dcefe1 55%, #cdeedb 100%);
}
.ps-hero__content { text-align: center; max-width: 900px; margin: 0 auto; }
.ps-hero__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.2rem, 1.2rem + 4vw, 4.25rem); line-height: 1.05; letter-spacing: -.015em;
  color: #333;
}
.ps-hero__lead { margin: 22px auto 0; max-width: 70ch; font-size: clamp(.95rem, .9rem + .2vw, 1.05rem); color: var(--ink-2); }
.ps-hero__btns { justify-content: center; margin-top: 32px; }
.ps-hero__perks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px;
  margin-top: 48px; padding: 18px 24px;
  border-radius: 999px; background: #fff;
  font-size: .95rem; color: var(--green);
}
.ps-hero__perks li { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- 2. Locked-scroll sections (shared) ---------- */
/* Without pinning (phones, reduced motion): items reveal as you scroll.
   With pinning (JS adds .is-pinned): section stays put, items appear 1 by 1. */
.ps-pin { position: relative; }
.ps-pin__sticky { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 130px) var(--gutter) 0; }
.js .ps-pin [data-pin-item] { opacity: 0; transform: translateY(26px); filter: blur(4px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out), filter .7s var(--ease-out); }
.js .ps-pin [data-pin-item].is-shown { opacity: 1; transform: none; filter: none; }

.ps-pin.is-pinned { height: calc(100vh + var(--steps, 4) * 34vh); }
.ps-pin.is-pinned .ps-pin__sticky {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
  padding-top: 0; padding-bottom: 0;
}
.ps-pin.is-pinned .ps-pin__sticky > * { width: 100%; }

/* ---------- 3. Ketentuan + Tanggung jawab ---------- */
.ps-rules__inner { display: grid; gap: 28px; }
.ps-rules__title { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); }
.ps-list { display: grid; gap: 12px; }
.ps-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 20px; border-radius: 12px; background: #f2f3f2;
  font-size: .95rem; color: var(--green); line-height: 1.45;
}
.ps-item__tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: -1px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; }
@media (min-width: 900px) {
  .ps-rules__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6vw; align-items: start; }
  .ps-pin.is-pinned .ps-rules__inner { align-items: center; }
}

/* ---------- 4. Privasi ---------- */
.ps-privacy { padding-top: clamp(72px, 10vw, 140px); }
.ps-privacy .h2 { margin-bottom: clamp(28px, 4vw, 56px); }
.ps-privacy__grid { display: grid; gap: 20px; }
.ps-note { padding: clamp(24px, 3vw, 36px); border-radius: 20px; background: var(--mist); }
.ps-note__title { display: flex; align-items: center; gap: 16px; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -.01em; }
.ps-note__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--green); color: #fff; font-size: 22px; }
.ps-note__text { margin-top: 18px; font-size: .95rem; color: var(--ink-2); line-height: 1.6; }
.ps-note__text a { color: var(--green); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 760px) { .ps-privacy__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 5. Alur ---------- */
.ps-flow__inner .h2 { margin-bottom: clamp(32px, 5vw, 60px); }
.ps-steps { display: grid; gap: 20px; counter-reset: none; }
.ps-step {
  position: relative; display: flex; flex-direction: column;
  min-height: 0; padding: 18px; border-radius: 20px; background: var(--mist);
}
.ps-step__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 12px; background: var(--green); color: #fff; font-size: 26px; }
.ps-step__num { margin-top: 28px; font-family: var(--font-head); font-weight: 600; font-size: 1.9rem; color: var(--green); line-height: 1; }
.ps-step__text { margin-top: 10px; font-size: .95rem; color: var(--ink-2); line-height: 1.55; }
.ps-step__text a { font-weight: 700; color: var(--green); }
.ps-step__link { position: absolute; border-color: var(--green); border-style: dashed; border-width: 0; transition: transform .6s var(--ease-out) .35s; }

/* Phone / tablet: vertical connectors */
.ps-step__link { left: 46px; top: 100%; height: 20px; border-left-width: 3px; transform-origin: top; transform: scaleY(0); }
.ps-step.is-shown .ps-step__link { transform: scaleY(1); }

.ps-step__icon img { width: 26px; height: 26px; }

@media (min-width: 640px) and (max-width: 1023px) {
  .ps-steps { grid-template-columns: 1fr 1fr; }
  .ps-step__link { display: none; }
}
@media (min-width: 1024px) {
  .ps-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
  .ps-step { min-height: 274px; }
  .ps-step__num { margin-top: auto; padding-top: 28px; }
  /* horizontal dashed connectors between cards */
  .ps-step__link { left: 100%; top: 50%; width: 36px; height: 0; border-left-width: 0; border-top-width: 3px; transform-origin: left; transform: scaleX(0); }
  .ps-step.is-shown .ps-step__link { transform: scaleX(1); }
}

/* ---------- 6. Form ---------- */
.ps-form { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--gutter) 0; }
.ps-form__inner { display: grid; gap: 28px; }
.ps-form__intro .lead { margin-top: 18px; }

/* Checklist card */
.ps-check {
  margin: 0; min-width: 0;
  padding: 20px; border-radius: 18px;
  background: #fffaea; border: 1px solid #f1e3b0;
  display: grid; gap: 12px;
  transition: opacity .3s;
}
.ps-check__lock { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: #8a6d00; }
.ps-check__lock .icon { font-size: 16px; }
.ps-check:not([disabled]) .ps-check__lock { display: none; }
.ps-check__item { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.ps-check[disabled] .ps-check__item { cursor: not-allowed; opacity: .55; }
.ps-check__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps-check__box {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px;
  border: 1.5px solid var(--green); background: var(--mint); color: transparent; font-size: 14px;
  transition: background-color .25s, color .25s, transform .3s var(--ease-spring);
}
.ps-check__item input:checked + .ps-check__box { background: var(--green); color: #fff; transform: scale(1.06); }
.ps-check__item input:focus-visible + .ps-check__box { outline: 3px solid var(--green); outline-offset: 2px; }
.ps-check__progress { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.ps-check__count { flex: none; font-size: .88rem; font-style: italic; color: var(--ink-3); }
.ps-check__count span { font-style: normal; font-weight: 800; color: var(--green); }
.ps-check__bar { flex: 1; height: 8px; border-radius: 999px; background: #eee6c7; overflow: hidden; }
.ps-check__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width .5s var(--ease-out); }
.ps-check.is-flash { animation: shake .4s; border-color: var(--red); }

/* Fields */
.ps-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 20px; }
.pf { display: flex; flex-direction: column; min-width: 0; }
.pf__label { margin-bottom: 8px; font-size: .95rem; font-weight: 500; color: var(--ink); }
.pf__req { color: var(--red); }
.pf__opt { color: var(--ink-2); }
.pf__input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid #d3d9d4; border-radius: 12px; background: #fff;
  font: inherit; font-size: .95rem; color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.pf__input::placeholder { color: #a9afaa; }
.pf__input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(43, 98, 51, .1); }
.pf__textarea { height: auto; min-height: 92px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.pf__phone { display: flex; align-items: center; border: 1.5px solid #d3d9d4; border-radius: 12px; background: #fff; transition: border-color .25s, box-shadow .25s; }
.pf__phone:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(43, 98, 51, .1); }
.pf__code {
  flex: none; height: 48px; padding: 0 28px 0 14px; border: 0; border-right: 1px solid var(--line);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23444a45'/%3E%3C/svg%3E") no-repeat right 10px center / 9px;
  font: inherit; font-size: .95rem; color: var(--ink); appearance: none; cursor: pointer; border-radius: 12px 0 0 12px;
}
.pf__code:focus { outline: none; }
.pf__input--phone { height: 48px; border: 0; box-shadow: none !important; }
.pf__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.pf__help, .pf__note { font-size: .82rem; font-style: italic; color: var(--ink-2); }
.pf__note { margin-top: 8px; }
.pf__count { font-size: .8rem; color: var(--ink-3); }
.pf__error { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .84rem; color: var(--red); }
.pf.is-invalid .pf__input, .pf.is-invalid .pf__phone, .pf.is-invalid .pf-drop { border-color: var(--red); box-shadow: 0 0 0 4px rgba(232, 71, 74, .08); }
.pf.is-valid .pf__input:not(:focus), .pf.is-valid .pf__phone:not(:focus-within) { border-color: #a9cfa6; }

/* Upload: drop zone */
.pf-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px; border-radius: 12px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--green); background: var(--mist);
  transition: background-color .25s, border-color .25s, transform .25s var(--ease-out);
}
.pf-drop:hover, .pf-drop.is-over { background: var(--mint); }
.pf-drop.is-over { transform: scale(1.01); border-style: solid; }
.pf-drop:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }
.pf-drop__btn { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 14px; border-radius: 8px; background: #d3e8d1; font-weight: 700; font-size: .95rem; color: var(--green); }
.pf-drop__btn .icon { font-size: 20px; }
.pf-drop__title { font-weight: 700; color: var(--green); font-size: .95rem; }
.pf-drop__text { font-size: .92rem; color: var(--ink-2); }
.pf-drop__hint { margin-top: 10px; font-size: .8rem; font-style: italic; color: var(--ink-2); }

/* Upload: file card after upload */
.pf-file {
  display: flex; align-items: center; gap: 16px;
  padding: 14px; border-radius: 12px; border: 1.5px solid #a9cfa6; background: #fff;
  animation: drop .35s var(--ease-out);
}
.pf-file__thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; background: var(--mist); border: 1px solid var(--line); }
.pf-file__meta { flex: 1; min-width: 0; }
.pf-file__name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-file__size { margin-top: 2px; font-size: .84rem; color: var(--ink-3); }
.pf-file__ok { color: var(--green); font-weight: 700; }
.pf-file__bar { display: block; height: 5px; margin-top: 8px; border-radius: 999px; background: var(--mint); overflow: hidden; }
.pf-file__bar span { display: block; height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .7s var(--ease-out); }
.pf-file__remove {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px;
  color: var(--red); font-weight: 700; font-size: .88rem; background: #fdecec;
  transition: background-color .2s;
}
.pf-file__remove:hover { background: #fbd9d9; }
.pf-file__remove .icon { font-size: 17px; }

/* Submit row */
.ps-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 12px; }
.ps-submit__legal { flex: 1 1 260px; font-size: .95rem; color: var(--ink-2); line-height: 1.55; }
.ps-submit__legal a { font-weight: 800; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.ps-submit__action { display: grid; justify-items: end; gap: 8px; }
.ps-submit__btn[disabled] { --btn-bg: #c3d6c6; --btn-ic-bg: #fff; --btn-ic-fg: #c3d6c6; border-color: #c3d6c6; cursor: not-allowed; box-shadow: none; transform: none; }
.ps-submit__btn[disabled] .btn__icon { transform: none; }
.ps-submit__btn.is-loading { pointer-events: none; }
.ps-submit__btn.is-loading .btn__icon { animation: spin .9s linear infinite; }
.ps-submit__hint { font-size: .82rem; color: var(--ink-3); text-align: right; }
.ps-submit__hint.is-ready { color: var(--green); font-weight: 700; }

/* Success state */
.ps-done {
  max-width: 640px; margin: 0 auto; padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-xl); background: var(--mist); text-align: center;
  animation: featIn .7s var(--ease-out);
}
.ps-done:focus { outline: none; }
.ps-done__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: var(--green); color: var(--yellow); font-size: 36px; }
.ps-done__title { margin-top: 20px; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.ps-done__text { margin-top: 12px; color: var(--ink-2); }
.ps-done__btns { justify-content: center; margin-top: 28px; }

/* Desktop form: left column locked, form scrolls */
@media (min-width: 900px) {
  .ps-form__inner {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
    grid-template-areas: "aside fields" "aside submit";
    column-gap: 6vw; row-gap: 40px; align-items: start;
  }
  .ps-form__aside { grid-area: aside; position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 28px; }
  .ps-fields { grid-area: fields; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ps-submit { grid-area: submit; }
  .pf--full { grid-column: 1 / -1; }
}

/* Mobile/tablet form order: intro → fields → checklist → submit */
@media (max-width: 899px) {
  .ps-form__aside { display: contents; }
  .ps-form__intro { order: 0; }
  .ps-fields { order: 1; }
  .ps-check { order: 2; }
  .ps-submit { order: 3; }
}

/* Band before the footer */
.ps-band { height: clamp(120px, 13vw, 200px); margin-top: clamp(60px, 8vw, 120px); background: linear-gradient(180deg, #fff 0%, #e3efe1 100%); }

/* ---------- 7. Tablet + phone ---------- */
@media (min-width: 640px) and (max-width: 899px) {
  .ps-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pf--full { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
  .ps-hero__card { min-height: 0; padding-top: 56px; }
  .ps-hero__btns { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .ps-hero__btns .btn { justify-content: space-between; }
  .ps-hero__perks { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 36px; padding: 18px 20px; border-radius: 16px; }
  .ps-item { padding: 14px 16px; font-size: .9rem; }
  .ps-step { padding: 16px; }
  .ps-step__icon { width: 52px; height: 52px; font-size: 24px; }
  .ps-step__num { margin-top: 18px; }
  .ps-step__link { left: 42px; }
  .ps-submit { flex-direction: column; align-items: stretch; }
  .ps-submit__action { justify-items: stretch; }
  .ps-submit__btn { justify-content: space-between; }
  .ps-submit__hint { text-align: left; }
  .pf-file { flex-wrap: wrap; }
  .pf-file__remove { margin-left: auto; }

  .ps-hero__title { font-size: clamp(1.9rem, 1.2rem + 3.6vw, 2.3rem); line-height: 1.1; }
  .ps-hero__line + .ps-hero__line { margin-top: .15em; }

  .ps-submit__legal { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .ps-pin [data-pin-item] { opacity: 1; transform: none; filter: none; }
  .ps-step__link { transform: none !important; }
}

.ps-hero__perks .tag__check { border-radius: 50%; }

.ps-hero__line { display: block; text-wrap: balance; }
