:root {
  --bg: #f6fbf8;
  --surface: #ffffff;
  --primary: #1b8450;
  --primary-dark: #146440;
  --primary-soft: #e3f4ea;
  --coral: #e56b6f;
  --amber: #f2b04c;
  --amber-soft: #fff5e0;
  --ink: #22313a;
  --muted: #66787f;
  --line: #e2ebee;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Montserrat", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(800px 380px at 90% -10%, #dcf1e4 0%, transparent 65%),
    var(--bg);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
p {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
}

/* buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  min-height: 48px;
  padding: 12px 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}
.btn-primary,
.btn-wa {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(27, 132, 80, 0.26);
}
.btn-primary:hover,
.btn-wa:hover {
  background: var(--primary-dark);
}
.btn-primary:active,
.btn-wa:active {
  transform: translateY(1px);
}
.btn-outline {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary-soft);
}
.btn-wa {
  gap: 10px;
}
.btn-wa svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.btn-block {
  width: 100%;
}

/* hero */
.hero {
  text-align: center;
  padding: 48px 0 28px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(27px, 7.2vw, 38px);
  color: var(--ink);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--primary-dark);
}
.hero-sub {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 24px;
}

/* card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px 30px;
  box-shadow: 0 18px 50px rgba(20, 100, 64, 0.08);
  min-height: 380px;
  margin-bottom: 40px;
}

.screen {
  animation: screen-in 260ms ease both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* form data diri */
.intro {
  text-align: center;
  padding-top: 4px;
}
.intro .q-title {
  font-size: 24px;
  margin-bottom: 10px;
}
.intro-text {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 24px;
  font-size: 14px;
}

.form {
  text-align: left;
  display: grid;
  gap: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}
.field input::placeholder {
  color: #a5b3b8;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field.invalid input {
  border-color: var(--coral);
}
.field-error {
  display: none;
  font-size: 12px;
  color: #c24a50;
  margin-top: 5px;
}
.field.invalid .field-error {
  display: block;
}
.form .btn {
  margin-top: 6px;
  width: 100%;
}

/* progress */
.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--primary-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 360ms ease;
}
.progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* question */
.q-context {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.q-title {
  font-size: 22px;
  line-height: 1.45;
  margin-bottom: 24px;
}

.options {
  display: grid;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  min-height: 54px;
  padding: 12px 16px;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}
.option:hover {
  border-color: var(--primary);
}
.option-dot {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccdadf;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}
.option[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.option[aria-pressed="true"] .option-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px #fff;
}

.q-nav {
  margin-top: 22px;
}
.q-back,
.link-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
  padding: 10px 12px 10px 0;
}
.q-back:hover,
.link-btn:hover {
  color: var(--primary-dark);
}

/* loading */
.loading {
  text-align: center;
  padding-top: 18px;
}
.heart-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
}
.heart {
  width: 54px;
  height: 54px;
  fill: var(--primary);
  animation: beat 1.3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.18);
  }
  40% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.1);
  }
}
.pulse-ring {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: ring 2.4s ease-out infinite;
}
.pulse-ring.delay {
  animation-delay: 1.2s;
}
@keyframes ring {
  0% {
    transform: scale(0.6);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
.loading .q-title {
  font-size: 22px;
  margin-bottom: 20px;
}

.load-steps {
  display: inline-grid;
  gap: 12px;
  text-align: left;
  margin-bottom: 26px;
}
.load-step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a5b3b8;
  font-size: 14px;
  transition: color 300ms ease;
}
.load-step::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ccdadf;
  transition: all 300ms ease;
}
.load-step.active {
  color: var(--ink);
  font-weight: 500;
}
.load-step.active::before {
  border-color: var(--primary);
  border-top-color: transparent;
  animation: spin 800ms linear infinite;
}
.load-step.done {
  color: var(--muted);
}
.load-step.done::before {
  border-color: var(--primary);
  background: var(--primary);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.load-bar {
  height: 6px;
  background: var(--primary-soft);
  border-radius: 999px;
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto;
}
.load-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 999px;
  animation: fill 2.5s ease-out forwards;
}
@keyframes fill {
  to {
    width: 92%;
  }
}

/* hasil */
.result {
  text-align: left;
}
.print-only {
  display: none;
}

.res-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.res-section:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.res-heading {
  font-size: 20px;
  color: var(--primary-dark);
  margin-bottom: 14px;
}
.res-center {
  text-align: center;
}

.score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 4px auto 18px;
}
.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track {
  stroke: var(--primary-soft);
}
.ring-fill {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 1000ms ease 150ms;
}
.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}
.score-value small {
  font-size: 16px;
  color: var(--muted);
  margin-left: 2px;
}

.result-title {
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 10px;
}
.result-summary {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 26px;
}

.dims {
  display: grid;
  gap: 16px;
  text-align: left;
}
.dim-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}
.dim-level {
  font-size: 12px;
  font-weight: 600;
}
.dim-track {
  height: 8px;
  background: #edf3f5;
  border-radius: 999px;
  overflow: hidden;
}
.dim-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 900ms ease 200ms;
}
.dim-fill.lvl-good {
  background: var(--primary);
}
.dim-fill.lvl-mid {
  background: var(--amber);
}
.dim-fill.lvl-low {
  background: var(--coral);
}
.dim-level.lvl-good {
  color: var(--primary-dark);
}
.dim-level.lvl-mid {
  color: #b97a12;
}
.dim-level.lvl-low {
  color: #c24a50;
}

.safety {
  background: var(--amber-soft);
  border: 1px solid #f6dda6;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 8px 0 4px;
  font-size: 14px;
}
.safety h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.validation p {
  font-size: 14.5px;
  margin-bottom: 12px;
}

.step-list {
  display: grid;
  gap: 12px;
  counter-reset: step;
}
.step-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14.5px;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.amalan-list {
  display: grid;
  gap: 10px;
}
.amalan-list li {
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14.5px;
}

.actions {
  display: grid;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-note {
  font-size: 12px;
  color: var(--muted);
}
.link-btn {
  text-decoration: underline;
  justify-self: center;
  padding-right: 0;
}

/* error */
.error {
  text-align: center;
  padding-top: 30px;
}
.error p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* hero actions */
.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}

/* pertanyaan pembuka */
.gap {
  padding: 16px 0 40px;
  text-align: center;
}
.gap-title {
  font-size: 24px;
  margin-bottom: 22px;
}
.gap-cards {
  display: grid;
  gap: 14px;
  text-align: left;
  margin-bottom: 26px;
}
.gap-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(20, 100, 64, 0.06);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}
.gap-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(20, 100, 64, 0.12);
}
.gap-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}
.gap-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gap-card h3 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
}
.gap-card p {
  font-size: 14px;
  color: var(--muted);
}
.gap-callout {
  background: var(--primary-soft);
  border-radius: 18px;
  padding: 20px 22px;
}
.gap-lead {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.gap-note {
  font-size: 14px;
  color: var(--muted);
}

/* perjalanan */
.journey {
  padding: 8px 0 44px;
  text-align: center;
}
.journey-steps {
  display: grid;
  max-width: 460px;
  margin: 20px auto 0;
  text-align: left;
}
.journey-step {
  --fill: 0;
  position: relative;
  padding: 0 0 26px 30px;
}
.journey-step:last-child {
  padding-bottom: 0;
}
.journey-step:not(:last-child)::before,
.journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: -2px;
  width: 2px;
}
.journey-step:not(:last-child)::before {
  background: #c4e5d1;
}
.journey-step:not(:last-child)::after {
  background: var(--primary);
  transform: scaleY(var(--fill));
  transform-origin: top;
  transition: transform 500ms ease;
}
.journey-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #b9d9c6;
  background: #fff;
  transition:
    background-color 300ms ease,
    border-color 300ms ease;
}
.journey-step.is-active .journey-dot,
.journey-step.is-done .journey-dot {
  border-color: var(--primary);
}
.journey-step.is-done .journey-dot {
  background: var(--primary);
}
.journey-step.is-active .journey-dot {
  animation: dot-pulse 1.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px var(--primary-soft);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(27, 132, 80, 0.12);
  }
}
.journey-step h3 {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 2px;
  transition: color 300ms ease;
}
.journey-step.is-active h3,
.journey-step.is-done h3 {
  color: var(--primary-dark);
}
.journey-step p {
  font-size: 14px;
  color: var(--muted);
}
.journey-status {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 12px;
  border-radius: 999px;
  background: #eef4f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition:
    background-color 300ms ease,
    color 300ms ease;
}
.journey-step.is-active .journey-status {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.journey-step.is-done .journey-status {
  background: var(--primary);
  color: #fff;
}

.required-star {
  color: #e53935;
  margin-left: 4px;
  font-weight: 700;
}

.print-contact {
  margin-top: 22px;
  padding: 14px 18px;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  break-inside: avoid;
}
.print-contact-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
}
.print-contact-line {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink);
}
.print-contact-line strong {
  font-size: 17px;
  color: var(--primary-dark);
}

/* tentang */
.about {
  padding: 8px 0 52px;
}
.about-inner {
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}
.portrait {
  position: relative;
  width: min(210px, 70%);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--primary-soft), #cdebd9);
  box-shadow: 0 18px 40px rgba(20, 100, 64, 0.16);
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--primary);
  border-radius: 28px;
  opacity: 0.35;
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 28px;
  z-index: 1;
}
.about-text {
  min-width: 0;
}
.about-name {
  font-size: 26px;
  margin-bottom: 6px;
}
.about-role {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  line-height: 1.5;
  margin-bottom: 14px;
}
.about-description {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.about-certifications {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  text-align: left;
}
.about-certifications h3 {
  font-size: 15px;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.about-certifications ul {
  display: grid;
  gap: 10px;
}
.about-certifications li {
  position: relative;
  padding-left: 28px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.about-certifications li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-soft);
}
.about-certifications li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 4px;
  height: 8px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 20px 36px;
  text-align: center;
  background: var(--surface);
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.footer-ig {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.footer-ig:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.footer-disclaimer {
  font-size: 12px;
  color: var(--muted);
  max-width: 60ch;
  margin: 12px auto 0;
}
.footer-copy {
  font-size: 12px;
  color: var(--muted);
  max-width: 60ch;
  margin: 18px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (min-width: 480px) {
  .hero-actions {
    grid-auto-flow: column;
    justify-content: center;
  }
}

@media (min-width: 720px) {
  .card {
    padding: 38px 44px 40px;
  }
  .hero {
    padding-top: 64px;
  }
  .gap-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .gap-card {
    flex-direction: column;
    gap: 14px;
  }

  .journey-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    gap: 0;
    text-align: center;
  }
  .journey-step {
    padding: 30px 12px 0;
  }
  .journey-step:not(:last-child)::before,
  .journey-step:not(:last-child)::after {
    left: calc(50% + 14px);
    right: calc(-50% + 14px);
    top: 5px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .journey-step:not(:last-child)::after {
    transform: scaleX(var(--fill));
    transform-origin: left center;
  }
  .journey-dot {
    left: calc(50% - 6px);
    top: 0;
  }

  .about-inner {
    grid-template-columns: 200px 1fr;
    text-align: left;
    align-items: start;
    gap: 38px;
  }
  .portrait {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 16mm;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body {
    background: #fff;
  }
  .hero,
  .gap,
  .journey,
  .about,
  .footer,
  .actions {
    display: none !important;
  }
  .container {
    max-width: none;
    padding: 0;
  }
  .card {
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: 0;
    margin: 0;
  }
  .screen {
    animation: none;
  }
  .print-only {
    display: block;
    margin-bottom: 18px;
  }
  .print-head h2 {
    font-size: 22px;
    color: var(--primary-dark);
  }
  .print-head p {
    font-size: 13px;
    color: var(--muted);
  }
  .res-section {
    break-inside: avoid;
  }
}
