/* ======================================================================
   ViberWorld — styles.css
   Theme palette carried from the original splash:
     cyan   #00f2fe   blue    #4facfe
     magenta#c471ed   red     #f64f59
     deep   #050505 (bg)
   Font: Space Grotesk (300/400/600/700) + JetBrains Mono for terminal/mono bits
   Tailwind CDN still in use on the page for utility classes; this file owns
   all custom components (modals, form, orb, neon, effects, breakpoints).
   ====================================================================== */


/* ---------- 1. ROOT + BASE ---------- */

:root {
    --cyan:      #00f2fe;
    --blue:      #4facfe;
    --magenta:   #c471ed;
    --pink:      #f64f59;
    --bg:        #050505;
    --panel:     rgba(15, 15, 20, 0.6);
    --panel-s:   rgba(15, 15, 20, 0.8);
    --border:    rgba(255, 255, 255, 0.08);
    --border-h:  rgba(255, 255, 255, 0.18);
    --muted:     #94a3b8;
    --text:      #e2e8f0;

    /* Char counter colors */
    --c-green:   #22e08a;
    --c-white:   #ffffff;
    --c-yellow:  #ffd43b;
    --c-dkred:   #a61b1b;
    --c-btred:   #ff2a2a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    perspective: 1200px;        /* enables 3D tilt FX on splash card */
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* Lock scroll when a modal is open */
body.modal-open {
    overflow: hidden;
}


/* ---------- 2. BACKGROUNDS ---------- */

/* Flowing animated gradient */
.vibe-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #0f172a, #2e0854, #001b3a);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    z-index: -3;
}

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

/* Subtle digital grid overlay */
.grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -2;
    pointer-events: none;
}

/* Matrix rain canvas (JS fills it) */
#matrix-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    opacity: 0.22;          /* bumped from 0.15 → 0.22 for more visible presence */
    pointer-events: none;
    filter: hue-rotate(-15deg);  /* subtle cyan tint on the characters */
}


/* ---------- 3. GLASS PANEL (splash card + modals) ---------- */

.glass-panel {
    background: var(--panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}
.glass-panel:hover {
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.7);
}


/* ---------- 4. NEON TEXT ---------- */

.neon-text-primary {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5), 0 0 20px rgba(79, 172, 254, 0.3);
    background: linear-gradient(to right, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.neon-text-secondary {
    background: linear-gradient(to right, var(--magenta), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ---------- 5. VIBE ORB ---------- */

.vibe-orb {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--blue) 0%, var(--cyan) 40%, transparent 70%);
    box-shadow: 0 0 50px var(--cyan), 0 0 100px var(--blue) inset;
    animation: pulseOrb 4s ease-in-out infinite alternate;
    margin: 0 auto 2rem auto;
    position: relative;
}
.vibe-orb::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: ripple 2s linear infinite;
}
@keyframes pulseOrb {
    0%   { transform: scale(0.9); opacity: 0.7; filter: hue-rotate(0deg); }
    100% { transform: scale(1.1); opacity: 1;   filter: hue-rotate(45deg); }
}
@keyframes ripple {
    0%   { width: 100%; height: 100%; opacity: 1; }
    100% { width: 150%; height: 150%; opacity: 0; }
}
.orb-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 10px var(--cyan);
    pointer-events: none;
    z-index: 5;
    font-family: monospace;
    white-space: nowrap;
}


/* ---------- 6. TITLE GLITCH + SCRAMBLE ---------- */

#vibe-title {
    position: relative;
    display: inline-block;
}
#vibe-title::before,
#vibe-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
    pointer-events: none;
    transition: transform 0.1s ease;
}
#vibe-title::before {
    color: #0ff;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-1px, 0);
}
#vibe-title::after {
    color: #f0f;
    z-index: -2;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(1px, 0);
}
.glitching::before {
    transform: translate(-5px, -2px) !important;
    filter: hue-rotate(90deg);
}
.glitching::after {
    transform: translate(5px, 2px) !important;
    filter: hue-rotate(-90deg);
}

@keyframes spectralShimmer {
    0%   { filter: hue-rotate(0deg) brightness(1); }
    50%  { filter: hue-rotate(30deg) brightness(1.2); }
    100% { filter: hue-rotate(0deg) brightness(1); }
}
.shimmer-active { animation: spectralShimmer 3s ease-in-out infinite; }


/* ---------- 7. MODALS (shared base) ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal[hidden] { display: none !important; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 10, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: backdropFade 0.5s ease;
}
@keyframes backdropFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    position: relative;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--panel-s);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-h);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 0 60px rgba(0, 242, 254, 0.15),
        0 25px 80px rgba(0, 0, 0, 0.6);
    animation: modalEnter 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Modal entry FX: "portal opening" — hairline → expand vertical → settle */
@keyframes modalEnter {
    0% {
        opacity: 0;
        transform: scaleY(0.02) scaleX(1.1);
        filter: brightness(2) blur(3px);
    }
    40% {
        opacity: 1;
        transform: scaleY(0.05) scaleX(1.1);
        filter: brightness(2) blur(2px);
    }
    70% {
        transform: scaleY(1) scaleX(1);
        filter: brightness(1.3) blur(0);
    }
    100% {
        transform: scale(1);
        filter: none;
    }
}

/* Door-close reverse on exit — JS adds .modal-exit to trigger */
.modal.modal-exit .modal-content {
    animation: modalExit 0.5s cubic-bezier(0.55, 0, 0.74, 0.25) forwards;
}
@keyframes modalExit {
    to {
        opacity: 0;
        transform: scaleY(0.02);
        filter: brightness(2) blur(2px);
    }
}


/* ---------- 8. WELCOME MODAL ---------- */

.welcome-modal .modal-content {
    max-width: 520px;
    text-align: center;
    padding: 3rem 2rem;
}
.welcome-pulse {
    width: 12px; height: 12px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 20px var(--cyan);
    animation: welcomePulse 1.3s ease-in-out infinite;
}
@keyframes welcomePulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.6; }
}
.welcome-modal h2 {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.5rem;
}
.welcome-modal h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    margin: 0 0 1rem;
    font-weight: 700;
}
.welcome-modal p.tagline {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin: 0 0 2rem;
    font-weight: 300;
    letter-spacing: 0.04em;
}


/* ---------- 9. FORM MODAL ---------- */

.form-modal .modal-content {
    max-width: 620px;
    padding: 1.5rem 1.75rem 2rem;
}
.form-header {
    text-align: center;
    margin: 0.25rem 0 1.5rem;
}
.form-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.form-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
}
.form-header p {
    color: #cbd5e1;
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
}

/* Close button (return-visit "X") stays in the corner.
   Skip button (forced-flow "Skip this form") gets its own bigger top-center
   treatment below — overrides apply on top of these shared base properties. */
.skip-btn, .close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: transparent;
    border: 0;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}
.close-btn { font-size: 1.5rem; line-height: 1; }
.close-btn:hover { color: var(--cyan); background: rgba(0, 242, 254, 0.08); }

/* Skip button — re-styled per L 2026-04-20 to be prominent at the top of
   the modal, finger-friendly on mobile, and obviously a button rather
   than a corner footnote (mobile users were missing the old 11px text). */
.skip-btn {
    /* Override corner positioning from the shared block above */
    top: 0.55rem;
    right: auto;
    left: 50%;
    transform: translateX(-50%);

    background: rgba(255, 60, 80, 0.12);
    border: 1px solid rgba(255, 60, 80, 0.55);
    border-radius: 999px;
    color: #fff;
    padding: 0.55rem 1.4rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: 0 0 6px rgba(255, 60, 80, 0.55);
    box-shadow:
        0 0 18px rgba(255, 60, 80, 0.35),
        inset 0 0 12px rgba(255, 60, 80, 0.08);
    z-index: 20;
    cursor: pointer;
    /* Pulse so the eye catches it — even more important on mobile */
    animation: skipBtnPulse 1.6s ease-in-out infinite;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.skip-btn:hover {
    background: rgba(255, 60, 80, 0.22);
    box-shadow:
        0 0 28px rgba(255, 60, 80, 0.6),
        inset 0 0 14px rgba(255, 60, 80, 0.15);
    transform: translateX(-50%) translateY(-1px);
}
.skip-btn:active { transform: translateX(-50%) translateY(0); }
@keyframes skipBtnPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(255, 60, 80, 0.35), inset 0 0 12px rgba(255, 60, 80, 0.08); }
    50%      { box-shadow: 0 0 32px rgba(255, 60, 80, 0.65), inset 0 0 16px rgba(255, 60, 80, 0.15); }
}
@media (max-width: 540px) {
    .skip-btn {
        top: 0.4rem;
        font-size: 1rem;
        padding: 0.65rem 1.3rem;       /* bigger tap target — WCAG 44px friendly */
        min-height: 44px;
    }
}


/* ---------- 10. PROGRESS BAR ---------- */

.progress-wrap {
    margin-bottom: 1.25rem;
    padding: 0.5rem 0 0.75rem;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--magenta));
    background-size: 200% 100%;
    transition: width 0.35s ease;
    animation: progressSweep 2.5s linear infinite;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}
@keyframes progressSweep {
    0%   { background-position: 0%   0%; }
    100% { background-position: 200% 0%; }
}
.progress-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.4rem;
    text-align: right;
}


/* ---------- 11. FORM FIELDS ---------- */

#contact-form { display: flex; flex-direction: column; gap: 1rem; }

.field { position: relative; display: flex; flex-direction: column; gap: 0.4rem; }

.field > label,
.field .field-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

/* Required-field glowing dot indicator (replaces *) */
.req-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.7);
    transition: background 0.25s, box-shadow 0.25s, transform 0.2s;
    flex-shrink: 0;
}
.field.filled .req-dot {
    background: var(--c-green);
    box-shadow: 0 0 8px rgba(34, 224, 138, 0.7);
    transform: scale(1.1);
}
.field.invalid .req-dot {
    background: var(--c-btred);
    box-shadow: 0 0 8px rgba(255, 42, 42, 0.7);
    animation: glitchShake 0.3s;
}
@keyframes glitchShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-2px); }
    40%      { transform: translateX(2px); }
    60%      { transform: translateX(-1px); }
    80%      { transform: translateX(1px); }
}

/* Text + email + tel inputs, textarea, selects */
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field textarea,
.field select {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    color: #fff;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12), 0 0 12px rgba(0, 242, 254, 0.18);
    background: rgba(0, 0, 0, 0.5);
}

.field input::placeholder,
.field textarea::placeholder { color: #64748b; }

/* Custom dropdown styling */
.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='%2300f2fe'%3E%3Cpath d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 10px 6px;
    padding-right: 2rem;
    cursor: pointer;
}
.field select option {
    background: #0f172a;
    color: #fff;
}

/* Conditional reveal fields (has_website URL, project hint) */
.field.conditional[hidden],
.field-hint.conditional[hidden] { display: none !important; }
.field.conditional { animation: revealField 0.4s ease; }
@keyframes revealField {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.field-hint {
    background: rgba(196, 113, 237, 0.08);
    border-left: 2px solid var(--magenta);
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    color: #e9d5ff;
    border-radius: 4px;
    font-style: italic;
}


/* ---------- 12. PILLS (radio / yes-no) ---------- */

.radio-pills, .yn-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pill {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pill > span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: #cbd5e1;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}
.pill:hover > span {
    border-color: rgba(0, 242, 254, 0.5);
    color: #fff;
}
.pill input:checked + span,
.pill.active > span {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.18), rgba(79, 172, 254, 0.18));
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.3), inset 0 0 10px rgba(0, 242, 254, 0.08);
}


/* ---------- 13. SUB-CHECKBOXES (mailing list + phone cell) ---------- */

.sub-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: #cbd5e1;
    cursor: pointer;
    padding: 0.35rem 0;
    font-weight: 400;
}
.sub-check em { color: var(--muted); font-style: normal; }
.sub-check input { position: absolute; opacity: 0; pointer-events: none; }
.sub-check .check-box {
    width: 16px; height: 16px;
    border: 1px solid var(--border-h);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sub-check input:checked + .check-box {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}
.sub-check input:checked + .check-box::after {
    content: '✓';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #05050a;
    font-weight: 800;
    font-size: 0.75rem;
}


/* ---------- 14. CHARACTER COUNTER (color escalation) ---------- */

.char-counter {
    align-self: flex-end;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--c-green);
    margin-top: 0.2rem;
    font-weight: 500;
    transition: color 0.2s, text-shadow 0.2s, transform 0.15s;
}
.char-counter.state-white   { color: var(--c-white); }
.char-counter.state-yellow  { color: var(--c-yellow); }
.char-counter.state-dkred   { color: var(--c-dkred); }
.char-counter.state-btred   { color: var(--c-btred); font-weight: 700; }
.char-counter.state-flash   {
    color: var(--c-btred);
    font-weight: 700;
    animation: countFlash 0.4s linear infinite alternate;
}
@keyframes countFlash {
    from { opacity: 1; text-shadow: 0 0 8px var(--c-btred); }
    to   { opacity: 0.4; text-shadow: none; }
}
/* Subtle scramble moment when threshold crossed (JS adds .scramble briefly) */
.char-counter.scramble { animation: countScramble 0.25s ease; }
@keyframes countScramble {
    0%   { transform: translateY(0); filter: blur(0); }
    50%  { transform: translateY(-2px); filter: blur(1px); }
    100% { transform: translateY(0); filter: blur(0); }
}


/* ---------- 15. EMAIL SPARK ---------- */

.email-spark {
    position: absolute;
    right: 0.7rem;
    top: 2.1rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 10px var(--c-green);
    opacity: 0;
    transform: scale(0.2);
    transition: opacity 0.25s, transform 0.35s cubic-bezier(0.18, 1.25, 0.4, 1);
    pointer-events: none;
}
.field.valid-email .email-spark {
    opacity: 1;
    transform: scale(1);
}


/* ---------- 16. BUTTONS ---------- */

.btn-primary, .btn-secondary, .welcome-modal button {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.82rem;
    padding: 0.9rem 1.75rem;
    border-radius: 10px;
    cursor: pointer;
    border: 0;
    transition: transform 0.1s, box-shadow 0.2s, filter 0.2s, opacity 0.25s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #05050a;
    box-shadow: 0 8px 24px rgba(0, 242, 254, 0.25);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 242, 254, 0.45);
    filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-h);
    color: var(--muted);
    font-size: 0.72rem;
    padding: 0.7rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
}
.btn-secondary:hover {
    border-color: var(--magenta);
    color: var(--magenta);
}

/* ENTER button — breathing, chevron slide, halos, orbiting particles wrapper */
.enter-wrap {
    position: relative;
    display: inline-block;
    padding: 1rem;
    margin-top: 0.5rem;
}
#enter-orbit-canvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}
.enter-btn {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #05050a;
    padding: 1rem 3.5rem;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    overflow: visible;
    box-shadow:
        0 10px 28px rgba(0, 242, 254, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    animation: enterBreathe 2.4s ease-in-out infinite;
    transition: transform 0.15s, box-shadow 0.25s, letter-spacing 0.25s;
}
@keyframes enterBreathe {
    0%, 100% { transform: scale(1);    filter: brightness(1); }
    50%      { transform: scale(1.04); filter: brightness(1.15); }
}
.enter-label { position: relative; z-index: 2; }
.enter-chevron {
    display: inline-block;
    margin-left: 0.5ch;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.22, 1.1, 0.4, 1);
    font-weight: 900;
}
.enter-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 18px 44px rgba(0, 242, 254, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.38em;
}
.enter-btn:hover .enter-chevron { transform: translateX(8px); }

/* Pulsing halo rings behind the ENTER button */
.enter-halo {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 254, 0.45);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: enterHalo 2.4s ease-out infinite;
    z-index: 0;
}
.enter-halo-2 { animation-delay: 1.2s; }
@keyframes enterHalo {
    0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(1);   }
    100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.5); }
}

/* ViberWorld title on welcome modal — inherits glitch effect from fx.js */
.welcome-modal #welcome-title { position: relative; display: inline-block; }
.welcome-modal #welcome-title::before,
.welcome-modal #welcome-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
    pointer-events: none;
    transition: transform 0.1s ease;
}
.welcome-modal #welcome-title::before {
    color: #0ff;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-1px, 0);
}
.welcome-modal #welcome-title::after {
    color: #f0f;
    z-index: -2;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(1px, 0);
}

/* Tagline: letter-by-letter fade-in on modal open (staggered via JS-injected --i) */
.welcome-modal .tagline .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px);
    animation: taglineLetterIn 0.5s cubic-bezier(0.22, 1, 0.32, 1) forwards;
    animation-delay: calc(var(--i, 0) * 22ms + 400ms);
    white-space: pre;
}
@keyframes taglineLetterIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Transmit button — "sending" state bars animation */
#transmit-btn.sending {
    pointer-events: none;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan));
    background-size: 200% 100%;
    animation: transmitSweep 0.6s linear infinite;
}
@keyframes transmitSweep {
    from { background-position: 0%   0%; }
    to   { background-position: 200% 0%; }
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}


/* ---------- 17. FORM COUNTER + STATUS ---------- */

.form-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
    padding: 0.5rem;
    border-top: 1px dashed rgba(255,255,255,0.06);
}
.form-counter .counter-num {
    color: var(--cyan);
    font-weight: 700;
}

.form-status {
    min-height: 1.2em;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s;
}
.form-status.success {
    background: rgba(34, 224, 138, 0.12);
    color: #bbf7d0;
    border: 1px solid rgba(34, 224, 138, 0.3);
}
.form-status.error {
    background: rgba(220, 38, 38, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.3);
    animation: glitchShake 0.3s;
}


/* ---------- 18. RESET CONFIRM MICRO-MODAL ---------- */

.micro-confirm {
    position: absolute;
    bottom: 4.5rem;
    left: 1rem;
    background: var(--panel-s);
    border: 1px solid var(--magenta);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 20px rgba(196,113,237,0.2);
    z-index: 5;
    animation: revealField 0.25s ease;
    font-size: 0.85rem;
}
.micro-confirm[hidden] { display: none !important; }
.micro-confirm p { margin: 0; color: #e9d5ff; font-weight: 600; }
.micro-confirm button {
    background: transparent;
    border: 1px solid var(--border-h);
    color: #fff;
    padding: 0.3rem 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    border-radius: 5px;
    cursor: pointer;
    letter-spacing: 0.1em;
}
.micro-confirm button:hover { border-color: var(--magenta); color: var(--magenta); }


/* ---------- 19. VIBE LINK — floating electric button ---------- */

/* =====================================================================
   CONTACT // DISCOVERY floating panel (formerly "VIBE LINK")
   - Panel shape with clipped corners for a sci-fi edge
   - Figure-8 float motion (x + y offset animations layered)
   - Three pulsing halo rings expanding outward (staggered)
   - Scanning-line sweep across the surface
   - Chromatic-aberration glitch on the title text
   - Live electrical arcs to the Vibe Orb drawn on a separate canvas
   ===================================================================== */

/* The live-arc canvas sits behind everything else, full-screen, transparent */
#vibe-arc-canvas {
    position: fixed;
    inset: 0;
    width: 100vw; height: 100vh;
    z-index: 99;             /* behind button, above splash */
    pointer-events: none;
}
#vibe-arc-canvas[hidden] { display: none !important; }

/* =====================================================================
   VibeLiNK / Contact-Discovery button — proper-size 3D button.
   Dark chrome / electric-cyan palette (NO pink). Real depth via stacked
   shadows + top highlight + bottom shadow. Drifts in XY + occasional
   charged jolt. VibeLiNK label small on top, Contact/Discovery 3× below.
   ===================================================================== */

#vibe-arc-canvas {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    z-index: 99;
    pointer-events: none;
}
#vibe-arc-canvas[hidden] { display: none !important; }

.vibe-link-btn {
    position: fixed;
    top: 1.75rem;
    left: 50%;
    transform: translate(-50%, 0);
    /* Proper button size — NOT a giant panel */
    padding: 0.55rem 1.5rem 0.65rem;
    min-width: 0;
    border: 1px solid rgba(0, 242, 254, 0.55);
    border-top-color: rgba(180, 240, 255, 0.9);      /* top edge brighter → light from above */
    border-bottom-color: rgba(0, 120, 180, 0.6);
    border-radius: 10px;
    cursor: pointer;
    z-index: 100;
    color: #fff;
    text-align: center;
    /* Dark chrome body: navy-to-black gradient w/ a cyan-ish sheen on top */
    background:
        linear-gradient(to bottom,
            rgba(30, 60, 90, 0.95)  0%,
            rgba(12, 20, 32, 0.95)  45%,
            rgba(5, 10, 18, 0.95)  100%),
        radial-gradient(ellipse at 50% 0%, rgba(0, 242, 254, 0.35), transparent 60%);
    background-blend-mode: screen;
    /* Real depth: outer drop shadow + inset highlight top + inset shadow bottom + cyan edge-glow */
    box-shadow:
        0 10px 22px   rgba(0, 0, 0, 0.55),
        0  3px  6px   rgba(0, 0, 0, 0.4),
        0  0 22px     rgba(0, 242, 254, 0.35),
        inset 0  1px  0 rgba(255, 255, 255, 0.25),
        inset 0 -2px  4px rgba(0, 0, 0, 0.5),
        inset 0  0  18px rgba(0, 242, 254, 0.12);
    animation: vibeLinkDrift 9s ease-in-out infinite;
    transition: transform 0.15s, box-shadow 0.25s, filter 0.2s;
    overflow: visible;
    isolation: isolate;
}
.vibe-link-btn[hidden] { display: none !important; }

/* Bevel highlight — thin bright line across the top edge, selling the 3D */
.vlb-bevel {
    position: absolute;
    top: 1px; left: 6px; right: 6px;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.22), transparent 80%);
    border-radius: 8px 8px 0 0;
    pointer-events: none;
    z-index: 1;
}

/* Subtle scan-line sweep across the button face */
.vlb-scan {
    position: absolute;
    inset: 2px;
    z-index: 2;
    pointer-events: none;
    border-radius: 8px;
    overflow: hidden;
}
.vlb-scan::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 60%; height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 242, 254, 0.18) 50%,
        transparent 100%);
    animation: vlbScan 4s linear infinite;
}
@keyframes vlbScan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}

/* Two pulsing halo rings — expand outward in the cyan palette */
.vlb-halo {
    position: absolute;
    inset: -2px;
    z-index: 0;
    border: 1px solid rgba(0, 242, 254, 0.55);
    border-radius: 12px;
    pointer-events: none;
    animation: vlbHalo 2.4s ease-out infinite;
}
.vlb-halo-2 { animation-delay: 1.2s; }
@keyframes vlbHalo {
    0%   { opacity: 0.75; transform: scale(1);   }
    100% { opacity: 0;    transform: scale(1.35); }
}

/* Outer edge glow — more intense cyan halo, fast electric pulse */
.vlb-edge-glow {
    position: absolute;
    inset: -8px;
    z-index: -1;
    border-radius: 14px;
    background: radial-gradient(closest-side, rgba(0, 242, 254, 0.55), transparent 70%);
    pointer-events: none;
    animation: vlbEdgeBreathe 1.4s ease-in-out infinite;
    filter: blur(5px);
}
@keyframes vlbEdgeBreathe {
    0%, 100% { opacity: 0.45; transform: scale(1);   }
    50%      { opacity: 1;    transform: scale(1.08); }
}

/* Rapid electric crackle overlay — flickers brightness/hue over the button
   face at a high rate to read as "charged" / live current */
.vlb-crackle {
    position: absolute;
    inset: 2px;
    z-index: 2;
    pointer-events: none;
    border-radius: 8px;
    background:
        linear-gradient(45deg,  transparent 48%, rgba(0, 242, 254, 0.12) 49%, rgba(0, 242, 254, 0.12) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.08) 49%, rgba(255, 255, 255, 0.08) 51%, transparent 52%);
    background-size: 8px 8px, 6px 6px;
    mix-blend-mode: screen;
    animation: vlbCrackleFlicker 0.18s steps(2) infinite;
    opacity: 0.6;
}
@keyframes vlbCrackleFlicker {
    0%   { opacity: 0.4; transform: translate(0, 0); }
    50%  { opacity: 0.85; transform: translate(0.5px, -0.5px); }
    100% { opacity: 0.3; transform: translate(-0.5px, 0.5px); }
}

/* Canvas overlay for JS-drawn electric sparks shooting off the button edges */
.vlb-electricity {
    position: absolute;
    top: -20px; left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    z-index: 4;
    pointer-events: none;
}

/* Text stack: VibeLiNK small on top, Contact/Discovery 3× larger below */
.vlb-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    align-items: center;
    pointer-events: none;
    line-height: 1;
}
.vlb-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.45rem;                /* +15% from 0.39rem, second tuning pass */
    letter-spacing: 0.28em;
    color: rgba(180, 240, 255, 0.9);
    text-transform: none;
    text-shadow: 0 0 4px rgba(0, 242, 254, 0.8);
    margin-bottom: 0.1rem;
}
.vlb-main {
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;                 /* ≈ 3× the VibeLiNK tag */
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow:
        0 0 8px rgba(0, 242, 254, 0.65),
        0 1px 0 rgba(0, 0, 0, 0.6),
        0 2px 6px rgba(0, 0, 0, 0.7);
}
/* Chromatic aberration on the main label — very subtle, cyan/magenta ghosting */
.vlb-main::before,
.vlb-main::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0.55;
    animation: vlbChromaPulse 3.5s ease-in-out infinite;
}
.vlb-main::before { color: #0ff; transform: translate(-1px, 0); }
.vlb-main::after  { color: #f0f; transform: translate(1px, 0);  animation-delay: 0.45s; }
@keyframes vlbChromaPulse {
    0%, 92%, 100% { transform: translate(-1px, 0); opacity: 0.35; }
    94%           { transform: translate(-4px, -1px); opacity: 0.8; }
    97%           { transform: translate(4px,  1px); opacity: 0.8; }
}

/* Charged drift — XY wander with frequent sharp "jolts" (electrical discharges) */
@keyframes vibeLinkDrift {
    0%   { transform: translate(-50%, 0)     rotate(-0.2deg); filter: brightness(1);    }
    12%  { transform: translate(-47%, -4px)  rotate(0.3deg);  filter: brightness(1);    }
    14%  {                                                    filter: brightness(1.4);  }  /* JOLT */
    16%  {                                                    filter: brightness(1);    }
    28%  { transform: translate(-48%, -9px)  rotate(0.1deg);  filter: brightness(1);    }
    36%  {                                                    filter: brightness(1.35); }  /* JOLT */
    38%  {                                                    filter: brightness(1);    }
    48%  { transform: translate(-52%, -6px)  rotate(-0.3deg); filter: brightness(1);    }
    59%  {                                                    filter: brightness(1.5);  }  /* BIG JOLT */
    61%  {                                                    filter: brightness(1);    }
    68%  { transform: translate(-54%, -10px) rotate(0.2deg);  filter: brightness(1);    }
    81%  {                                                    filter: brightness(1.35); }  /* JOLT */
    83%  {                                                    filter: brightness(1);    }
    90%  { transform: translate(-50%, -3px)  rotate(-0.1deg); filter: brightness(1);    }
    100% { transform: translate(-50%, 0)     rotate(-0.2deg); filter: brightness(1);    }
}

/* Hover: button "depresses" slightly + edge glow intensifies */
.vibe-link-btn:hover {
    filter: brightness(1.1) saturate(1.15);
    box-shadow:
        0 6px 16px   rgba(0, 0, 0, 0.55),
        0 2px 4px    rgba(0, 0, 0, 0.4),
        0 0 34px     rgba(0, 242, 254, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5),
        inset 0 0 22px rgba(0, 242, 254, 0.2);
}
.vibe-link-btn:active { transform: translate(-50%, 1px) scale(0.98); }

/* Hover info card — JARVIS-style readout positioned next to button by JS */
.vlb-info {
    position: fixed;
    z-index: 101;
    background: rgba(5, 5, 15, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 113, 237, 0.5);
    color: #e9d5ff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    line-height: 1.6;
    pointer-events: none;
    box-shadow: 0 0 24px rgba(196, 113, 237, 0.3);
    animation: vlbInfoIn 0.25s ease;
    white-space: nowrap;
}
.vlb-info[hidden] { display: none !important; }
.vlb-info .k { color: rgba(255, 255, 255, 0.45); }
.vlb-info .v { color: var(--cyan); font-weight: 700; }
@keyframes vlbInfoIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ---------- 20. SUCCESS SCREEN / TERMINAL OUTPUT ---------- */

.success-screen {
    text-align: center;
    padding: 2rem 1rem;
}
.success-screen[hidden] { display: none !important; }
.terminal-output {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--cyan);
    text-align: left;
    margin: 0 auto 1.5rem;
    max-width: 460px;
    white-space: pre-wrap;
    line-height: 1.7;
    min-height: 9em;
}
.terminal-output .line { display: block; }
.terminal-output .caret {
    display: inline-block;
    width: 0.5ch;
    background: var(--cyan);
    animation: caretBlink 1s steps(2) infinite;
    margin-left: 1px;
}
@keyframes caretBlink {
    0%, 50%   { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}


/* ---------- 21. CONTEXT MENU POPUP (right-click) ---------- */

.context-menu-popup {
    position: fixed;
    z-index: 99;
    background: var(--panel-s);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
    animation: revealField 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}
.context-menu-popup .accent {
    color: var(--cyan);
    font-weight: 700;
}
.context-menu-popup[hidden] { display: none !important; }


/* ---------- 22. RESPONSIVE BREAKPOINTS ---------- */

/* Mobile (< 768px): simplify FX, vertical stack */
@media (max-width: 767px) {
    body { perspective: none; overflow-y: auto; overflow-x: hidden; min-height: 100vh; height: auto; }
    #matrix-canvas { display: none; }   /* kill matrix rain on mobile — battery + clarity */

    .modal { padding: 0; }
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        border: 0;
        padding: 1.5rem 1.25rem 2rem;
    }

    .welcome-modal .modal-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #contact-form { gap: 0.85rem; }

    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn-primary,
    .form-actions .btn-secondary { width: 100%; text-align: center; }

    .form-header h1 { font-size: 1.5rem; }
    .form-header p  { font-size: 0.82rem; }

    .vibe-link-btn { top: 1rem; padding: 0.5rem 1.2rem 0.6rem; }
    .vibe-link-btn .vlb-tag  { font-size: 0.56rem; letter-spacing: 0.22em; }
    .vibe-link-btn .vlb-main { font-size: 1.1rem; }
    #vibe-arc-canvas { display: none; }   /* skip the electrical-arc canvas on mobile for perf */
    .vibe-orb     { width: 110px; height: 110px; }

    .radio-pills, .yn-pills { gap: 0.4rem; }
    .pill > span { padding: 0.5rem 0.85rem; font-size: 0.8rem; }

    /* Ensure tap targets meet WCAG 44px minimum */
    .field input, .field select, .field textarea { min-height: 44px; }
    button, .pill > span, .sub-check { min-height: 36px; display: inline-flex; align-items: center; }

    .micro-confirm {
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Tablet (768–1023px): reduced but present FX */
@media (min-width: 768px) and (max-width: 1023px) {
    #matrix-canvas { opacity: 0.08; }
    body { perspective: 800px; }
    .modal-content { max-width: 560px; }
}

/* Desktop (>= 1024px): full ride, already set by defaults */
@media (min-width: 1024px) {
    .modal-content { max-width: 620px; }
}


/* ---------- 23. UTILITY / PROP FX ---------- */

/* Field valid state (set by JS when valid + required fulfilled) */
.field.filled input,
.field.filled textarea,
.field.filled select { border-color: rgba(34, 224, 138, 0.4); }

/* Invalid state — subtle RGB-glitch */
.field.invalid input,
.field.invalid textarea,
.field.invalid select {
    border-color: var(--c-btred);
    box-shadow: 0 0 0 2px rgba(255, 42, 42, 0.12);
    animation: glitchShake 0.3s;
}

/* Scrollbar in modal-content */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--cyan), var(--magenta));
    border-radius: 3px;
}

/* Honeypot stays fully hidden from users (bots don't look at CSS display) */
#honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0 !important;
    pointer-events: none;
}
