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

:root {
    color-scheme: dark;
    --bg: transparent; /* allow fixed video background to show through */
    --panel: rgba(15, 12, 28, 0.78);
    --panel-soft: rgba(22, 18, 38, 0.82);
    --border: rgba(139, 92, 246, 0.15);
    --text: #f1edff;
    --muted: #b8a9e0;
    --gold: #e2b930;
    --purple: #7c3aed;
    --purple-soft: rgba(124, 58, 237, 0.16);
    --gold-soft: rgba(226, 185, 48, 0.14);
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 30%),
                radial-gradient(circle at bottom right, rgba(226, 185, 48, 0.09), transparent 25%),
                var(--bg); /* transparent base so fixed video shows */
    color: var(--text);
    scroll-behavior: smooth;
}

.page-shell, .admin-shell {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 2rem;
    gap: 1rem;
    background: rgba(10, 8, 25, 0.82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.admin-topbar {
    background: rgba(12, 10, 32, 0.85);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid var(--purple);
    background: var(--purple-soft);
    padding: 0.45rem;
}

.brand-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-tag {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

.topnav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.topnav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.topnav a:hover {
    color: var(--gold);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.9rem 1.6rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--purple), #a855f7);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.button-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border-color: rgba(255,255,255,0.12);
}

.button-outline {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* No overflow hidden needed anymore since video is page-wide fixed */
}

.hero-video-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.75) brightness(0.7);
}

.hero-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, rgba(30, 15, 60, 0.35), rgba(8, 8, 24, 0.62));
    pointer-events: none;
}

.hero-content,
.service-card,
.feature-card,
.glass-panel,
.metric-card,
.list-item,
.section-header {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 940px;
    width: min(100%, 980px);
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    animation: fadeIn 1.3s ease forwards;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hero-content h1 {
    font-size: clamp(2.8rem, 5vw, 4.4rem);
    line-height: 1.03;
    margin: 0;
    max-width: 10ch;
}

.hero-content p {
    margin: 1.75rem auto 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.75rem;
    text-align: left;
}

.hero-video {
    transition: transform 0.24s ease-out;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.in-view {
    opacity: 1;
    transform: translateY(0);
}

.hero-highlights div {
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    border-radius: 22px;
    background: var(--panel-soft);
}

.hero-highlights strong {
    display: block;
    color: var(--gold);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.section-block {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    margin: 1rem auto 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
}

.section-header p {
    margin-top: 1rem;
    color: var(--muted);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--purple);
}

.highlight-card {
    background: linear-gradient(180deg, var(--purple-soft), var(--panel));
    border-color: var(--purple);
}

.service-badge {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}

.service-card h3 {
    margin: 0;
    font-size: 1.3rem;
}

.service-card p {
    flex: 1;
    color: var(--muted);
    line-height: 1.75;
}

.service-price {
    font-size: 1.55rem;
    font-weight: 700;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 1.8rem;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08);
}

.feature-card span {
    display: block;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.8;
}

.intake-block {
    padding-bottom: 6rem;
}

.intake-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 2rem;
}

.glass-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.intake-panel h3,
.admin-panel h2 {
    margin-top: 0;
}

.intake-panel p {
    color: var(--muted);
    margin-bottom: 1.75rem;
}

.input-row {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.input-row label {
    font-size: 0.95rem;
    color: var(--muted);
}

.input-row input,
.input-row select,
.input-row textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    background: rgba(0,0,0,0.45);
    color: var(--text);
    padding: 1rem 1.2rem;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-row input:focus,
.input-row select:focus,
.input-row textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px var(--purple-soft);
}

.intake-summary ul,
.admin-notes {
    padding-left: 1.15rem;
    margin: 1rem 0 0;
    color: var(--muted);
}

.intake-summary li,
.admin-notes li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.summary-stat {
    margin-top: 1.75rem;
    padding: 1.45rem 1.4rem;
    border-radius: 22px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
}

.summary-stat strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.admin-header {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 1.8rem;
    box-shadow: var(--shadow);
}

.metric-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 1rem;
}

.metric-card strong {
    font-size: 2.4rem;
    color: var(--text);
}

.gold-card {
    background: linear-gradient(180deg, var(--purple-soft), rgba(20, 18, 35, 0.96));
    border-color: var(--purple);
}

.admin-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-panel {
    min-height: 420px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.list-box {
    display: grid;
    gap: 1rem;
    overflow: auto;
    max-height: 44rem;
    padding-right: 0.25rem;
}

.list-item {
    padding: 1.25rem 1.4rem;
    background: rgba(20, 18, 35, 0.7);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.list-item h4 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.list-item p,
.list-item span {
    color: var(--muted);
    line-height: 1.7;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
}

.status-pill.active {
    color: var(--gold);
    border-color: rgba(226, 185, 48, 0.3);
}

.status-pill.done {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.3);
}

.list-item button {
    margin-top: 0.95rem;
    width: auto;
}

.admin-form-block {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
}

.admin-notes {
    list-style: disc;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 50;
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

@media (max-width: 980px) {
    .hero-highlights,
    .admin-block,
    .admin-grid,
    .intake-grid,
    .admin-form-block {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 2rem 1.15rem;
    }

    .hero-highlights {
        text-align: center;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Admin Login Portal Styles - Black, Purple, Gold Theme */
.login-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.08), var(--bg) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.login-container {
    background: var(--panel);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    border: 2px solid var(--purple);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    color: var(--gold);
    margin: 0 0 0.5rem;
    font-size: 2.1rem;
    letter-spacing: -0.02em;
}

.login-container .tagline {
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-container input {
    width: 100%;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    background: rgba(10, 8, 25, 0.85);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.login-container input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px var(--purple-soft);
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 1.15rem;
    background: linear-gradient(135deg, var(--purple), #a855f7);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.75rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.4);
}

.login-error {
    color: #f87171;
    margin-top: 1rem;
    min-height: 1.25em;
    font-size: 0.9rem;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--purple);
    border-color: var(--purple);
}

/* Enhanced Glassmorphic HUD for Admin Revamp */
.glass-panel, .metric-card, .list-item {
    background: rgba(15, 12, 28, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.glass-panel:hover, .metric-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.metric-card.glass {
    padding: 1.5rem;
    text-align: center;
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--purple-soft);
    border-color: var(--purple);
    color: var(--text);
}

.paid-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.paid-pill.paid {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.paid-pill.unpaid {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.admin-hud {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.client-count {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), var(--panel));
    border-color: var(--purple);
}

/* Client Auth Modal */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.auth-modal-content {
    background: var(--panel);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--purple);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-modal-content h3 {
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--gold);
    border-bottom-color: var(--purple);
}

.auth-form input {
    width: 100%;
    padding: 0.9rem;
    margin-bottom: 1rem;
    background: rgba(10, 8, 25, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.auth-form button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--purple), #a855f7);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.auth-form button:hover {
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-switch span {
    color: var(--gold);
    cursor: pointer;
    text-decoration: underline;
}

/* AI Chat Widget for xAI Integration */
.ai-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 150;
}

.ai-button {
    background: linear-gradient(135deg, var(--purple), var(--gold));
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
    font-size: 24px;
}

.ai-button:hover {
    transform: scale(1.1);
}

.ai-chat {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    background: var(--panel);
    border-radius: 16px;
    border: 1px solid var(--purple);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-header {
    padding: 1rem;
    background: rgba(124, 58, 237, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-body {
    height: 300px;
    padding: 1rem;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ai-message.user {
    align-self: flex-end;
    background: var(--purple);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message.bot {
    align-self: flex-start;
    background: rgba(226, 185, 48, 0.15);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.ai-chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
    background: var(--panel);
}

.ai-chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(10, 8, 25, 0.8);
    color: var(--text);
}

.ai-chat-input button {
    background: var(--gold);
    color: #111;
    border: none;
    border-radius: 999px;
    padding: 0 1.25rem;
    cursor: pointer;
    font-weight: 700;
}
