/* ==============================================
   FLOCKAR — Modern Minimal Dark Theme
   ============================================== */

:root {
    --bg: #0c0c0e;
    --bg-2: #141416;
    --bg-3: #1c1c20;
    --bg-card: #18181c;
    --border: rgba(255,255,255,0.07);
    --border-2: rgba(255,255,255,0.12);
    --text: #f2f2f3;
    --text-2: #8a8a9a;
    --text-3: #4a4a5a;
    --purple: #8b7cf6;
    --purple-dim: rgba(139,124,246,0.15);
    --purple-glow: rgba(139,124,246,0.25);
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --r: 16px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── NAVBAR ───────────────────────────────── */
#navbar {
    position: fixed;
    top: 16px; left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1080px;
    z-index: 100;
    background: rgba(20,20,22,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 0 20px;
}

.nav-wrap {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--text);
    flex-shrink: 0;
}

.brand-img {
    width: 28px; height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.nav-center {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.nav-center a {
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--text-2);
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-center a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.nav-btn {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bg);
    background: var(--text);
    padding: 8px 18px;
    border-radius: 8px;
    transition: opacity 0.2s, transform 0.2s;
}

.nav-btn:hover { opacity: 0.9; transform: translateY(-1px); }

#ham {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-2);
    margin-left: auto;
    padding: 4px;
}

#mob-menu {
    position: fixed;
    top: 82px; left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: calc(100% - 48px);
    max-width: 1080px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

#mob-menu.open {
    display: flex;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#mob-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s;
}

#mob-menu a:hover { background: var(--bg-3); color: var(--text); }

/* ── HERO ──────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-blur-1, .hero-blur-2 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.hero-blur-1 {
    width: 600px; height: 400px;
    top: 10%; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(139,124,246,0.18) 0%, transparent 70%);
}

.hero-blur-2 {
    width: 300px; height: 300px;
    bottom: 20%; right: 10%;
    background: radial-gradient(ellipse, rgba(34,197,94,0.08) 0%, transparent 70%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-2);
    border: 1px solid var(--border-2);
    background: var(--bg-2);
    padding: 6px 16px;
    border-radius: 40px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
    animation: fadeUp 0.8s var(--ease) forwards;
}

.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.04;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.1s var(--ease) both;
}

.hl {
    background: linear-gradient(135deg, var(--purple) 0%, #c084fc 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-p {
    font-size: 1.1rem;
    color: var(--text-2);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.2s var(--ease) both;
}

.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 72px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.3s var(--ease) both;
}

.btn-solid {
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 28px;
    border-radius: 10px;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-solid:hover { opacity: 0.88; transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 10px;
    border: 1px solid var(--border-2);
    transition: all 0.2s;
}

.btn-outline:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* ── Hero Cards + Phone ───────────────────── */
.hero-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.4s var(--ease) both;
    margin-top: 20px;
}

.phone-wrap { 
    position: relative; 
    z-index: 2;
}

.phone {
    width: 250px;
    height: 500px;
    background: #000;
    border: 4px solid #1f2937;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.1),
        0 32px 80px rgba(0,0,0,0.8),
        0 0 60px rgba(139, 124, 246, 0.4);
    transform: perspective(1000px) rotateY(0deg) translateY(0);
    transition: transform 0.3s ease;
    margin-top: 10px;
}

.phone:hover {
    transform: perspective(1000px) rotateY(-5deg) translateY(-10px);
}

/* CSS Mockup Map */
.css-map {
    width: 100%; height: 100%;
    background: #090b10; /* Pitch dark vector map background */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(139, 124, 246, 0.15) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='400' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50,600 L150,400 L300,350 L400,450 M0,200 L200,250 L250,0 M150,400 L200,250 M300,350 L350,100 L400,50' stroke='rgba(96,165,250,0.3)' stroke-width='4' fill='none' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M100,600 L180,450 L100,300 L0,250 M200,250 L300,200 L400,200 M350,100 L300,0' stroke='rgba(96,165,250,0.1)' stroke-width='1.5' fill='none' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center center;
    position: relative;
    overflow: hidden;
}

/* Radar Pulse */
.radar {
    position: absolute;
    top: 50%; left: 50%;
    width: 120px; height: 120px;
    margin: -60px 0 0 -60px;
    border-radius: 50%;
    border: 1px solid rgba(139, 124, 246, 0.5);
    background: radial-gradient(circle, rgba(139, 124, 246, 0.2) 0%, transparent 70%);
    animation: radarPulse 3s infinite ease-out;
}

@keyframes radarPulse {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* User Center Dot */
.user-dot {
    position: absolute;
    top: 50%; left: 50%;
    width: 32px; height: 32px;
    margin: -16px 0 0 -16px;
    background: var(--purple);
    border-radius: 50%;
    border: 3px solid #000;
    box-shadow: 0 0 20px var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.user-avatar {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* UI Overlays */
.mockup-ui-top {
    position: absolute;
    top: 24px; left: 16px; right: 16px;
    z-index: 3;
}

.mockup-search {
    height: 40px;
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mockup-nav {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    background: #1e1e24; /* Dark navbar background */
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding-bottom: 8px; /* Safe area padding */
    z-index: 5;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.4);
    font-size: 0.65rem;
    font-weight: 500;
    width: 48px; /* Fixed width for equal horizontal spacing */
}

.nav-item.active {
    color: var(--purple);
}

.nav-item svg {
    width: 22px; height: 22px;
}

.sos-center {
    position: relative;
    top: -32px;
    width: 58px;
}

.sos-btn {
    width: 58px; height: 58px;
    background: #ff5252;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(255, 82, 82, 0.4);
    border: 6px solid #090b10; /* Creates the seamless cutout illusion against the map background */
}

.hcard {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(20, 20, 25, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    z-index: 3;
    transition: transform 0.3s ease;
}

.hcard:hover {
    transform: translateY(-5px) scale(1.02);
}

.hcard-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.green-dot { background: var(--green); box-shadow: 0 0 12px var(--green); }
.amber-dot { background: var(--amber); box-shadow: 0 0 12px var(--amber); }

.hcard-info { display: flex; flex-direction: column; gap: 3px; }
.hcard-name { font-size: 0.95rem; font-weight: 600; color: #fff; }
.hcard-loc  { font-size: 0.75rem; color: var(--text-2); }

.hcard-left { 
    align-self: center; 
    margin-right: -50px; 
    margin-top: -80px;
    animation: floatA 5s ease-in-out infinite; 
}

.hcard-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    align-self: center;
    margin-left: -50px;
    margin-top: 40px;
    position: relative;
    z-index: 3;
}

.hcard-right { 
    animation: floatA 5s 1.5s ease-in-out infinite; 
}

.hcard-sos {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 30px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(239, 68, 68, 0.2);
    margin-left: 30px;
    color: #fca5a5;
    font-weight: 600;
    animation: floatA 4.5s 0.5s ease-in-out infinite;
}



/* ── FEATURES ─────────────────────────────── */
.features {
    padding: 100px 0;
}

.content-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.sec-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 14px;
}

.sec-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 14px;
}

.sec-sub {
    font-size: 1rem;
    color: var(--text-2);
    max-width: 480px;
    line-height: 1.65;
    margin-bottom: 56px;
}

.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
}

.feat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.25s, background 0.25s;
}

.feat-card:hover {
    background: var(--bg-3);
    border-color: var(--border-2);
}

.feat-large {
    grid-column: span 1;
}

.feat-icon-box {
    width: 44px; height: 44px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: all 0.25s;
    margin-bottom: 4px;
}

.feat-card:hover .feat-icon-box {
    color: var(--purple);
    background: var(--purple-dim);
    border-color: rgba(139,124,246,0.3);
}

.sos-icon { color: var(--red) !important; }
.feat-card:hover .sos-icon { background: rgba(239,68,68,0.1) !important; border-color: rgba(239,68,68,0.25) !important; }

.feat-card h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.feat-card p {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.65;
}

.feat-chip {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--purple);
    background: var(--purple-dim);
    border: 1px solid rgba(139,124,246,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 4px;
}

/* ── HOW IT WORKS ─────────────────────────── */
.how {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

.step-card {
    flex: 1;
    padding: 48px 36px;
    transition: background 0.25s;
}

.step-card:hover { background: var(--bg-3); }

.step-line {
    width: 1px;
    height: 120px;
    background: var(--border);
    flex-shrink: 0;
}

.step-num {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--purple);
    margin-bottom: 20px;
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-2);
    line-height: 1.65;
}

/* ── CTA ─────────────────────────────────── */
.cta-section {
    padding: 40px 0 100px;
}

.cta-box {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 500px; height: 400px;
    background: radial-gradient(ellipse, var(--purple-glow) 0%, transparent 65%);
    pointer-events: none;
    filter: blur(20px);
}

.cta-box h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.cta-box > p {
    font-size: 1rem;
    color: var(--text-2);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.store-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    padding: 14px 24px;
    border-radius: 12px;
    color: var(--text);
    transition: all 0.25s;
}

.store-btn:hover {
    border-color: rgba(255,255,255,0.22);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.store-btn div { display: flex; flex-direction: column; text-align: left; }
.store-btn span { font-size: 0.68rem; color: var(--text-2); }
.store-btn strong { font-size: 0.95rem; font-weight: 600; }

/* ── FOOTER ──────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 64px;
    align-items: start;
    margin-bottom: 48px;
}

.footer-left p {
    font-size: 0.875rem;
    color: var(--text-2);
    max-width: 260px;
    margin-top: 14px;
    line-height: 1.6;
}

.footer-cols {
    display: flex;
    gap: 48px;
}

.footer-cols div { display: flex; flex-direction: column; gap: 10px; }
.footer-cols strong { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.footer-cols a { font-size: 0.875rem; color: var(--text-2); transition: color 0.2s; }
.footer-cols a:hover { color: var(--text); }

.footer-bar {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.footer-bar p { font-size: 0.8rem; color: var(--text-3); }

/* ── ANIMATIONS ──────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatA {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 5px var(--green); }
    50%       { box-shadow: 0 0 14px var(--green); }
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 900px) {
    .nav-center, .nav-btn { display: none; }
    #ham { display: block; }

    .hero {
        padding: 100px 20px 20px; /* tighter spacing for mobile */
    }

    /* Force vertical stack on anything smaller than desktop */
    .hero-cards {
        flex-direction: column !important;
        margin-top: 10px;
    }
    
    /* Hide floating cards completely on mobile */
    .hcard-left, .hcard-stack {
        display: none !important;
    }
    
    .phone {
        transform: scale(0.9);
    }

    .feat-grid { grid-template-columns: 1fr 1fr; }
    .feat-large { grid-column: span 1; }

    .steps { flex-direction: column; gap: 0; }
    .step-card { padding: 28px 24px; }
    .step-line { width: 100%; height: 1px; margin: 0; }

    .footer-inner { grid-template-columns: 1fr; gap: 40px; }
    .footer-bar { flex-direction: column; gap: 12px; align-items: center; text-align: center; }
}

@media (max-width: 600px) {
    #navbar { top: 10px; width: calc(100% - 24px); }
    
    .feat-grid { grid-template-columns: 1fr; gap: 0; }
    .feat-card {
        display: grid;
        grid-template-columns: auto 1fr;
        padding: 24px 0;
        gap: 4px 16px;
        align-items: start;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-radius: 0;
    }
    .feat-card:last-child {
        border-bottom: none;
    }
    .feat-card > .feat-icon-box {
        grid-column: 1;
        grid-row: 1 / span 3; /* spans title, desc, and chip */
        width: 40px; height: 40px; /* slightly larger for balance */
        border-radius: 10px;
        margin-bottom: 0;
    }
    .feat-card > h3 {
        grid-column: 2;
        grid-row: 1;
        font-size: 1rem;
        margin-bottom: 4px;
        margin-top: 2px;
    }
    .feat-card > p {
        grid-column: 2;
        grid-row: 2;
        font-size: 0.85rem;
        line-height: 1.5;
        margin-top: 0;
    }
    .feat-card > .feat-chip {
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
        margin-top: 8px;
    }
    
    .footer-cols { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px 16px;
        text-align: left;
    }
    .footer-cols div { align-items: flex-start; }
    .cta-box { padding: 40px 20px; }
    
    .store-btns {
        flex-direction: column;
        align-items: center;
    }
    .store-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
