:root {
    --frame-yellow: #ffd200;
    --ink: #3a1e15;
    --blue: #4aa9e8;
    --yellow: #ffd23f;
    --red: #ee4444;
    --green: #7fbf3f;
    --orange: #f5941f;
    --white: #fff;
    --gray: #fafafa;
    --line: rgba(4, 0, 0, 0.28);
    --ring: #ffffff;
    --shadow: rgba(60, 40, 20, 0.18);
    --ink: #4a341f;
}

* {
    box-sizing: border-box;
}

::selection {
    background-color: var(--frame-yellow);
    color: var(--ink);
}

::-moz-selection {
    background-color: var(--frame-yellow);
    color: var(--ink);
}

body {
    margin: 0;
    background-color: var(--frame-yellow);
    font-family: 'Inter', 'Noto Sans Khmer', sans-serif;
}

.container {
    width: 100%;
    max-width: 1040px;
    margin: auto;
    background: var(--gray);
}

/* form */
/* hand-drawn wobble border */
.wobble-border {
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

/* crayon scribble underline */
.scribble-underline {
    position: relative;
}

.scribble-underline::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='10' viewBox='0 0 200 10'%3E%3Cpath d='M0 5 Q 10 0, 20 5 T 40 5 T 60 5 T 80 5 T 100 5 T 120 5 T 140 5 T 160 5 T 180 5 T 200 5' stroke='%23f5941f' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 40px 10px;
}

input[type='radio'],
input[type='checkbox'] {
    accent-color: #f5941f;
}

.option-card:has(input:checked) {
    border-color: #f5941f;
    background-color: #fff7e8;
    box-shadow: 0 4px 0 0 #f5941f;
    transform: translateY(-2px);
}

.option-card {
    transition: all 0.15s ease;
}

.consent-card:has(input:checked) {
    border-color: #7fbf3f;
    background-color: #f4fbe9;
}

@media (prefers-reduced-motion: reduce) {
    .option-card,
    .drip {
        transition: none !important;
        animation: none !important;
    }
}

input:focus-visible,
textarea:focus-visible

/* .option-card:focus-within, */
/* .consent-card:focus-within  */ {
    outline: 3px solid #4aa9e8;
    outline-offset: 2px;
}

.drip {
    animation: sway 4s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes sway {
    0%,
    100% {
        transform: rotate(-1.5deg);
    }

    50% {
        transform: rotate(1.5deg);
    }
}

/* Footer */
.duck-pet {
    top: 50%;
    transform: translateY(-50%);
    will-change: left, transform;
}

@keyframes duck-walk-bob {
    0%,
    100% {
        margin-top: 0;
    }

    50% {
        margin-top: -3px;
    }
}

.duck-pet.walking {
    animation: duck-walk-bob 0.35s ease-in-out infinite;
}

/* Duck follow mouse */
#stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
}

#hint {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--ink);
    opacity: 0.55;
    font-size: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    pointer-events: none;
}

svg#trail-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.duck {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 50%;
    box-shadow: 0 6px 14px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    will-change: transform;
}

.duck svg {
    width: 34px;
    height: 34px;
}

.duck-face {
    opacity: 1;
    transform-origin: center bottom;
}

@keyframes float-updown {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.float-animate {
    animation: float-updown 3s ease-in-out infinite;
}
