/* Husada — ucapan kelulusan/sumpah profesi tenaga kesehatan: bersih dan terang, garis EKG, kartu pengenal, monitor tanda vital. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; src: url("fonts/fraunces.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; src: url("fonts/manrope.woff2") format("woff2"); font-display: swap; }

:root { --bg: #eef8f6; --ink: #12312d; --soft: #5d7f79; --accent: #12867a; --pulse: #f26b6b; --card: #ffffff; --line: #cfe6e1; --screen: #0f1d24; --screen-ink: #7df0dd; --btn-ink: #ffffff; --serif: "Fraunces", Georgia, serif; --sans: "Manrope", system-ui, sans-serif; }
/* Tone warna (field "tone"): toska = bawaan di atas. */
:root[data-tone="biru"] { --bg: #eef4fb; --ink: #12283f; --soft: #5b7591; --accent: #1f6fb2; --pulse: #f2a03d; --line: #cfdfef; --screen: #0e1a2b; --screen-ink: #8fd0ff; }
:root[data-tone="malam"] { --bg: #0f1d24; --ink: #e9f6f3; --soft: #8fb0ab; --accent: #3fd6bd; --pulse: #ff8a8a; --card: #17282f; --line: #29414a; --screen: #091318; --screen-ink: #3fd6bd; --btn-ink: #0f1d24; }

body { margin: 0; min-height: 100vh; background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 26px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 26px 100%, var(--bg); color: var(--ink); font: 500 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
em { font-style: italic; color: var(--accent); }
.kicker, .lbl { font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }

.cover h1 { font: 500 40px/1.08 var(--serif); }
/* Layar monitor: garis datar, lalu garis detak digambar saat dibuka (stroke-dashoffset). */
.screen { position: relative; width: 280px; height: 150px; padding: 14px; border-radius: 18px; background: var(--screen); box-shadow: 0 20px 36px rgb(0 0 0 / .22), inset 0 0 0 3px rgb(255 255 255 / .06); }
.screen svg { width: 100%; height: 96px; }
.screen .flat { stroke: color-mix(in srgb, var(--screen-ink) 30%, transparent); }
.screen .beat { stroke: var(--screen-ink); stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 5px var(--screen-ink)); }
.opening .screen .beat { stroke-dashoffset: 0; transition: stroke-dashoffset 1s ease-out; }
.screen span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--screen-ink); opacity: .8; text-align: left; }
.open { min-height: 50px; padding: 0 30px; border: 0; border-radius: 999px; background: var(--accent); color: var(--btn-ink); font: 800 15px/1 var(--sans); cursor: pointer; animation: napas 2.2s ease-in-out infinite; }

.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 38px; }
/* Kartu pengenal: tali penjepit di atas, foto bulat, nama, profesi. */
.idcard { position: relative; width: 100%; max-width: 300px; padding: 34px 20px 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 36px rgb(0 60 50 / .14); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.idcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: 22px 22px 0 0; background: var(--accent); }
.clip { position: absolute; left: 50%; top: -22px; width: 46px; height: 34px; margin-left: -23px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 55%, var(--bg)); box-shadow: inset 0 -10px 0 rgb(0 0 0 / .18); }
.pic { width: 124px; height: 124px; margin: 8px 0 6px; border-radius: 50%; overflow: hidden; border: 4px solid var(--line); background: var(--bg); display: grid; place-items: center; font: 500 60px/1 var(--serif); color: var(--pulse); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.idcard h1 { font: 500 42px/1.02 var(--serif); overflow-wrap: anywhere; }
.job { padding: 5px 14px; border-radius: 999px; background: var(--accent); color: var(--btn-ink); font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.school { font-size: 13px; color: var(--soft); }

.monitor { padding: 18px 18px 20px; border-radius: 20px; background: var(--screen); color: #e9f6f3; box-shadow: 0 18px 36px rgb(0 0 0 / .2); }
.monitor header { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--screen-ink); }
.monitor header svg { flex: none; width: 96px; height: 24px; stroke: var(--pulse); animation: napas 1.1s ease-in-out infinite; }
.monitor dl { display: flex; flex-direction: column; }
.monitor dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid rgb(255 255 255 / .12); }
.monitor dt { font-size: 14px; opacity: .8; }
.monitor dd { flex: none; max-width: 55%; font: 800 20px/1.15 var(--sans); color: var(--screen-ink); text-align: right; overflow-wrap: anywhere; }
.dx { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgb(255 255 255 / .25); font-size: 14px; }
.dx b { color: var(--pulse); }

.card { padding: 26px 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.lbl { margin-bottom: 12px; }
.msg { font: 500 20px/1.5 var(--serif); }
.sign { margin-top: 16px; font: italic 400 24px/1.1 var(--serif); color: var(--accent); text-align: right; }
.album .lbl { text-align: center; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photos figure { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.photos figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.reply h2 { margin-bottom: 14px; font: 500 30px/1.1 var(--serif); }
.hint { font-size: 13px; color: var(--soft); }
.btn { min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--btn-ink); font: 800 15px/1.2 var(--sans); cursor: pointer; }
.btn.ghost { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; }
textarea { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--sans); }
textarea::placeholder { color: var(--soft); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.js-only { display: none; }
.js .js-only { display: block; }
main { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 0 22px; }

/* Cara dibuka "amplop": sampul diketuk dulu. Tanpa JS sampul dilewati dan semua isi langsung tampil. */
.cover { display: none; min-height: 100vh; min-height: 100svh; padding: 48px 0 40px; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; cursor: pointer; }
.js body[data-opener="amplop"]:not(.opened) .cover { display: flex; }
.js body[data-opener="amplop"]:not(.opened) .content,
.js body[data-opener="amplop"]:not(.opened) .foot { display: none; }
.content { display: flex; flex-direction: column; gap: 28px; padding: 40px 0 54px; }
.opened .content { animation: masuk .7s cubic-bezier(.2, .7, .2, 1) both; }
form { display: flex; flex-direction: column; gap: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
textarea { width: 100%; min-height: 96px; padding: 14px 16px; resize: vertical; }
.msg { white-space: pre-line; overflow-wrap: anywhere; }
.music-toggle { position: fixed; top: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.music-toggle svg { width: 20px; height: 20px; }
.music-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.foot { position: relative; z-index: 1; padding: 8px 22px 34px; text-align: center; font-size: 12px; color: var(--soft); }
.anim .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.anim .reveal.in { opacity: 1; transform: none; }
@keyframes masuk { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes napas { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Adegan 3D (scene.js + three.js): kanvas menempel di layar di belakang isi. Tanpa WebGL kanvas tetap tak terlihat
   dan gambar CSS/SVG biasa yang tampil. */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease; }
.gl .scene { opacity: 1; }
