:root {
    --rif-bg: #f4f2ed;
    --rif-panel: rgba(244, 242, 237, .92);
    --rif-text: #121313;
    --rif-muted: #8c8d8b;
    --rif-line: #c6c5c0;
    --rif-line-soft: rgba(18, 19, 19, .09);
    --rif-invert: #111212;
    --rif-on-invert: #f7f6f2;
    --rif-shadow: 0 28px 80px rgba(17, 18, 18, .13);
    --rif-font: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html.rif-dark {
    --rif-bg: #111212;
    --rif-panel: rgba(17, 18, 18, .94);
    --rif-text: #f2f1ed;
    --rif-muted: #8c8e8d;
    --rif-line: #414342;
    --rif-line-soft: rgba(255, 255, 255, .09);
    --rif-invert: #f0efeb;
    --rif-on-invert: #111212;
    --rif-shadow: 0 30px 90px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--rif-bg); scroll-behavior: smooth; }
body.rif-site {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    color: var(--rif-text);
    background: var(--rif-bg);
    font-family: var(--rif-font);
    -webkit-font-smoothing: antialiased;
    transition: color .5s ease, background-color .5s ease;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 1px solid var(--rif-text);
    outline-offset: 4px;
}

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.rif-page {
    position: relative;
    display: grid;
    grid-template-rows: 98px minmax(440px, 1fr) 138px;
    min-height: 100vh;
    min-height: 100dvh;
    isolation: isolate;
}

.rif-masthead {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 34px;
}

.rif-wordmark {
    margin: 0;
    font-size: 13px;
    font-weight: 520;
    letter-spacing: .46em;
    line-height: 1;
    text-indent: .46em;
}

.rif-theme-toggle {
    position: absolute;
    top: 26px;
    right: clamp(20px, 4vw, 60px);
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--rif-text);
    border: 0;
    background: transparent;
    cursor: pointer;
}
.rif-theme-toggle span {
    width: 12px;
    height: 12px;
    border: 1px solid currentColor;
    border-radius: 50%;
    box-shadow: inset -4px -2px 0 var(--rif-bg);
    transition: transform .4s ease, box-shadow .4s ease;
}
.rif-theme-toggle:hover span { transform: rotate(-22deg) scale(1.08); }

.rif-main { display: grid; align-items: center; padding: 26px 24px 44px; }
.rif-launcher { position: relative; width: min(410px, 100%); margin: 0 auto; }
.rif-actions { display: grid; gap: 11px; }
.rif-action {
    position: relative;
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    width: 100%;
    min-height: 66px;
    padding: 0 20px;
    overflow: hidden;
    color: var(--rif-text);
    border: 1px solid var(--rif-line);
    border-radius: 0;
    background: transparent;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: color .35s ease, border-color .35s ease, transform .35s cubic-bezier(.22, 1, .36, 1);
    animation: rif-action-in .75s both cubic-bezier(.22, 1, .36, 1);
}
.rif-action:nth-child(1) { animation-delay: .15s; }
.rif-action:nth-child(2) { animation-delay: .22s; }
.rif-action:nth-child(3) { animation-delay: .29s; }
.rif-action:nth-child(4) { animation-delay: .36s; }
.rif-action:nth-child(5) { animation-delay: .43s; }
.rif-action::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: var(--rif-invert);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.rif-action:hover, .rif-action:focus-visible { color: var(--rif-on-invert); border-color: var(--rif-invert); transform: translateY(-2px); }
.rif-action:hover::before, .rif-action:focus-visible::before { transform: scaleY(1); }
.rif-action__label {
    grid-column: 2;
    font-size: 12px;
    font-weight: 560;
    letter-spacing: .29em;
    line-height: 1.35;
    text-indent: .29em;
}
.rif-action__icon { display: grid; grid-column: 1; width: 18px; height: 18px; place-items: center; opacity: .72; }
.rif-action__icon:empty { visibility: hidden; }
.rif-action__icon svg, .rif-action__icon img { width: 17px; height: 17px; object-fit: contain; }
.rif-action__icon svg { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.rif-action__edge { grid-column: 3; font-size: 13px; opacity: 0; transform: translate(-5px, 5px); transition: opacity .3s ease, transform .3s ease; }
.rif-action:hover .rif-action__edge { opacity: .8; transform: translate(0, 0); }
.rif-action__soon { position: absolute; right: 9px; bottom: 7px; font-size: 7px; letter-spacing: .16em; color: var(--rif-muted); }
.rif-action.is-unavailable { cursor: default; opacity: .48; }
.rif-action.is-unavailable:hover { color: var(--rif-text); border-color: var(--rif-line); transform: none; }
.rif-action.is-unavailable:hover::before { transform: scaleY(0); }

.rif-kode-qr {
    width: clamp(64px, 14vw, 76px);
    margin: clamp(16px, 2.8vh, 24px) auto 0;
}
.rif-kode-qr img {
    display: block;
    width: 100%;
    height: auto;
}

.rif-footer { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 20px 24px; text-align: center; }
.rif-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 17px;
    color: var(--rif-muted);
    font-size: 9px;
    letter-spacing: .22em;
}
.rif-counter__pulse { width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
.rif-counter__value { min-width: 6ch; font-variant-numeric: tabular-nums; text-align: left; }
.rif-footer__brand { margin: 0 0 12px; color: var(--rif-muted); font-size: 10px; font-weight: 520; letter-spacing: .42em; text-indent: .42em; }
.rif-slogan { margin: 0; color: var(--rif-muted); font-size: 9px; letter-spacing: .27em; text-indent: .27em; }

.rif-intro {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    color: #111212;
    background: #f4f2ed;
    pointer-events: none;
    animation: rif-veil 2.15s .2s both cubic-bezier(.76, 0, .24, 1);
}
.rif-intro__mark {
    font-size: clamp(17px, 2vw, 25px);
    font-weight: 500;
    letter-spacing: .6em;
    text-indent: .6em;
    animation: rif-mark 1.85s both cubic-bezier(.22, 1, .36, 1);
}
.rif-intro.is-skipped { display: none; }

.rif-dialog {
    width: min(600px, calc(100% - 28px));
    max-height: calc(100dvh - 28px);
    padding: 0;
    color: var(--rif-text);
    border: 1px solid var(--rif-line);
    background: var(--rif-panel);
    box-shadow: var(--rif-shadow);
    opacity: 0;
    transform: translateY(20px) scale(.985);
    transition: opacity .28s ease, transform .42s cubic-bezier(.22, 1, .36, 1), overlay .28s allow-discrete, display .28s allow-discrete;
}
.rif-dialog[open] { opacity: 1; transform: translateY(0) scale(1); }
@starting-style { .rif-dialog[open] { opacity: 0; transform: translateY(20px) scale(.985); } }
.rif-dialog::backdrop { background: rgba(13, 14, 14, .45); opacity: 0; backdrop-filter: blur(7px); transition: opacity .3s ease, overlay .3s allow-discrete, display .3s allow-discrete; }
.rif-dialog[open]::backdrop { opacity: 1; }
@starting-style { .rif-dialog[open]::backdrop { opacity: 0; } }
.rif-dialog__panel { position: relative; padding: clamp(30px, 6vw, 58px); }
.rif-dialog__close { position: absolute; top: 15px; right: 17px; width: 34px; height: 34px; padding: 0; color: var(--rif-muted); border: 0; background: transparent; font-size: 27px; font-weight: 200; line-height: 1; cursor: pointer; }
.rif-kicker { margin: 0 0 19px; color: var(--rif-muted); font-size: 9px; font-weight: 600; letter-spacing: .35em; }
.rif-dialog h2 { margin: 0; font-size: clamp(28px, 6vw, 48px); font-weight: 360; letter-spacing: -.035em; }
.rif-dialog__lead { max-width: 430px; margin: 14px 0 32px; color: var(--rif-muted); font-size: 14px; line-height: 1.65; }
.rif-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.rif-field-grid label, .rif-code-field { display: grid; gap: 8px; }
.rif-field-grid label > span { color: var(--rif-muted); font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.rif-field-grid input, .rif-field-grid textarea, .rif-code-field input {
    width: 100%;
    padding: 12px 0;
    color: var(--rif-text);
    border: 0;
    border-bottom: 1px solid var(--rif-line);
    border-radius: 0;
    background: transparent;
    outline: none;
}
.rif-field-grid input:focus, .rif-field-grid textarea:focus, .rif-code-field input:focus { border-color: var(--rif-text); }
.rif-field-grid textarea { resize: vertical; }
.rif-field-wide { grid-column: 1 / -1; }
.rif-honeypot { position: absolute !important; left: -9999px !important; }
.rif-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 54px;
    margin-top: 28px;
    padding: 0 20px;
    color: var(--rif-on-invert);
    border: 1px solid var(--rif-invert);
    background: var(--rif-invert);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .22em;
    cursor: pointer;
}
.rif-submit[disabled] { opacity: .5; cursor: wait; }
.rif-form-status { min-height: 18px; margin: 15px 0 0; color: var(--rif-muted); font-size: 12px; line-height: 1.5; }
.rif-form-status.is-error { color: #b34138; }
.rif-code-field input { padding: 15px 0; font-size: 24px; letter-spacing: .35em; text-align: center; text-transform: uppercase; }
.rif-access-name { margin: 0 0 14px; color: var(--rif-muted); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; }
.rif-private-actions { display: grid; gap: 10px; }
.rif-private-actions a { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 18px; color: var(--rif-text); border: 1px solid var(--rif-line); font-size: 11px; font-weight: 600; letter-spacing: .22em; text-decoration: none; transition: .3s ease; }
.rif-private-actions a:hover { color: var(--rif-on-invert); border-color: var(--rif-invert); background: var(--rif-invert); }
.rif-private-action__lead { display: inline-flex; align-items: center; gap: 12px; }
.rif-private-action__lead img { width: 19px; height: 19px; object-fit: contain; }
.rif-kode-reset { margin-top: 20px; padding: 8px 0; color: var(--rif-muted); border: 0; border-bottom: 1px solid var(--rif-line); background: transparent; font-size: 9px; font-weight: 600; letter-spacing: .2em; cursor: pointer; transition: color .25s ease, border-color .25s ease; }
.rif-kode-reset:hover { color: var(--rif-text); border-color: var(--rif-text); }
.rif-kode form.is-shaking { animation: rif-shake .4s both ease; }

@keyframes rif-action-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes rif-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes rif-mark {
    0% { opacity: 0; filter: blur(10px); letter-spacing: .35em; transform: scale(.98); }
    38% { opacity: 1; filter: blur(0); letter-spacing: .6em; transform: scale(1); }
    72% { opacity: 1; filter: blur(0); }
    100% { opacity: 0; filter: blur(12px); letter-spacing: .92em; transform: scale(1.025); }
}
@keyframes rif-veil { 0%, 68% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }

@media (max-width: 600px) {
    .rif-page { grid-template-rows: 78px minmax(430px, 1fr) 118px; }
    .rif-masthead { padding-top: 27px; }
    .rif-wordmark { font-size: 11px; }
    .rif-theme-toggle { top: 17px; right: 13px; }
    .rif-main { padding: 10px 22px 26px; }
    .rif-actions { gap: 9px; }
    .rif-action { min-height: 60px; padding: 0 15px; }
    .rif-action__label { font-size: 10px; letter-spacing: .25em; text-indent: .25em; }
    .rif-footer { padding-bottom: 17px; }
    .rif-counter { margin-bottom: 13px; }
    .rif-slogan { font-size: 8px; letter-spacing: .2em; }
    .rif-field-grid { grid-template-columns: 1fr; }
    .rif-field-wide { grid-column: auto; }
    .rif-dialog__panel { padding: 38px 24px 28px; }
}

@media (max-height: 720px) and (min-width: 601px) {
    .rif-page { grid-template-rows: 76px minmax(390px, 1fr) 105px; }
    .rif-masthead { padding-top: 27px; }
    .rif-main { padding-top: 8px; padding-bottom: 20px; }
    .rif-action { min-height: 56px; }
    .rif-footer { padding-bottom: 16px; }
    .rif-counter { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .rif-intro { display: none; }
}
