/* Conthrax font */
@font-face {
    font-family: "Conthrax";
    src: url("/fonts/Conthrax-SemiBold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #07090c;
    --card: #0f141c;
    --card2: #0b1017;
    --text: #e8edf4;
    --muted: #a9b5c6;
    --line: #1c2636;
    --accent: #19d3ff;
    --accent2: #7cf7c6;
    --shadow: 0 18px 60px rgba(0, 0, 0, .45);
    --radius: 18px;
    --error: #ff4d4d;
    --success: #4dff88;
}

* {
    box-sizing: border-box;
}

/* Prevent unwanted focus outlines and selection artifacts */
*:focus,
*:focus-visible {
    outline: none;
}

*::selection {
    background: rgba(25, 211, 255, .25);
    color: var(--text);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    scroll-behavior: smooth;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: radial-gradient(1200px 800px at 70% -10%, rgba(25, 211, 255, .18), transparent 55%),
                radial-gradient(900px 700px at 10% 0%, rgba(124, 247, 198, .10), transparent 55%),
                var(--bg);
    color: var(--text);
}

#blazor-error-ui {
    background: var(--error);
    color: var(--text);
    padding: 1rem;
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Headings use Conthrax font */
h1, h2, h3, .wordmark, .label {
    font-family: "Conthrax", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    letter-spacing: .6px;
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(7, 9, 12, .65);
    border-bottom: 1px solid rgba(28, 38, 54, .7);
}

.nav .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: .3px;
}

.brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(15, 20, 28, .95), rgba(11, 16, 23, .90));
    box-shadow: 0 12px 30px rgba(7, 9, 12, .65);
    object-fit: cover;
    padding: 2px;
}

.wordmark {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.wordmark .cerb {
    color: #ffffff;
}

.wordmark .ev {
    color: #00EAFF;
}

.links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.links a {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.links a:hover {
    color: var(--text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(25, 211, 255, .35);
    background: rgba(25, 211, 255, .08);
    color: var(--text);
    font-weight: 700;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
    white-space: nowrap;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-1px);
    background: rgba(25, 211, 255, .12);
    border-color: rgba(25, 211, 255, .55);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn.primary {
    background: linear-gradient(135deg, rgba(25, 211, 255, .95), rgba(124, 247, 198, .75));
    color: #061018;
    border-color: rgba(255, 255, 255, .25);
}

.btn.primary:hover {
    background: linear-gradient(135deg, rgba(25, 211, 255, 1), rgba(124, 247, 198, .85));
}

.btn.danger {
    background: rgba(255, 77, 77, .15);
    border-color: rgba(255, 77, 77, .35);
    color: var(--error);
}

.btn.danger:hover {
    background: rgba(255, 77, 77, .25);
    border-color: rgba(255, 77, 77, .55);
}

/* Hero Section */
.hero {
    padding: 56px 0 24px;
}

.heroGrid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 22px;
    align-items: stretch;
}

@media (max-width: 920px) {
    .heroGrid {
        grid-template-columns: 1fr;
    }
}

.kicker {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(28, 38, 54, .9);
    background: rgba(15, 20, 28, .65);
    color: var(--muted);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(25, 211, 255, .55);
}

h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    background: transparent;
    outline: none;
    border: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

h1:focus {
    outline: none;
}

h1::selection {
    background: transparent;
    color: inherit;
}

.hero h1 {
    pointer-events: none;
}

.sub {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
    max-width: 58ch;
    margin: 0 0 18px;
}

.ctaRow {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0 6px;
}

.mini {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

.pillRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pill {
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    color: rgba(232, 237, 244, .92);
    border: 1px solid rgba(28, 38, 54, .9);
    background: rgba(11, 16, 23, .55);
}

/* Cards */
.card {
    border: 1px solid rgba(28, 38, 54, .9);
    background: linear-gradient(180deg, rgba(15, 20, 28, .85), rgba(11, 16, 23, .75));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.mediaCard {
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 360px;
}

.mediaTop {
    position: relative;
    background:
        radial-gradient(700px 400px at 30% 20%, rgba(25, 211, 255, .20), transparent 55%),
        radial-gradient(700px 400px at 70% 90%, rgba(124, 247, 198, .12), transparent 55%),
        rgba(9, 12, 16, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mediaTop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 360px;
    filter: drop-shadow(0 18px 60px rgba(0, 0, 0, .55));
    border-radius: 12px;
}

.mediaBottom {
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(28, 38, 54, .9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mediaBottom .label {
    font-weight: 800;
    letter-spacing: .2px;
}

.mediaBottom .hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

/* Sections */
section {
    padding: 22px 0;
    scroll-margin-top: 80px;
}

.sectionHead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 0 14px;
}

.sectionHead h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.01em;
}

.sectionHead p {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    max-width: 62ch;
}

/* Grid Layouts */
.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .grid3 {
        grid-template-columns: 1fr;
    }
}

/* Features */
.feature {
    padding: 14px 14px 16px;
}

.feature .t {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    margin: 0 0 8px;
}

.icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(25, 211, 255, .35);
    background: rgba(25, 211, 255, .10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 900;
    flex-shrink: 0;
}

.feature .d {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
    font-weight: 600;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 14px;
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

.bigImg, .smallImg {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(28, 38, 54, .9);
    background: rgba(11, 16, 23, .55);
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.bigImg img, .smallImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.stack {
    display: grid;
    gap: 14px;
}

/* Specifications */
.specRow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .specRow {
        grid-template-columns: 1fr 1fr;
    }
}

.spec {
    padding: 14px;
}

.spec .k {
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.spec .v {
    font-weight: 900;
    font-size: 18px;
    margin-top: 6px;
}

/* CTA Section */
.cta {
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.cta h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.01em;
}

.cta p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 600;
}

/* Footer */
footer {
    padding: 26px 0 40px;
    color: var(--muted);
    font-size: 13px;
}

.footGrid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(28, 38, 54, .7);
    padding-top: 16px;
}

.badgeRow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(28, 38, 54, .9);
    background: rgba(11, 16, 23, .55);
    font-weight: 800;
    font-size: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-group label.required::after {
    content: " *";
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(28, 38, 54, .9);
    background: rgba(11, 16, 23, .75);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(25, 211, 255, .15);
}

.form-control::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.form-control.invalid {
    border-color: var(--error);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a9b5c6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.validation-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Contact Form Card */
.contact-form-card {
    padding: 24px;
    max-width: 600px;
}

.contact-form-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.contact-form-card .subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Alert Messages */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 14px;
}

.alert-success {
    background: rgba(77, 255, 136, .15);
    border: 1px solid rgba(77, 255, 136, .35);
    color: var(--success);
}

.alert-error {
    background: rgba(255, 77, 77, .15);
    border: 1px solid rgba(255, 77, 77, .35);
    color: var(--error);
}

/* Admin Dashboard Styles */
.admin-container {
    padding: 40px 0;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 28px;
    margin: 0 0 8px;
}

.admin-header p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 18px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 6px;
}

.leads-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
}

.leads-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 14px;
    display: table;
}

.leads-table th,
.leads-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(28, 38, 54, .7);
}

.leads-table th {
    font-weight: 700;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.leads-table tr:hover td {
    background: rgba(25, 211, 255, .05);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-new {
    background: rgba(25, 211, 255, .15);
    color: var(--accent);
}

.status-contacted {
    background: rgba(255, 193, 7, .15);
    color: #ffc107;
}

.status-qualified {
    background: rgba(124, 247, 198, .15);
    color: var(--accent2);
}

.status-proposal {
    background: rgba(147, 112, 219, .15);
    color: #9370db;
}

.status-won {
    background: rgba(77, 255, 136, .15);
    color: var(--success);
}

.status-lost {
    background: rgba(255, 77, 77, .15);
    color: var(--error);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
}

.auth-card h1 {
    font-size: 24px;
    margin: 0 0 8px;
    text-align: center;
}

.auth-card .subtitle {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(28, 38, 54, .7);
    color: var(--muted);
    font-size: 14px;
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(25, 211, 255, .3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--muted);
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}
