/* ==========================================================
   PRO4A SAFER CITIES - Mobile Web App
   Premium mobile-first design
   ========================================================== */

:root {
    --navy-900: #051a2e;
    --navy-800: #06243d;
    --navy-700: #0a3d62;
    --navy-600: #154e7a;
    --navy-500: #1e6aa1;
    --gold-500: #f5b800;
    --gold-400: #ffd54a;
    --gold-300: #ffe58a;
    --bg-soft:  #f1f4f9;
    --bg-card:  #ffffff;
    --ink-900:  #0f172a;
    --ink-700:  #334155;
    --ink-500:  #64748b;
    --ink-300:  #cbd5e1;
    --shadow-lg: 0 20px 50px rgba(6, 36, 61, 0.18);
    --shadow-md: 0 8px 24px rgba(6, 36, 61, 0.12);
    --shadow-sm: 0 4px 12px rgba(6, 36, 61, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-soft);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow-y: auto;
}

/* ----- Background decorations ----- */
.bg-decor {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
}

.orb-1 {
    width: 320px; height: 320px;
    background: radial-gradient(circle, #1e6aa1 0%, transparent 70%);
    top: -120px; left: -120px;
}

.orb-2 {
    width: 260px; height: 260px;
    background: radial-gradient(circle, #f5b800 0%, transparent 70%);
    top: 60px; right: -100px;
    opacity: 0.35;
}

.orb-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, #06243d 0%, transparent 70%);
    bottom: -160px; left: -100px;
    opacity: 0.18;
}

/* ----- App container ----- */
.app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ==========================================================
   HEADER
   ========================================================== */
.app-header {
    position: relative;
    padding: 22px 22px 90px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(ellipse at top right, rgba(245, 184, 0, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(30, 106, 161, 0.55) 0%, transparent 60%),
        linear-gradient(160deg, var(--navy-800) 0%, var(--navy-700) 60%, var(--navy-600) 100%);
    overflow: hidden;
}

.app-header::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(255, 213, 74, 0.22) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.app-header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-soft) 100%);
    pointer-events: none;
}

/* ----- Status pill ----- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 22px;
}

.status-dot {
    width: 7px; height: 7px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.8);
    animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.8); }
    70%  { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ----- Logo row ----- */
.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    animation: fadeDown 0.6s ease-out;
}

.logo-wrapper {
    width: 96px;
    height: 96px;
    background:
        radial-gradient(circle at 30% 25%, #ffffff 0%, #f3f6fb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(255, 255, 255, 0.18),
        0 0 0 6px rgba(245, 184, 0, 0.35);
    overflow: hidden;
    padding: 8px;
    transition: transform 0.3s ease;
}

.logo-wrapper:active { transform: scale(0.96); }

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.logo-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 213, 74, 0.6) 50%,
        transparent 100%);
}

/* ----- Title ----- */
.title-block { animation: fadeUp 0.7s ease-out 0.1s both; }

.app-title {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.title-pro4a {
    color: var(--gold-400);
    text-shadow:
        0 0 16px rgba(245, 184, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.title-divider {
    width: 4px;
    height: 4px;
    background: var(--gold-400);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-400);
}

.title-safer { color: #ffffff; }

.app-subtitle {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
}

/* ==========================================================
   MAIN
   ========================================================== */
.app-main {
    flex: 1;
    margin-top: -56px;
    padding: 0 18px 24px;
    position: relative;
    z-index: 2;
}

/* ----- Welcome card ----- */
.welcome-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    margin-bottom: 18px;
    animation: fadeUp 0.7s ease-out 0.2s both;
}

.welcome-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-500) 100%);
    color: var(--gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(10, 61, 98, 0.28);
}

.welcome-text { line-height: 1.3; }

.welcome-greet {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 2px;
}

.welcome-sub {
    font-size: 12px;
    color: var(--ink-500);
}

/* ----- Primary Button ----- */
.action-section {
    animation: fadeUp 0.7s ease-out 0.3s both;
}

.primary-button {
    width: 100%;
    min-height: 78px;
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 50%, var(--navy-600) 100%);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    box-shadow:
        0 14px 30px rgba(10, 61, 98, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.primary-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        transparent 30%,
        rgba(255, 213, 74, 0.18) 50%,
        transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.primary-button:hover::before { transform: translateX(100%); }

.primary-button:active {
    transform: translateY(2px) scale(0.99);
    box-shadow:
        0 6px 14px rgba(10, 61, 98, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-400) 100%);
    color: var(--navy-900);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 12px rgba(245, 184, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.button-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.button-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.button-sub {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2px;
}

.button-arrow {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.2s ease, background 0.2s ease;
}

.primary-button:active .button-arrow {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.app-footer {
    text-align: center;
    padding: 18px 20px 24px;
    color: var(--ink-500);
}

.footer-brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--navy-700);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.footer-copy {
    font-size: 10.5px;
    color: var(--ink-500);
    letter-spacing: 0.3px;
}

/* ==========================================================
   ANIMATIONS
   ========================================================== */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 360px) {
    .logo-wrapper { width: 80px; height: 80px; }
    .app-title    { font-size: 19px; letter-spacing: 1px; }
    .button-text  { font-size: 16px; }
    .primary-button { min-height: 72px; }
}

@media (min-width: 481px) {
    body {
        background: linear-gradient(135deg, #dfe6ef 0%, #c9d4e3 100%);
    }
    .app-container {
        margin-top: 24px;
        margin-bottom: 24px;
        border-radius: 28px;
        overflow: hidden;
        background: var(--bg-soft);
        box-shadow:
            0 30px 80px rgba(6, 36, 61, 0.25),
            0 0 0 1px rgba(255, 255, 255, 0.4);
    }
    .bg-decor { display: none; }
}
