/* /site-builder/landing/landing.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Core */
    --primary-color: #a83232;      /* Crimson brand anchor */
    --accent-color: #ff5555;       /* Brighter red for hover/energy */
    --secondary-color: #3a3f44;    /* Neutral gray for secondary actions */
    --highlight-color: #e6b422;    /* Warm gold accent for highlights/success states */

    /* Backgrounds */
    --bg-dark: #121212;                     /* Main background */
    --bg-card: rgba(30, 30, 30, 0.9);       /* Elevated surfaces */
    --bg-glass: rgba(22, 22, 22, 0.6);      /* Glassmorphic overlays */

    /* Text */
    --text-light: #f1f1f1;    /* High-contrast white */
    --text-muted: #a0a0a0;    /* Muted gray */
    --text-dark: #1a1a1a;     /* For light surfaces */

    /* Status Colors */
    --success-color: #4CAF50;  /* Green for positive actions */
    --danger-color: #e53935;   /* Error/destructive */
    --warning-color: #ffc107;  /* Alerts */

    /* Effects */
    --shadow-heavy: 0 8px 28px rgba(0,0,0,0.45);
    --shadow-glow:  0 0 22px rgba(168,50,50,0.35);
    --border-glow:  rgba(255,85,85,0.25);

    /* Font */
    --font-main: 'Roboto', system-ui, sans-serif;

    /* Motion */
    --transition-fast: 0.18s ease-in-out;
    --transition-medium: 0.28s ease;
}


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

html, body {
    min-height: 100vh;
    background-color: var(--bg-dark);
}

body {
    overflow: auto;
    font-family: var(--font-main);
    color: var(--text-light);

    /* We kept your specific gradient structure but wired it to your brand variables */
    background:
            radial-gradient(circle at 50% 40%, rgba(168, 50, 50, 0.16), transparent 24rem),
            radial-gradient(circle at 10% 10%, rgba(255, 85, 85, 0.14), transparent 28rem),
            radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.055), transparent 24rem),
            linear-gradient(135deg, var(--bg-dark), #0a0a0a 54%, #000000);
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: transparent;
}

/* Retained Background Overlays for depth */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
            linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
            radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.45) 85%),
            linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

/* Base Layout */
.landing {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* The Card - Now utilizing your glassmorphic and shadow variables */
.landing-card {
    position: relative;
    width: 100%;
    max-width: 720px;
    padding: clamp(1.5rem, 4vh, 2.5rem) clamp(1.5rem, 5vw, 3rem);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: var(--bg-glass);
    box-shadow:
            var(--shadow-heavy),
            var(--shadow-glow),
            inset 0 1px 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: systemBoot 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle intelligent scanline */
.landing-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.logo {
    width: min(300px, 50vw);
    height: auto;
    display: block;
    margin: 0 auto 1.25rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

/* Strategic Status Pill */
.system-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 14px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 85, 85, 0.3); /* Uses your brand red for the border */
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(168, 50, 50, 0.15), rgba(22, 22, 22, 0.4));
    color: var(--text-light); /* Bumped up from muted to high-contrast white */
    font-size: 0.75rem;
    font-weight: 700; /* Stronger font weight */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow:
            0 4px 12px rgba(168, 50, 50, 0.15), /* Subtle red outer glow */
            inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
    animation: pulse 2s infinite ease-in-out;
}

h1 {
    font-family: var(--font-main);
    color: var(--text-light);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
    margin-bottom: 0.75rem;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    max-width: 520px;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.6;
    font-weight: 400;
}

/* Intelligent System Modules Grid */
.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 580px;
    margin: 0 auto 1.5rem;
}

.feature-module {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.feature-module:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(168, 50, 50, 0.12);
    border: 1px solid var(--border-glow);
    color: var(--accent-color);
    flex-shrink: 0; /* Prevents icon from squishing */
}

.feature-text {
    color: var(--text-light);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
}


/* The Main CTA */
.start-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 2.5rem;
    border: 1px solid rgba(255, 85, 85, 0.4);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow:
            var(--shadow-glow),
            inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all var(--transition-medium);
    overflow: hidden;
}

.start-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow:
            0 20px 40px rgba(168, 50, 50, 0.4),
            0 0 20px rgba(255, 85, 85, 0.2),
            inset 0 1px 1px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #b83737, var(--accent-color));
}

.start-btn:hover::before {
    transform: translateX(100%);
}

.start-btn svg {
    transition: transform var(--transition-fast);
}

.start-btn:hover svg {
    transform: translateX(4px);
}

.microcopy {
    margin-top: 0.75rem;
    color: rgba(160, 160, 160, 0.6); /* Slightly fainter text-muted */
    font-size: 0.85rem;
    font-weight: 500;
}

/* Animation Utilities */
.stagger-1 { animation: fadeUp 0.8s 0.1s both cubic-bezier(0.16, 1, 0.3, 1); }
.stagger-2 { animation: fadeUp 0.8s 0.2s both cubic-bezier(0.16, 1, 0.3, 1); }
.stagger-3 { animation: fadeUp 0.8s 0.3s both cubic-bezier(0.16, 1, 0.3, 1); }
.stagger-4 { animation: fadeUp 0.8s 0.4s both cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes systemBoot {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(255, 85, 85, 0.4); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(255, 85, 85, 0); }
    100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(255, 85, 85, 0); }
}

.landing-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.start-btn,
.secondary-btn {
    cursor: pointer;
}

.start-btn:disabled,
.secondary-btn:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.secondary-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-light);
    font-size: 0.96rem;
    font-weight: 600;
    text-decoration: none;
    transition:
            background var(--transition-fast),
            border-color var(--transition-fast),
            transform var(--transition-fast);
}

.secondary-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.22);
}

.existing-preview-panel {
    max-width: 580px;
    margin: 0 auto 1.45rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(255, 85, 85, 0.2);
    border-radius: 18px;
    background:
            linear-gradient(135deg, rgba(168, 50, 50, 0.13), rgba(255, 255, 255, 0.025)),
            rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.existing-preview-kicker {
    margin-bottom: 0.45rem;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.existing-preview-panel h2 {
    margin: 0 0 0.45rem;
    color: var(--text-light);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.existing-preview-panel p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.is-hidden {
    display: none !important;
}

/* ==========================================================================
   PREMIUM MODAL DIALOG
   ========================================================================== */
.wiq-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: opacity var(--transition-fast);
}

.wiq-modal {
    position: relative;
    width: min(100%, 460px);
    padding: 2.5rem 2rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.95), rgba(15, 15, 15, 0.98));
    box-shadow:
            0 40px 80px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(168, 50, 50, 0.15),
            inset 0 1px 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    overflow: hidden;
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle red intelligent scanline at the top */
.wiq-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.8;
}

.wiq-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wiq-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    transform: rotate(90deg);
}

.wiq-modal-kicker {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.wiq-modal h2 {
    margin: 0 0 1rem;
    color: var(--text-light);
    font-size: 1.6rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.wiq-modal p {
    margin: 0 0 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Modal Actions */
.wiq-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.wiq-modal .secondary-btn,
.wiq-modal .start-btn {
    flex: 1; /* Forces both buttons to be equal width */
    min-height: 48px;
    padding: 0 1rem;
    font-size: 0.95rem;
}

/* Animations */
@keyframes modalIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Overrides */
@media (max-width: 640px) {
    .landing-actions {
        width: 100%;
    }

    .secondary-btn,
    .start-btn {
        width: 100%;
    }

    .existing-preview-panel {
        padding: 1rem;
    }

    .landing-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .intelligence-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Stack modal buttons vertically on phones */
    .wiq-modal-actions {
        flex-direction: column-reverse;
    }
}

@media (max-width: 640px) {
    .landing-actions {
        width: 100%;
    }

    .secondary-btn {
        width: 100%;
    }

    .existing-preview-panel {
        padding: 1rem;
    }
}


@media (max-width: 640px) {
    .landing-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    .intelligence-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .start-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Landing responsive sizing
   ========================================================================== */

/* Normal desktop / laptop */
@media (max-width: 1600px) {
    .landing {
        padding: 1rem;
    }

    .landing-card {
        max-width: 580px;
        padding: 1.75rem 2rem;
        border-radius: 22px;
    }

    .logo {
        width: min(230px, 36vw);
        margin-bottom: 0.9rem;
    }

    .system-pill {
        margin-bottom: 0.8rem;
        padding: 5px 14px 5px 11px;
        font-size: 0.68rem;
    }

    h1 {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 0.55rem;
        font-size: clamp(2rem, 3.25vw, 2.75rem);
        line-height: 1;
    }

    .lead {
        max-width: 460px;
        margin-bottom: 1.15rem;
        font-size: 0.96rem;
        line-height: 1.5;
    }

    .intelligence-grid {
        max-width: 500px;
        gap: 10px;
        margin-bottom: 1.15rem;
    }

    .feature-module {
        padding: 11px 15px;
        gap: 11px;
        min-height: 58px;
    }

    .feature-icon {
        width: 31px;
        height: 31px;
        border-radius: 9px;
    }

    .feature-icon svg {
        width: 15px;
        height: 15px;
    }

    .feature-text {
        font-size: 0.84rem;
    }

    .start-btn {
        min-height: 48px;
        padding: 0 2rem;
        font-size: 0.95rem;
    }

    .secondary-btn {
        min-height: 42px;
        padding: 0 1.65rem;
        font-size: 0.88rem;
    }

    .microcopy {
        margin-top: 0.35rem;
        font-size: 0.78rem;
    }
}

/* Short laptop screens: prioritize no-scroll */
@media (max-height: 820px) and (min-width: 641px) {
    .landing {
        padding: 0.75rem;
    }

    .landing-card {
        max-width: 540px;
        padding: 1.35rem 1.75rem;
    }

    .logo {
        width: min(205px, 32vw);
        margin-bottom: 0.65rem;
    }

    .system-pill {
        margin-bottom: 0.65rem;
    }

    h1 {
        font-size: clamp(1.85rem, 3vw, 2.35rem);
        margin-bottom: 0.45rem;
    }

    .lead {
        margin-bottom: 0.9rem;
        font-size: 0.9rem;
        line-height: 1.42;
    }

    .intelligence-grid {
        margin-bottom: 0.9rem;
        gap: 8px;
    }

    .feature-module {
        min-height: 52px;
        padding: 9px 13px;
    }

    .start-btn {
        min-height: 45px;
    }

    .secondary-btn {
        min-height: 39px;
    }

    .microcopy {
        display: none;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .landing-card {
        max-width: 520px;
        padding: 1.45rem;
    }

    h1 {
        font-size: clamp(1.85rem, 5vw, 2.45rem);
    }
}

/* Mobile: centered and compact */
@media (max-width: 640px) {
    html,
    body {
        min-height: 100%;
    }

    body {
        overflow-y: auto;
    }

    .landing {
        min-height: 100svh;
        justify-content: center;
        padding: 1rem;
    }

    .landing-card {
        width: min(100%, 390px);
        max-width: 390px;
        padding: 1.05rem;
        border-radius: 18px;
    }

    .logo {
        width: min(165px, 54vw);
        margin-bottom: 0.65rem;
    }

    .system-pill {
        gap: 7px;
        margin-bottom: 0.65rem;
        padding: 4px 10px 4px 9px;
        font-size: 0.58rem;
        letter-spacing: 0.075em;
    }

    .pulse-dot {
        width: 5px;
        height: 5px;
    }

    h1 {
        max-width: 290px;
        margin-bottom: 0.45rem;
        font-size: clamp(1.55rem, 8vw, 2rem);
        line-height: 1;
        letter-spacing: -0.055em;
    }

    .lead {
        max-width: 300px;
        margin-bottom: 0.8rem;
        font-size: 0.82rem;
        line-height: 1.38;
    }

    .intelligence-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 0.85rem;
    }

    .feature-module {
        min-height: 68px;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 6px;
        padding: 8px 6px;
        border-radius: 12px;
        text-align: center;
    }

    .feature-icon {
        width: 27px;
        height: 27px;
        border-radius: 8px;
    }

    .feature-icon svg {
        width: 14px;
        height: 14px;
    }

    .feature-text {
        font-size: 0.66rem;
        line-height: 1.1;
        text-align: center;
        font-weight: 800;
    }

    .landing-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .start-btn {
        width: 100%;
        min-height: 44px;
        font-size: 0.9rem;
    }

    .secondary-btn {
        width: 100%;
        min-height: 40px;
        font-size: 0.84rem;
    }

    .microcopy {
        max-width: 280px;
        margin-top: 0.1rem;
        font-size: 0.7rem;
        line-height: 1.3;
    }
}

/* Tiny / short mobile screens */
@media (max-width: 420px), (max-width: 640px) and (max-height: 720px) {
    .landing {
        padding: 0.75rem;
    }

    .landing-card {
        padding: 0.9rem;
    }

    .logo {
        width: min(150px, 50vw);
        margin-bottom: 0.5rem;
    }

    .system-pill {
        margin-bottom: 0.5rem;
    }

    h1 {
        font-size: clamp(1.4rem, 7.6vw, 1.8rem);
    }

    .lead {
        margin-bottom: 0.7rem;
        font-size: 0.76rem;
    }

    .feature-module {
        min-height: 60px;
    }

    .microcopy {
        display: none;
    }
}