/*
 * Realitor public site shell (TB-057): base styles, the one header and footer, buttons and the
 * few helpers the public pages share. Colours come from site-tokens.css only. Page-specific
 * layout lives in the scoped Pages/**\/*.cshtml.css files; the landing page sections are in
 * Pages/Index.cshtml.css. Loaded by every Razor Pages layout through Pages/Shared/_SiteHead.cshtml.
 */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--site-ink); background: var(--site-paper); font: 16px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { width: min(calc(100% - 40px), var(--site-max)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 99; padding: .7rem 1rem; color: var(--site-ink); background: var(--site-accent); font-weight: 800; }
.skip:focus { top: 1rem; }

/* Header */
.topbar { border-bottom: 1px solid var(--site-line); background: var(--site-paper-translucent); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-size: 1.25rem; font-weight: 850; letter-spacing: -.04em; text-decoration: none; }
.mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--site-accent); background: var(--site-ink); font-size: .88rem; font-weight: 900; }
.links { display: flex; align-items: center; gap: 28px; }
.links a { color: inherit; text-decoration: none; font-size: .91rem; font-weight: 700; }
.links a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--site-ink); border-radius: 12px; background: var(--site-ink); color: var(--site-surface); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.button:hover { color: var(--site-surface); transform: translateY(-2px); box-shadow: 0 10px 25px var(--site-shadow); }
.button.light { color: var(--site-ink); background: var(--site-accent); border-color: var(--site-accent); }
.button.light:hover { color: var(--site-ink); }
.button.ghost { color: var(--site-ink); background: transparent; }
.button.ghost:hover { color: var(--site-ink); }

/* Footer */
.site-footer { padding: 50px 0; color: var(--site-text-on-dark); background: var(--site-ink-deep); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; }
.footer-brand { font-size: 1.3rem; font-weight: 850; }
.footer-copy { max-width: 450px; color: var(--site-text-on-dark-faint); font-size: .83rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 24px; font-size: .83rem; }
.footer-links a { color: var(--site-text-on-dark); }
.legal { margin-top: 38px; padding-top: 20px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--site-line-on-dark); color: var(--site-text-on-dark-faint); font-size: .72rem; }

/* Helpers shared by the public pages (replacing the Bootstrap utilities they used) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.site-alert { margin: 1.5rem 0; padding: .9rem 1.1rem; border-radius: .6rem; background: var(--site-notice-bg); }
.site-alert--error { background: var(--site-danger-bg); }
.site-alert ul { margin: 0; padding-left: 1.2rem; }
.form-errors { margin: 0 0 1rem; color: var(--site-danger); }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors.validation-summary-valid { display: none; }

/* Account pages (sign-in, passwords): the shell around Bootstrap forms */
.account-main { max-width: 42rem; padding: 3rem 0; }
.account-back { display: inline-block; margin-bottom: 1.5rem; color: var(--site-ink); font-weight: 700; text-decoration: none; }

/* Public error pages (404, 500) */
.status-page { min-height: calc(100vh - 8.5rem); padding: clamp(4rem, 10vw, 8rem) 0; }
.status-page__card { max-width: 40rem; }
.status-page__eyebrow { color: var(--site-eyebrow); font-size: .75rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.status-page h1 { margin: .8rem 0 1.2rem; font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.status-page p { margin: 0 0 1rem; color: var(--site-muted); font-size: 1.08rem; line-height: 1.7; }
.status-page code { font-size: .95rem; }
.status-page .button { margin-top: 1rem; }

@media (max-width: 640px) {
    .wrap { width: min(calc(100% - 28px), var(--site-max)); }
    .nav { min-height: 64px; }
    .links > a:not(.button) { display: none; }
    .links { gap: 8px; }
    .links .button { min-height: 40px; padding: 0 14px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-links { justify-content: flex-start; }
    .legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button { transition: none; }
}
