@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Quicksand:wght@500;600;700&display=swap');

:root {
    --pink: #ff5f9e;
    --rose: #ff8fc7;
    --violet: #a855f7;
    --peach: #ffb27a;
    --ink: #7a2d5c;
    --glass: rgba(255, 255, 255, 0.55);
    --stroke: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

body {
    min-height: 100vh;
    min-height: 100dvh; /* tinggi riil, nggak kepotong bilah alamat browser HP */
    display: flex;
    padding: 1.2rem;
    padding: 1.2rem max(1.2rem, env(safe-area-inset-left)) calc(1.2rem + env(safe-area-inset-bottom)) max(1.2rem, env(safe-area-inset-right));
    font-family: 'Quicksand', 'Arial Rounded MT Bold', sans-serif;
    color: var(--ink);
    /* latar diam, tidak bergerak supaya tidak bikin pusing */
    background: linear-gradient(135deg, #ffeede 0%, #ffe6f2 35%, #ece9ff 70%, #e6f6ff 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

/* ---------- canvas efek ---------- */
.fx-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

/* ---------- bintik warna lembut (diam) ---------- */
.orbs span {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.42;
    pointer-events: none;
    /* gerak sangat pelan supaya terasa hidup tapi tidak bikin pusing */
    animation: drift 34s ease-in-out infinite;
}

.orbs span:nth-child(1) {
    width: 340px;
    height: 340px;
    background: #ff9ecb;
    top: -110px;
    left: -90px;
}

.orbs span:nth-child(2) {
    width: 300px;
    height: 300px;
    background: #c4b5fd;
    bottom: -110px;
    right: -80px;
    animation-delay: -8s;
}

.orbs span:nth-child(3) {
    width: 240px;
    height: 240px;
    background: #fcd34d;
    top: 62%;
    left: 6%;
    opacity: 0.28;
    animation-delay: -16s;
}

.orbs span:nth-child(4) {
    width: 220px;
    height: 220px;
    background: #a5f3fc;
    top: 8%;
    right: 12%;
    opacity: 0.3;
    animation-delay: -24s;
}

.orbs span:nth-child(5) {
    display: none;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(38px, -26px) scale(1.07); }
}

/* ---------- kursor kustom ---------- */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--pink);
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(255, 95, 158, 0.45);
    transition: width .25s, height .25s, background .25s, border-color .25s;
}

.cursor-ring.grow {
    width: 62px;
    height: 62px;
    background: rgba(255, 95, 158, 0.1);
    border-color: rgba(255, 95, 158, 0.7);
}

/* ---------- kartu kaca ---------- */
.container {
    z-index: 2;
    position: relative;
    width: 100%;
    max-width: 720px;
    /* margin:auto supaya tidak terpotong di layar pendek */
    margin: auto;
}

.glass {
    text-align: center;
    background: var(--glass);
    border: 1.5px solid var(--stroke);
    border-radius: 32px;
    padding: clamp(2rem, 6vw, 3.2rem) clamp(1.2rem, 5vw, 2.8rem);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    box-shadow: 0 20px 50px rgba(190, 60, 130, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.eyebrow {
    display: inline-block;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: .72rem;
    color: var(--violet);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(168, 85, 247, 0.22);
    padding: .45rem 1.1rem;
    border-radius: 999px;
    margin-bottom: 1.3rem;
    opacity: 0;
}

/* ---------- foto halaman pertama (gaya polaroid) ---------- */
.hero-photo {
    width: clamp(170px, 32vw, 235px);
    margin: 0 auto 1.6rem;
    padding: 9px 9px 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(190, 60, 130, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: rotate(-3deg);
    transition: transform .35s ease, box-shadow .35s ease;
}

.hero-photo:hover {
    transform: rotate(0deg) translateY(-3px);
    box-shadow: 0 22px 44px rgba(190, 60, 130, 0.26);
}

.hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 5px;
    background: linear-gradient(150deg, #ffeef6, #f3edff);
}

/* ---------- judul ---------- */
.title {
    font-family: 'Baloo 2', cursive;
    line-height: 1.08;
    margin-bottom: 1.5rem;
}

.title .line {
    display: block;
    font-size: clamp(2.1rem, 7.5vw, 3.9rem);
    font-weight: 800;
}

.title .name {
    font-size: clamp(2.5rem, 8.5vw, 4.5rem);
    filter: drop-shadow(0 6px 18px rgba(255, 95, 158, 0.28));
}

/* gradasi dipasang per-huruf, karena background-clip:text rusak
   kalau anaknya punya transform (dipakai animasi masuk) */
.title .name .char {
    background: linear-gradient(90deg, #ff5f9e, #c084fc, #ffb27a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-text .char {
    background: linear-gradient(90deg, #ff5f9e, #c084fc, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* kilau gradasi yang bergerak sangat pelan */
.title .name .char,
.gradient-text .char {
    background-size: 250% 100%;
    animation: shimmer 9s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 250% 50%; }
}

.word {
    display: inline-block;
    white-space: nowrap;
}

.char {
    display: inline-block;
    will-change: transform, opacity;
}

/* ---------- sapaan ketik ---------- */
.greeting-wrap {
    min-height: 3.4em;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 2rem;
}

.greeting {
    font-size: clamp(1rem, 2.6vw, 1.22rem);
    font-weight: 600;
    line-height: 1.6;
    max-width: 46ch;
    color: #8b3a6b;
    text-align: center;
}

.caret {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    margin-top: .25em;
    background: var(--pink);
    border-radius: 3px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---------- tombol ---------- */
.cta-button {
    position: relative;
    border: none;
    border-radius: 999px;
    padding: 1rem 2.3rem;
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, #ff5f9e, #c084fc);
    box-shadow: 0 12px 28px rgba(255, 95, 158, 0.35);
    opacity: 0;
    transition: transform .25s, box-shadow .25s;
    animation: glowPulse 5s ease-in-out infinite;
}

/* denyut cahaya pelan di sekitar tombol */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 12px 28px rgba(255, 95, 158, 0.3), 0 0 0 0 rgba(255, 95, 158, 0.3); }
    50% { box-shadow: 0 14px 34px rgba(255, 95, 158, 0.42), 0 0 0 14px rgba(255, 95, 158, 0); }
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(255, 95, 158, 0.45);
}

.cta-button:active {
    transform: translateY(0) scale(.98);
}

.hint {
    margin-top: 1.3rem;
    font-size: .86rem;
    font-weight: 600;
    color: rgba(123, 45, 92, 0.55);
    opacity: 0;
}

/* ---------- tombol musik ---------- */
.music-btn {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--stroke);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    font-size: 1.15rem;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(190, 60, 130, 0.16);
    cursor: none;
    opacity: 0;
    transition: transform .25s, background .25s;
}

.music-btn:hover {
    transform: scale(1.08);
}

.music-btn.playing {
    background: linear-gradient(120deg, #ff5f9e, #c084fc);
}

/* ---------- emoji melayang ---------- */
.floating {
    position: fixed;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    will-change: transform, opacity;
}

/* ---------- responsif ---------- */
@media (max-height: 680px) {
    .glass { padding: 1.4rem 1.2rem; }
    .hero-photo {
        width: clamp(140px, 24vw, 175px);
        padding: 7px 7px 22px;
        margin-bottom: 1rem;
    }
    .title .line { font-size: clamp(1.7rem, 7vw, 2.9rem); }
    .title .name { font-size: clamp(2rem, 8vw, 3.3rem); }
    .title { margin-bottom: 1rem; }
    .eyebrow { margin-bottom: .9rem; }
    .greeting-wrap { min-height: 2.6em; margin-bottom: 1.3rem; }
}

@media (max-width: 768px) {
    .glass { border-radius: 26px; }

    /* backdrop-filter + blur besar itu berat di GPU HP.
       Di layar kecil, kartu dibuat lebih pekat sehingga tetap rapi tanpa blur. */
    .glass {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.78);
    }

    .orbs span { filter: blur(50px); opacity: 0.32; }
    .orbs span:nth-child(3),
    .orbs span:nth-child(4) { display: none; }
}

/* layar sangat kecil (HP jadul / layar 320px) */
@media (max-width: 380px) {
    body { padding-left: .9rem; padding-right: .9rem; }
    .glass { padding: 1.4rem 1rem; border-radius: 22px; }
    .hero-photo { width: clamp(130px, 44vw, 165px); padding: 6px 6px 18px; margin-bottom: 1.1rem; }
    .title .line { font-size: clamp(1.55rem, 8.5vw, 2.2rem); }
    .title .name { font-size: clamp(1.9rem, 10vw, 2.7rem); }
    .greeting { font-size: .97rem; }
    .cta-button { padding: .9rem 1.6rem; font-size: 1rem; width: 100%; }
    .music-btn { width: 44px; height: 44px; font-size: 1.05rem; }
}

/* HP di posisi menyamping: jangan sampai kepotong */
@media (max-height: 480px) and (orientation: landscape) {
    body { padding-top: 1rem; padding-bottom: 1rem; }
    .glass { padding: 1.3rem 1.2rem; }
    .greeting-wrap { min-height: 2.2em; }
    .title .line { font-size: clamp(1.4rem, 4.5vh, 2rem); }
    .title .name { font-size: clamp(1.7rem, 5.5vh, 2.4rem); }
    .music-btn { top: .7rem; right: .7rem; }
}

/* target sentuh minimum 44px supaya enak diketuk */
@media (pointer: coarse) {
    .music-btn { width: 46px; height: 46px; }
}

/* ---------- aksesibilitas: hormati preferensi hemat animasi ---------- */
@media (prefers-reduced-motion: reduce) {
    .orbs span,
    .caret,
    .title .name .char,
    .gradient-text .char,
    .cta-button,
    .music-btn {
        animation: none !important;
    }

    .glass,
    .cta-button,
    .cursor-ring {
        transition-duration: .01ms !important;
    }
}

@media (hover: none), (pointer: coarse) {
    * { cursor: auto; }
    .cursor-dot,
    .cursor-ring { display: none; }
    .music-btn { cursor: pointer; }
}
