/* ===========================================================================
   skeletonsintheyard.com - site styles
   =========================================================================== */
:root {
    --ink: #1f2430;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #b45a2b;        /* warm California terracotta */
    --brand-dark: #8f4420;
    --accent: #2a4a7c;       /* dusk blue */
    --ok: #2f8f5b;
    --warn: #c98a1e;
    --bad: #c0432f;
    font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
}

a { color: var(--accent); }

/* ---------------------------------------------------------------------------
   Landing (magnifier hero + login)
   --------------------------------------------------------------------------- */
body.landing { min-height: 100vh; }

.landing-bg {
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(180deg, #cfe9fb 0%, #e6f1ea 52%, #f6efe2 100%);
}

.hero {
    max-width: 1060px;
    margin: 0 auto;
    padding: 4vh 24px 18px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-head { text-align: center; margin-bottom: 16px; }
.brand-title {
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    line-height: 1.04;
    margin: 0 0 .25em;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #241c30;
}
.brand-tagline {
    margin: 0;
    color: #4a4458;
    font-size: clamp(1rem, 1.9vw, 1.25rem);
}

.hero-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.scene-col { flex: 1 1 560px; min-width: 0; max-width: 600px; }
.login-col { flex: 0 0 340px; }

.hero-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 14px 0 2px; }

/* magnifier scene (a fixed 500x470 stage scaled to its column by JS) */
.sit-scene { position: relative; width: 100%; }
.sit-stage {
    position: absolute; top: 0; left: 0;
    width: 500px; height: 470px;
    transform-origin: top left;
    background: #cfe9fb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 0 3px #2a2330, 0 14px 32px rgba(20,20,40,.18);
}
.sit-world { position: absolute; top: 0; left: 0; width: 500px; height: 470px; }
.sit-xray { will-change: mask-image; }
.sit-rim {
    position: absolute; width: 170px; height: 170px; border-radius: 50%;
    pointer-events: none; will-change: left, top;
    border: 8px solid #2a2330;
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.5), 0 8px 16px rgba(0,0,0,.22);
}
.sit-handle {
    position: absolute; left: 50%; top: 100%;
    margin-left: -13px; margin-top: -7px;
    width: 26px; height: 66px;
    background: #7a4e27; border: 5px solid #2a2330; border-radius: 12px;
}
.sit-glint {
    position: absolute; left: 16%; top: 12%; width: 40%; height: 32%;
    border-radius: 50%; background: #fff; opacity: .28;
}
.sit-cap {
    position: absolute; left: 250px; top: 432px; transform: translateX(-50%);
    background: #2a2330; color: #fff; font-weight: 800; letter-spacing: 1.1px;
    font-size: 12px; padding: 7px 14px; border-radius: 20px; white-space: nowrap;
    transition: opacity .25s; box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

.login-card {
    background: #fff;
    border: 1px solid #e8e6ef;
    border-radius: 16px;
    padding: 28px 26px;
    box-shadow: 0 14px 36px rgba(20,20,40,.16);
}
.login-card h2 { margin: 0 0 18px; font-size: 1.4rem; }

/* ---------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > span:first-child { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #374151; }

input[type="text"], input[type="email"], input[type="password"], .search-input {
    width: 100%;
    padding: 11px 13px;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

input:focus, .search-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(180, 90, 43, 0.18);
}

.checkbox { display: flex; align-items: center; gap: 8px; margin: 6px 0 20px; font-size: 0.92rem; color: #374151; }
.checkbox input { width: auto; }

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }

.field-error { color: var(--bad); font-size: 0.82rem; display: inline-block; margin-top: 4px; }
.field-error.block { display: block; margin: 0 0 12px; font-weight: 600; }
.validation-summary { color: var(--bad); font-size: 0.85rem; }
.validation-summary ul { margin: 0 0 10px; padding-left: 18px; }
.validation-summary:empty { display: none; }

/* ---------------------------------------------------------------------------
   App chrome (signed-in pages)
   --------------------------------------------------------------------------- */
body.app { background: #f4f5f7; min-height: 100vh; }

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    height: 60px;
    background: linear-gradient(90deg, var(--accent), #3a5e94);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.app-brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.app-user { display: flex; align-items: center; gap: 14px; }
.welcome { font-size: 0.9rem; opacity: 0.92; }
.logout-form { margin: 0; }
.btn-link { background: none; border: 1px solid rgba(255,255,255,0.6); color: #fff; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 0.85rem; }
.btn-link:hover { background: rgba(255,255,255,0.15); }

.app-body { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }

/* ---------------------------------------------------------------------------
   Search + results
   --------------------------------------------------------------------------- */
.search-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.search-panel h1 { margin: 0 0 6px; font-size: 1.5rem; }
.muted { color: var(--muted); }
.muted.small { font-size: 0.8rem; }

.search-form { display: flex; gap: 12px; margin-top: 16px; }
.search-form .search-input { flex: 1; }
.search-form .btn-primary { width: auto; padding-left: 28px; padding-right: 28px; }

.result-header { margin: 26px 0 8px; }
.verified-badge { background: var(--ok); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; margin-right: 10px; }
.matched-address { font-weight: 600; }

.results-grid, .map-section { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-top: 20px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.results-grid h2, .map-section h2 { margin: 0 0 14px; font-size: 1.15rem; }

table.grid { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.grid th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.grid td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tr:last-child td { border-bottom: none; }
table.grid td.cat { font-weight: 600; white-space: nowrap; }
table.grid td.notes { color: var(--muted); }

.sev { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; color: #fff; }
.sev-low { background: var(--ok); }
.sev-moderate { background: var(--warn); }
.sev-high { background: var(--bad); }

.map { height: 420px; width: 100%; border-radius: 10px; overflow: hidden; }

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 880px) {
    /* portrait / narrow: stack the scene above the login form */
    .hero-body { flex-direction: column; gap: 24px; }
    .scene-col { flex: 1 1 auto; width: 100%; max-width: 460px; }
    .login-col { flex: 1 1 auto; width: 100%; max-width: 420px; }
}

@media (max-height: 560px) and (orientation: landscape) {
    /* short landscape phones: tighten vertical rhythm, keep scene + login side by side */
    .hero { padding-top: 2vh; }
    .hero-head { margin-bottom: 8px; }
    .scene-col { max-width: 460px; }
}

@media (max-width: 760px) {
    .search-form { flex-direction: column; }
    .search-form .btn-primary { width: 100%; }
}
