/**
 * theme.css — Claim Of Zones shared design system
 *
 * Single source of truth for colors, typography, and shared components.
 * All HTML pages link to this file. Page-specific styles live in inline
 * <style> blocks inside each HTML file.
 *
 * Color palette mirrors the Android app (see CLAUDE.md §15):
 *   Primary blue:   #2C6F9E  (app colorPrimary)
 *   Primary dark:   #0F4C6E  (app colorPrimaryVariant)
 *   Secondary blue: #8EB6CC  (app colorSecondary)
 *   Accent green:   #6ED6AC  (app colorAccent)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
    /* Backgrounds — deep dark with a subtle blue tint */
    --bg:     #0d1117;
    --bg2:    #141d2b;
    --bg3:    #1a2638;
    --border: #223048;

    /* Typography */
    --text: #e2e8f0;
    --dim:  #8fa4b8;

    /* Brand — Primary blue (app colorPrimary / colorSecondary) */
    --accent:       #2C6F9E;
    --accent2:      #3a82b5;   /* hover / lighter variant */
    --accent-dark:  #0F4C6E;
    --accent-light: #8EB6CC;
    --glow:         rgba(44, 111, 158, 0.22);

    /* CTA — Accent green (app colorAccent) */
    --cta:      #6ED6AC;
    --cta-dark: #4eb892;
    --cta-glow: rgba(110, 214, 172, 0.18);

    /* Feedback */
    --green:  #6ED6AC;   /* reuse app accent green for success states */
    --amber:  #FF9500;
    --red:    #FF3B30;
    --cyan:   #8EB6CC;   /* light blue replaces harsh cyan */

    /* Layout */
    --r:     14px;
    --nav-h: 64px;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Ambient gradient background — subtle, doesn't distract */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%,  rgba(44,111,158,.07)  0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%,  rgba(110,214,172,.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%,  rgba(142,182,204,.03) 0%, transparent 50%);
    animation: bgShift 22s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgShift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-5%, 3%); }
}

.page-wrap { position: relative; z-index: 1; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--cta); }

/* =====================================================================
   NAVIGATION
   ===================================================================== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: var(--nav-h);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    background: rgba(13, 17, 23, .80);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -.5px;
    color: var(--text);
    text-decoration: none;
}

.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-right a,
.nav-right button {
    color: var(--dim);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.nav-right a:hover,
.nav-right button:hover {
    color: var(--text);
    background: var(--bg3);
}

.nav-btn-cta {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
}
.nav-btn-cta:hover {
    background: var(--accent2) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--glow) !important;
}

.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-user-email { font-size: 13px; color: var(--dim); }
.nav-user-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cta); }

/* =====================================================================
   FOOTER
   ===================================================================== */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 28px 40px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--dim);
    margin-top: 80px;
}

.footer-copy { color: var(--dim); }

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a { color: var(--dim); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--accent-light); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .25s;
    font-family: inherit;
    line-height: 1;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
    background: var(--accent2);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--glow);
    color: #fff;
}

.btn-cta { background: var(--cta); color: #0d1117; font-weight: 700; }
.btn-cta:hover {
    background: var(--cta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--cta-glow);
    color: #0d1117;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(44,111,158,.08);
}

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

.btn-danger {
    background: transparent;
    color: var(--red);
    border: 1.5px solid rgba(255,59,48,.35);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.btn-danger:hover { background: rgba(255,59,48,.1); border-color: var(--red); }

.btn-google {
    background: #fff;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid #ddd;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.btn-google:hover { border-color: var(--accent); box-shadow: 0 4px 15px var(--glow); }

.btn:disabled,
button:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Google Play badge */
.playstore-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #111;
    color: #fff;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    transition: all .2s;
    border: 1px solid var(--border);
}
.playstore-link:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(0,0,0,.5); color: #fff; }
.ps-text { text-align: left; }
.ps-label { font-size: 11px; opacity: .7; }
.ps-store { font-size: 16px; font-weight: 700; }

/* =====================================================================
   CARDS
   ===================================================================== */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 28px 24px;
    transition: all .25s;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0,0,0,.3);
}

/* Top-accent line on hover (used by feature cards, etc.) */
.card-accent-line { position: relative; overflow: hidden; }
.card-accent-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--cta));
    opacity: 0;
    transition: opacity .3s;
}
.card-accent-line:hover::after { opacity: 1; }

/* Quick-action cards */
.qa-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text);
    transition: all .2s;
    cursor: pointer;
}
.qa-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.3);
    color: var(--text);
}
.qa-card.highlight {
    border-color: rgba(44,111,158,.3);
    background: linear-gradient(135deg, var(--bg2), rgba(44,111,158,.06));
}
.qa-icon {
    font-size: 26px;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}
.qa-icon.blue   { background: rgba(44,111,158,.14); }
.qa-icon.green  { background: rgba(110,214,172,.13); }
.qa-icon.amber  { background: rgba(255,149,0,.12); }
.qa-icon.cyan   { background: rgba(142,182,204,.12); }
.qa-icon.purple { background: rgba(110,214,172,.09); }
.qa-icon.red    { background: rgba(255,59,48,.12); }
.qa-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.qa-info p  { font-size: 12px; color: var(--dim); line-height: 1.4; }
.qa-arrow   { margin-left: auto; color: var(--dim); font-size: 18px; flex-shrink: 0; transition: transform .2s; }
.qa-card:hover .qa-arrow { transform: translateX(3px); color: var(--accent-light); }

/* Feature cards */
.feature-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 30px 26px;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.feature-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--cta));
    opacity: 0;
    transition: opacity .3s;
}
.feature-card:hover::after { opacity: 1; }
.feature-icon { font-size: 30px; margin-bottom: 14px; display: block; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; color: var(--dim); line-height: 1.6; }
.feature-card a  {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent-light); text-decoration: none;
    font-size: 14px; font-weight: 600; margin-top: 14px; transition: color .2s;
}
.feature-card a:hover { color: var(--cta); }

/* =====================================================================
   SECTION HEADERS
   ===================================================================== */
.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header h2 { font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px; }
.section-header p  { font-size: 16px; color: var(--dim); line-height: 1.6; }

.section-divider {
    width: 48px; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cta));
    border-radius: 2px;
    margin: 0 auto 16px;
}

/* =====================================================================
   HERO / GRADIENT TEXT
   ===================================================================== */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(44,111,158,.1);
    border: 1px solid rgba(44,111,158,.25);
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 28px;
}

.gradient-text {
    background: linear-gradient(135deg, #c8dce9 0%, var(--accent-light) 35%, var(--accent) 65%, var(--cta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================================
   INPUT GROUPS & FORMS
   ===================================================================== */
.input-group { margin-bottom: 16px; text-align: left; }
.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dim);
    margin-bottom: 6px;
}
.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus { outline: none; border-color: var(--accent); }
.input-group input::placeholder { color: var(--dim); opacity: .6; }

/* =====================================================================
   LOGIN / AUTH CARD
   ===================================================================== */
.login-section { max-width: 420px; margin: 0 auto; padding: 40px 20px 60px; text-align: center; }
.login-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 36px 32px;
}
.login-card h2  { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: var(--dim); font-size: 14px; margin-bottom: 28px; }

.login-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0;
    color: var(--dim); font-size: 13px;
}
.login-divider::before,
.login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* =====================================================================
   FEEDBACK MESSAGES
   ===================================================================== */
.msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; }
.msg-error   { background: rgba(255,59,48,.1);   color: var(--red);          border: 1px solid rgba(255,59,48,.25); }
.msg-success { background: rgba(110,214,172,.1); color: var(--cta);          border: 1px solid rgba(110,214,172,.3); }
.msg-info    { background: rgba(44,111,158,.1);  color: var(--accent-light); border: 1px solid rgba(44,111,158,.25); }
.msg-warning { background: rgba(255,149,0,.1);   color: var(--amber);        border: 1px solid rgba(255,149,0,.25); }

/* Legacy message selectors used in existing pages */
.error-msg   { background: rgba(255,59,48,.1);   color: var(--red);    border: 1px solid rgba(255,59,48,.25);   padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.success-msg { background: rgba(110,214,172,.1); color: var(--cta);    border: 1px solid rgba(110,214,172,.3);  padding: 10px 14px; border-radius: 8px; font-size: 13px; }

/* =====================================================================
   SPINNER / LOADING
   ===================================================================== */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   BADGES / PILLS
   ===================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.badge-blue   { background: rgba(44,111,158,.15);  color: var(--accent-light); }
.badge-green  { background: rgba(110,214,172,.15); color: var(--cta); }
.badge-amber  { background: rgba(255,149,0,.15);   color: var(--amber); }
.badge-red    { background: rgba(255,59,48,.15);   color: var(--red); }

/* =====================================================================
   CONTENT / ARTICLE PAGES  (legal, privacy policy, etc.)
   ===================================================================== */
.content-page { max-width: 820px; margin: 0 auto; padding: 56px 24px 80px; }

.content-page .content-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.content-page .content-header h1 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -.5px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.content-page .content-header .meta { color: var(--dim); font-size: 14px; }

.content-page h2 {
    font-size: 19px; font-weight: 700;
    color: var(--accent-light);
    margin: 40px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.content-page h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 28px 0 8px; }
.content-page p  { color: var(--dim); margin-bottom: 14px; font-size: 15px; line-height: 1.75; }
.content-page strong { color: var(--text); }
.content-page ul,
.content-page ol { margin: 0 0 16px 24px; color: var(--dim); font-size: 15px; line-height: 1.75; }
.content-page ul li,
.content-page ol li { margin-bottom: 6px; }
.content-page a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
.content-page a:hover { color: var(--cta); }

/* =====================================================================
   404 / ERROR PAGES
   ===================================================================== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 40px 20px;
}
.error-page .error-code {
    font-size: clamp(80px, 15vw, 140px);
    font-weight: 800;
    letter-spacing: -6px;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--cta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.error-page h2  { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.error-page p   { color: var(--dim); font-size: 16px; margin-bottom: 32px; }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slideUp .45s ease-out both; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}
.pulse { animation: pulse 2s ease-in-out infinite; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    nav { padding: 0 20px; }
    footer { padding: 20px; flex-direction: column; align-items: flex-start; }
    .content-page { padding: 36px 16px 60px; }
    .login-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
    :root { --nav-h: 56px; }
    .nav-brand { font-size: 17px; }
    .btn { padding: 11px 20px; font-size: 14px; }
    .section-header h2 { font-size: 26px; }
}
