/* Marketing landing pages (/, /draw-polygon-on-map, …). Deliberately
   standalone from app.css - these pages are public, crawlable and must
   render meaningful content without any of the app's auth/JS machinery. */

:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --ink: #0f172a;
    --muted: #475569;
    --line: #e2e8f0;
    --bg-soft: #f8fafc;
    --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- Top nav ---- */
/* Dark header to match the app's topbar (#18181b / #fafafa). */
.site-header {
    border-bottom: 1px solid #27272a;
    position: sticky;
    top: 0;
    background: #18181b;
    color: #fafafa;
    z-index: 10;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fafafa;
}
/* Override the global a:hover underline - the brand should stay plain. */
.brand, .brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.site-header nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.site-header nav a { color: #d4d4d8; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.site-header nav a:hover { color: #fafafa; text-decoration: none; background: #27272a; }
/* The CTA in the nav is an <a> styled as a button. The two rules above are
   more specific than .btn-primary, so without these the label turns muted
   (grey-on-blue, unreadable) and the hover background goes light. Restate the
   button colours with matching specificity. */
.site-header nav a.btn-primary { color: #fff; }
.site-header nav a.btn-primary:hover { color: #fff; background: var(--brand-dark); }
.site-header nav a.btn-ghost { color: var(--ink); }
.site-header nav a.btn-ghost:hover { color: var(--ink); background: var(--bg-soft); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }

/* ---- Hero ---- */
.hero {
    padding: 80px 0 64px;
    text-align: center;
    background: radial-gradient(1200px 400px at 50% -120px, #eff6ff, #fff);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
    margin: 0 0 18px;
    letter-spacing: -.02em;
}
.hero p.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 660px;
    margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--muted); }

/* ---- Sections ---- */
section { padding: 64px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.01em; margin: 0 0 12px; }
.section-intro { color: var(--muted); max-width: 680px; margin: 0 0 36px; font-size: 1.05rem; }

/* ---- Feature grid ---- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.15rem; }
.feature p { margin: 0; color: var(--muted); }
.feature .ico {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--brand);
    margin-bottom: 14px;
}

/* ---- FAQ ---- */
.faq details {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px 20px;
    margin-bottom: 12px;
    background: #fff;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 16px 0;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---- Related links ---- */
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.related a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--ink);
    font-weight: 500;
}
.related a:hover { background: var(--bg-soft); text-decoration: none; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 20px; }

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
    color: var(--muted);
    font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.site-footer nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
