/* ═══════════════════════════════════════════════════════════
   COMIC 2026 — THE ROYAL CODEX
   Theme : Science History / Age of Enlightenment
   Palette: Slate Navy · Sepia · Parchment · Brass
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;900&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IM+Fell+English+SC&family=Special+Elite&display=swap');

/* ─────────── ROOT TOKENS ─────────── */
:root {
    --bg-void: #0e1318;
    --bg-deep: #161d24;
    --bg-slate: #1e2730;
    --bg-panel: #232d38;

    --parchment: #d4c4a8;
    --parchment-bright: #e8dcc4;
    --parchment-dim: #a89878;

    --ink: #bfb49a;
    --ink-soft: #9c9078;
    --ink-dim: #7a705c;

    --brass: #9c7e50;
    --brass-bright: #c4a878;
    --brass-deep: #6b5535;
    --brass-dark: #4a3a22;

    --sepia: #8a7050;
    --sepia-glow: #a89070;

    --patina: #5a7a6a;
    --moss: #6b7a4a;
    --leaf: #8a7a4a;

    --line: rgba(180, 160, 120, 0.14);
    --line-strong: rgba(180, 160, 120, 0.32);

    --font-display: 'Cinzel', serif;
    --font-hist: 'IM Fell English SC', serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    --font-mono: 'Special Elite', 'Courier New', monospace;
}

/* ─────────── RESET ─────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg-void);
    overflow-x: hidden;
    min-height: 100vh;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
button {
    cursor: none;
}

::selection {
    background: rgba(156, 126, 80, 0.45);
    color: #fff;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0b1014;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brass), var(--brass-deep));
    border-radius: 10px;
    border: 3px solid #0b1014;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--brass-bright), var(--brass));
}

/* ─────────── SCROLL PROGRESS ─────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--brass-deep), var(--brass-bright), var(--sepia-glow), var(--brass-bright), var(--brass-deep));
    background-size: 300% 100%;
    z-index: 99999;
    box-shadow: 0 0 16px rgba(196, 168, 120, 0.7);
    animation: progressSheen 7s linear infinite;
    transition: width .12s linear;
}

@keyframes progressSheen {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 300% 0;
    }
}

/* ═══════════ BACKGROUND ═══════════ */
#bg-layer {
    position: fixed;
    inset: 0;
    z-index: -30;
    overflow: hidden;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(168, 144, 112, 0.22), transparent 70%),
        radial-gradient(ellipse 50% 30% at 20% 8%, rgba(196, 168, 120, 0.10), transparent 70%),
        linear-gradient(180deg, #2a3038 0%, #20272f 22%, #1a2028 55%, #141a20 100%);
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(8, 10, 14, 0.55) 100%),
        repeating-linear-gradient(0deg, rgba(180, 160, 120, 0.02) 0px, rgba(180, 160, 120, 0.02) 1px, transparent 1px, transparent 90px),
        repeating-linear-gradient(90deg, rgba(180, 160, 120, 0.02) 0px, rgba(180, 160, 120, 0.02) 1px, transparent 1px, transparent 90px);
}

.bg-atom {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(90vw, 820px);
    height: min(90vw, 820px);
    transform: translate(-50%, -50%);
    color: rgba(160, 140, 110, 0.10);
    animation: atomDrift 30s ease-in-out infinite alternate;
}

@keyframes atomDrift {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    100% {
        transform: translate(-50%, -50%) rotate(12deg) scale(1.06);
    }
}

.bg-gear {
    position: absolute;
    color: rgba(140, 120, 90, 0.10);
    fill: none;
}

.gear-1 {
    width: 520px;
    height: 520px;
    top: -160px;
    left: -160px;
    animation: gearSpin 80s linear infinite;
}

.gear-2 {
    width: 380px;
    height: 380px;
    bottom: -120px;
    right: -120px;
    animation: gearSpin 60s linear infinite reverse;
    color: rgba(140, 120, 90, 0.08);
}

@keyframes gearSpin {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════
   FALLING CODEX LEAVES 🍃
   Setiap leaf adalah <span> berisi simbol sains.
   Gerakan: jatuh + sway horizontal + rotasi lembut.
   Variabel per-leaf: --dur, --sway, --rot, --drift, --size, --tint
   ═══════════════════════════════════════════════════════════ */
#leaf-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -18;
    contain: strict;
}

.codex-leaf {
    position: absolute;
    top: -12vh;
    left: var(--start-x, 50vw);
    font-family: 'Cormorant Garamond', 'Cinzel', serif;
    font-weight: 500;
    line-height: 1;
    will-change: transform, opacity;
    user-select: none;
    -webkit-user-select: none;
    text-shadow:
        0 0 6px currentColor,
        0 0 14px rgba(196, 168, 120, 0.25);
    animation:
        leafFall var(--dur, 14s) linear var(--delay, 0s) 1 forwards,
        leafSway var(--sway-dur, 4.5s) ease-in-out var(--delay, 0s) infinite alternate,
        leafSpin var(--spin-dur, 9s) linear var(--delay, 0s) infinite;
    transform-origin: 50% 50%;
}

/* Fall — linear vertical descent using translateY from -12vh to 112vh.
   Sway and spin are separate animations so they compose (independent transforms). */
@keyframes leafFall {
    0% {
        top: -12vh;
        opacity: 0;
    }

    8% {
        opacity: var(--max-op, 0.85);
    }

    92% {
        opacity: var(--max-op, 0.85);
    }

    100% {
        top: 112vh;
        opacity: 0;
    }
}

/* Sway — horizontal drift with easing */
@keyframes leafSway {
    0% {
        margin-left: calc(var(--sway, 40px) * -1);
    }

    100% {
        margin-left: var(--sway, 40px);
    }
}

/* Spin — gentle rotation */
@keyframes leafSpin {
    0% {
        rotate: 0deg;
    }

    100% {
        rotate: var(--rot, 360deg);
    }
}

/* Depth-of-field variants */
.codex-leaf.depth-near {
    filter: blur(0px) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
    z-index: 3;
}

.codex-leaf.depth-mid {
    filter: blur(0.6px) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
    opacity: 0.85;
    z-index: 2;
}

.codex-leaf.depth-far {
    filter: blur(1.6px);
    opacity: 0.55;
    z-index: 1;
}

/* Special glow for atomic/gear symbols */
.codex-leaf.symbol-glow {
    text-shadow:
        0 0 8px currentColor,
        0 0 22px rgba(196, 168, 120, 0.5),
        0 0 40px rgba(196, 168, 120, 0.2);
}

/* ═══════════ QUILL CURSOR 🪶 ═══════════ */
.quill-cursor {
    position: fixed;
    top: 0;
    left: 0;
    font-size: 30px;
    line-height: 1;
    pointer-events: none;
    z-index: 100000;
    transform: translate(-4px, -26px) rotate(0deg);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), filter .28s ease;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
    will-change: transform, left, top;
    user-select: none;
    -webkit-user-select: none;
}

.quill-cursor.is-hover {
    transform: translate(-4px, -26px) rotate(22deg) scale(1.25);
    filter: drop-shadow(0 0 14px rgba(196, 168, 120, 0.95)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
}

.quill-cursor.is-click {
    transform: translate(-4px, -20px) rotate(-8deg) scale(0.85);
    filter: drop-shadow(0 0 20px rgba(232, 220, 196, 1)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.7));
}

/* ═══════════ TOPBAR ═══════════ */
.topbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(280px, 94%, 1240px);
    height: 68px;
    background: rgba(22, 29, 36, 0.78);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    z-index: 900;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(232, 220, 196, 0.03) inset,
        0 0 30px rgba(156, 126, 80, 0.08);
    transition: height .5s cubic-bezier(.2, .8, .2, 1), background .5s, box-shadow .5s;
}

.topbar::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass-bright), transparent);
    opacity: 0.7;
}

.topbar::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 168, 120, 0.3), transparent);
}

.topbar:hover {
    border-color: var(--line-strong);
    box-shadow: 0 10px 44px rgba(0, 0, 0, 0.65), 0 0 44px rgba(156, 126, 80, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(14px, 1.6vw, 17px);
    letter-spacing: 4px;
    color: var(--parchment);
    text-shadow: 0 0 18px rgba(156, 126, 80, 0.5);
}

.logo-mark {
    color: var(--brass-bright);
    font-size: 18px;
    animation: logoSpin 24s linear infinite;
    display: inline-block;
    filter: drop-shadow(0 0 6px rgba(196, 168, 120, 0.7));
}

@keyframes logoSpin {
    to {
        transform: rotate(360deg);
    }
}

.logo-text em {
    font-style: normal;
    color: var(--brass);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.topbar-vol {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--brass);
    opacity: 0.75;
}

.hamburger {
    width: 34px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: .4s;
}

.hamburger span {
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brass), var(--brass-bright));
    box-shadow: 0 0 10px rgba(196, 168, 120, 0.55);
    transition: .5s cubic-bezier(.68, -0.55, .27, 1.55);
}

.hamburger:hover {
    transform: scale(1.08);
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ═══════════ SIDE MENU ═══════════ */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 360px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(22, 29, 36, 0.99), rgba(26, 32, 40, 0.99));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: -16px 0 70px rgba(0, 0, 0, 0.75), 0 0 60px rgba(156, 126, 80, 0.1);
    padding: 120px 0 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--line);
    transition: right .7s cubic-bezier(.17, .67, .22, 1.01);
}

.side-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(196, 168, 120, 0.1), transparent 40%),
        repeating-linear-gradient(0deg, rgba(180, 160, 120, 0.025) 0px, rgba(180, 160, 120, 0.025) 1px, transparent 1px, transparent 60px);
    pointer-events: none;
}

.side-menu.active {
    right: 0;
}

.menu-eyebrow {
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 5px;
    color: var(--brass);
    opacity: 0.75;
}

.side-menu ul {
    list-style: none;
    width: 100%;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

.side-menu ul li {
    margin: 22px 0;
    transform: translateX(60px);
    opacity: 0;
    transition: .55s cubic-bezier(.2, .8, .2, 1);
}

.side-menu.active ul li {
    transform: translateX(0);
    opacity: 1;
}

.side-menu.active ul li:nth-child(1) {
    transition-delay: .1s;
}

.side-menu.active ul li:nth-child(2) {
    transition-delay: .16s;
}

.side-menu.active ul li:nth-child(3) {
    transition-delay: .22s;
}

.side-menu.active ul li:nth-child(4) {
    transition-delay: .28s;
}

.side-menu.active ul li:nth-child(5) {
    transition-delay: .34s;
}

.side-menu.active ul li:nth-child(6) {
    transition-delay: .40s;
}

.side-menu ul li a {
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 3px;
    color: var(--parchment);
    position: relative;
    padding-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: .35s;
}

.side-menu ul li a::before {
    content: "❖";
    color: var(--brass);
    font-size: 9px;
    opacity: 0;
    transform: translateX(-10px);
    transition: .35s;
}

.side-menu ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--brass);
    transition: .45s;
}

.side-menu ul li a:hover {
    color: var(--brass-bright);
    text-shadow: 0 0 18px rgba(196, 168, 120, 0.7);
}

.side-menu ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.side-menu ul li a:hover::after {
    width: 100%;
}

.menu-footer {
    margin-top: auto;
    padding: 24px 30px 0;
    border-top: 1px solid var(--line);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--brass);
    opacity: 0.7;
}

.close-btn {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--brass);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(156, 126, 80, 0.05);
    transition: .45s;
}

.close-btn:hover {
    transform: rotate(180deg) scale(1.12);
    color: var(--brass-bright);
    border-color: var(--brass);
    box-shadow: 0 0 22px rgba(196, 168, 120, 0.5);
}

.side-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 12, 0.78);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: .45s;
    z-index: 998;
}

.side-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ═══════════ HERO ═══════════ */
.hero {
    min-height: 100vh;
    padding: 150px 5% 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(232, 220, 196, 0.018) 0px, rgba(232, 220, 196, 0.018) 1px, transparent 1px, transparent 4px);
    mix-blend-mode: overlay;
    animation: scanline 14s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        transform: translateY(-40px);
    }

    100% {
        transform: translateY(40px);
    }
}

.hero::after {
    content: "";
    position: absolute;
    width: 1100px;
    height: 1100px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(168, 144, 112, 0.18), transparent 62%);
    filter: blur(90px);
    z-index: -1;
    animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: .85;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.16);
        opacity: 1;
    }
}

.hero-visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.atom-hero {
    width: min(88vw, 820px);
    height: min(88vw, 820px);
    color: rgba(196, 168, 120, 0.28);
    animation: atomHeroSpin 120s linear infinite;
}

@keyframes atomHeroSpin {
    to {
        transform: rotate(360deg);
    }
}

.atom-orbit {
    stroke-width: 1;
    stroke-dasharray: 2 6;
    animation: orbitDash 30s linear infinite;
}

@keyframes orbitDash {
    to {
        stroke-dashoffset: -200;
    }
}

.electron {
    fill: var(--brass-bright);
    filter: drop-shadow(0 0 10px rgba(196, 168, 120, 0.9));
}

.electron-2 {
    fill: var(--sepia-glow);
}

.electron-3 {
    fill: var(--parchment-dim);
}

.nucleus-outer {
    fill: rgba(196, 168, 120, 0.18);
    stroke: var(--brass);
    stroke-width: 1;
}

.nucleus-inner {
    fill: var(--brass-bright);
    filter: drop-shadow(0 0 12px rgba(196, 168, 120, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 880px;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 5px;
    color: var(--brass);
    margin-bottom: 26px;
    opacity: 0;
    animation: eyebrowFade 1.6s ease .3s forwards;
}

.hero-eyebrow .line {
    display: inline-block;
    width: 46px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

@keyframes eyebrowFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(46px, 9.5vw, 110px);
    letter-spacing: 10px;
    line-height: 1.02;
    margin-bottom: 22px;
    background: linear-gradient(180deg, #f2e8d0 0%, var(--brass-bright) 55%, var(--brass-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(196, 168, 120, 0.35), 0 0 80px rgba(156, 126, 80, 0.18);
    animation: heroFloat 8s ease-in-out infinite alternate;
}

.hero-title em {
    font-style: normal;
    color: var(--brass);
    -webkit-text-fill-color: var(--brass);
    font-weight: 500;
}

@keyframes heroFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-6px);
    }
}

.hero-subtitle {
    font-style: italic;
    font-size: clamp(15px, 1.8vw, 21px);
    letter-spacing: 1.5px;
    color: var(--ink-soft);
    margin-bottom: 16px;
    max-width: 640px;
}

.hero-motto {
    font-family: var(--font-hist);
    font-size: clamp(12px, 1.4vw, 15px);
    letter-spacing: 5px;
    color: var(--brass);
    margin-bottom: 26px;
    opacity: 0.9;
}

.hero-rule {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.hero-rule span {
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.hero-rule i {
    font-style: normal;
    color: var(--brass);
    font-size: 12px;
    opacity: 0.8;
}

.hero-lede {
    font-size: clamp(15px, 1.7vw, 18px);
    line-height: 1.75;
    color: var(--ink-soft);
    max-width: 640px;
    margin-bottom: 44px;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.btn {
    padding: 15px 40px;
    border-radius: 3px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: inline-block;
    transition: .5s cubic-bezier(.2, .8, .2, 1);
}

.btn span {
    position: relative;
    z-index: 2;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transition: .8s;
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brass) 0%, var(--brass-bright) 50%, var(--brass) 100%);
    background-size: 200% 100%;
    color: #1a1208;
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.35) inset, 0 8px 30px rgba(156, 126, 80, 0.4);
    animation: btnShine 6s linear infinite;
}

@keyframes btnShine {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.6) inset, 0 16px 46px rgba(196, 168, 120, 0.6);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--parchment);
}

.btn-ghost:hover {
    background: var(--parchment);
    color: #161d24;
    border-color: var(--parchment);
    transform: translateY(-5px);
    box-shadow: 0 16px 42px rgba(232, 220, 196, 0.25);
}

.hero-meta {
    display: flex;
    gap: 44px;
    margin-top: 60px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-meta>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hero-meta strong {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--brass-bright);
    text-shadow: 0 0 16px rgba(196, 168, 120, 0.5);
}

.hero-meta small {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--ink-dim);
    text-transform: uppercase;
}

.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 5px;
    color: var(--brass);
    opacity: 0.7;
    z-index: 3;
}

.scroll-hint i {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--brass), transparent);
    animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scaleY(0.8);
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* ═══════════ SECTIONS ═══════════ */
section {
    padding: 130px 8%;
    position: relative;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 6px;
    color: var(--brass);
    margin-bottom: 14px;
    opacity: 0.85;
    text-align: center;
}

h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: 3px;
    color: var(--parchment);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 24px rgba(156, 126, 80, 0.35);
}

h2::before,
h2::after {
    content: "❖";
    display: inline-block;
    margin: 0 22px;
    color: var(--brass);
    font-size: 13px;
    opacity: 0.65;
    vertical-align: middle;
}

.section-lede {
    text-align: center;
    font-style: italic;
    color: var(--ink-soft);
    font-size: 17px;
    letter-spacing: .5px;
    max-width: 640px;
    margin: 0 auto 56px;
}

/* ═══════════ COUNTDOWN ═══════════ */
.countdown-section {
    text-align: center;
}

.countdown-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    max-width: 760px;
    margin: 0 auto;
}

.box {
    position: relative;
    background: linear-gradient(160deg, rgba(35, 45, 56, 0.85), rgba(22, 29, 36, 0.75));
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 28px 22px 22px;
    min-width: 118px;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 220, 196, 0.03) inset;
    transition: .5s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}

.box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
    opacity: 0.7;
}

.box::after {
    content: "";
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-bottom: 1px solid var(--brass);
    border-right: 1px solid var(--brass);
    opacity: 0.35;
}

.box:hover {
    transform: translateY(-8px);
    border-color: var(--line-strong);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.62), 0 0 36px rgba(156, 126, 80, 0.25);
}

.box span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 44px;
    letter-spacing: 2px;
    color: var(--brass-bright);
    text-shadow: 0 0 22px rgba(196, 168, 120, 0.55);
    display: block;
    transition: .2s ease;
}

.box span.pop {
    transform: scale(1.18);
    color: #fff;
    text-shadow: 0 0 32px var(--brass), 0 0 60px rgba(196, 168, 120, 0.7);
}

.box small {
    display: block;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--ink-dim);
}

/* ═══════════ KATEGORI GRID ═══════════ */
.kategori-section {
    text-align: center;
}

.kategori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 26px;
    max-width: 1280px;
    margin: 0 auto;
    perspective: 1200px;
}

.kategori-card {
    position: relative;
    background: linear-gradient(160deg, rgba(35, 45, 56, 0.78), rgba(22, 29, 36, 0.62));
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 36px 26px 30px;
    text-align: left;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, border-color .45s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.kategori-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(196, 168, 120, 0.16), transparent 55%);
    opacity: 0;
    transition: opacity .4s;
    pointer-events: none;
}

.kategori-card:hover::before {
    opacity: 1;
}

.kategori-card::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-top: 1px solid var(--brass);
    border-right: 1px solid var(--brass);
    opacity: 0.55;
    transition: .4s;
}

.kategori-card:hover::after {
    top: 10px;
    right: 10px;
    opacity: 1;
    border-color: var(--brass-bright);
}

.kategori-card:hover {
    transform: translateY(-12px);
    border-color: var(--line-strong);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(156, 126, 80, 0.22);
}

.card-corner {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 16px;
    height: 16px;
    border-bottom: 1px solid var(--brass);
    border-left: 1px solid var(--brass);
    opacity: 0.45;
    transition: .4s;
}

.kategori-card:hover .card-corner {
    bottom: 6px;
    left: 6px;
    opacity: 0.9;
    border-color: var(--brass-bright);
}

.card-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 18px;
    display: inline-block;
    filter: drop-shadow(0 0 14px rgba(196, 168, 120, 0.55));
    transition: .4s;
}

.kategori-card:hover .card-icon {
    filter: drop-shadow(0 0 22px rgba(196, 168, 120, 0.95));
    transform: scale(1.08);
}

.card-num {
    position: absolute;
    top: 28px;
    right: 28px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--brass);
    opacity: 0.85;
}

.kategori-card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 1.5px;
    color: var(--parchment);
    margin-bottom: 12px;
    text-shadow: 0 0 14px rgba(196, 168, 120, 0.25);
}

.kategori-card p {
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.card-tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brass);
    background: rgba(156, 126, 80, 0.06);
    transition: .4s;
}

.kategori-card:hover .card-tag {
    border-color: var(--brass);
    color: var(--brass-bright);
    background: rgba(156, 126, 80, 0.16);
    box-shadow: 0 0 16px rgba(196, 168, 120, 0.3);
}

/* ═══════════ ABOUT ═══════════ */
.about-section {
    text-align: center;
}

.about-grid {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: start;
    text-align: left;
}

.about-text p {
    font-size: 17.5px;
    line-height: 1.9;
    color: var(--ink-soft);
    margin-bottom: 22px;
}

.about-text em {
    color: var(--brass-bright);
    font-style: italic;
}

.drop-cap {
    float: left;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 64px;
    line-height: 0.85;
    margin: 6px 14px 0 0;
    color: var(--brass-bright);
    text-shadow: 0 0 26px rgba(196, 168, 120, 0.6);
}

.about-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aside-card {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--brass);
    border-radius: 3px;
    background: linear-gradient(135deg, rgba(35, 45, 56, 0.6), rgba(22, 29, 36, 0.4));
    transition: .4s;
}

.aside-card:hover {
    transform: translateX(6px);
    border-color: var(--line-strong);
    border-left-color: var(--brass-bright);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 26px rgba(156, 126, 80, 0.18);
}

.aside-icon {
    font-size: 20px;
    color: var(--brass-bright);
    margin-bottom: 8px;
    filter: drop-shadow(0 0 10px rgba(196, 168, 120, 0.55));
}

.aside-card h4 {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--parchment);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.aside-card p {
    font-size: 14.5px;
    color: var(--ink-soft);
    line-height: 1.55;
}

/* ═══════════ LOCATION ═══════════ */
.location-section {
    text-align: center;
}

.map-box {
    max-width: 960px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    position: relative;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.65), 0 0 50px rgba(156, 126, 80, 0.12);
}

.map-box iframe {
    width: 100%;
    height: 440px;
    display: block;
    border: 0;
    filter: sepia(0.5) hue-rotate(-12deg) saturate(0.75) contrast(1.08) brightness(0.85);
    transition: filter .7s;
}

.map-box:hover iframe {
    filter: sepia(0.2) saturate(0.95) brightness(0.98);
}

.map-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: 0 0 80px rgba(156, 126, 80, 0.16) inset;
    background: linear-gradient(180deg, rgba(22, 29, 36, 0.12), transparent 30%, transparent 70%, rgba(22, 29, 36, 0.32));
}

/* ═══════════ CONTACT ═══════════ */
.contact-section {
    text-align: center;
}

.contact-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.contact-card {
    padding: 34px 24px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: linear-gradient(160deg, rgba(35, 45, 56, 0.6), rgba(22, 29, 36, 0.5));
    backdrop-filter: blur(10px);
    transition: .45s;
}

.contact-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), 0 0 34px rgba(156, 126, 80, 0.2);
}

.contact-icon {
    font-size: 26px;
    color: var(--brass-bright);
    margin-bottom: 14px;
    filter: drop-shadow(0 0 12px rgba(196, 168, 120, 0.6));
}

.contact-card h4 {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--brass);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.contact-card a,
.contact-card p {
    font-size: 16px;
    color: var(--parchment);
    text-decoration: none;
    font-style: italic;
    word-break: break-word;
}

.contact-card a:hover {
    color: var(--brass-bright);
    text-shadow: 0 0 14px rgba(196, 168, 120, 0.55);
}

.contact-note {
    margin-top: 44px;
    font-style: italic;
    color: var(--ink-soft);
    font-size: 16px;
}

/* ═══════════ FOOTER ═══════════ */
.premium-footer {
    position: relative;
    background: linear-gradient(180deg, rgba(22, 29, 36, 0.6), rgba(11, 16, 20, 0.98));
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    padding: 70px 8% 26px;
    margin-top: 60px;
    overflow: hidden;
}

.premium-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
    opacity: 0.8;
}

.premium-footer::after {
    content: "❖";
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--brass);
    font-size: 18px;
    background: var(--bg-void);
    padding: 0 14px;
    text-shadow: 0 0 18px rgba(196, 168, 120, 0.7);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 44px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 44px;
}

.footer-brand h2 {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 3px;
    color: var(--parchment);
    margin-bottom: 14px;
    text-align: left;
    text-shadow: 0 0 24px rgba(196, 168, 120, 0.35);
}

.footer-brand h2::before,
.footer-brand h2::after {
    display: none;
}

.footer-brand p {
    color: var(--ink-soft);
    font-size: 15px;
    font-style: italic;
    line-height: 1.6;
}

.footer-motto {
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 3px;
    color: var(--brass);
    opacity: 0.85;
}

.footer-links h4,
.footer-social h4 {
    font-family: var(--font-display);
    color: var(--brass-bright);
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 12px;
    position: relative;
    padding-left: 0;
    transition: .35s;
}

.footer-links a:hover {
    color: var(--brass-bright);
    padding-left: 14px;
}

.footer-links a::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: var(--brass);
    opacity: 0;
    transition: .35s;
}

.footer-links a:hover::before {
    opacity: 1;
}

.social-icons a {
    display: inline-block;
    margin-right: 9px;
    padding: 7px 13px;
    color: var(--ink-soft);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 2px;
    transition: .4s;
}

.social-icons a:hover {
    background: var(--brass);
    color: #161d24;
    border-color: var(--brass);
    transform: translateY(-3px);
    box-shadow: 0 0 26px rgba(196, 168, 120, 0.7);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(180, 160, 120, 0.1);
    text-align: center;
    color: var(--ink-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
}

.footer-craft {
    margin-top: 8px;
    font-size: 11px;
    opacity: 0.65;
    font-style: italic;
}

/* ═══════════ LOADING ═══════════ */
#loading {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #161d24 0%, #0b1014 72%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
    transition: opacity .9s ease;
}

#loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(196, 168, 120, 0.14), transparent 60%);
    animation: loadPulse 4s ease-in-out infinite;
}

@keyframes loadPulse {

    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }
}

#loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-atom {
    width: 170px;
    height: 170px;
    margin-bottom: 34px;
    color: var(--brass);
    position: relative;
    z-index: 1;
    animation: loadSpin 14s linear infinite;
}

.loading-atom svg {
    width: 100%;
    height: 100%;
}

@keyframes loadSpin {
    to {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(40px, 10vw, 84px);
    letter-spacing: 14px;
    display: flex;
    gap: 8px;
    color: var(--parchment);
    text-shadow: 0 0 26px rgba(196, 168, 120, 0.6), 0 0 70px rgba(156, 126, 80, 0.35);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.loading-title span {
    display: inline-block;
    animation: letterFlicker 2.2s ease-in-out infinite;
}

.loading-title span:nth-child(1) {
    animation-delay: 0s;
}

.loading-title span:nth-child(2) {
    animation-delay: .12s;
}

.loading-title span:nth-child(3) {
    animation-delay: .24s;
}

.loading-title span:nth-child(4) {
    animation-delay: .36s;
}

.loading-title span:nth-child(5) {
    animation-delay: .48s;
}

@keyframes letterFlicker {

    0%,
    100% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0.55;
        transform: translateY(-3px);
    }
}

.loading-sub {
    font-family: var(--font-hist);
    font-size: 13px;
    letter-spacing: 6px;
    color: var(--brass);
    margin-bottom: 26px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.loading-text {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 28px;
    opacity: 0.9;
    animation: pulseText 1.9s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.loading-bar {
    width: clamp(260px, 45vw, 480px);
    height: 2px;
    background: rgba(156, 126, 80, 0.16);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brass-deep), var(--brass-bright), var(--brass-deep));
    box-shadow: 0 0 16px var(--brass);
    animation: loading 4s cubic-bezier(.6, .1, .2, 1) forwards;
}

@keyframes loading {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* ═══════════ REVEAL ═══════════ */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1), transform 1.1s cubic-bezier(.2, .7, .2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════ RIPPLE ═══════════ */
@keyframes ripple-anim {
    to {
        transform: scale(3.6);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(196, 168, 120, 0.35);
    pointer-events: none;
    transform: scale(0);
    animation: ripple-anim .7s ease-out forwards;
    z-index: 5;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width:1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .bg-atom {
        width: min(110vw, 680px);
        height: min(110vw, 680px);
    }
}

@media (max-width:900px) {
    .hero-meta {
        gap: 32px;
    }

    .kategori-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width:768px) {
    body {
        cursor: auto;
    }

    a,
    button,
    .hamburger,
    .close-btn {
        cursor: pointer;
    }

    .quill-cursor {
        display: none;
    }

    section {
        padding: 100px 6%;
    }

    h2::before,
    h2::after {
        display: none;
    }

    .topbar {
        height: 62px;
        padding: 0 20px;
    }

    .topbar-vol {
        display: none;
    }

    .hero {
        padding: 130px 5% 80px;
    }

    .hero-eyebrow {
        font-size: 9.5px;
        letter-spacing: 4px;
    }

    .side-menu {
        width: 310px;
    }

    .box {
        padding: 22px 16px;
        min-width: 96px;
    }

    .box span {
        font-size: 36px;
    }

    .kategori-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 18px;
    }

    .kategori-card {
        padding: 28px 22px 24px;
    }
}

@media (max-width:480px) {
    .buttons {
        gap: 12px;
    }

    .btn {
        padding: 13px 26px;
        font-size: 11.5px;
        letter-spacing: 2.5px;
    }

    .hero-title {
        letter-spacing: 6px;
    }

    .hero-meta {
        gap: 22px;
    }

    .hero-meta strong {
        font-size: 18px;
    }

    .loading-title {
        letter-spacing: 8px;
        gap: 5px;
    }

    .kategori-grid {
        grid-template-columns: 1fr;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    #leaf-layer {
        display: none;
    }

    .codex-leaf {
        animation: none;
    }

    .bg-atom,
    .bg-gear,
    .atom-hero {
        animation: none;
    }
}

/* ═══════════ AUTH AREA IN TOPBAR ═══════════ */
#authArea .btn {
    padding: 8px 18px;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: none;
}

#authArea .btn-primary {
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.25) inset, 0 4px 18px rgba(156, 126, 80, 0.35);
}

#authArea .btn-ghost {
    border-color: var(--line-strong);
}

@media (max-width: 768px) {
    #authArea .btn {
        padding: 6px 12px;
        font-size: 10px;
        letter-spacing: 1.5px;
    }
}

/* ═══════════ AUTH AREA DALAM SIDE MENU ═══════════ */
.menu-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 30px;
    margin-top: 20px;
    border-top: 1px solid var(--line);
    position: relative;
    z-index: 1;
}

.menu-auth-btn {
    display: block;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all .4s cubic-bezier(.2, .8, .2, 1);
    cursor: none;
}

.menu-auth-btn.primary {
    background: linear-gradient(135deg, var(--brass) 0%, var(--brass-bright) 50%, var(--brass) 100%);
    background-size: 200% 100%;
    color: #1a1208;
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.3) inset, 0 6px 20px rgba(156, 126, 80, 0.35);
    animation: btnShine 6s linear infinite;
}

.menu-auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.5) inset, 0 12px 30px rgba(196, 168, 120, 0.55);
}

.menu-auth-btn.ghost {
    border: 1px solid var(--line-strong);
    color: var(--parchment);
}

.menu-auth-btn.ghost:hover {
    background: var(--parchment);
    color: #161d24;
    border-color: var(--parchment);
    transform: translateY(-2px);
}

/* Sembunyikan auth area saat menu belum terbuka */
.side-menu .menu-auth {
    opacity: 0;
    transform: translateX(60px);
    transition: .55s cubic-bezier(.2, .8, .2, 1);
}

.side-menu.active .menu-auth {
    opacity: 1;
    transform: translateX(0);
    transition-delay: .46s;
}

/* ═══════════════════════════════════════════════════════════
   AUTH ACTIONS (TOPBAR)
   ═══════════════════════════════════════════════════════════ */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn-top {
    padding: 8px 16px;
    font-family: var(--font-display);
    font-size: 10.5px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: all .4s cubic-bezier(.2, .8, .2, 1);
    cursor: none;
    white-space: nowrap;
}

.auth-btn-top.ghost {
    border: 1px solid var(--line-strong);
    color: var(--parchment);
    background: transparent;
}

.auth-btn-top.ghost:hover {
    background: var(--parchment);
    color: #161d24;
    border-color: var(--parchment);
}

.auth-btn-top.primary {
    background: linear-gradient(135deg, var(--brass) 0%, var(--brass-bright) 50%, var(--brass) 100%);
    background-size: 200% 100%;
    color: #1a1208;
    border: none;
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.3) inset, 0 4px 16px rgba(156, 126, 80, 0.35);
    animation: btnShine 6s linear infinite;
}

.auth-btn-top.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(232, 220, 196, 0.5) inset, 0 10px 26px rgba(196, 168, 120, 0.55);
}

.auth-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 2px;
    color: var(--brass-bright);
    background: rgba(156, 126, 80, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   MODAL SYSTEM
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 12, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(35, 45, 56, 0.97), rgba(22, 29, 36, 0.96));
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 44px 38px 38px;
    position: relative;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(156, 126, 80, 0.15);
    transform: translateY(30px) scale(0.96);
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass-bright), transparent);
    opacity: 0.7;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(156, 126, 80, 0.05);
    color: var(--brass);
    font-size: 16px;
    cursor: none;
    transition: all .4s;
}

.modal-close:hover {
    color: var(--brass-bright);
    border-color: var(--brass);
    transform: rotate(180deg) scale(1.08);
    box-shadow: 0 0 20px rgba(196, 168, 120, 0.5);
}

.modal-content {
    position: relative;
    z-index: 1;
}

.modal-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 5px;
    color: var(--brass);
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.85;
}

.modal-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 3px;
    color: var(--parchment);
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(196, 168, 120, 0.35);
}

.modal-sub {
    text-align: center;
    font-style: italic;
    color: var(--ink-soft);
    font-size: 14.5px;
    margin-bottom: 26px;
    line-height: 1.5;
}

.modal-field {
    margin-bottom: 16px;
}

.modal-field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 7px;
}

.modal-field input,
.modal-field select,
.modal-field textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(14, 19, 24, 0.7);
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: 15.5px;
    transition: border-color .35s, box-shadow .35s;
}

.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 2px rgba(196, 168, 120, 0.18), 0 0 18px rgba(156, 126, 80, 0.15);
}

.modal-field input::placeholder,
.modal-field textarea::placeholder {
    color: var(--ink-dim);
    font-style: italic;
}

.modal-field select option {
    background: #1e2730;
    color: var(--parchment);
}

.modal-submit {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: none;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--brass) 0%, var(--brass-bright) 50%, var(--brass) 100%);
    background-size: 200% 100%;
    color: #1a1208;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: none;
    transition: transform .4s, box-shadow .4s;
    animation: btnShine 6s linear infinite;
}

.modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(196, 168, 120, 0.55);
}

.modal-switch {
    text-align: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 14.5px;
    color: var(--ink-soft);
}

.modal-switch a {
    color: var(--brass-bright);
    text-decoration: none;
    font-weight: 600;
    cursor: none;
    transition: text-shadow .3s;
}

.modal-switch a:hover {
    text-shadow: 0 0 14px rgba(196, 168, 120, 0.7);
}

.modal-alert {
    padding: 10px 14px;
    border-radius: 3px;
    margin-bottom: 16px;
    font-size: 13.5px;
    display: none;
}

.modal-alert.error {
    display: block;
    background: rgba(180, 60, 60, 0.15);
    border: 1px solid rgba(180, 60, 60, 0.5);
    color: #e8a0a0;
}

.modal-alert.success {
    display: block;
    background: rgba(90, 122, 106, 0.15);
    border: 1px solid rgba(90, 122, 106, 0.5);
    color: #a0d4b8;
}

/* Kartu lomba & panduan */
.modal-lomba-card {
    border: 1px solid var(--line);
    border-left: 3px solid var(--brass);
    border-radius: 3px;
    padding: 16px 18px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(156, 126, 80, 0.08), transparent);
}

.modal-lomba-card h4 {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--brass-bright);
    margin-bottom: 6px;
}

.modal-lomba-card p {
    font-size: 14px;
    color: var(--ink-soft);
    font-style: italic;
    line-height: 1.5;
}

.modal-panduan-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.modal-panduan-list li {
    padding: 10px 0 10px 26px;
    border-bottom: 1px solid var(--line);
    position: relative;
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.modal-panduan-list li::before {
    content: "❖";
    position: absolute;
    left: 0;
    top: 11px;
    color: var(--brass);
    font-size: 10px;
}

.modal-panduan-list li strong {
    color: var(--parchment);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Success view */
.modal-success-icon {
    text-align: center;
    font-size: 48px;
    color: var(--brass-bright);
    margin-bottom: 14px;
    filter: drop-shadow(0 0 20px rgba(196, 168, 120, 0.7));
    animation: heroFloat 3s ease-in-out infinite alternate;
}

/* Responsive topbar */
@media (max-width: 640px) {
    .auth-btn-top {
        padding: 7px 12px;
        font-size: 9.5px;
        letter-spacing: 1.5px;
    }

    .auth-user-chip {
        padding: 5px 10px;
        font-size: 9.5px;
    }
}

@media (max-width: 480px) {
    .auth-actions {
        gap: 6px;
    }

    .auth-btn-top.ghost {
        display: none;
    }

    /* sembunyikan "Masuk" di layar kecil, hanya Daftar */
    .modal-box {
        padding: 36px 22px 28px;
    }
}

/* ═══════════════════════════════════════════════════════════
   ⚡ PERFORMANCE PATCH — Ringankan untuk HP low-end & mobile
   ═══════════════════════════════════════════════════════════ */

/* ─── Mobile & Low-End: buang efek berat ─── */
@media (max-width: 820px), (pointer: coarse), (prefers-reduced-motion: reduce) {

  /* Backdrop blur itu PALING berat. Matikan. */
  .topbar,
  .side-menu,
  .modal-overlay,
  .modal-box,
  .reg-card,
  .box,
  .kategori-card,
  .aside-card,
  .contact-card,
  .premium-footer,
  .ig-drop,
  .auth-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Background lebih solid biar tidak perlu blur */
  .topbar { background: rgba(22, 29, 36, 0.96) !important; }
  .modal-overlay { background: rgba(6, 8, 12, 0.94) !important; }
  .reg-card { background: linear-gradient(160deg, rgba(35, 45, 56, 0.98), rgba(22, 29, 36, 0.96)) !important; }
  .auth-panel { background: linear-gradient(160deg, rgba(35, 45, 56, 0.98), rgba(22, 29, 36, 0.96)) !important; }
  .modal-box { background: linear-gradient(160deg, rgba(35, 45, 56, 0.98), rgba(22, 29, 36, 0.96)) !important; }

  /* Matikan semua animasi dekoratif */
  #leaf-layer,
  .codex-leaf,
  .quill-cursor {
    display: none !important;
  }

  .bg-atom,
  .bg-gear,
  .atom-hero,
  .loading-atom,
  .logo-mark,
  #scroll-progress,
  .hero-title,
  .hero::before,
  .hero::after,
  .success-mark,
  .btn-primary,
  .auth-btn,
  .modal-submit,
  .reg-btn.primary,
  .menu-auth-btn.primary,
  .auth-btn-top.primary,
  .loading-title span,
  .loading-progress,
  .loading-text,
  .electron {
    animation: none !important;
  }

  /* Hilangkan scanning line hero */
  .hero::before { opacity: 0.4; }

  /* Matikan efek hover 3D di kartu */
  .kategori-card {
    transform: none !important;
    transition: box-shadow .3s ease, border-color .3s ease !important;
  }
  .kategori-card:hover {
    transform: none !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55) !important;
  }

  /* Kecilkan shadow besar */
  .topbar { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important; }
  .modal-box { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important; }
  .box { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4) !important; }
  .box:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important; }

  /* Hero glow besar -> kecil */
  .hero::after { filter: blur(40px); opacity: 0.6; }
}

/* ─── Low-End Fallback (dari script.js) ─── */
body.low-end #leaf-layer,
body.low-end .codex-leaf,
body.low-end .bg-atom,
body.low-end .bg-gear,
body.low-end .atom-hero,
body.low-end .quill-cursor {
  display: none !important;
}

body.low-end .topbar,
body.low-end .modal-overlay,
body.low-end .modal-box,
body.low-end .reg-card,
body.low-end .auth-panel,
body.low-end .box,
body.low-end .kategori-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.low-end .topbar { background: rgba(22, 29, 36, 0.96) !important; }
body.low-end .hero::after { display: none; }

body.low-end *:not(.loading-progress) {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
}

/* ─── End Performance Patch ─── */