/* ─── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    background: #050508;
    color: #e2e2e8;
    font-family: 'Ubuntu', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* Force Ubuntu across all MudBlazor components */
*, .mud-typography, .mud-input, .mud-input-control,
.mud-button, .mud-snackbar, .mud-dialog,
.mud-popover, .mud-tooltip { font-family: 'Ubuntu', system-ui, sans-serif !important; }

/* ─── App shell ─────────────────────────────────────────── */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.page-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ─── Floating nav ──────────────────────────────────────── */
.floating-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #fff;
    opacity: 0.9;
    line-height: 1.2;
}

.nav-tagline {
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.4);
}

.nav-links { display: flex; align-items: center; gap: 0.5rem; }

.nav-link {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    transition: color 0.2s;
    letter-spacing: 0.05em;
}

.nav-link:hover { color: rgba(255,255,255,0.9); }

.nav-link-cta {
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
}

.nav-link-cta:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

/* ─── Coming Soon page ──────────────────────────────────── */
.coming-soon-page {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Orbs / background */
.cs-bg { position: absolute; inset: 0; pointer-events: none; }

.cs-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
}

.cs-orb-1 {
    width: 600px; height: 600px;
    background: #1a56b0;
    top: -200px; left: -100px;
    animation: drift 12s ease-in-out infinite alternate;
}

.cs-orb-2 {
    width: 500px; height: 500px;
    background: #60a5fa;
    bottom: -150px; right: -80px;
    animation: drift 15s ease-in-out infinite alternate-reverse;
}

.cs-orb-3 {
    width: 300px; height: 300px;
    background: #38bdf8;
    top: 40%; left: 55%;
    animation: drift 10s ease-in-out infinite alternate;
}

.cs-grid {
    position: absolute; inset: 0;
    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: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.08); }
}

/* Content */
.cs-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cs-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.03);
}

.cs-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #1a56b0;
    box-shadow: 0 0 6px #1a56b0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px #1a56b0; }
    50%       { opacity: 0.5; box-shadow: 0 0 14px #1a56b0; }
}

.cs-headline {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 1.25rem;
}

.cs-headline-top {
    background: linear-gradient(135deg, #fff 30%, rgba(163,130,245,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cs-sub {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.45);
    margin-bottom: 1.75rem;
}

.cs-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.cs-pill {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.03);
}

.cs-pill-ai {
    border-color: rgba(26,86,176,0.4) !important;
    color: #60a5fa !important;
    background: rgba(26,86,176,0.08) !important;
}

.cp-service-ai span { color: #60a5fa; }
.cp-service-ai svg  { color: #60a5fa; }

.cs-divider {
    width: 40px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.6), transparent);
    margin: 0 auto 1.25rem;
}

.cs-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.cs-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, #1a56b0, #2563eb);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 30px rgba(99,102,241,0.3);
}

.cs-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(99,102,241,0.5);
}

.cs-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.05em;
    z-index: 1;
}

.cs-footer a { transition: color 0.2s; }
.cs-footer a:hover { color: rgba(255,255,255,0.5); }
.cs-footer-sep { opacity: 0.4; }

/* ─── Contact page ──────────────────────────────────────── */
.contact-page {
    position: relative;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    scrollbar-width: none;
}

.contact-page::-webkit-scrollbar { display: none; }

.cp-bg { position: absolute; inset: 0; pointer-events: none; }

.cp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.cp-orb-1 {
    width: 500px; height: 500px;
    background: #1a56b0;
    top: -100px; left: -100px;
}

.cp-orb-2 {
    width: 400px; height: 400px;
    background: #60a5fa;
    bottom: -100px; right: 10%;
}

.cp-layout {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100%;
}

/* Left panel */
.cp-left {
    width: 38%;
    min-width: 280px;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
}

.cp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.05em;
    transition: color 0.2s;
    margin-bottom: auto;
    padding-top: 4rem;
}

.cp-back:hover { color: rgba(255,255,255,0.7); }

.cp-left-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 4rem;
}

.cp-overline {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #1a56b0;
    margin-bottom: 1rem;
}

.cp-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 1rem;
}

.cp-title em {
    font-style: normal;
    background: linear-gradient(135deg, #60a5fa, #1a56b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cp-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cp-services {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.cp-service-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.cp-service-item svg { flex-shrink: 0; color: #1a56b0; }

.cp-contact-items { display: flex; flex-direction: column; gap: 0.9rem; }

.cp-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.825rem;
    color: rgba(255,255,255,0.4);
}

.cp-contact-item svg { flex-shrink: 0; color: rgba(26,86,176,0.8); }

.cp-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.cp-legal span {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

/* Right panel (form) */
.cp-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    overflow-y: auto;
    scrollbar-width: none;
}

.cp-right::-webkit-scrollbar { display: none; }

.cp-form {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    animation: fadeUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

.cp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cp-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cp-optional {
    font-weight: 400;
    color: rgba(255,255,255,0.2);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.65rem;
}

.cp-field label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

.cp-input, .cp-textarea {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    color: #e2e2e8;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    resize: none;
}

.cp-input::placeholder, .cp-textarea::placeholder {
    color: rgba(255,255,255,0.2);
}

.cp-input-error { border-color: rgba(248,113,113,0.5) !important; }

.cp-input:focus, .cp-textarea:focus {
    border-color: rgba(99,102,241,0.6);
    background: rgba(99,102,241,0.05);
}

.cp-error {
    font-size: 0.72rem;
    color: #f87171;
    margin-top: 0.15rem;
}

.cp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, #1a56b0, #2563eb);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 24px rgba(99,102,241,0.25);
    margin-top: 0.5rem;
    align-self: flex-start;
}

.cp-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 36px rgba(99,102,241,0.4);
}

.cp-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.cp-error-banner {
    padding: 0.75rem 1rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 8px;
    color: #f87171;
    font-size: 0.8rem;
}

.cp-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success state */
.cp-success {
    text-align: center;
    animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

.cp-success-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #60a5fa;
}

.cp-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.cp-success p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
}

/* ─── Blazor error boundary ─────────────────────────────── */
.blazor-error-boundary {
    position: fixed;
    bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    background: rgba(185,28,28,0.9);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.blazor-error-boundary::after { content: "An error has occurred."; }

/* ─── Responsive ────────────────────────────────────────── */

/* Tablet (641–900px): shrink left panel, keep side-by-side */
@media (min-width: 641px) and (max-width: 900px) {
    .cp-left {
        width: 44%;
        padding: 2rem 1.75rem;
    }
    .cp-right { padding: 2rem 1.75rem; }
    .cp-services { display: none; }
    .cp-title { font-size: 1.6rem; }
    .floating-nav { padding: 1.25rem 1.75rem; }
}

/* Mobile (≤ 640px)
   Use position:fixed to escape the overflow:hidden chain on .app-shell / .page-content */
@media (max-width: 640px) {

    /* Escape the parent overflow clip */
    .contact-page {
        position: fixed;
        inset: 0;
        z-index: 50;
        overflow-y: auto;
        overflow-x: hidden;
        display: block;
        height: auto;
    }

    .cp-layout {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        height: auto;
    }

    /* Nav sits above the fixed contact page */
    .floating-nav { z-index: 100; padding: 1rem 1.25rem; }
    .nav-logo { font-size: 0.75rem; }

    /* ── Left info panel → compact header ── */
    .cp-left {
        width: 100%;
        min-width: unset;
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 4.5rem 1.25rem 1.25rem;
        background: rgba(255,255,255,0.02);
    }

    .cp-back {
        padding-top: 0;
        margin-bottom: 0;
        position: absolute;
        top: 1.1rem;
        left: 1.25rem;
    }

    .cp-left-body {
        padding-bottom: 0;
        justify-content: flex-start;
    }

    .cp-overline { margin-bottom: 0.4rem; }
    .cp-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .cp-desc, .cp-services { display: none; }

    .cp-contact-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
        margin-top: 0.75rem !important;
    }

    .cp-contact-item {
        font-size: 0.75rem;
        align-items: center;
    }

    .cp-legal {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        gap: 0.3rem 0.75rem;
    }

    /* ── Right form panel → full width ── */
    .cp-right {
        flex: 1;
        width: 100%;
        padding: 1.5rem 1.25rem 2rem;
        overflow-y: visible;
        align-items: stretch;
        justify-content: flex-start;
    }

    .cp-form {
        max-width: 100%;
        width: 100%;
    }

    .cp-field-row { grid-template-columns: 1fr; }

    .cp-submit {
        align-self: stretch;
        width: 100%;
        justify-content: center;
    }

    .cp-success { padding: 1rem 0; }
}
