/* ============================================================
   CloudSoftware.live — Full stylesheet
   Dark theme · Red accent · Sora font · Scroll reveal
   ============================================================ */

/* ---- reset & base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', system-ui, sans-serif;
    color: #f5f5f5;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #0f0f0f;
    background-image: linear-gradient(rgba(10,10,10,0.72), rgba(10,10,10,0.94)), url("/static/background.png");
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

::selection {
    background: rgba(220, 38, 38, 0.35);
    color: #fff;
}

/* ---- design tokens ---- */
:root {
    --bg: #0f0f0f;
    --bg-alt: #141414;
    --card: rgba(24,24,24,0.72);
    --popover: #1a1a1a;
    --border: rgba(255,255,255,0.08);
    --input: rgba(255,255,255,0.08);
    --ring: #dc2626;
    --text: #f5f5f5;
    --muted: #888;
    --muted-fg: #71717a;
    --primary: #dc2626;
    --primary-hover: #ef4444;
    --primary-foreground: #ffffff;
    --secondary: rgba(255,255,255,0.06);
    --secondary-foreground: #f5f5f5;
    --accent: rgba(255,255,255,0.06);
    --accent-foreground: #f5f5f5;
    --destructive: #dc2626;
    --destructive-foreground: #ffffff;
    --radius: 0.5rem;
    --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.muted {
    color: var(--muted);
}

.small {
    font-size: 0.85rem;
}

.w-full {
    width: 100%;
}

.center {
    display: block;
    text-align: center;
}

.block {
    display: block;
}

.mt-5 {
    margin-top: 1.25rem;
}

.mt-12 {
    margin-top: 3rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

    .row-between:last-child {
        border-bottom: none;
    }

    .row-between strong {
        font-weight: 600;
        font-size: 0.92rem;
    }

.tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--primary);
    text-transform: uppercase;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 0.75rem;
}

.page-head {
    margin-bottom: 1rem;
}

.surface-grid {
    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: 56px 56px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    height: 2.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
    user-select: none;
}

    .btn:active {
        transform: scale(0.98);
    }

    .btn:disabled {
        opacity: 0.5;
        pointer-events: none;
        cursor: not-allowed;
    }

    .btn svg {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
        pointer-events: none;
    }

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

    .btn-primary:hover {
        background: rgba(255,255,255,0.9);
    }

.btn-bright {
    background: #ffffff;
    color: #0a0a0a;
}

    .btn-bright:hover {
        background: rgba(255,255,255,0.9);
    }

.btn-red {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(220,38,38,0.25);
}

    .btn-red:hover {
        background: var(--primary-hover);
        box-shadow: 0 0 28px rgba(220,38,38,0.45);
    }

.btn-outline {
    background: transparent;
    border-color: var(--input);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

    .btn-outline:hover {
        background: var(--accent);
        color: var(--accent-foreground);
        border-color: rgba(255,255,255,0.2);
    }

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

    .btn-secondary:hover {
        background: rgba(255,255,255,0.1);
    }

.btn-ghost {
    background: transparent;
    color: var(--text);
}

    .btn-ghost:hover {
        background: var(--accent);
        color: var(--accent-foreground);
    }

.btn-danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

    .btn-danger:hover {
        background: var(--primary-hover);
    }

.btn-link {
    color: var(--primary);
    text-underline-offset: 4px;
    background: transparent;
    padding: 0;
    height: auto;
}

    .btn-link:hover {
        text-decoration: underline;
    }

.btn-sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    border-radius: calc(var(--radius) - 2px);
}

.btn-lg {
    height: 2.5rem;
    padding: 0 1.5rem;
    font-size: 0.95rem;
}

.btn-icon {
    height: 2.25rem;
    width: 2.25rem;
    padding: 0;
}

.btn-icon-sm {
    height: 2rem;
    width: 2rem;
    padding: 0;
}

/* ============================================================
   INPUTS
   ============================================================ */
.input, .form input, .auth-form input {
    display: flex;
    width: 100%;
    height: 2.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text);
    background: rgba(10,10,10,0.5);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .input::placeholder,
    .form input::placeholder,
    .auth-form input::placeholder {
        color: var(--muted-fg);
    }

    .input:focus-visible,
    .form input:focus-visible,
    .auth-form input:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
    }

    .input:disabled,
    .form input:disabled,
    .auth-form input:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.textarea {
    display: flex;
    min-height: 60px;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: rgba(10,10,10,0.5);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    outline: none;
    resize: vertical;
}

    .textarea:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
    }

.form label,
.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ccc;
    line-height: 1.4;
}

    .form label > input,
    .form label > .input,
    .auth-form label > input {
        margin-top: 0.5rem;
    }

/* ============================================================
   NAV
   ============================================================ */
.landing {
    overflow: hidden;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(15,15,15,0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background 0.35s var(--ease-out-strong), border-color 0.35s var(--ease-out-strong);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: height 0.35s var(--ease-out-strong);
}

.nav.scrolled {
    background: rgba(10,10,10,0.9);
}

    .nav.scrolled .nav-inner {
        height: 56px;
    }

.logo {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

    .logo span {
        color: var(--primary);
    }

.nav-links {
    display: none;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--muted);
}

    .nav-links a {
        transition: color 0.2s;
    }

        .nav-links a:hover {
            color: #fff;
        }

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(220,38,38,0.18) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 56rem;
    text-align: center;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(220,38,38,0.4);
    background: rgba(220,38,38,0.08);
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
}

    .badge .dot {
        width: 6px;
        height: 6px;
        background: var(--primary);
        border-radius: 50%;
        animation: pulse 1.8s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

    .hero h1 .accent {
        color: var(--primary);
    }

.hero p {
    max-width: 36rem;
    margin: 0 auto 2.25rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
}

.section-alt {
    background: rgba(10,10,10,0.55);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    max-width: 100%;
    backdrop-filter: blur(6px);
}

    .section-alt > * {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

.section-header-left {
    max-width: 40rem;
    margin-bottom: 4rem;
}

    .section-header-left h2 {
        font-size: clamp(2rem, 4vw, 3.5rem);
        font-weight: 700;
        letter-spacing: -0.04em;
        margin-top: 1rem;
    }

    .section-header-left .sub {
        color: var(--muted);
        margin-top: 1rem;
    }

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,0.4);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature {
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

    .feature:last-child {
        border-bottom: none;
    }

@media (min-width: 768px) {
    .feature {
        border-bottom: none;
        border-right: 1px solid var(--border);
    }

        .feature:last-child {
            border-right: none;
        }
}

.feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.75rem;
}

.feature p {
    color: var(--muted);
    margin-top: 0.75rem;
    line-height: 1.7;
}

/* ============================================================
   MENU SHOWCASE
   ============================================================ */
.menu-showcase {
    max-width: 100% !important;
    padding: 8rem 1.5rem;
}

    .menu-showcase .showcase-inner {
        max-width: 1200px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 4rem;
        align-items: center;
    }

@media (min-width: 1024px) {
    .menu-showcase .showcase-inner {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
}

/* left copy */
.showcase-copy h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin: 0.75rem 0 1.5rem;
    color: #f5f5f5;
}

.showcase-copy .sub {
    color: #a1a1aa;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 32rem;
    margin-bottom: 3rem;
}

.showcase-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 22rem;
}

    .showcase-list li {
        display: flex;
        align-items: center;
        gap: 0.9rem;
        padding: 0.95rem 1.1rem;
        font-size: 0.95rem;
        font-weight: 500;
        color: #a1a1aa;
        border-left: 2px solid transparent;
        transition: color 0.25s, background 0.25s, border-color 0.25s;
        border-radius: 0 8px 8px 0;
        cursor: pointer;
        user-select: none;
    }

        .showcase-list li:hover {
            color: #e4e4e7;
            background: rgba(255,255,255,0.03);
        }

        .showcase-list li.active {
            color: #fff;
            border-left-color: var(--primary);
            background: rgba(220,38,38,0.08);
        }

.showcase-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #71717a;
    flex-shrink: 0;
    transition: color 0.25s;
}

.showcase-list li.active .showcase-icon {
    color: var(--primary);
}

.showcase-icon svg {
    width: 16px;
    height: 16px;
}

/* right panel */
.showcase-mock {
    position: relative;
    perspective: 1400px;
}

.showcase-panel {
    position: relative;
    border-radius: 14px;
    background: #101012;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02), 0 0 120px -30px rgba(220,38,38,0.18);
    overflow: hidden;
    aspect-ratio: 16 / 11;
    transform: rotateY(-3deg) rotateX(2deg);
    transition: transform 0.5s var(--ease-out-strong);
}

.showcase-mock:hover .showcase-panel {
    transform: rotateY(0deg) rotateX(0deg);
}

.showcase-panel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s var(--ease-out-strong);
    pointer-events: none;
}

    .showcase-panel-item.active {
        opacity: 1;
        pointer-events: auto;
    }

    .showcase-panel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* placeholder when image is missing */
.showcase-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(220,38,38,0.05), rgba(0,0,0,0.4)), repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px);
    color: rgba(220,38,38,0.65);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.18em;
    pointer-events: none;
}

.showcase-panel-item:not(.no-img) .showcase-placeholder {
    display: none;
}

.showcase-panel-item.no-img .showcase-placeholder {
    display: flex;
}

@media (max-width: 640px) {
    .showcase-panel {
        transform: none;
    }
}

/* ============================================================
   SCRIPTING
   ============================================================ */
.scripting-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .scripting-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.script-card {
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.75rem;
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out-strong);
}

    .script-card:hover {
        border-color: rgba(220,38,38,0.3);
        background: rgba(220,38,38,0.05);
        transform: translateY(-2px);
    }

.script-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

    .script-card-head .feature-icon {
        width: 40px;
        height: 40px;
    }

    .script-card-head h3 {
        font-size: 1.05rem;
        font-weight: 600;
        margin: 0;
    }

.script-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.script-code {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    color: var(--primary);
    background: rgba(220,38,38,0.06);
    border: 1px solid rgba(220,38,38,0.15);
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
    text-align: center;
    position: relative;
}

    .cta h2 {
        font-size: clamp(2rem, 4vw, 3.5rem);
        font-weight: 700;
        letter-spacing: -0.04em;
    }

    .cta p {
        max-width: 36rem;
        margin: 1.25rem auto 2rem;
        color: var(--muted);
    }

    .cta::before {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 4rem;
        width: 380px;
        height: 380px;
        transform: translateX(-50%) scale(0.9);
        background: radial-gradient(circle, rgba(220,38,38,0.18), transparent 70%);
        pointer-events: none;
        filter: blur(40px);
        animation: ctaPulse 5s ease-in-out infinite;
        z-index: -1;
    }

@keyframes ctaPulse {
    0%, 100% {
        transform: translateX(-50%) scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }
}

/* ============================================================
   AUTH
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 26rem;
    border: 1px solid var(--border);
    background: rgba(24,24,24,0.85);
    backdrop-filter: blur(14px);
    padding: 2.5rem;
    border-radius: var(--radius);
}

    .auth-card h1 {
        font-size: 1.75rem;
        margin-top: 1.5rem;
        letter-spacing: -0.03em;
    }

    .auth-card .muted {
        margin-top: 0.5rem;
        font-size: 0.9rem;
    }

.auth-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: var(--muted);
}

    .switch a {
        color: var(--primary);
        font-weight: 500;
    }

        .switch a:hover {
            text-decoration: underline;
        }

/* ============================================================
   DASHBOARD SHELL + SIDEBAR
   ============================================================ */
.shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 16rem;
    flex-shrink: 0;
    background: rgba(15,15,15,0.85);
    backdrop-filter: blur(14px);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.side-nav {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .side-nav a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        height: 2.25rem;
        padding: 0 0.75rem;
        border-radius: calc(var(--radius) - 2px);
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--muted);
        transition: background-color 0.15s, color 0.15s;
        cursor: pointer;
    }

        .side-nav a:hover,
        .side-nav a.active {
            background: var(--accent);
            color: var(--accent-foreground);
        }

        .side-nav a svg {
            width: 1rem;
            height: 1rem;
            flex-shrink: 0;
        }

.side-bottom {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.email {
    margin-top: 1rem;
    padding: 0 0.5rem;
}

.main {
    flex: 1;
    padding: 4rem 3rem;
    max-width: 80rem;
    margin: 0 auto;
    width: 100%;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 60;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
}

    .sidebar-toggle:hover {
        background: var(--accent);
    }

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        z-index: 55;
        transition: transform 0.3s var(--ease-drawer);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main {
        padding: 5rem 1.5rem 2rem;
    }

    .sidebar-toggle {
        display: flex;
    }
}

/* ============================================================
   DASHBOARD STATS
   ============================================================ */
.stats {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,0.4);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border);
}

    .stat:last-child {
        border-bottom: none;
    }

@media (min-width: 768px) {
    .stat {
        border-bottom: none;
        border-right: 1px solid var(--border);
    }

        .stat:last-child {
            border-right: none;
        }
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 1.5rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 1024px) {
    .dash-grid {
        grid-template-columns: 1.4fr 1fr;
    }
}

.dash-grid h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.activity {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0;
}

.activity-title {
    font-weight: 500;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: 1px solid var(--border);
    background: rgba(24,24,24,0.7);
    backdrop-filter: blur(8px);
    padding: 1.75rem;
    border-radius: var(--radius);
    margin-top: 1.25rem;
}

    .card.wide {
        max-width: 40rem;
        margin-top: 1.25rem;
    }

.card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card h3 {
    font-weight: 600;
    margin-top: 1.25rem;
}

.card p {
    margin-top: 0.5rem;
    line-height: 1.6;
}

.form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* ============================================================
   TABS (settings)
   ============================================================ */
.tabs {
    margin-top: 2.5rem;
}

.tabs-list {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--secondary);
    border-radius: var(--radius);
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    height: 2.25rem;
}

.tabs-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    height: 1.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-fg);
    border-radius: calc(var(--radius) - 2px);
    transition: all 0.2s var(--ease-out-strong);
    cursor: pointer;
    white-space: nowrap;
    border: none;
    background: transparent;
}

    .tabs-trigger:hover {
        color: var(--text);
    }

    .tabs-trigger.active {
        background: #0a0a0a;
        color: var(--text);
        box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }

.tabs-content {
    display: none;
}

    .tabs-content.active {
        display: block;
        animation: fadeUp 0.25s ease;
    }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   SETTINGS
   ============================================================ */
.color-swatches {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--c);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

    .swatch:hover {
        transform: scale(1.1);
    }

    .swatch.active {
        border-color: #fff;
        transform: scale(1.12);
        box-shadow: 0 0 14px var(--c);
    }

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    margin-top: 0.75rem;
    border-radius: 999px;
    background: rgba(220,38,38,0.2);
    outline: none;
    cursor: pointer;
}

    .slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--bg);
        border: 1px solid var(--primary);
        cursor: pointer;
        box-shadow: 0 0 8px rgba(220,38,38,0.5);
    }

    .slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--bg);
        border: 1px solid var(--primary);
        cursor: pointer;
    }

.switch {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    border: none;
    padding: 0;
}

    .switch::after {
        content: '';
        position: absolute;
        top: 3px;
        left: 3px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        transition: transform 0.2s;
    }

    .switch:checked {
        background: var(--primary);
    }

        .switch:checked::after {
            transform: translateX(18px);
        }

.card.danger {
    border-color: rgba(220,38,38,0.3);
    background: rgba(220,38,38,0.06);
}

.danger-icon {
    color: var(--primary);
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.1rem;
    background: rgba(24,24,24,0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   ICONS
   ============================================================ */
svg {
    color: inherit;
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--primary);
    transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-out-strong);
}

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

.feature:hover .feature-icon {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--primary);
}

    .card-icon svg {
        width: 20px;
        height: 20px;
    }

.stat-icon {
    color: var(--primary);
    display: inline-flex;
}

    .stat-icon svg {
        width: 16px;
        height: 16px;
    }

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius);
    color: var(--primary);
    flex-shrink: 0;
}

    .activity-icon svg {
        width: 18px;
        height: 18px;
    }

/* ============================================================
   ACTIVATE KEY MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(5, 5, 5, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out-strong);
}

    .modal-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

.modal {
    position: relative;
    width: 100%;
    max-width: 26rem;
    padding: 2.25rem 2rem;
    background: #131313;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.7), 0 0 0 1px rgba(220,38,38,0.1), 0 0 60px -10px rgba(220,38,38,0.15);
    text-align: center;
    transform: translateY(12px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s var(--ease-out-strong), opacity 0.35s var(--ease-out-strong);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(220,38,38,0.6), transparent);
}

.modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}

    .modal-close:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }

.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.25);
    color: var(--primary);
    box-shadow: 0 0 24px rgba(220,38,38,0.2);
}

    .modal-icon svg {
        width: 26px;
        height: 26px;
    }

.modal h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.modal .muted {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.modal .form {
    text-align: left;
    margin-top: 0;
}

    .modal .form input {
        font-family: ui-monospace, monospace;
        letter-spacing: 0.05em;
    }

.modal #keyHint {
    margin-top: -0.5rem;
    transition: color 0.2s;
}

    .modal #keyHint code {
        font-family: ui-monospace, monospace;
        color: var(--primary);
        background: rgba(220,38,38,0.08);
        padding: 0.1rem 0.35rem;
        border-radius: 4px;
        font-size: 0.8rem;
    }

    .modal #keyHint.error {
        color: #fca5a5;
    }

    .modal #keyHint.success {
        color: #86efac;
    }

/* ============================================================
   HERO ORBS
   ============================================================ */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0;
    animation: orbFloat 14s ease-in-out infinite;
}

.hero-orb-1 {
    width: 320px;
    height: 320px;
    top: 12%;
    left: 8%;
    background: radial-gradient(circle, rgba(220,38,38,0.35), transparent 70%);
}

.hero-orb-2 {
    width: 260px;
    height: 260px;
    bottom: 14%;
    right: 10%;
    background: radial-gradient(circle, rgba(220,38,38,0.22), transparent 70%);
    animation-delay: 3s;
}

@keyframes orbFloat {
    0% {
        opacity: 0;
        transform: translate(0,0) scale(0.85);
    }

    15% {
        opacity: 1;
    }

    50% {
        opacity: 1;
        transform: translate(30px,-25px) scale(1.05);
    }

    85% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(0,0) scale(0.85);
    }
}

/* ============================================================
   HERO ENTRANCE + SCROLL REVEAL
   ============================================================ */
[data-hero] {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
}

    [data-hero].hero-in {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
        transition: opacity 0.9s var(--ease-out-strong), transform 0.9s var(--ease-out-strong), filter 0.9s var(--ease-out-strong);
    }

.badge[data-hero] {
    transition-delay: 0.05s;
}

h1[data-hero] {
    transition-delay: 0.15s;
}

p[data-hero] {
    transition-delay: 0.30s;
}

.hero-actions a[data-hero]:nth-child(1) {
    transition-delay: 0.45s;
}

.hero-actions a[data-hero]:nth-child(2) {
    transition-delay: 0.55s;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(4px);
    transition: opacity 0.8s var(--ease-out-strong), transform 0.8s var(--ease-out-strong), filter 0.8s var(--ease-out-strong);
}

    [data-reveal].in {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

.features-grid .feature[data-reveal] {
    transform: translateY(36px) rotateX(-6deg) scale(0.97);
    transform-origin: top center;
    perspective: 800px;
}

    .features-grid .feature[data-reveal].in {
        transform: translateY(0) rotateX(0deg) scale(1);
    }

.scripting-grid .script-card[data-reveal]:nth-child(1) {
    transform: translateX(-28px) translateY(12px);
}

.scripting-grid .script-card[data-reveal]:nth-child(2) {
    transform: translateY(28px);
}

.scripting-grid .script-card[data-reveal]:nth-child(3) {
    transform: translateX(28px) translateY(12px);
}

.scripting-grid .script-card[data-reveal].in {
    transform: translate(0, 0);
}

.features-grid .feature[data-reveal]:nth-child(1) {
    transition-delay: 0.05s;
}

.features-grid .feature[data-reveal]:nth-child(2) {
    transition-delay: 0.15s;
}

.features-grid .feature[data-reveal]:nth-child(3) {
    transition-delay: 0.25s;
}

.features-grid .feature[data-reveal]:nth-child(4) {
    transition-delay: 0.10s;
}

.features-grid .feature[data-reveal]:nth-child(5) {
    transition-delay: 0.20s;
}

.features-grid .feature[data-reveal]:nth-child(6) {
    transition-delay: 0.30s;
}

.stats .stat[data-reveal]:nth-child(1) {
    transition-delay: 0.05s;
}

.stats .stat[data-reveal]:nth-child(2) {
    transition-delay: 0.15s;
}

.stats .stat[data-reveal]:nth-child(3) {
    transition-delay: 0.25s;
}

/* ============================================================
   FOCUS STATES
   ============================================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
.tabs-trigger:focus-visible,
.swatch:focus-visible,
.switch:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    [data-hero],
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }

    .hero-orb,
    .cta::before {
        animation: none !important;
        opacity: 0.35;
    }
}
