/* /afiliasi — builds on referensi.css (rx-* tokens and components). */
.af-page { padding-top: 64px; }
.af-page section[id] { scroll-margin-top: 84px; }

/* Hero */
.af-hero { padding: 72px 0 72px; }
.af-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: center; }
.af-hero-copy > * { animation: rx-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.af-hero-copy > *:nth-child(2) { animation-delay: .06s; } .af-hero-copy > *:nth-child(3) { animation-delay: .12s; }
.af-hero-copy > *:nth-child(4) { animation-delay: .18s; } .af-hero-copy > *:nth-child(5) { animation-delay: .24s; }
.af-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.af-btn-primary { background: var(--rx-navy); color: white; box-shadow: 0 12px 28px -12px #001965; }
.af-btn-primary:hover { background: #000062; color: white; }
.af-btn-ghost { background: white; color: #234269; border: 1px solid #ccdced; }
.af-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.af-facts li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #3a5577; }
.af-facts svg { color: #16a34a; }

.af-flow { position: relative; padding: 26px; background: white; border: 1px solid #dfe9f5; border-radius: 24px; box-shadow: 0 40px 80px -40px #00196566; animation: rx-zoom .9s cubic-bezier(.2,.7,.2,1) .15s both; }
.af-flow-step { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--rx-soft); opacity: 0; animation: rx-rise .5s cubic-bezier(.2,.7,.2,1) forwards; }
.af-flow-step:nth-child(1) { animation-delay: .5s; } .af-flow-step:nth-child(3) { animation-delay: .9s; } .af-flow-step:nth-child(5) { animation-delay: 1.3s; }
.af-flow-step.is-final { background: linear-gradient(120deg, #001965, #173f7a); color: white; }
.af-flow-icon { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; background: white; color: var(--rx-navy); box-shadow: 0 6px 14px -8px #0019654d; }
.af-flow-step.is-final .af-flow-icon { background: #ffffff1f; color: white; box-shadow: none; }
.af-flow-step strong { display: block; font-size: 15px; color: inherit; }
.af-flow-step:not(.is-final) strong { color: var(--rx-ink); }
.af-flow-step small { display: block; margin-top: 2px; font-size: 13px; color: var(--rx-muted); }
.af-flow-step.is-final small { color: #c7d7ee; }
.af-flow-line { width: 2px; height: 22px; margin: 4px 0 4px 36px; background: repeating-linear-gradient(to bottom, #9db8d8 0 4px, transparent 4px 8px); background-size: 2px 16px; animation: af-dash 1s linear infinite; }
@keyframes af-dash { to { background-position: 0 16px; } }

/* Products */
.af-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.af-product { display: flex; flex-direction: column; gap: 4px; padding: 24px; background: white; border: 1px solid var(--rx-line); border-radius: 20px; color: inherit; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.af-product:hover { transform: translateY(-4px); border-color: #bcd3ec; box-shadow: 0 20px 40px -24px #0019654d; }
.af-product-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 15px; color: white; background: linear-gradient(135deg, var(--rx-navy), var(--rx-blue)); box-shadow: 0 12px 24px -14px #001965; }
.af-product strong { font-size: 19px; color: var(--rx-ink); }
.af-product em { font-style: normal; font-size: 13px; font-weight: 650; color: var(--rx-blue); }
.af-product p { margin: 8px 0 16px; font-size: 14px; line-height: 1.65; color: var(--rx-muted); }
.af-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--rx-navy); }
.af-product:hover .af-more svg { transform: translateX(3px); }
.af-more svg { transition: transform .2s ease; }

/* Roles */
.af-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.af-role { position: relative; display: flex; flex-direction: column; padding: 26px; background: white; border: 1px solid var(--rx-line); border-radius: 22px; transition: transform .25s ease, box-shadow .25s ease; }
.af-role:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px #0019655c; }
.af-role.is-featured { border: 2px solid var(--rx-navy); box-shadow: 0 24px 48px -28px #00196573; }
.af-badge { position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 999px; background: var(--rx-navy); color: white; font-size: 11.5px; font-weight: 700; }
.af-role-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border-radius: 15px; background: var(--rx-tint); color: var(--rx-navy); }
.af-role.is-featured .af-role-icon { background: var(--rx-navy); color: white; }
.af-role h3 { margin: 0 0 8px; font-size: 21px; font-weight: 750; color: var(--rx-ink); }
.af-role > p { margin: 0 0 18px; font-size: 14px; line-height: 1.65; color: var(--rx-muted); }
.af-role-block { padding-top: 14px; margin-top: 4px; border-top: 1px dashed #dbe6f3; }
.af-role-block + .af-role-block { margin-top: 14px; }
.af-role-block h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: #7b8ca3; }
.af-role-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.af-role-block li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: #334155; }
.af-role-block li svg { flex-shrink: 0; margin-top: 3px; color: #16a34a; }
.af-role-cta { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; margin-top: 22px; border-radius: 12px; border: 1px solid #ccdced; font-weight: 700; font-size: 14.5px; color: var(--rx-navy); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.af-role-cta:hover, .af-role.is-featured .af-role-cta { background: var(--rx-navy); border-color: var(--rx-navy); color: white; }
.af-role-cta { margin-top: auto; }
.af-role-block:last-of-type { margin-bottom: 22px; }

/* Steps */
.af-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: af; }
.af-steps li { position: relative; padding: 22px; background: white; border: 1px solid var(--rx-line); border-radius: 18px; counter-increment: af; }
.af-steps li::after { content: "0" counter(af); position: absolute; top: 18px; right: 20px; font: 800 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e6eef8; }
.af-steps li > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px; background: var(--rx-tint); color: var(--rx-navy); }
.af-steps strong { display: block; font-size: 16px; color: var(--rx-ink); }
.af-steps p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--rx-muted); }

/* Benefits */
.af-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.af-benefits > div { padding: 20px; background: white; border: 1px solid var(--rx-line); border-radius: 18px; transition: transform .25s ease, border-color .25s ease; }
.af-benefits > div:hover { transform: translateY(-3px); border-color: #bcd3ec; }
.af-benefits span { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; background: var(--rx-tint); color: var(--rx-navy); }
.af-benefits strong { display: block; font-size: 15.5px; color: var(--rx-ink); }
.af-benefits p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--rx-muted); }
.af-fit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; font-size: 14px; color: #3a5577; }
.af-fit span { padding: 7px 14px; border-radius: 999px; background: white; border: 1px solid #d6e4f4; font-weight: 600; }

/* FAQ */
.af-faq-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.af-faq-head { display: block; position: sticky; top: 100px; }
.af-faq-head p { margin-top: 10px; }
.af-faq-head a { color: var(--rx-blue); font-weight: 650; }
.af-faq-grid .rx-faq { max-width: none; }

/* Join */
.af-join { padding: 80px 0; background: linear-gradient(135deg, #000062, #173f7a 55%, #4075aa); color: white; position: relative; overflow: hidden; }
.af-join::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: #ffffff10; pointer-events: none; }
.af-join-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.af-eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 750; letter-spacing: .12em; color: #a9c4e8; }
.af-join h2 { margin: 0 0 14px; font-size: clamp(28px, 3vw, 40px); font-weight: 780; letter-spacing: -.035em; line-height: 1.15; }
.af-join-copy > p { margin: 0; font-size: 16px; line-height: 1.7; color: #d4e2f4; }
.af-next { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.af-next li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: #e6eef9; }
.af-next b { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; background: #ffffff1f; font-size: 13px; }

.af-form { display: grid; gap: 18px; padding: 28px; background: white; border-radius: 24px; color: var(--rx-ink); box-shadow: 0 40px 80px -40px #000000a0; }
.af-roles-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.af-roles-pick legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--rx-ink); }
.af-roles-pick label { cursor: pointer; }
.af-roles-pick input { position: absolute; opacity: 0; pointer-events: none; }
.af-roles-pick span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1.5px solid var(--rx-line); border-radius: 14px; background: #fbfdff; font-size: 14px; font-weight: 650; color: #3a5577; text-align: center; transition: all .2s ease; }
.af-roles-pick span svg { color: var(--rx-blue); }
.af-roles-pick input:checked + span { border-color: var(--rx-navy); background: #f3f7fd; color: var(--rx-navy); box-shadow: 0 0 0 3px #00196514; }
.af-roles-pick input:checked + span svg { color: var(--rx-navy); }
.af-roles-pick input:focus-visible + span { outline: 3px solid var(--rx-blue); outline-offset: 2px; }
.af-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.af-wide { grid-column: 1 / -1; }
.af-field { display: grid; gap: 6px; align-content: start; }
.af-field label { font-size: 13px; font-weight: 600; color: var(--rx-ink); }
.af-field label i { font-style: normal; color: #dc2626; }
.af-field input, .af-field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #ccdced; border-radius: 12px; background: white; font: inherit; font-size: 15px; color: var(--rx-ink); transition: border-color .2s ease, box-shadow .2s ease; }
.af-field input:focus, .af-field select:focus { outline: 0; border-color: var(--rx-blue); box-shadow: 0 0 0 4px #4075aa22; }
.af-field em { display: none; font-style: normal; font-size: 12.5px; color: #dc2626; }
.af-field.is-invalid input { border-color: #f87171; background: #fffafa; }
.af-field.is-invalid em { display: block; }
.af-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; color: #52657b; cursor: pointer; }
.af-consent input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--rx-navy); }
.af-consent a { color: var(--rx-blue); font-weight: 600; }
.af-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; font-size: 13.5px; color: #b91c1c; }
.af-submit { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 54px; border: 0; border-radius: 14px; background: #16a34a; color: white; font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; box-shadow: 0 12px 28px -12px #16a34aaa; transition: background-color .2s ease, transform .2s ease; }
.af-submit:hover { background: #15803d; transform: translateY(-2px); }

@media (max-width: 1099px) {
    .af-hero-grid, .af-join-grid, .af-faq-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .af-flow { max-width: 520px; }
    .af-products, .af-roles { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
    .af-steps, .af-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .af-faq-head { position: static; }
}
@media (max-width: 767px) {
    .af-hero { padding: 40px 0 44px; }
    .af-actions { display: grid; }
    .af-steps, .af-benefits, .af-fields { grid-template-columns: minmax(0, 1fr); }
    .af-join { padding: 52px 0; }
    .af-form { padding: 20px; }
    .af-roles-pick span { padding: 12px 4px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .af-flow, .af-flow-step, .af-flow-line, .af-hero-copy > * { animation: none !important; opacity: 1; }
}
