/* ============================================================
   MouseJiggler.pages.dev — Tech/SaaS theme
   Inter + JetBrains Mono · slate + electric blue · white surfaces
   ============================================================ */

/* ===== Base ===== */
/* (Tailwind v4 preflight handles the universal reset; do NOT add a
    `* { margin: 0 }` here — it would be unlayered and would override
    Tailwind's utility classes like mx-auto.) */

html {
    scroll-behavior: smooth;
}

body {
    background: #FFFFFF;
    color: #334155;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-feature-settings: "cv11", "ss01", "ss03";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: #DBEAFE;
    color: #1E3A8A;
}

/* ===== Skip link (a11y) ===== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: #2563EB;
    color: #FFFFFF;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* ===== Decorative cursor trail ===== */
.cursor-glow {
    position: fixed;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.10);
    box-shadow: 0 0 18px 6px rgba(37, 99, 235, 0.05);
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    top: 0;
    left: 0;
}

.trail-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563EB;
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
    top: 0;
    left: 0;
}

.trail-dot-1 { opacity: 0.55; }
.trail-dot-2 { opacity: 0.42; transform: scale(0.92); }
.trail-dot-3 { opacity: 0.32; transform: scale(0.84); }
.trail-dot-4 { opacity: 0.24; transform: scale(0.76); }
.trail-dot-5 { opacity: 0.18; transform: scale(0.68); }
.trail-dot-6 { opacity: 0.12; transform: scale(0.60); }
.trail-dot-7 { opacity: 0.08; transform: scale(0.52); }
.trail-dot-8 { opacity: 0.05; transform: scale(0.44); }

@media (prefers-reduced-motion: reduce) {
    .cursor-glow,
    .trail-dot {
        display: none;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Floating Cursor Animator — full-page fake cursor that wanders
   the viewport during an active session. Layer is hidden until
   the session starts.
   ============================================================ */

.floating-cursor-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.floating-cursor-layer.hidden {
    display: none;
}

.floating-cursor {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    fill: #2563EB;
    filter: drop-shadow(0 4px 14px rgba(37, 99, 235, 0.55))
            drop-shadow(0 1px 2px rgba(15, 23, 42, 0.25));
    pointer-events: none;
    will-change: transform;
    z-index: 2;
}

.floating-cursor-trail {
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563EB;
    pointer-events: none;
    will-change: transform;
    z-index: 1;
}

#home-floating-trail-1 { opacity: 0.55; }
#home-floating-trail-2 { opacity: 0.42; transform: scale(0.92); }
#home-floating-trail-3 { opacity: 0.30; transform: scale(0.84); }
#home-floating-trail-4 { opacity: 0.20; transform: scale(0.76); }
#home-floating-trail-5 { opacity: 0.12; transform: scale(0.68); }
#home-floating-trail-6 { opacity: 0.07; transform: scale(0.60); }

@media (prefers-reduced-motion: reduce) {
    .floating-cursor-layer {
        display: none !important;
    }
}

/* ============================================================
   Hero Play Disc — centerpiece of the tool card
   ============================================================ */

.disc-button {
    width: clamp(200px, 26vw, 240px);
    height: clamp(200px, 26vw, 240px);
    background: transparent;
    border: 0;
    padding: 0;
    position: relative;
    isolation: isolate;
    flex-shrink: 0;
    cursor: pointer;
}

.disc-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #2563EB;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    z-index: 2;
    box-shadow:
        0 10px 28px rgba(37, 99, 235, 0.32),
        0 4px 10px rgba(30, 64, 175, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition:
        transform 0.24s cubic-bezier(0.34, 1.4, 0.64, 1),
        box-shadow 0.24s ease,
        background 0.18s ease;
}

.disc-button:hover .disc-circle {
    transform: scale(1.035);
    background: #1D4ED8;
    box-shadow:
        0 16px 36px rgba(37, 99, 235, 0.42),
        0 6px 14px rgba(30, 64, 175, 0.26),
        0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}

.disc-button:active .disc-circle {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

.disc-button:focus-visible {
    outline: none;
}

.disc-button:focus-visible .disc-circle {
    box-shadow:
        0 0 0 4px #FFFFFF,
        0 0 0 7px #2563EB,
        0 10px 28px rgba(37, 99, 235, 0.32);
}

.disc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.disc-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Optical centering nudge for the play triangle */
#home-tool-card[data-state="inactive"] .disc-icon svg {
    transform: translateX(4px);
}

.disc-label {
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ===== Sonar rings ===== */
.disc-ring {
    position: absolute;
    inset: 0;
    border: 1.5px solid #3B82F6;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

#home-tool-card[data-state="active"] .disc-ring {
    animation: home-sonar 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

#home-tool-card[data-state="active"] .disc-ring-2 { animation-delay: 0.86s; }
#home-tool-card[data-state="active"] .disc-ring-3 { animation-delay: 1.72s; }

@keyframes home-sonar {
    0%   { transform: scale(1);    opacity: 0.55; }
    100% { transform: scale(1.62); opacity: 0;    }
}

/* Active disc state */
#home-tool-card[data-state="active"] .disc-circle {
    background: #1E40AF;
}

#home-tool-card[data-state="active"] .disc-button:hover .disc-circle {
    background: #1E3A8A;
}

/* ============================================================
   Status pill + dot states
   ============================================================ */

.status-dot {
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.status-dot.active {
    background: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    animation: home-status-pulse 1.8s ease-in-out infinite;
}

@keyframes home-status-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
    50%      { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.05); }
}

/* ============================================================
   Toggle pill — wake lock / silent audio
   ============================================================ */

.toggle-pill {
    transition: all 0.18s ease;
}

#home-wake-lock-btn.active,
#home-audio-btn.active {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(37, 99, 235, 0.28);
}

#home-wake-lock-btn.active:hover,
#home-audio-btn.active:hover {
    background: #1D4ED8;
    border-color: #1D4ED8;
}

/* ============================================================
   Card surfaces — tool card, feature cards, FAQ
   ============================================================ */

.tool-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 28px rgba(15, 23, 42, 0.06);
}

.tool-card-accent {
    background: #2563EB;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    opacity: 0;
}

#home-tool-card[data-state="active"] .tool-card-accent {
    transform: scaleX(1);
    opacity: 1;
}

.feature-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: #BFDBFE;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.step-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
}

.use-case-tile {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.use-case-tile:hover {
    border-color: #BFDBFE;
    background: #FFFFFF;
}

/* ============================================================
   FAQ accordion (native <details>)
   ============================================================ */

.faq-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item[open] {
    border-color: #BFDBFE;
}

.faq-summary {
    padding: 1.125rem 1.25rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: #0F172A;
    transition: background 0.18s ease;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary:hover {
    background: #F8FAFC;
}

.faq-icon {
    width: 22px;
    height: 22px;
    color: #2563EB;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-body {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: #475569;
    line-height: 1.7;
}

/* ============================================================
   Comparison table
   ============================================================ */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #E2E8F0;
    font-size: 0.9rem;
}

.comparison-table thead th {
    background: #F8FAFC;
    color: #0F172A;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table tbody tr:last-child td {
    border-bottom: 0;
}

.comparison-table td:first-child {
    font-weight: 600;
    color: #0F172A;
}

.tick-yes  { color: #10B981; font-weight: 600; }
.tick-no   { color: #94A3B8; font-weight: 500; }
.tick-warn { color: #F59E0B; font-weight: 600; }

/* ============================================================
   Time picker modal
   ============================================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    background: #FFFFFF;
    border-radius: 1rem;
    padding: 1.75rem;
    width: 100%;
    max-width: 340px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.modal-card input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.5rem;
    font-family: "JetBrains Mono", "SFMono-Regular", monospace;
    font-size: 1.125rem;
    text-align: center;
    color: #0F172A;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-card input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ============================================================
   Section dividers & subtle backgrounds
   ============================================================ */

.section-subtle {
    background: #F8FAFC;
}

.section-divider {
    border-top: 1px solid #E2E8F0;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-primary {
    background: #2563EB;
    color: #FFFFFF;
    padding: 0.625rem 1.125rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 0;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(37, 99, 235, 0.05);
}

.btn-primary:hover {
    background: #1D4ED8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
    transform: translateY(0.5px);
}

.btn-secondary {
    background: #FFFFFF;
    color: #334155;
    padding: 0.625rem 1.125rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid #CBD5E1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
}

/* ============================================================
   Misc utility helpers used inline
   ============================================================ */

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
