/* Site-wide base styles. Earth palette comes from theme.css. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--fm-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--fm-text);
    background: var(--fm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--fm-font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--fm-text);
    margin: 0 0 0.6em;
}
h1 { font-size: 2.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--fm-primary-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fm-accent-dark); }

/* Layout */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Top nav */
.site-nav {
    background: var(--fm-surface);
    border-bottom: 1px solid var(--fm-border-soft);
    position: sticky; top: 0; z-index: 50;
}
.site-nav .container {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.site-nav .brand {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: var(--fm-font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--fm-primary-dark);
    text-decoration: none;
}
.site-nav .brand-mark {
    width: 32px; height: 32px;
    background: var(--fm-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; align-items: center; }
.site-nav a.nav-link { color: var(--fm-text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav a.nav-link:hover { color: var(--fm-primary-dark); }

/* Live search in nav */
.fm-ls {
    position: relative;
    margin-right: 0.6rem;
}
.fm-ls input {
    width: 220px;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--fm-border);
    border-radius: 100px;
    background: var(--fm-bg-alt);
    font: inherit; font-size: 0.9rem;
    color: var(--fm-text);
    outline: none;
    transition: all 0.18s;
}
.fm-ls input:focus {
    width: 320px;
    border-color: var(--fm-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 107, 58, 0.12);
}
.fm-ls-dd {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 360px;
    max-height: 460px;
    overflow-y: auto;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow-lg);
    display: none;
    z-index: 60;
}
.fm-ls-dd.open { display: block; }
.fm-ls-section { padding: 0.5rem 0; border-bottom: 1px solid var(--fm-border-soft); }
.fm-ls-section:last-child { border-bottom: 0; }
.fm-ls-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fm-text-soft);
    padding: 0.25rem 1rem 0.4rem;
    font-weight: 700;
}
.fm-ls-item {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--fm-text);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.35;
}
.fm-ls-item:hover, .fm-ls-item.is-active {
    background: var(--fm-primary-soft);
    color: var(--fm-primary-dark);
}
.fm-ls-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--fm-text-soft);
    margin-top: 0.1rem;
}
.fm-ls-empty {
    padding: 1rem;
    color: var(--fm-text-muted);
    font-size: 0.9rem;
    text-align: center;
}
@media (max-width: 720px) {
    .fm-ls { display: none; }
}

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, var(--fm-bg) 0%, var(--fm-bg-alt) 100%);
}
.hero h1 { font-size: 2.8rem; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--fm-text-muted); max-width: 60ch; }

/* Search bar */
.search-bar {
    margin-top: 1.5rem;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-lg);
    padding: 0.5rem;
    display: flex; gap: 0.5rem;
    box-shadow: var(--fm-shadow);
    max-width: 540px;
}
.search-bar input {
    flex: 1; min-width: 0;
    border: 0; outline: none; background: transparent;
    padding: 0.85rem 1rem;
    font: inherit; color: var(--fm-text);
}
.search-bar input::placeholder { color: var(--fm-text-soft); }
.search-bar button {
    border: 0; cursor: pointer;
    background: var(--fm-primary); color: #fff;
    padding: 0.75rem 1.4rem;
    border-radius: calc(var(--fm-radius-lg) - 4px);
    font: inherit; font-weight: 600;
    transition: background 0.18s;
}
.search-bar button:hover { background: var(--fm-primary-dark); }

/* Pills */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--fm-text-muted);
    text-decoration: none;
    transition: all 0.15s;
}
.pill:hover { border-color: var(--fm-primary); color: var(--fm-primary-dark); }
.pill.is-active { background: var(--fm-primary); color: #fff; border-color: var(--fm-primary); }

/* Sections */
section.block { padding: 3rem 0; }
section.block.alt { background: var(--fm-bg-alt); }

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.card {
    background: var(--fm-surface);
    border: 1px solid var(--fm-border-soft);
    border-radius: var(--fm-radius);
    padding: 1.25rem;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fm-shadow);
    border-color: var(--fm-border);
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; color: var(--fm-text); }
.card .meta { font-size: 0.85rem; color: var(--fm-text-soft); }
.fm-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.9rem;
    padding: 0.4rem 0.9rem;
    background: var(--fm-primary);
    color: #fff !important;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.fm-card-btn:hover {
    background: var(--fm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 107, 58, 0.25);
}
.fm-card-btn--alt {
    background: var(--fm-surface-2);
    color: var(--fm-primary-dark) !important;
    border: 1px solid var(--fm-border);
}
.fm-card-btn--alt:hover { background: var(--fm-primary-soft); border-color: var(--fm-primary); }

/* Footer */
.site-foot {
    margin-top: 4rem;
    padding: 2.5rem 0 1.5rem;
    background: var(--fm-text);
    color: #d9cdb1;
}
.site-foot a { color: #fff; }
.site-foot small { color: #9a917e; }

/* Branded map pin */
.fm-pin { background: transparent !important; border: 0 !important; }
.fm-pin-inner {
    width: 36px;
    height: 44px;
    background: var(--fm-primary);
    border: 2px solid #fff;
    border-radius: 18px 18px 18px 4px;
    transform: rotate(-45deg);
    box-shadow: 0 3px 10px rgba(43, 36, 25, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    line-height: 1;
}
.fm-pin-inner > * { transform: rotate(45deg); }
.fm-pin-inner::before {
    content: "\1F33F";
    transform: rotate(45deg);
    display: block;
}

/* Notice strip — used where there's no data yet */
.notice {
    background: var(--fm-primary-soft);
    border: 1px solid var(--fm-primary);
    color: var(--fm-primary-dark);
    padding: 1rem 1.25rem;
    border-radius: var(--fm-radius);
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .hero { padding: 2.5rem 0 2rem; }
    .hero h1 { font-size: 2rem; }
    .hero p.lead { font-size: 1rem; }
    .site-nav ul { gap: 1rem; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.4rem; }
}
