/* ==========================================================================
   Kilifi Legacy Estates — Pre-Development Data Room
   Design system: black / purple / white, institutional (Blackstone/Hines-style)
   ========================================================================== */

:root{
  --black: #0a0a0f;
  --black-soft: #131319;
  --black-card: #17171f;
  --purple-900: #3b1667;
  --purple-700: #5b21b6;
  --purple-600: #6d28d9;
  --purple-500: #7c3aed;
  --purple-400: #9061f2;
  --purple-pale: #f3ecfe;
  --white: #ffffff;
  --gray-050: #fafafa;
  --gray-100: #f4f3f7;
  --gray-200: #e6e4ec;
  --gray-300: #d3d0dc;
  --gray-500: #837e94;
  --gray-600: #625d70;
  --gray-800: #2c2a35;
  --green: #1f9d55;
  --green-bg: #e5f7ea;
  --amber: #b7791f;
  --amber-bg: #fdf1dc;
  --red: #c0392b;
  --red-bg: #fbe6e3;
  --gray-status: #6b7280;
  --gray-status-bg: #edeef0;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(10,10,15,.06), 0 1px 1px rgba(10,10,15,.04);
  --shadow-md: 0 8px 24px rgba(10,10,15,.08);
  --shadow-lg: 0 16px 48px rgba(10,10,15,.14);
  --sidebar-w: 272px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--gray-050);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ font-family: 'Georgia', 'Times New Roman', serif; font-weight: 600; letter-spacing: -0.01em; color: var(--black); margin: 0 0 .4em; }
a{ color: inherit; text-decoration: none; }
img{ max-width:100%; display:block; }
ul{ margin:0; padding:0; }
p{ line-height:1.65; color: var(--gray-600); }

/* ---------- Layout shell ---------- */
.shell{ display:flex; min-height:100vh; }

.sidebar{
  width: var(--sidebar-w);
  flex-shrink:0;
  background: linear-gradient(180deg, var(--black) 0%, #140b22 100%);
  color: var(--gray-300);
  position: fixed;
  top:0; left:0; bottom:0;
  overflow-y:auto;
  z-index: 40;
  transition: transform .25s ease;
}
.sidebar::-webkit-scrollbar{ width:6px; }
.sidebar::-webkit-scrollbar-thumb{ background: var(--purple-700); border-radius:3px; }

.brand{
  padding: 26px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand .mark{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:8px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-900));
  color:#fff; font-family:'Georgia',serif; font-weight:700; font-size:16px;
  margin-bottom:10px;
}
.brand .name{ color:#fff; font-family:'Georgia',serif; font-size:15px; font-weight:600; line-height:1.3; }
.brand .sub{ color: var(--purple-400); font-size:11px; letter-spacing:.08em; text-transform:uppercase; margin-top:4px; }

.nav{ padding: 12px 12px 30px; }
.nav-group-label{ font-size:10.5px; text-transform:uppercase; letter-spacing:.09em; color: var(--gray-500); padding: 16px 10px 6px; }
.nav a.nav-link{
  display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:8px; font-size:13.5px;
  color: var(--gray-300); margin-bottom:2px;
}
.nav a.nav-link svg{ width:16px; height:16px; flex-shrink:0; opacity:.8; }
.nav a.nav-link:hover{ background: rgba(255,255,255,.06); color:#fff; }
.nav a.nav-link.active{ background: linear-gradient(90deg, var(--purple-700), var(--purple-600)); color:#fff; box-shadow: var(--shadow-sm); }
.nav a.nav-link .num{ font-variant-numeric: tabular-nums; opacity:.55; font-size:11px; width:16px; }

.main{
  margin-left: var(--sidebar-w);
  flex:1;
  min-width:0;
}

.topbar{
  position: sticky; top:0; z-index:30;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--gray-200);
  padding: 14px 36px;
  display:flex; align-items:center; justify-content:space-between;
}
.topbar .crumb{ font-size:12.5px; color: var(--gray-500); }
.topbar .crumb b{ color: var(--black); }
.menu-btn{ display:none; background:none; border:1px solid var(--gray-300); border-radius:8px; width:36px; height:36px; align-items:center; justify-content:center; cursor:pointer; }

/* ---------- Hero ---------- */
.hero{
  background: radial-gradient(circle at 15% 20%, rgba(124,58,237,.35), transparent 55%), linear-gradient(135deg, var(--black) 0%, #1c0f33 55%, var(--purple-900) 100%);
  color:#fff;
  padding: 56px 40px 44px;
  position: relative;
  overflow:hidden;
}
.hero::after{
  content:""; position:absolute; inset:0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 30% 30%, black, transparent 70%);
  opacity:.6;
}
.hero-content{ position:relative; z-index:2; max-width: 980px; }
.hero .eyebrow{ font-size:12px; letter-spacing:.14em; text-transform:uppercase; color: var(--purple-400); margin-bottom:10px; font-weight:600; }
.hero h1{ color:#fff; font-size: 34px; margin-bottom:10px; }
.hero p.lead{ color: rgba(255,255,255,.72); font-size:15px; max-width:640px; }

.status-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding: 4px 11px; border-radius:999px; font-size:11.5px; font-weight:600;
  text-transform:uppercase; letter-spacing:.04em;
}
.status-pill .dot{ width:7px; height:7px; border-radius:50%; }
.status-pill.status-approved, .status-pill.status-complete, .status-pill.status-green{ background: var(--green-bg); color: var(--green); }
.status-pill.status-approved .dot, .status-pill.status-complete .dot, .status-pill.status-green .dot{ background: var(--green); }
.status-pill.status-pending, .status-pill.status-inprogress, .status-pill.status-amber{ background: var(--amber-bg); color: var(--amber); }
.status-pill.status-pending .dot, .status-pill.status-inprogress .dot, .status-pill.status-amber .dot{ background: var(--amber); }
.status-pill.status-notstarted, .status-pill.status-red, .status-pill.status-atrisk{ background: var(--red-bg); color: var(--red); }
.status-pill.status-notstarted .dot, .status-pill.status-red .dot, .status-pill.status-atrisk .dot{ background: var(--red); }
.status-pill.status-submitted{ background: var(--purple-pale); color: var(--purple-700); }
.status-pill.status-submitted .dot{ background: var(--purple-600); }
.status-pill.status-onhero{ background: rgba(255,255,255,.12); color:#fff; }
.status-pill.status-onhero .dot{ background:#fff; }

/* ---------- Content sections ---------- */
.content{ padding: 40px 40px 90px; max-width: 1180px; }
.section-block{ margin-bottom: 46px; }
.section-block h2{ font-size:21px; display:flex; align-items:center; gap:10px; }
.section-block h2 .icon-badge{ width:30px; height:30px; border-radius:8px; background: var(--purple-pale); color: var(--purple-700); display:inline-flex; align-items:center; justify-content:center; }
.section-block h2 .icon-badge svg{ width:16px; height:16px; }
.section-block .intro{ max-width: 760px; margin-bottom: 20px; }

/* Metric cards */
.metric-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:16px; margin-bottom: 8px; }
.metric-card{
  background:#fff; border:1px solid var(--gray-200); border-radius: var(--radius);
  padding:18px 18px 16px; box-shadow: var(--shadow-sm);
}
.metric-card .label{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color: var(--gray-500); margin-bottom:6px; }
.metric-card .value{ font-family:'Georgia',serif; font-size:24px; color: var(--black); font-weight:700; }
.metric-card .value .unit{ font-size:13px; color: var(--gray-500); font-weight:400; margin-left:3px; }
.metric-card .placeholder-tag{ display:inline-block; margin-top:6px; font-size:10.5px; color: var(--purple-600); background: var(--purple-pale); padding:2px 7px; border-radius:5px; }

/* Cards / panels */
.card{ background:#fff; border:1px solid var(--gray-200); border-radius: var(--radius); padding:22px 24px; box-shadow: var(--shadow-sm); margin-bottom:18px; }
.card h3{ font-size:15.5px; margin-bottom:12px; }
.card h4{ font-size:13.5px; margin: 14px 0 8px; color: var(--gray-800); }

.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
.three-col{ display:grid; grid-template-columns: repeat(3,1fr); gap:18px; }
@media (max-width: 900px){ .two-col, .three-col{ grid-template-columns:1fr; } }

/* Tables */
table.data-table{ width:100%; border-collapse: collapse; font-size:13.5px; }
table.data-table th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color: var(--gray-500); padding:9px 12px; border-bottom:1px solid var(--gray-200); }
table.data-table td{ padding: 11px 12px; border-bottom:1px solid var(--gray-100); color: var(--gray-800); vertical-align:top; }
table.data-table tr:last-child td{ border-bottom:none; }
table.data-table tr:hover td{ background: var(--gray-050); }
.placeholder{ color: var(--purple-500); font-style: italic; }

/* Checklist (approvals) */
.checklist{ display:flex; flex-direction:column; gap:10px; }
.check-item{
  display:flex; align-items:center; gap:14px;
  background:#fff; border:1px solid var(--gray-200); border-radius:10px; padding:14px 18px;
}
.check-item .box{ width:20px; height:20px; border-radius:5px; border:2px solid var(--gray-300); flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.check-item.done .box{ background: var(--green); border-color: var(--green); color:#fff; }
.check-item .info{ flex:1; min-width:0; }
.check-item .info .title{ font-weight:600; font-size:14px; color: var(--black); }
.check-item .info .meta{ font-size:12px; color: var(--gray-500); margin-top:2px; }
.check-item .right{ display:flex; align-items:center; gap:18px; flex-shrink:0; }
.check-item .agency{ font-size:12px; color: var(--gray-600); text-align:right; min-width:120px; }
@media (max-width:700px){ .check-item{ flex-wrap:wrap; } .check-item .right{ width:100%; justify-content:space-between; margin-top:8px; } }

/* Progress bars */
.progress-wrap{ display:flex; align-items:center; gap:12px; }
.progress-track{ flex:1; height:8px; background: var(--gray-200); border-radius:999px; overflow:hidden; }
.progress-fill{ height:100%; border-radius:999px; background: linear-gradient(90deg, var(--purple-600), var(--purple-400)); transition: width 1s ease; }
.progress-fill.green{ background: linear-gradient(90deg,#178a49,#2fbf6b); }
.progress-fill.amber{ background: linear-gradient(90deg,#a5680f,#e0a63a); }
.progress-fill.red{ background: linear-gradient(90deg,#a83226,#dc6653); }
.progress-pct{ font-size:12.5px; font-weight:700; color: var(--black); width:38px; text-align:right; }

/* Visual placeholders */
.visual-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap:16px; }
.visual-box{
  border: 1.5px dashed var(--gray-300); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #fbfaff, #fbfaff 10px, #f5f1fc 10px, #f5f1fc 20px);
  aspect-ratio: 4/3; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; color: var(--purple-600); text-align:center; padding:16px;
}
.visual-box svg{ width:28px; height:28px; opacity:.7; }
.visual-box .vlabel{ font-size:12.5px; font-weight:600; color: var(--gray-800); }
.visual-box .vhint{ font-size:11px; color: var(--gray-500); }

/* Section index cards (used on index.html & readiness dashboard) */
.section-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap:16px; }
.section-card{
  background:#fff; border:1px solid var(--gray-200); border-radius:12px; padding:20px;
  box-shadow: var(--shadow-sm); display:flex; flex-direction:column; gap:10px;
  transition: transform .15s ease, box-shadow .15s ease; position:relative;
}
.section-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); }
.section-card .top-row{ display:flex; align-items:flex-start; justify-content:space-between; }
.section-card .icon-badge{ width:34px; height:34px; border-radius:9px; background: var(--purple-pale); color: var(--purple-700); display:flex; align-items:center; justify-content:center; }
.section-card .icon-badge svg{ width:17px; height:17px; }
.section-card .num-tag{ font-family:'Georgia',serif; font-size:11px; color: var(--gray-500); }
.section-card h3{ font-size:15px; margin: 2px 0 0; }
.section-card .desc{ font-size:12.5px; color: var(--gray-500); line-height:1.5; flex:1; }

/* Timeline / gantt */
.timeline{ position:relative; padding-left:22px; }
.timeline::before{ content:""; position:absolute; left:6px; top:6px; bottom:6px; width:2px; background: var(--gray-200); }
.tl-item{ position:relative; padding-bottom:22px; }
.tl-item::before{ content:""; position:absolute; left:-22px; top:3px; width:12px; height:12px; border-radius:50%; background: var(--purple-500); border:3px solid #fff; box-shadow:0 0 0 2px var(--gray-200); }
.tl-item.done::before{ background: var(--green); }
.tl-item .tl-title{ font-weight:600; font-size:14px; color: var(--black); }
.tl-item .tl-date{ font-size:11.5px; color: var(--gray-500); margin-bottom:3px; }
.tl-item .tl-desc{ font-size:12.5px; color: var(--gray-600); }

.gantt{ display:flex; flex-direction:column; gap:8px; }
.gantt-row{ display:grid; grid-template-columns: 190px 1fr; align-items:center; gap:12px; font-size:12.5px; }
.gantt-label{ color: var(--gray-800); font-weight:500; }
.gantt-track{ position:relative; height:22px; background: var(--gray-100); border-radius:6px; overflow:hidden; }
.gantt-bar{ position:absolute; top:2px; bottom:2px; border-radius:5px; background: linear-gradient(90deg, var(--purple-600), var(--purple-400)); }
.gantt-bar.done{ background: linear-gradient(90deg,#178a49,#2fbf6b); }
.gantt-bar.current{ background: linear-gradient(90deg, var(--purple-700), var(--purple-500)); box-shadow:0 0 0 2px rgba(124,58,237,.25); }

/* Team */
.team-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap:18px; }
.team-card{ background:#fff; border:1px solid var(--gray-200); border-radius:12px; padding:18px; text-align:center; box-shadow: var(--shadow-sm); }
.avatar-placeholder{
  width:64px; height:64px; border-radius:50%; margin:0 auto 12px;
  background: linear-gradient(135deg, var(--purple-pale), #fff); border: 1.5px dashed var(--purple-400);
  display:flex; align-items:center; justify-content:center; color: var(--purple-500);
}
.avatar-placeholder svg{ width:26px; height:26px; }
.team-card .tname{ font-weight:700; font-size:13.5px; color: var(--black); }
.team-card .trole{ font-size:11.5px; color: var(--purple-600); margin:2px 0 8px; text-transform:uppercase; letter-spacing:.04em; }
.team-card .tcompany{ font-size:11.5px; color: var(--gray-500); }
.logo-placeholder{ width:100%; height:36px; border:1px dashed var(--gray-300); border-radius:6px; margin-top:10px; display:flex; align-items:center; justify-content:center; font-size:10px; color: var(--gray-500); }

/* Risk matrix */
.risk-matrix{ display:grid; grid-template-columns: 140px repeat(3,1fr); gap:6px; }
.risk-matrix .rm-head{ font-size:11px; text-transform:uppercase; letter-spacing:.04em; color: var(--gray-500); padding:8px; text-align:center; }
.risk-matrix .rm-row-label{ font-size:12.5px; font-weight:600; display:flex; align-items:center; padding:8px; }
.risk-cell{ border-radius:8px; padding:10px; font-size:11.5px; min-height:56px; color:#fff; display:flex; align-items:center; justify-content:center; text-align:center; font-weight:600; }
.risk-cell.low{ background: var(--green); }
.risk-cell.med{ background: var(--amber); }
.risk-cell.high{ background: var(--red); }
.risk-cell.empty{ background: var(--gray-100); color: var(--gray-500); font-weight:400; }

/* Footer nav (prev/next) */
.page-footer-nav{ display:flex; justify-content:space-between; margin-top:36px; padding-top:22px; border-top:1px solid var(--gray-200); }
.page-footer-nav a{ font-size:13px; color: var(--purple-700); font-weight:600; display:flex; align-items:center; gap:6px; }
.page-footer-nav a:hover{ text-decoration:underline; }

/* Badges list (documents needed) */
.doc-list{ display:flex; flex-wrap:wrap; gap:8px; }
.doc-chip{ font-size:12px; background: var(--gray-100); color: var(--gray-800); padding:6px 12px; border-radius:999px; border:1px solid var(--gray-200); display:flex; align-items:center; gap:6px; }
.doc-chip svg{ width:13px; height:13px; color: var(--purple-600); }

/* Overall readiness ring */
.ring-wrap{ display:flex; align-items:center; gap:20px; }
.ring{ width:120px; height:120px; }

@media (max-width: 980px){
  .sidebar{ transform: translateX(-100%); }
  .sidebar.open{ transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main{ margin-left:0; }
  .menu-btn{ display:flex; }
  .content{ padding: 28px 18px 70px; }
  .hero{ padding: 40px 20px 32px; }
}

.brand-footer{ padding:18px 22px; font-size:11px; color: var(--gray-500); border-top:1px solid rgba(255,255,255,.08); }

/* Team Documents button */
.btn-purple{
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
  background: var(--purple-600); color:#fff; padding:10px 18px; border-radius:8px;
  font-size:13px; font-weight:600; box-shadow: var(--shadow-sm); transition: background .15s ease, transform .15s ease;
}
.btn-purple:hover{ background: var(--purple-700); transform: translateY(-1px); }
.btn-purple.disabled{ opacity:.55; pointer-events:none; background: var(--gray-300); color: var(--gray-600); box-shadow:none; }
.team-docs-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.team-docs-row .td-title{ font-weight:600; font-size:14px; color: var(--black); margin-bottom:4px; }
.team-docs-row .td-hint{ font-size:12.5px; color: var(--gray-500); }
