/* RemodelMatch — shared styles for legal / policy pages
   Mirrors the design tokens used on the homepage (index.html). */

:root{
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-tint: #eff4ff;
  --brand-tint-strong: #dbe6ff;
  --ink: #0b1220;
  --ink-2: #1a2236;
  --muted: #4b5468;
  --muted-2: #6b7384;
  --line: #e6e8ee;
  --line-strong: #d4d8e1;
  --bg: #fbfbfa;
  --bg-2: #f5f5f3;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11,18,32,.04), 0 1px 1px rgba(11,18,32,.03);
  --shadow-md: 0 8px 24px rgba(11,18,32,.06), 0 2px 6px rgba(11,18,32,.04);
  --shadow-lg: 0 24px 60px -12px rgba(11,18,32,.18), 0 8px 20px rgba(11,18,32,.06);
}

*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
html{ scroll-behavior: smooth; }
body{
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
}
img{ max-width:100%; display:block; }
button{ font-family: inherit; }

.container{ width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Nav (matches homepage) ---------- */
.nav{
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,251,250,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(11,18,32,.02);
}
.nav-row{
  display:flex; align-items:center; justify-content:space-between;
  height: 72px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight: 700; letter-spacing: -.01em; font-size: 18px;
  color: var(--ink); text-decoration:none;
}
.brand-mark{
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--brand);
  display:grid; place-items:center;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 1px 2px rgba(37,99,235,.35);
}
.brand-mark svg{ width: 16px; height: 16px; color: white; }
.nav-links{ display:flex; gap: 28px; align-items:center; }
.nav-links a{
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover{ color: var(--ink); }
.nav-links a.is-current{ color: var(--ink); font-weight: 600; }
.nav-cta{ display:flex; align-items:center; gap: 14px; }
@media (max-width: 820px){ .nav-links{ display:none; } }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600; font-size: 14.5px; letter-spacing: -.005em;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration:none; white-space:nowrap;
}
.btn-primary{
  background: var(--brand); color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -4px rgba(37,99,235,.45), 0 1px 2px rgba(37,99,235,.25);
}
.btn-primary:hover{ background: var(--brand-600); }
.btn-primary:active{ transform: translateY(1px); }

/* ---------- Page header ---------- */
.legal-hero{
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 40px;
}
.legal-hero .crumb{
  display:flex; align-items:center; gap:8px;
  font-size: 13px; color: var(--muted-2); margin-bottom: 22px;
}
.legal-hero .crumb a{ color: var(--muted); text-decoration:none; }
.legal-hero .crumb a:hover{ color: var(--ink); }
.legal-hero .crumb svg{ width: 14px; height: 14px; opacity:.5; }
.legal-eyebrow{
  text-transform: uppercase; letter-spacing: .14em;
  font-size: 12px; font-weight: 700; color: var(--brand);
  display:inline-block; margin-bottom: 14px;
}
.legal-hero h1{
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08; letter-spacing: -.025em;
  margin: 0 0 16px; max-width: 760px; text-wrap: balance;
}
.legal-meta{
  display:flex; flex-wrap:wrap; gap: 10px 22px; align-items:center;
  color: var(--muted); font-size: 14px;
}
.legal-meta .pill{
  display:inline-flex; align-items:center; gap:7px;
  background: var(--brand-tint); color: var(--brand-700);
  border: 1px solid var(--brand-tint-strong);
  padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
}
.legal-meta .pill svg{ width: 14px; height: 14px; }

/* ---------- Layout: TOC + content ---------- */
.legal-wrap{ padding: 56px 0 80px; }
.legal-grid{
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 920px){
  .legal-grid{ grid-template-columns: 1fr; gap: 36px; }
}

/* Table of contents */
.toc{
  position: sticky; top: 96px;
  border-left: 2px solid var(--line);
  padding-left: 18px;
}
.toc h2{
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
  margin: 0 0 14px;
}
.toc ol{ list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li{ margin: 0; }
.toc a{
  display:block; padding: 7px 0;
  color: var(--muted); text-decoration: none;
  font-size: 14px; line-height: 1.4;
  transition: color .15s ease;
}
.toc a:hover{ color: var(--ink); }
.toc a.is-active{ color: var(--brand); font-weight: 600; }
@media (max-width: 920px){
  .toc{
    position: static; border-left: 0; padding-left: 0;
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 22px; background: var(--white);
  }
  .toc a{ padding: 5px 0; }
}

/* Content typography */
.legal-content{ max-width: 760px; }
.legal-content > section{ scroll-margin-top: 96px; }
.legal-content > section + section{ margin-top: 44px; }
.legal-content h2{
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -.015em; line-height: 1.2;
  margin: 0 0 16px;
  display:flex; align-items: baseline; gap: 12px;
}
.legal-content h2 .num{
  font-size: 14px; font-weight: 700; color: var(--brand);
  font-variant-numeric: tabular-nums;
  flex: none; padding-top: 2px;
}
.legal-content h3{
  font-size: 16.5px; font-weight: 700; letter-spacing: -.01em;
  margin: 28px 0 10px; color: var(--ink-2);
}
.legal-content p{
  color: var(--muted); margin: 0 0 14px; text-wrap: pretty;
}
.legal-content ul{
  margin: 0 0 16px; padding-left: 0; list-style: none;
}
.legal-content ul li{
  position: relative; padding-left: 26px; margin-bottom: 10px;
  color: var(--muted);
}
.legal-content ul li::before{
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}
.legal-content ul li strong{ color: var(--ink-2); }
.legal-content a{ color: var(--brand); text-decoration: none; font-weight: 500; }
.legal-content a:hover{ text-decoration: underline; }
.legal-content strong{ color: var(--ink-2); }

/* Callout box */
.callout{
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
}
.callout p{ margin: 0; color: var(--ink-2); font-size: 14.5px; }
.callout p + p{ margin-top: 8px; }

/* Definition / data table */
.legal-content table{
  width: 100%; border-collapse: collapse; margin: 4px 0 20px;
  font-size: 14.5px;
}
.legal-content th, .legal-content td{
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.legal-content thead th{
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-2); background: var(--bg-2);
  border-bottom: 1px solid var(--line-strong);
}
.legal-content tbody th{ font-weight: 700; color: var(--ink-2); width: 34%; }
.legal-content td{ color: var(--muted); }

/* Company card */
.entity-card{
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px 26px;
  box-shadow: var(--shadow-sm); margin-top: 6px;
}
.entity-card . name{ font-weight: 700; color: var(--ink); font-size: 16px; }
.entity-card address{
  font-style: normal; color: var(--muted); line-height: 1.7; font-size: 14.5px;
  margin-top: 6px;
}
.entity-card .rows{ margin-top: 14px; display: grid; gap: 8px; }
.entity-card .row{ display:flex; gap: 10px; font-size: 14.5px; }
.entity-card .row .k{ color: var(--muted-2); min-width: 116px; }
.entity-card .row .v{ color: var(--ink-2); font-weight: 600; }
.entity-card .row a{ color: var(--brand); text-decoration: none; font-weight: 600; }
.entity-card .row a:hover{ text-decoration: underline; }

/* ---------- Footer (matches homepage) ---------- */
footer{
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  background: var(--white);
}
.foot-grid{
  display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 820px){ .foot-grid{ grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot-brand p{ margin: 14px 0 0; color: var(--muted); font-size: 14px; max-width: 320px; }
.foot-col h4{
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 14px;
}
.foot-col a{
  display:block; color: var(--muted); text-decoration:none; font-size: 14px;
  margin-bottom: 10px; transition: color .15s ease;
}
.foot-col a:hover{ color: var(--ink); }
.foot-col a.is-current{ color: var(--ink); font-weight: 600; }
.foot-bot{
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display:flex; justify-content: space-between; align-items:center;
  gap: 16px; flex-wrap: wrap;
  color: var(--muted-2); font-size: 12.5px;
}
