/* GrantSaaS design foundation — warm-monochrome editorial, trust-first, accessible.
   Page-specific styles live in wwwroot/css/<feature>/*.css (loaded via @section Styles). */

:root {
    /* Surfaces */
    --canvas: #f7f6f3;          /* warm off-white page */
    --surface: #ffffff;
    --surface-sunken: #f1f0ec;

    /* Ink (never pure black) */
    --ink: #1f2421;
    --ink-muted: #696d67;
    --ink-faint: #9a9e97;

    /* Lines */
    --border: #e7e6e1;
    --border-strong: #d6d5cf;

    /* Single locked accent: deep evergreen (funding / growth / trust) */
    --accent: #2f5d50;
    --accent-ink: #244a40;
    --accent-soft: #e9f1ec;

    /* Semantic status (used sparingly, for real state only) */
    --alert-ink: #9f2f2d;
    --warn-ink: #8a5d00;
    --warn-soft: #f6edda;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(31, 36, 33, .04), 0 14px 30px -18px rgba(31, 36, 33, .14);

    --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

    --maxw: 1080px;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

::selection { background: var(--accent-soft); }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }

/* Accessibility helpers */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--ink); color: #fff; padding: .65rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Top chrome (flat editorial bar; replaces the Bootstrap navbar styling) */
.site-nav {
    background: var(--canvas);
    border-bottom: 1px solid var(--border);
}
.site-nav__inner {
    max-width: var(--maxw); margin-inline: auto; padding: 1.1rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-brand {
    font-family: var(--font-mono);
    font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em;
    color: var(--ink);
}
.site-brand:hover { text-decoration: none; }
.site-brand .dot { color: var(--accent); }
.site-nav__links { display: flex; gap: 1.5rem; align-items: center; }
.site-nav__link { color: var(--ink-muted); font-size: .95rem; font-weight: 500; }
.site-nav__link:hover { color: var(--ink); text-decoration: none; }
.site-nav__link[aria-current="page"] { color: var(--ink); }

.site-nav__auth { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.site-nav__user { color: var(--ink-faint); font-size: .9rem; }
.site-nav__logout {
    background: none; border: none; padding: 0; cursor: pointer;
    font-family: inherit; color: var(--ink-muted); font-size: .95rem; font-weight: 500;
}
.site-nav__logout:hover { color: var(--ink); }

/* Shared components */
.tag-open {
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--accent-soft);
    color: var(--accent-ink);
    padding: .25rem .55rem;
    border-radius: 999px;
}

/* Footer (normal flow, not absolute) */
.site-footer {
    border-top: 1px solid var(--border);
    color: var(--ink-faint);
    font-size: .85rem;
    margin-top: 5rem;
}
.site-footer__inner {
    max-width: var(--maxw); margin-inline: auto; padding: 2rem 1.25rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.site-footer a { color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
