:root {
  --sky-top: #1b2550;
  --sky: #131b3d;
  --sky-deep: #0d1330;
  --panel: #1e2a57;
  --panel-line: #2e3c74;
  --cream: #fff3d6;
  --cream-line: #f0dfb4;
  --ink: #18203f;
  --ink-soft: #4a5277;
  --text: #f4f1e8;
  --muted: #b3bbd9;
  --yellow: #ffd45c;
  --coral: #ff6b57;
  --coral-ink: #b8321f;
  --mint: #8fe3c8;
  --sky-blue: #7cc8f2;
  --shadow: #090e24;
  --radius: 18px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-color: var(--sky);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 8%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 4%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 22%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 38%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 55%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 18% 70%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 84%, #fff6 50%, transparent 51%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 40%, var(--sky-deep) 100%);
  background-attachment: fixed;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.page { width: 100%; max-width: 540px; margin: 0 auto; padding: 56px 16px 40px; }

.hand { font-family: "Gochi Hand", cursive; font-weight: 400; color: var(--yellow); font-size: 18px; letter-spacing: 0.01em; }
.title { font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 600; }

/* Profil */
.profile { text-align: center; margin-bottom: 40px; }
.avatar { width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 50%; background: var(--cream); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--shadow); padding: 6px; transform: rotate(-4deg); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; }
.profile .hand { display: block; margin-bottom: 2px; }
.profile h1 { font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 700; font-size: 30px; line-height: 1.15; margin: 0 0 4px; }
.handle { font-weight: 700; color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.bio { max-width: 400px; margin: 0 auto; color: var(--text); }
.mark { background: var(--yellow); color: var(--ink); padding: 0 6px; border-radius: 4px; font-weight: 800; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Judul blok */
.block { margin-bottom: 40px; }
.block-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 14px; }
.block-head h2 { font-family: "Fredoka", ui-rounded, sans-serif; font-weight: 600; font-size: 19px; margin: 0; }
.block-head .hand { font-size: 17px; }

/* Kartu unggulan */
.feature { position: relative; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--shadow); padding: 22px 20px 20px; }
.badge { position: absolute; top: -14px; right: 16px; transform: rotate(4deg); background: var(--coral); color: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 2px 10px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.06em; }
.feature-eyebrow { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.1em; color: var(--coral-ink); margin: 0 0 4px; }
.feature h3 { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 24px; line-height: 1.2; margin: 0 0 14px; }
.ticks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; }
.tick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); }
.tick .icon { width: 12px; height: 12px; stroke-width: 3; color: var(--ink); }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.price small { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.price strong { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 26px; color: var(--coral-ink); font-variant-numeric: tabular-nums; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px; border-radius: 999px;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn-yellow { background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-yellow:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-yellow:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-dashed { background: transparent; color: var(--ink); border: 2px dashed var(--ink); }
.btn-dashed:hover { background: var(--cream-line); }
.btn-wide { width: 100%; }

/* Kartu konsultasi */
.chat-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; background: var(--mint); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--shadow); text-decoration: none; transition: transform 150ms ease, box-shadow 150ms ease; }
.chat-card:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--shadow); }
.chat-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--mint); flex: none; }
.chat-card span:nth-child(2) { display: grid; flex: 1; line-height: 1.3; }
.chat-card strong { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 17px; }
.chat-card small { font-weight: 700; color: var(--ink-soft); }

/* Daftar tautan */
.links { display: grid; gap: 12px; }
.link {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  background: var(--panel); border: 2px solid var(--panel-line); border-radius: 16px;
  box-shadow: 4px 4px 0 var(--shadow); text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease;
}
.link:hover { transform: translate(-1px, -1px); border-color: #4a5a98; }
.link-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); color: var(--ink); flex: none; }
.link-icon.c-yellow { background: var(--yellow); }
.link-icon.c-coral { background: var(--coral); }
.link-icon.c-mint { background: var(--mint); }
.link-icon.c-blue { background: var(--sky-blue); }
.link-icon.c-cream { background: var(--cream); }
.link-text { display: grid; flex: 1; line-height: 1.3; min-width: 0; }
.link-text strong { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; }
.link-text small { color: var(--muted); font-size: 13px; font-weight: 600; }
.link-go { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #ffffff14; color: var(--text); flex: none; }
.link-go .icon { width: 16px; height: 16px; }

/* Karya (geser) */
.rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 18px; margin: 0 -16px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.work { flex: 0 0 82%; max-width: 360px; scroll-snap-align: center; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--shadow); overflow: hidden; transform: rotate(var(--r, 0deg)); display: flex; flex-direction: column; }
.work-media { aspect-ratio: 16 / 10; border-bottom: 3px solid var(--ink); background: #272739; overflow: hidden; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.work-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.work-body h3 { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 17px; margin: 0; }
.work-tag { font-family: "Gochi Hand", cursive; color: var(--coral-ink); font-size: 16px; white-space: nowrap; }
.work-body p { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.work-body a { justify-self: start; margin-top: 4px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 14px; color: var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.work-body a .icon { width: 15px; height: 15px; }

/* Cara kerja */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--panel); border: 2px solid var(--panel-line); border-radius: 16px; }
.step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); font-family: "Fredoka", sans-serif; font-weight: 700; }
.step strong { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; display: block; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 2px solid var(--panel-line); border-radius: 14px; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: var(--ink); transition: transform 150ms ease; }
.faq summary .plus .icon { width: 14px; height: 14px; stroke-width: 3; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 16px 16px; color: var(--muted); font-size: 15px; font-weight: 600; }

/* Penutup */
.closing { text-align: center; }
.closing .hand { display: block; margin-bottom: 6px; }
.closing h2 { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 26px; line-height: 1.25; margin: 0 0 18px; }
.closing .contact { display: grid; gap: 10px; margin-top: 14px; }
.closing .contact a { color: var(--muted); font-weight: 700; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.closing .contact a:hover { color: var(--text); }

.socials { display: flex; justify-content: center; gap: 12px; margin: 36px 0 18px; }
.socials a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--panel); border: 2px solid var(--panel-line); color: var(--text); transition: border-color 150ms ease; }
.socials a:hover { border-color: var(--yellow); }

footer a { color: inherit; }
footer { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
footer .hand { display: block; font-size: 19px; margin-bottom: 2px; }

@media (min-width: 600px) {
  .page { padding-top: 72px; }
  .profile h1 { font-size: 34px; }
  .rail { margin: 0 -40px; padding-left: 40px; padding-right: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.work:nth-child(4n+1) { --r: -1.2deg; }
.work:nth-child(4n+2) { --r: 0.8deg; }
.work:nth-child(4n+3) { --r: -0.5deg; }
.work:nth-child(4n+4) { --r: 1.1deg; }

/* Latar 3D */
#space { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; pointer-events: none; }
.page { position: relative; }
.profile h1, .profile .handle, .bio, .block-head, .closing h2, .closing .hand, footer { text-shadow: 0 1px 12px rgba(9, 14, 36, 0.9), 0 0 2px rgba(9, 14, 36, 0.8); }

/* Animasi */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0.2; animation: twinkle 3.6s ease-in-out infinite; }
.stars i:nth-child(1) { top: 12%; left: 8%; animation-delay: 0s; }
.stars i:nth-child(2) { top: 18%; left: 86%; animation-delay: 1.2s; }
.stars i:nth-child(3) { top: 42%; left: 4%; animation-delay: 2.1s; }
.stars i:nth-child(4) { top: 58%; left: 92%; animation-delay: 0.6s; }
.stars i:nth-child(5) { top: 76%; left: 14%; animation-delay: 1.8s; }
.stars i:nth-child(6) { top: 88%; left: 80%; animation-delay: 2.7s; }
.stars i:nth-child(7) { top: 30%; left: 70%; animation-delay: 3.1s; width: 2px; height: 2px; }
.stars i:nth-child(8) { top: 66%; left: 30%; animation-delay: 0.9s; width: 2px; height: 2px; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 0.9; transform: scale(1.3); } }

.avatar { animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(-1deg); } }

.badge { animation: wiggle 4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes wiggle { 0%, 82%, 100% { transform: rotate(4deg); } 86% { transform: rotate(-3deg); } 90% { transform: rotate(6deg); } 94% { transform: rotate(1deg); } }

.nudge { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

.mark { text-shadow: none; background-image: linear-gradient(var(--yellow), var(--yellow)); background-repeat: no-repeat; background-size: 100% 100%; }

.js .reveal {
  opacity: 0; translate: 0 18px;
  transition: opacity 500ms ease, translate 500ms cubic-bezier(.2,.8,.2,1), transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms, 0ms, 0ms;
}
.js .reveal.in { opacity: 1; translate: none; }
.js .mark.reveal { opacity: 1; translate: none; background-color: transparent; background-size: 0% 100%; color: var(--text); transition: background-size 700ms cubic-bezier(.2,.8,.2,1) 300ms, color 300ms ease 600ms; }
.js .mark.reveal.in { background-size: 100% 100%; color: var(--ink); }

.work { transition: transform 200ms ease, box-shadow 200ms ease; }
.work:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 7px 9px 0 var(--shadow); }

.chat-icon { animation: ping 2.4s ease-in-out infinite; }
@keyframes ping { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.12) rotate(-6deg); } 86% { transform: scale(1) rotate(4deg); } }

.link:active, .chat-card:active { transform: translate(2px, 2px); }

@media (prefers-reduced-motion: reduce) {
  .stars i, .avatar, .badge, .nudge, .chat-icon { animation: none; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .js .mark.reveal { background-size: 100% 100%; color: var(--ink); transition: none; }
}

/* Halaman paramedic */
.avatar.photo { padding: 4px; }
.avatar.photo img { object-fit: cover; object-position: 50% 30%; }
.back-link { display: flex; width: fit-content; align-items: center; gap: 6px; margin-bottom: 20px; padding: 6px 12px; border: 2px solid var(--panel-line); border-radius: 999px; background: var(--panel); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; transition: border-color 150ms ease; }
.back-link:hover { border-color: var(--yellow); }
.back-link .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.back-link.forward { margin-left: auto; }
.back-link.forward .icon { transform: none; }
.area { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 12px; font-weight: 800; font-size: 15px; }
.area .icon { color: var(--coral-ink); }

.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cred { padding: 12px 14px; background: var(--panel); border: 2px solid var(--panel-line); border-radius: 14px; box-shadow: 3px 3px 0 var(--shadow); }
.cred.wide { grid-column: 1 / -1; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); }
.cred strong { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; line-height: 1.25; }
.cred small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; margin-top: 2px; }
.cred.wide small { color: var(--ink-soft); }
.cred-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--mint); border: 2px solid var(--ink); color: var(--ink); font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 12px; }
.pill .icon { width: 12px; height: 12px; stroke-width: 3; }
.note { margin: 12px 4px 0; color: var(--muted); font-size: 13px; font-weight: 700; text-shadow: 0 1px 10px rgba(9, 14, 36, 0.9); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.job { position: relative; padding: 14px 16px 14px 46px; background: var(--panel); border: 2px solid var(--panel-line); border-radius: 16px; }
.job::before { content: ""; position: absolute; left: 16px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); }
.job.now::before { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 107, 87, 0.25); }
.job time { font-family: "Gochi Hand", cursive; color: var(--yellow); font-size: 17px; }
.job strong { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; }
.job p { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }

.polaroid { margin: 0; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--shadow); padding: 10px 10px 12px; transform: rotate(-1.5deg); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); }
.polaroid figcaption { font-family: "Gochi Hand", cursive; font-size: 19px; text-align: center; margin-top: 8px; color: var(--ink); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #2a1420; border: 2px solid #7a2b3a; border-radius: 14px; color: #ffd9d4; font-weight: 700; font-size: 14px; }
.alert .icon { color: var(--coral); margin-top: 1px; }

/* Contoh undangan */
.invite { display: grid; gap: 18px; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--shadow); padding: 18px; }
@media (min-width: 480px) { .invite { grid-template-columns: 200px 1fr; align-items: center; } }
.phone { justify-self: center; width: 100%; max-width: 220px; padding: 8px; background: var(--ink); border-radius: 26px; transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--shadow); }
.phone video { display: block; width: 100%; aspect-ratio: 9 / 16; height: auto; border-radius: 18px; background: #2a0a12; object-fit: cover; }
.invite-body h3 { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 24px; margin: 0 0 8px; }
.invite-body p:not(.feature-eyebrow) { margin: 0 0 16px; font-weight: 600; color: var(--ink-soft); font-size: 15px; }

/* Peneduh di belakang kolom isi */
.shade { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, transparent 0%, rgba(13, 19, 48, 0.55) 32%, rgba(13, 19, 48, 0.55) 68%, transparent 100%); }
@media (max-width: 640px) { .shade { background: rgba(13, 19, 48, 0.45); } }
