/* Warna dan huruf template ini diatur di blok :root berikut. */
:root {
  --ground: #BFD9FF;
  --ink: #0A1A4A;
  --biru: #1B4DFF;
  --r: 28px;
  --action: #1B4DFF;
  --action-ink: #FFFFFF;
  --focus: #0A1A4A;
  --font: 'Hanken Grotesk', Arial, sans-serif;
  --judul: 'Fredoka', 'Hanken Grotesk', Arial, sans-serif;
}

@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url('fonts/fredoka-500.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('fonts/fredoka-600.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 400; font-display: swap; src: url('fonts/hanken-grotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 700; font-display: swap; src: url('fonts/hanken-grotesk-700.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
}
h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
input, button { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
[hidden] { display: none; }
:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }

.alert { font-weight: 600; }
.trial { display: inline-block; padding: 10px 0; }
.more summary { cursor: pointer; padding: 10px 0; }
.more label { display: block; }
.more input { width: 100%; padding: 10px 12px; margin-top: 4px; }

/* Halaman setelah login: alogin, status, logout, error */
.sheet {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 100vh; min-height: 100svh;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 32px 20px;
}
.sheet h1 { font-size: 44px; line-height: 1.02; }
.facts { display: grid; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.action {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  background: var(--action);
  color: var(--action-ink);
  transition: transform .15s ease;
}
.action:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

body { background: radial-gradient(70vmax 60vmax at 10% 0%, #E6F0FF, transparent 60%), radial-gradient(60vmax 50vmax at 100% 100%, #FFD3DC, transparent 60%), var(--ground); font-size: 16px; }

/* Latar: empat bola warna yang hanyut pelan, supaya kaca di depannya punya sesuatu untuk dibiaskan */
.latar { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.latar i { position: absolute; width: 56vmax; height: 56vmax; border-radius: 50%; animation: hanyut 20s ease-in-out infinite alternate; }
.latar i:nth-child(1) { left: -18vmax; top: -14vmax; background: radial-gradient(circle at 35% 35%, #4F8BFF, #1B4DFF 60%, transparent 62%); }
.latar i:nth-child(2) { right: -20vmax; top: 18vh; width: 48vmax; height: 48vmax; background: radial-gradient(circle at 40% 40%, #FF9FB6, #FF5C85 60%, transparent 62%); animation-duration: 26s; animation-delay: -6s; }
.latar i:nth-child(3) { left: 10vmax; bottom: -26vmax; background: radial-gradient(circle at 40% 40%, #7CF0D8, #14C8A8 60%, transparent 62%); animation-duration: 23s; animation-delay: -12s; }
.latar i:nth-child(4) { right: 12vmax; bottom: -8vmax; width: 24vmax; height: 24vmax; background: radial-gradient(circle at 40% 40%, #FFE9A3, #FFC53D 60%, transparent 62%); animation-duration: 17s; }
@keyframes hanyut { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); } }

.kaca { display: grid; gap: 14px; max-width: 1040px; margin: 0 auto; padding: 18px 14px 28px; }
h2 { font-family: var(--judul); font-weight: 600; font-size: 22px; line-height: 1.15; }

/* Kaca cair: bias latar, tepi memantulkan cahaya, sorotan mengikuti jari atau kursor */
.glass {
  position: relative; overflow: hidden; border-radius: var(--r); padding: 20px;
  background: rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(26px) saturate(185%); backdrop-filter: blur(26px) saturate(185%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -14px 26px rgba(255,255,255,.14), 0 24px 44px -16px rgba(10, 40, 130, .38);
  animation: muncul .7s cubic-bezier(.2,.8,.2,1) both;
}
.glass::before { content: ''; position: absolute; inset: 0; z-index: 2; padding: 1.5px; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 62%, rgba(255,255,255,.7)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.glass::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; background: radial-gradient(320px circle at var(--mx, 25%) var(--my, 0%), rgba(255,255,255,.5), transparent 65%); opacity: .75; transition: opacity .3s; }
.glass > * { position: relative; z-index: 3; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(255,255,255,.72); } }
.masuk { animation-delay: .08s; }
.paket { animation-delay: .16s; }
.kontak { animation-delay: .24s; }
@keyframes muncul { from { opacity: 0; transform: translateY(22px) scale(.97); } }

.merek { display: flex; align-items: center; gap: 16px; }
/* Tetes air: kaca kecil yang bernapas */
.tetes { flex: none; width: 58px; height: 58px; border-radius: 50% 50% 50% 8%; transform: rotate(-45deg); background: rgba(255,255,255,.35); box-shadow: inset 4px 6px 10px rgba(255,255,255,.95), inset -6px -8px 14px rgba(27,77,255,.28), 0 12px 22px -6px rgba(27,77,255,.5); animation: napas 4s ease-in-out infinite; }
@keyframes napas { 50% { transform: rotate(-45deg) scale(1.1); } }
h1 { font-family: var(--judul); font-weight: 600; font-size: 42px; line-height: .95; letter-spacing: -.02em; }
.merek p:last-child { margin-top: 6px; }

.masuk h2 { margin-bottom: 10px; }
.form { display: grid; gap: 10px; }
label { font-weight: 700; }
#username { width: 100%; height: 56px; padding: 0 18px; border: 0; border-radius: 18px; background: rgba(255,255,255,.55); box-shadow: inset 0 2px 6px rgba(10,40,130,.18), inset 0 0 0 1px rgba(255,255,255,.7); font-family: var(--judul); font-weight: 500; font-size: 24px; letter-spacing: .06em; color: var(--ink); }
#username:focus-visible { outline-offset: 2px; }
.action { border-radius: 999px; font-family: var(--judul); font-size: 20px; font-weight: 600; background: var(--biru); box-shadow: inset 0 2px 2px rgba(255,255,255,.65), inset 0 -8px 14px rgba(0,0,80,.3), 0 12px 24px -8px rgba(27,77,255,.7); transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; }
.action:hover { transform: translateY(-2px) scale(1.02); }
.action:active { transform: scale(.97); }
.alert { color: #A4161A; line-height: 1.3; }
.trial { color: var(--biru); font-weight: 700; }
.more { font-size: 15px; }
.more input { border: 0; border-radius: 14px; background: rgba(255,255,255,.55); }

/* Daftar paket: satu butir kaca meluncur ke paket yang dipilih */
.paket h2 { margin-bottom: 14px; }
.daftar { --h: 72px; --g: 8px; position: relative; display: grid; gap: var(--g); }
.daftar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: var(--h); border-radius: 22px; background: rgba(255,255,255,.62); box-shadow: inset 0 2px 2px #fff, inset 0 -8px 16px rgba(27,77,255,.12), 0 12px 24px -8px rgba(10,40,130,.4); transform: translateY(calc(var(--i, 1) * (var(--h) + var(--g)))); transition: transform .6s cubic-bezier(.34,1.45,.5,1); }
.daftar button { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: var(--h); padding: 0 20px; border: 0; border-radius: 22px; background: transparent; text-align: left; color: var(--ink); transition: transform .2s; }
.daftar button:active { transform: scale(.98); }
.lama { font-family: var(--judul); font-weight: 600; font-size: 22px; }
.daftar b { font-family: var(--judul); font-weight: 600; font-size: 24px; white-space: nowrap; }
.daftar em { margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: #FF5C85; color: #fff; font-size: 13px; font-weight: 700; font-style: normal; vertical-align: 3px; }

.kontak { display: grid; gap: 10px; }
.kontak h2 { margin-bottom: 2px; }
.kontak a { display: block; padding: 15px; border-radius: 999px; text-align: center; text-decoration: none; font-weight: 700; transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.kontak a:hover { transform: translateY(-2px); }
.wa { background: #12A150; color: #fff; box-shadow: inset 0 2px 2px rgba(255,255,255,.55), inset 0 -8px 14px rgba(0,60,20,.28), 0 12px 24px -8px rgba(18,161,80,.7); }
.telp { background: rgba(255,255,255,.55); box-shadow: inset 0 1px 2px #fff; }

@media (min-width: 760px) {
  .kaca { grid-template-columns: 1fr 1fr; grid-template-areas: "merek merek" "masuk paket" "kontak paket"; gap: 22px; padding: 56px 24px; align-items: start; }
  .merek { grid-area: merek; padding: 32px 40px; gap: 28px; }
  .tetes { width: 96px; height: 96px; }
  h1 { font-size: 104px; }
  .merek p:last-child { font-size: 22px; }
  .masuk { grid-area: masuk; padding: 28px; }
  .paket { grid-area: paket; padding: 28px; }
  .kontak { grid-area: kontak; padding: 28px; }
  .daftar { --h: 84px; --g: 10px; }
  .lama { font-size: 26px; }
  .daftar b { font-size: 28px; }
}

.sheet { min-height: 0; margin: 10vh auto; border-radius: var(--r); background: rgba(255,255,255,.28); -webkit-backdrop-filter: blur(26px) saturate(185%); backdrop-filter: blur(26px) saturate(185%); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 24px 44px -16px rgba(10,40,130,.38); }
.sheet h1 { font-size: 40px; }
.facts div { padding: 12px 16px; border-radius: 18px; background: rgba(255,255,255,.5); }
.facts dd { color: var(--ink); }

/* Halaman setelah login tidak punya bola yang bergerak, jadi kacanya dibiaskan di atas bola diam */
body:not(.page-login)::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 18% 28%, #4F8BFF 0 20vmax, transparent 20.3vmax), radial-gradient(circle at 82% 72%, #FF7FA0 0 18vmax, transparent 18.3vmax), radial-gradient(circle at 70% 18%, #7CF0D8 0 9vmax, transparent 9.3vmax); }
