/* ==========================================================================
   Spect — the transparent home record
   Clean editorial restyle · light only · electric-blue accent
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* surfaces & ink */
  --bg:          #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f5f5f3;   /* light gray panel */
  --surface-3:   #efefec;
  --ink:         #0f0f0e;
  --ink-soft:    #3a3a37;
  --muted:       #8b8b86;
  --faint:       #bdbdb7;   /* grid lines, big section numbers */
  --line:        #e7e7e2;   /* hairline */
  --line-strong: #d8d8d2;

  /* electric-blue accent (strategic pops) */
  --accent:      #2b5cff;
  --accent-hover:#1c46e0;
  --accent-soft: #eaefff;
  --accent-ink:  #ffffff;

  /* high-contrast CTA */
  --cta:         #111110;
  --cta-hover:   #2c2c28;
  --cta-ink:     #ffffff;

  /* score data colors */
  --good-bg: #e7f4ec;  --good-fg: #1c7a4a;
  --warn-bg: #fbeed0;  --warn-fg: #8a6300;
  --bad-bg:  #fbe1e0;  --bad-fg:  #b3261e;

  /* legacy aliases (so old inline styles still resolve) */
  --navy:        var(--ink);
  --navy-700:    var(--surface);
  --navy-600:    var(--ink-soft);
  --navy-50:     var(--surface-2);
  --green:       var(--good-fg);
  --green-600:   #155f39;
  --green-100:   var(--good-bg);
  --sky:         var(--accent);
  --sky-100:     var(--accent-soft);
  --white:       #ffffff;

  /* shape & motion */
  --radius:      12px;
  --radius-lg:   16px;
  --radius-sm:   7px;
  --radius-xs:   5px;
  --pill:        999px;
  --shadow:      0 1px 2px rgba(15,15,14,.04);
  --shadow-lg:   0 20px 48px -28px rgba(15,15,14,.22);
  --max:         1200px;
  --font:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:        "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ----- Typography -------------------------------------------------------- */
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.08; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.9rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); letter-spacing: -.025em; }
h3 { font-size: 1.16rem; letter-spacing: -.01em; }

/* Sentence case: capitalize the first letter of every heading */
h1::first-letter, h2::first-letter, h3::first-letter, h4::first-letter { text-transform: uppercase; }

p { margin: 0 0 1em; color: var(--ink-soft); }
.muted { color: var(--muted); }

/* slash separator inside headings, e.g. HELLO/WELCOME */
.slash { color: var(--faint); font-weight: 500; margin: 0 .04em; }
.dim { color: var(--muted); font-weight: 500; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ----- Tag chips (mono, technical) --------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 7px 12px;
  background: var(--surface);
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
a.tag:hover, .tag.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ----- Top utility bar --------------------------------------------------- */
.utility-bar {
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
}
.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 40px;
}
.utility-bar .u-group { display: flex; gap: 22px; align-items: center; }
.utility-bar .u-sep { color: var(--faint); }
.utility-bar a { color: var(--muted); }
.utility-bar a:hover { color: var(--accent); }
@media (max-width: 720px) { .utility-bar .u-hide { display: none; } }

/* ----- Header ------------------------------------------------------------ */
.site-header {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-row { display: flex; align-items: center; gap: 22px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand-name { font-size: 1.3rem; font-weight: 600; color: var(--ink); letter-spacing: -.03em; }
.brand-name .slash { font-size: .8em; }
.search {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 4px 4px 4px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; border: none; background: transparent; outline: none; font: inherit; color: var(--ink); padding: 8px 4px; }
.search input::placeholder { color: var(--muted); }
.search button {
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 5px; padding: 8px 16px;
  font-weight: 500; cursor: pointer; transition: background .15s;
}
.search button:hover { background: var(--accent-hover); }
.header-actions { display: flex; align-items: center; gap: 6px; }

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: .94rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .06s ease, background .15s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cta); color: var(--cta-ink); }
.btn-primary:hover { background: var(--cta-hover); color: var(--cta-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--accent); }

/* inline "learn more" style link with bullet */
.link-more { font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }
.link-more::before { content: "•"; color: var(--accent); }
.link-more:hover { color: var(--accent-hover); }

/* ----- Role nav (mono, technical) ---------------------------------------- */
.role-nav { background: var(--bg); border-bottom: 1px solid var(--line); }
.role-nav .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 0; }
.role-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); text-transform: uppercase; font-size: .73rem; letter-spacing: .09em;
  color: var(--muted); font-weight: 500;
  padding: 14px 18px;
}
.role-nav a:hover { color: var(--ink); }
.role-nav a.active { color: var(--ink); }
.role-nav a.active::before { content: "•"; color: var(--accent); }

/* ----- Eyebrow ----------------------------------------------------------- */
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }
.eyebrow, .section-head .eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .74rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: "•"; color: var(--accent); font-size: 1em; }

/* ----- Hero -------------------------------------------------------------- */
.hero {
  background: var(--bg);
  padding: 92px 0 80px;
  position: relative;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { font-size: 1.16rem; color: var(--muted); max-width: 520px; margin-bottom: 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-tags { margin: 22px 0 0; }
.hero-search {
  margin-top: 26px; display: flex; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 5px; max-width: 520px;
  transition: border-color .15s, box-shadow .15s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-search input { flex: 1; border: none; outline: none; background: transparent; padding: 12px 16px; font: inherit; color: var(--ink); }
.hero-search input::placeholder { color: var(--muted); }
.hero-search button {
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: 5px;
  padding: 0 22px; font-weight: 500; cursor: pointer; transition: background .15s;
}
.hero-search button:hover { background: var(--accent-hover); }
.hero-stats { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 460px; gap: 24px; }
.hero-stat .num { color: var(--ink); font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1; }
.hero-stat .lbl { color: var(--muted); font-size: .82rem; margin-top: 6px; font-family: var(--mono); }
.hero-illustration {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-illustration svg { border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 56px 0 44px; } }

/* ----- Section base ------------------------------------------------------ */
section.block { padding: 92px 0; }
section.block.dark { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ----- Cards: property grid ---------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } .cards-3 { grid-template-columns: 1fr; } }

.property-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex; flex-direction: column;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.property-thumb { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; }
.property-thumb svg, .property-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.property-body { padding: 18px 18px 16px; }
.property-body .addr { font-weight: 600; color: var(--ink); margin: 0 0 4px; letter-spacing: -.01em; }
.property-body .meta { color: var(--muted); font-size: .9rem; margin: 0 0 14px; font-family: var(--mono); }
.score-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.score-pill { background: var(--good-bg); color: var(--good-fg); padding: 4px 11px; border-radius: var(--pill); font-weight: 600; font-size: .8rem; font-family: var(--mono); }
.score-pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.score-pill.bad  { background: var(--bad-bg);  color: var(--bad-fg); }
.property-card .btn {
  width: 100%; border-radius: 0; padding: 13px; border: none; border-top: 1px solid var(--line);
  background: transparent; color: var(--ink);
  font-family: var(--mono); text-transform: uppercase; font-size: .74rem; letter-spacing: .08em;
}
.property-card .btn:hover { background: var(--accent); color: #fff; }

/* ----- Property detail --------------------------------------------------- */
.detail {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 30px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin-top: 28px;
}
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.detail h1 { margin-bottom: 8px; font-size: clamp(1.9rem, 3vw, 2.5rem); }
.detail .addr-meta { color: var(--muted); margin-bottom: 22px; font-family: var(--mono); font-size: .9rem; }
.detail-stats { display: flex; flex-direction: column; gap: 24px; }
.score-block { display: flex; align-items: center; gap: 16px; }
.score-block .icon { width: 54px; height: 54px; border-radius: 11px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; }
.score-block .num { font-size: 2.1rem; font-weight: 600; color: var(--accent); line-height: 1; letter-spacing: -.02em; }
.score-block.repairs .num { color: var(--ink); }
.score-block .label { color: var(--muted); margin-top: 4px; font-family: var(--mono); font-size: .82rem; }
.progress { width: 220px; height: 8px; background: var(--accent-soft); border-radius: var(--pill); overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); }

/* ----- Stat tiles -------------------------------------------------------- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
@media (max-width: 720px) { .stat-tiles { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px 0; text-align: center; display: flex; flex-direction: column; overflow: hidden; }
.stat-tile .num { font-size: 2.6rem; font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.stat-tile .lbl { margin-top: 20px; background: var(--ink); color: #fff; padding: 10px; font-weight: 500; font-size: .76rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-left: -20px; margin-right: -20px; margin-bottom: 0; }
.stat-tile.warn  .lbl { background: #c98a00; }
.stat-tile.minor .lbl { background: var(--accent); }
.stat-tile.major .lbl { background: #d6453d; }
.stat-tile .num.warn  { color: var(--warn-fg); }
.stat-tile .num.minor { color: var(--accent); }
.stat-tile .num.major { color: var(--bad-fg); }

/* ----- Service icons row ------------------------------------------------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.services .svc { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 14px; color: var(--ink); font-family: var(--mono); text-transform: uppercase; font-size: .74rem; letter-spacing: .07em; text-decoration: none; border-right: 1px solid var(--line); transition: background .15s, color .15s; }
.services .svc:last-child { border-right: none; }
.services .svc:hover { background: var(--accent-soft); color: var(--accent); }
.services .svc svg { width: 28px; height: 28px; margin-bottom: 12px; stroke-width: 1.6; opacity: .85; }
@media (max-width: 720px) { .services { grid-template-columns: repeat(2, 1fr); } .services .svc:nth-child(2) { border-right: none; } }

/* ----- Feature cards (numbered) ------------------------------------------ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: feat; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); padding: 30px; border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; transition: border-color .18s, transform .18s, box-shadow .18s;
}
.feature:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature::before {
  counter-increment: feat; content: counter(feat, decimal-leading-zero);
  position: absolute; top: 22px; right: 24px;
  font-family: var(--mono); font-size: .82rem; color: var(--faint); letter-spacing: .05em;
}
.feature h3 { margin-bottom: .4em; }
.feature .ic { width: 44px; height: 44px; background: var(--accent-soft); color: var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feature .ic svg { stroke-width: 1.7; }
.step-ic { display: block; width: 22px; height: 22px; margin-bottom: 12px; color: var(--muted); flex-shrink: 0; }

/* ----- Forms (auth) ------------------------------------------------------ */
.auth-wrap { min-height: 74vh; display: flex; align-items: center; justify-content: center; padding: 64px 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 42px; width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; letter-spacing: -.03em; }
.auth-card p.muted { margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); margin-bottom: 7px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: var(--muted); }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-card .btn { width: 100%; padding: 13px; margin-top: 4px; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--muted); font-size: .9rem; }
.auth-foot a { color: var(--accent); }

/* ----- Footer ------------------------------------------------------------ */
.site-footer { background: var(--surface); color: var(--muted); padding: 72px 0 32px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--ink); font-family: var(--mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--muted); font-size: .92rem; }
.site-footer a:hover { color: var(--accent); }
.foot-brand p { color: var(--muted); max-width: 300px; font-size: .92rem; }
.foot-brand .brand-name { color: var(--ink); }
.foot-brand img { border-radius: 7px; }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .76rem; color: var(--muted); font-family: var(--mono); letter-spacing: .03em; }

/* ----- Generic content page ---------------------------------------------- */
.page-hero { background: var(--surface-2); padding: 88px 0 76px; border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--ink); }
.page-hero p { color: var(--muted); max-width: 680px; font-size: 1.08rem; }
.page-content { padding: 64px 0 92px; }
.page-content .grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
@media (max-width: 860px) { .page-content .grid-2 { grid-template-columns: 1fr; } }
.sidebar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }

/* ----- Utility ----------------------------------------------------------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
