/* ============================================================
   VISCERA — Website Styles
   ============================================================ */

:root {
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
    --accent: #8BC34A;
    --accent-dim: rgba(139, 195, 74, 0.15);
    --accent-glow: rgba(139, 195, 74, 0.4);
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #2E3440;
    --bg-surface: #353C4A;
    --bg-elevated: #3B4252;
    --text: #D8DEE9;
    --text-dim: #8891A0;
    --shadow-dark: #1A1E26;
    --shadow-light: #434C5E;
    --card-bg: #2E3440;
    --border: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] {
    --bg: #E0E5EC;
    --bg-surface: #E4E9F0;
    --bg-elevated: #D8DDE4;
    --text: #404048;
    --text-dim: #808088;
    --shadow-dark: #A3B1C6;
    --shadow-light: #FFFFFF;
    --card-bg: #E0E5EC;
    --border: rgba(0, 0, 0, 0.04);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* --- Top Bar --- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px 24px;
    user-select: none;
    -webkit-user-select: none;
}

.brand-logo {
    height: 32px;
    width: auto;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.brand-logo:hover {
    opacity: 1;
}

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

.login-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    letter-spacing: 0.05em;
    transition: all var(--transition);
    background: var(--bg);
    box-shadow:
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
}

.login-btn:hover {
    color: var(--accent);
    box-shadow:
        4px 4px 10px var(--shadow-dark),
        -4px -4px 10px var(--shadow-light);
}

/* --- Theme Toggle --- */
.theme-toggle {
    background: var(--bg);
    border: none;
    border-radius: 20px;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
    height: 33px;
    box-shadow:
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    transition: box-shadow var(--transition), background var(--transition);
}

.theme-toggle:hover {
    box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
}

.theme-toggle:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.toggle-track {
    display: block;
    width: 48px;
    height: 24px;
    border-radius: 12px;
    background: var(--bg-elevated);
    position: relative;
    transition: background var(--transition);
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow:
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
}

.toggle-thumb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 4px var(--accent-glow),
        inset 1px 1px 1px rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .toggle-thumb {
    transform: translateX(24px);
}

/* ============================================================
   HERO — Full viewport: blob + logo top, text + CTA bottom
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 560px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.hero:active {
    cursor: grabbing;
}

#flubber {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 110%;
    z-index: 2;
    pointer-events: none;
    image-rendering: auto;
}

/* Flex container — logo top, text bottom */
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    padding: 48px 40px 48px;
}

.hero-logo {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(320px, 50vw);
    height: auto;
    opacity: 0.85;
    z-index: 1;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.4));
    transition: filter var(--transition), opacity var(--transition);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

[data-theme="light"] .hero-logo {
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
}

/* Bottom group: tagline + desc + CTA */
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.tagline {
    font-size: clamp(0.75rem, 1.8vw, 0.95rem);
    color: #EAEAEA;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

[data-theme="light"] .tagline {
    color: var(--text);
    text-shadow: none;
}

.hero-desc {
    font-size: clamp(0.7rem, 1.4vw, 0.8rem);
    color: rgba(234, 234, 234, 0.6);
    white-space: nowrap;
    line-height: 1.6;
}

[data-theme="light"] .hero-desc {
    color: var(--text-dim);
}

.cta-group {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    pointer-events: all;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.05em;
    border: none;
}

.btn-primary {
    background: var(--bg);
    color: var(--accent);
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.btn-primary:hover {
    box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
    color: var(--accent);
}

[data-theme="dark"] .btn-primary:hover {
    text-shadow: 0 0 12px var(--accent-glow);
}

.btn-primary:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.btn-ghost {
    background: var(--bg);
    color: var(--text-dim);
    border: none;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
}

.btn-ghost:hover {
    color: var(--accent);
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}

.btn-ghost:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.btn-large {
    font-size: 1rem;
    padding: 16px 40px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--accent);
    text-align: center;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 32px;
    transition: color var(--transition);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        8px 8px 16px var(--shadow-dark),
        -8px -8px 16px var(--shadow-light);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    transition: box-shadow var(--transition);
}

.feature-card h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 10px;
    transition: color var(--transition);
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
    transition: color var(--transition);
}

/* ============================================================
   DOWNLOAD
   ============================================================ */
.download {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 100px 24px;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.download-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    box-shadow:
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light);
    transition: all var(--transition);
}

.download-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 6px 14px;
    border-radius: 50px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
    transition: all var(--transition);
}

.download-price {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--accent);
    font-weight: 400;
    margin-bottom: 8px;
    transition: color var(--transition);
}

.download-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 32px;
    transition: color var(--transition);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 60px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    transition: border-color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.footer-logo:hover { opacity: 1; }

.footer-text {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color var(--transition);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .hero {
        min-height: 100dvh;
    }

    .hero-content {
        padding: 40px 20px 32px;
    }

    .hero-text {
        bottom: 32px;
        gap: 10px;
    }

    .brand-logo {
        height: 26px;
    }

    .tagline {
        font-size: 0.7rem;
        letter-spacing: 0.18em;
    }

    .hero-desc {
        font-size: 0.68rem;
        white-space: normal;
        max-width: 300px;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn {
        font-size: 0.75rem;
        padding: 10px 28px;
        width: 100%;
        max-width: 220px;
    }

    .features {
        padding: 60px 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 24px;
    }

    .download {
        padding: 60px 16px;
    }

    .download-card {
        padding: 32px 20px;
    }

    .section-title {
        margin-bottom: 36px;
    }

    .topbar {
        padding: 14px 16px;
        gap: 10px;
    }

    .login-btn {
        font-size: 0.7rem;
        padding: 6px 16px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .hero-text {
        bottom: 28px;
    }

    .tagline {
        font-size: 0.6rem;
    }
}

/* Short phones — hide desc to save space */
@media (max-height: 700px) and (max-width: 768px) {
    .hero-desc {
        display: none;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
