/* ==========================================================================
   common.css — shared design tokens for the public (buyer-facing) side
   Theme: "Survey Ledger" — cadastral map ink/paper, brass seal accent.
   Loaded before landing.css / project-view.css on every public page.
   ========================================================================== */

:root {
    /* --- Palette --------------------------------------------------------- */
    --ink: #111111;
    /* pure high-contrast near-black */
    --ink-soft: #444444;
    /* secondary text */
    --paper: #FFFFFF;
    /* pure white background */
    --paper-raised: #FFFFFF;
    /* card surface */
    --line: #E2E2E2;
    /* hairline borders / grid */
    --line-strong: #A8A8A8;

    --brass: #B8873D;
    /* seal / primary accent */
    --brass-dark: #96692A;
    --brass-tint: rgba(184, 135, 61, 0.08);

    /* status colors — meaning-bearing, do not repurpose for decoration */
    --status-available: #3F8F5F;
    --status-available-bg: #E3F1E8;
    --status-booked: #C1462F;
    --status-booked-bg: #F8E4DF;
    --status-hold: #C98A1D;
    --status-hold-bg: #F5EAD3;
    --status-registered: #4A5FA0;
    --status-registered-bg: #E4E8F3;

    /* --- Type -------------------------------------------------------------
     Display/heading: Source Serif 4 (document, gazette register feel)
     Body: Inter (clean, high legibility for buyer-facing text)
     Data: IBM Plex Mono (plot numbers / sqft / survey figures read as
     ledger entries, not prose) */
    --font-display: 'Source Serif 4', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

    --radius: 3px;
    --shadow-card: 0 1px 2px rgba(29, 36, 32, 0.06), 0 4px 14px rgba(29, 36, 32, 0.06);
    --shadow-modal: 0 12px 40px rgba(29, 36, 32, 0.28);
}

[data-theme="dark"] {
    --ink: #EEF0E6;
    --ink-soft: #A5ACA0;
    --paper: #121513;
    --paper-raised: #1A1E1B;
    --line: rgba(203, 208, 194, 0.15);
    --line-strong: rgba(203, 208, 194, 0.4);
    --brass: #D4AF37;
    --brass-dark: #B8873D;
    --brass-tint: rgba(212, 175, 55, 0.15);
    --status-available: #4ADE80;
    --status-available-bg: rgba(74, 222, 128, 0.12);
    --status-booked: #F87171;
    --status-booked-bg: rgba(248, 113, 113, 0.12);
    --status-hold: #FBBF24;
    --status-hold-bg: rgba(251, 191, 36, 0.12);
    --status-registered: #60A5FA;
    --status-registered-bg: rgba(96, 165, 250, 0.12);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 18px rgba(0, 0, 0, 0.35);
    --shadow-modal: 0 12px 45px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    /* faint cadastral grid wash behind everything — the signature texture */
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: -1px -1px;
    background-color: var(--paper);
    background-attachment: fixed;
    min-height: 100vh;
}

a {
    color: inherit;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px clamp(20px, 5vw, 56px);
    border-bottom: 1px solid var(--line-strong);
    background: rgba(from var(--paper) r g b / 0.9);
    background-color: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.site-header .brand .mark {
    width: 10px;
    height: 10px;
    border: 2px solid var(--brass);
    transform: rotate(45deg);
    flex: none;
}

.site-header .brand .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--brass-dark);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 56px);
}

.state-message {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-align: center;
    padding: 60px 20px;
    letter-spacing: 0.02em;
}

.state-message.is-error {
    color: var(--status-booked);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brass);
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.theme-toggle-btn:hover {
    background: var(--brass-tint);
    border-color: var(--brass);
    box-shadow: 0 0 10px rgba(184, 135, 61, 0.25);
    transform: scale(1.05);
}