/* ============================================================
   LabShare Landing v2
   Brand tokens pulled from app.labshare.ai
   ============================================================ */

:root {
    /* Brand */
    --ls-navy-deep: #0b112b;       /* Sidebar / dark panels */
    --ls-navy: #273990;            /* Primary button */
    --ls-navy-hover: #1e2c73;
    --ls-cyan: #0da9e6;            /* Accent / active */
    --ls-cyan-hover: #0a8cc2;
    --ls-page-bg: #f6f6ff;         /* Page background */

    /* Neutrals */
    --ls-ink: #0b112b;
    --ls-ink-60: #4a5170;
    --ls-ink-40: #8a90a8;
    --ls-border: #e5e7f2;
    --ls-border-strong: #d0d4e4;
    --ls-surface: #ffffff;
    --ls-surface-tint: #f0f1fb;

    /* Effects */
    --ls-shadow-sm: 0 1px 2px rgba(11, 17, 43, 0.06);
    --ls-shadow-md: 0 6px 20px rgba(11, 17, 43, 0.08);
    --ls-shadow-lg: 0 20px 60px rgba(11, 17, 43, 0.12);

    /* Radii */
    --ls-radius: 12px;
    --ls-radius-lg: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ls-ink);
    background: var(--ls-page-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ls-navy); text-decoration: none; }
a:hover { color: var(--ls-cyan); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.ls-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ls-border);
    padding: 14px 0;
}

.ls-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ls-ink);
    letter-spacing: -0.01em;
}

.ls-brand:hover { color: var(--ls-ink); }

/* Logo image — real LabShare cube mark */
.ls-brand-mark-img {
    display: inline-block;
    height: 34px;
    width: auto;
    /* Lift slightly so the flat-bottom cube sits visually aligned with the wordmark baseline */
    margin-top: -2px;
}

.ls-brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.ls-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 28px;
}

.ls-nav-links li { margin: 0; }

.ls-nav-links a {
    color: var(--ls-ink-60);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

/* Navbar anchor-button exception: `.ls-nav-links a` (specificity 0,2,1) would
   otherwise override the button's own color rule (0,1,0). These selectors
   match at 0,3,1 so the white button text wins inside the nav. */
.ls-nav-links a.ls-btn-primary,
.ls-nav-links a.ls-btn-primary:hover,
.ls-nav-links a.ls-btn-cyan,
.ls-nav-links a.ls-btn-cyan:hover { color: #ffffff; }

.ls-nav-links a:hover { color: var(--ls-navy); }

.ls-link-subtle { color: var(--ls-ink-60); }

.ls-nav-toggle {
    background: transparent;
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--ls-ink);
    cursor: pointer;
}

@media (max-width: 991px) {
    .ls-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 15px;
        background: var(--ls-surface);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--ls-border);
        border-radius: var(--ls-radius);
        box-shadow: var(--ls-shadow-md);
        min-width: 220px;
    }
    .ls-nav-links.ls-open { display: flex; }
    .ls-nav-links li { padding: 4px 0; }
    .ls-nav-links a { padding: 10px 14px; display: block; border-radius: 8px; }
    .ls-nav-links a:hover { background: var(--ls-surface-tint); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ls-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.ls-btn-primary {
    background: var(--ls-navy);
    color: #ffffff;
}
.ls-btn-primary:hover {
    background: var(--ls-navy-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(39, 57, 144, 0.35);
}

.ls-btn-cyan {
    background: var(--ls-cyan);
    color: #ffffff;
}
.ls-btn-cyan:hover {
    background: var(--ls-cyan-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 169, 230, 0.4);
}

.ls-btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
    border-radius: 12px;
}

/* ============================================================
   HERO — the live feed is the whole show
   ============================================================ */
.ls-hero {
    position: relative;
    padding: 48px 0 80px;
    background:
        radial-gradient(ellipse at top, rgba(13, 169, 230, 0.08) 0%, transparent 60%),
        var(--ls-page-bg);
    min-height: calc(100vh - 66px);
}

.ls-hero-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 32px;
}

.ls-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--ls-surface);
    border: 1px solid var(--ls-border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ls-ink-60);
    box-shadow: var(--ls-shadow-sm);
    margin-bottom: 24px;
}

.ls-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ls-cyan);
    box-shadow: 0 0 0 0 rgba(13, 169, 230, 0.6);
    animation: ls-pulse 1.8s ease-out infinite;
}

@keyframes ls-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(13, 169, 230, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(13, 169, 230, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 169, 230, 0); }
}

.ls-hero-title {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: var(--ls-ink);
}

.ls-gradient-text {
    background: linear-gradient(90deg, var(--ls-navy) 0%, var(--ls-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ls-hero-sub {
    font-size: 1.05rem;
    color: var(--ls-ink-60);
    margin: 0;
}

/* ============================================================
   WORLD MAP HERO BLOCK
   ============================================================ */
.ls-map-wrap {
    max-width: 960px;
    margin: 0 auto 56px;
    padding: 14px;
    background: var(--ls-surface);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-lg);
    box-shadow: var(--ls-shadow-md);
    position: relative;
}

.ls-map {
    width: 100%;
    height: 420px;
    border-radius: var(--ls-radius);
    overflow: hidden;
    background: #eef0fa;
}

@media (max-width: 767px) {
    .ls-map { height: 280px; }
    .ls-map-wrap { padding: 10px; margin-bottom: 40px; }
}

/* Custom cyan pin styling */
.ls-map-pin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ls-cyan);
    border: 3px solid #ffffff;
    box-shadow:
        0 0 0 1px rgba(13, 169, 230, 0.4),
        0 3px 8px rgba(11, 17, 43, 0.25);
    animation: ls-pin-pulse 3.2s ease-in-out infinite;
}

@keyframes ls-pin-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* Leaflet popup restyle to match brand */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: var(--ls-shadow-md) !important;
    padding: 2px !important;
}
.leaflet-popup-content {
    margin: 10px 14px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.88rem !important;
    color: var(--ls-ink) !important;
    line-height: 1.4 !important;
}
.leaflet-popup-content strong {
    color: var(--ls-navy);
    font-weight: 600;
}
.leaflet-popup-tip {
    box-shadow: var(--ls-shadow-sm) !important;
}

/* Popup internal structure */
.ls-map-popup { min-width: 160px; }
.ls-map-popup-loc {
    color: var(--ls-ink-60);
    font-size: 0.82rem;
    margin-top: 2px;
}
.ls-map-popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.ls-map-popup-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--ls-surface-tint);
    color: var(--ls-navy);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

/* Stats row under the map */
.ls-map-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 20px;
    padding: 6px 0;
}

.ls-map-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ls-map-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ls-navy);
    letter-spacing: -0.01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ls-map-stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ls-ink-40);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 480px) {
    .ls-map-stats { gap: 24px; }
    .ls-map-stat-value { font-size: 1.4rem; }
}

.ls-map-cta {
    text-align: center;
    margin-top: 22px;
    padding-bottom: 8px;
}

/* Divider between map block and feed */
.ls-hero-divider {
    max-width: 640px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ls-ink-40);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.ls-hero-divider::before,
.ls-hero-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ls-border);
}

/* Leaflet attribution sizing — keep it unobtrusive but readable */
.leaflet-control-attribution {
    font-size: 10px !important;
    background: rgba(255, 255, 255, 0.85) !important;
}
.leaflet-control-attribution a { color: var(--ls-navy) !important; }

/* ============================================================
   FEED
   ============================================================ */
.ls-feed {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ls-post-card {
    display: block;
    background: var(--ls-surface);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-lg);
    padding: 22px 24px;
    box-shadow: var(--ls-shadow-sm);
    transition: all 0.2s ease;
    color: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

a.ls-post-card:hover {
    border-color: var(--ls-cyan);
    box-shadow: var(--ls-shadow-md);
    transform: translateY(-2px);
}

a.ls-post-card:hover .ls-post-cta {
    opacity: 1;
    transform: translateX(0);
}

.ls-post-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.ls-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ls-surface-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--ls-navy);
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.ls-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-avatar-anon {
    background: linear-gradient(135deg, var(--ls-ink-40), var(--ls-ink-60));
    color: #ffffff;
}

.ls-post-meta { flex: 1; min-width: 0; }

.ls-post-author {
    font-weight: 600;
    color: var(--ls-ink);
    font-size: 0.95rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-post-sub {
    font-size: 0.82rem;
    color: var(--ls-ink-40);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-post-body {
    color: var(--ls-ink);
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ls-post-body.ls-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ls-post-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ls-cyan);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

@media (max-width: 767px) {
    .ls-post-cta { opacity: 1; transform: none; }
}

/* Skeleton loading state */
.ls-skeleton .ls-skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ls-surface-tint);
    animation: ls-shimmer 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

.ls-skeleton-meta { flex: 1; }

.ls-skeleton-line {
    height: 14px;
    background: var(--ls-surface-tint);
    border-radius: 6px;
    margin: 8px 0;
    animation: ls-shimmer 1.6s ease-in-out infinite;
}

.ls-skeleton-line-sm { width: 40%; height: 12px; }
.ls-skeleton-line-xs { width: 25%; height: 10px; }
.ls-skeleton-line-short { width: 60%; }

@keyframes ls-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty / error state */
.ls-feed-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--ls-surface);
    border: 1px dashed var(--ls-border-strong);
    border-radius: var(--ls-radius-lg);
    color: var(--ls-ink-60);
}

.ls-feed-empty h3 {
    color: var(--ls-ink);
    font-size: 1.15rem;
    margin: 0 0 8px;
}

.ls-feed-footer {
    text-align: center;
    margin-top: 36px;
}

.ls-feed-footnote {
    font-size: 0.85rem;
    color: var(--ls-ink-40);
    margin: 14px 0 0;
}

.ls-scroll-cue {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--ls-ink-40);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.ls-scroll-cue:hover { opacity: 1; color: var(--ls-navy); }
.ls-scroll-cue i { animation: ls-bob 2s ease-in-out infinite; }

@keyframes ls-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@media (max-width: 767px) {
    .ls-scroll-cue { display: none; }
}

/* ============================================================
   SECTIONS (below the fold)
   ============================================================ */
.ls-section {
    padding: 100px 0;
}

.ls-section-light { background: var(--ls-surface); }

.ls-section-dark {
    background: var(--ls-navy-deep);
    color: #ffffff;
}

.ls-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ls-cyan);
    margin-bottom: 14px;
}

.ls-eyebrow-light { color: var(--ls-cyan); }

.ls-section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
    color: var(--ls-ink);
}

.ls-text-light { color: #ffffff; }
.ls-text-muted-light { color: rgba(255, 255, 255, 0.72); }

.ls-section-lead {
    font-size: 1.1rem;
    color: var(--ls-ink-60);
    margin: 0 0 28px;
    line-height: 1.7;
}

.ls-section-dark .ls-section-lead { color: rgba(255, 255, 255, 0.72); }

/* Image frames */
.ls-image-frame {
    background: var(--ls-surface-tint);
    border-radius: var(--ls-radius-lg);
    padding: 24px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ls-image-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: var(--ls-radius);
}

.ls-image-frame-dark {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ls-image-fallback {
    background: linear-gradient(135deg, var(--ls-navy) 0%, var(--ls-cyan) 100%);
    min-height: 300px;
}

/* Benefit cards */
.ls-benefit-card {
    height: 100%;
    background: var(--ls-surface);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-lg);
    padding: 32px;
    transition: all 0.2s ease;
}

.ls-benefit-card:hover {
    border-color: var(--ls-cyan);
    transform: translateY(-4px);
    box-shadow: var(--ls-shadow-md);
}

.ls-benefit-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ls-navy) 0%, var(--ls-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.ls-benefit-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--ls-ink);
}

.ls-benefit-card p {
    color: var(--ls-ink-60);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Step cards */
.ls-step-card {
    position: relative;
    padding: 28px 24px;
    background: var(--ls-surface);
    border: 1px solid var(--ls-border);
    border-radius: var(--ls-radius-lg);
    height: 100%;
}

.ls-step-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ls-cyan);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1rem;
}

.ls-step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ls-ink);
}

.ls-step-card p {
    color: var(--ls-ink-60);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

/* Final CTA */
.ls-cta-final {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--ls-navy-deep) 0%, var(--ls-navy) 100%);
    color: #ffffff;
}

.ls-cta-title {
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: #ffffff;
}

.ls-cta-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 32px;
}

/* Footer */
.ls-footer {
    background: var(--ls-navy-deep);
    color: rgba(255, 255, 255, 0.72);
    padding: 60px 0 30px;
}

.ls-brand-footer { margin-bottom: 14px; color: #ffffff; }
.ls-brand-footer:hover { color: #ffffff; }
.ls-brand-footer .ls-brand-text { color: #ffffff; }

.ls-footer-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 320px;
}

.ls-footer h5 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 14px;
}

.ls-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ls-footer li { margin-bottom: 8px; }

.ls-footer a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.ls-footer a:hover { color: var(--ls-cyan); }

.ls-footer-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 36px 0 20px;
}

.ls-footer-legal {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .ls-hero { padding: 32px 0 60px; }
    .ls-section { padding: 64px 0; }
    .ls-cta-final { padding: 64px 0; }
    .ls-post-card { padding: 18px 20px; }
    .ls-benefit-card, .ls-step-card { padding: 24px; }
}

/* ============================================================
   BOOTSTRAP BRIDGE — keep contact.html looking consistent
   ============================================================ */
.btn-primary {
    background: var(--ls-navy) !important;
    border-color: var(--ls-navy) !important;
}
.btn-primary:hover {
    background: var(--ls-navy-hover) !important;
    border-color: var(--ls-navy-hover) !important;
}
.btn-outline-primary {
    color: var(--ls-navy) !important;
    border-color: var(--ls-navy) !important;
}
.btn-outline-primary:hover {
    background: var(--ls-navy) !important;
    color: #ffffff !important;
}
.text-primary { color: var(--ls-navy) !important; }
.bg-dark { background: var(--ls-navy-deep) !important; }

/* Legacy logo-box on contact/thank-you pages — match new brand */
.logo-box {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--ls-navy) 0%, var(--ls-cyan) 100%);
    border-radius: 8px;
}
