:root {
    /* DEFAULT: Solid State Dark */
    --bg-base: #050505;
    --panel-bg: #0A0A0C;
    --primary: #8b5cf6; /* Purple */
    --border: rgba(255, 255, 255, 0.05);
    --text-main: #f8fafc;
}

[data-theme="cyberpunk"] {
    --bg-base: #09090b;
    --panel-bg: #18181b;
    --primary: #f213a4; /* Neon Pink */
    --border: rgba(242, 19, 164, 0.2);
    --text-main: #e2e8f0;
}

[data-theme="matrix"] {
    --bg-base: #000000;
    --panel-bg: #051a05;
    --primary: #00ff00; /* Hacker Green */
    --border: rgba(0, 255, 0, 0.2);
    --text-main: #ccffcc;
}
[data-theme="light"] {
    --bg-base: #f1f5f9;
    --panel-bg: rgba(255, 255, 255, 0.7);
    --primary: #6d28d9; /* Deep Purple for contrast */
    --border: rgba(0, 0, 0, 0.1);
    --text-main: #0f172a;
}

/* Fix input text colors for light mode */
[data-theme="light"] .glass-input {
    background: rgba(255, 255, 255, 0.5);
    color: #0f172a !important;
}
[data-theme="light"] .text-gray-400 { color: #64748b !important; }
[data-theme="light"] .text-white { color: #0f172a !important; }
[data-theme="light"] .glass-panel { box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); }

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.glass-panel {
    background: var(--panel-bg); 
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.type-card { transition: border-color 0.2s ease, background-color 0.2s ease; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.qr-animate { animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* ==========================================
   LANDING HERO MOTION (js/motion.js)
   ========================================== */

/*
 * Hero elements start hidden so motion.js can stage the entrance without a
 * flash of unstyled content. motion.js strips .hero-reveal before it touches
 * GSAP, so a missing GSAP just leaves everything plainly visible. The keyframe
 * is a last-resort fallback for when main.js never boots at all (e.g. a CDN
 * module import fails) -- it reveals the hero a second later regardless.
 */
.hero-reveal {
    opacity: 0;
    animation: heroFallbackReveal 0.5s ease-out 1s both;
}

@keyframes heroFallbackReveal {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Vertical word rotator on the headline's last line --- */
.hero-rotator {
    position: relative;
    display: block;
    width: 100%;
    height: 1.4em;
    line-height: 1.4;
    overflow: hidden;
    text-align: center;
}

.hero-word {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    will-change: transform, opacity;
}

/* Without JS only the first word should be legible in the stack. */
.hero-word.is-active { opacity: 1; }

/* The longest phrases overflow a phone at the h2's own size, so scale down. */
@media (max-width: 767px) {
    .hero-rotator { font-size: min(8vw, 1em); }
}

.hero-badge-text {
    display: inline-block;
    will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
    .hero-reveal { opacity: 1; animation: none; }
}
