/* ============================================
   8 Emerald Street — Design System
   ============================================ */

:root {
  --emerald:        #10B981;
  --emerald-light:  #34D399;
  --emerald-dark:   #059669;
  --hero-bg:        #0A1A0F;
  --hero-card:      rgba(16,185,129,0.10);
  --text-primary:   #111827;
  --text-secondary: #4B5563;
  --text-muted:     #9CA3AF;
  --bg-page:        #F9FAFB;
  --bg-card:        #FFFFFF;
  --border:         #E5E7EB;
  --green:          #059669;
  --green-bg:       #D1FAE5;
  --blue:           #1D4ED8;
  --blue-bg:        #DBEAFE;
  --orange:         #D97706;
  --orange-bg:      #FEF3C7;
  --red:            #DC2626;
  --red-bg:         #FEE2E2;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.14);
  --radius:         3px;
  --radius-sm:      3px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

/* ── NAVIGATION ───────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hero-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 52px;
}

.nav-logo {
  color: var(--emerald);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  white-space: nowrap;
  transition: all 0.15s;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

/* ── HERO ─────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  background-image:
    linear-gradient(to bottom, rgba(10,26,15,0.55) 0%, rgba(10,26,15,0.80) 60%, rgba(10,26,15,1) 100%),
    var(--hero-image, none);
  background-size: cover;
  background-position: center 30%;
  padding: 5rem 2rem 4rem;
  color: #fff;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--emerald);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--hero-card);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.75rem;
  min-width: 160px;
  backdrop-filter: blur(8px);
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--emerald-light);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
}

/* ── SECTION LAYOUT ───────────────────────── */
.section {
  padding: 3.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.section-header .section-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── BUDGET SECTION ───────────────────────── */
.budget-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
  .budget-overview { grid-template-columns: 1fr; }
}

.budget-big-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.budget-big-card .label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.budget-big-card .amount {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.budget-big-card .amount.spent { color: var(--emerald-dark); }

.budget-progress {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.progress-bar-track {
  background: #E5E7EB;
  border-radius: 3px;
  height: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--emerald-dark), var(--emerald-light));
  transition: width 0.8s ease;
  min-width: 4px;
}

/* ── BUDGET BOTTOM: chart + table ─────────── */
.budget-bottom {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .budget-bottom { grid-template-columns: 1fr; }
}

.vendor-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.vendor-chart-wrap h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.vendor-table {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.vendor-table table {
  width: 100%;
  border-collapse: collapse;
}

.vendor-table th {
  background: #F9FAFB;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vendor-table td {
  padding: 0.9rem 1.25rem;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.vendor-table tr:last-child td { border-bottom: none; }
.vendor-table tr:hover td { background: #F9FAFB; }

.vendor-table td.amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.vendor-table td.category-badge span {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: var(--blue-bg);
  color: var(--blue);
}

.vendor-table tfoot td {
  font-weight: 800;
  background: #F9FAFB;
  border-top: 2px solid var(--border);
  font-size: 14px;
}

/* ── LOCK GATE ────────────────────────────── */
.lock-gate {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.lock-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lock-prompt svg {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  stroke: currentColor;
}

.lock-prompt > p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.lock-input-row {
  display: flex;
  gap: 0.5rem;
}

.lock-input-row input {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 180px;
  transition: border-color 0.15s;
}

.lock-input-row input:focus {
  border-color: var(--emerald);
}

.lock-input-row button {
  padding: 0.6rem 1.25rem;
  background: var(--emerald);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.lock-input-row button:hover {
  background: var(--emerald-dark);
}

.lock-error {
  font-size: 12px;
  color: var(--red);
  display: none;
  font-weight: 500;
}

.protected-content { display: none; }

/* ── TIMELINE ─────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 1.75rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item.complete .timeline-dot {
  background: var(--green);
  border-color: var(--green);
}

.timeline-item.in-progress .timeline-dot {
  background: var(--emerald);
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
}

.timeline-dot svg { width: 10px; height: 10px; fill: #fff; }

.timeline-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-item.complete .timeline-title { color: var(--text-secondary); }

.status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

.pill-complete  { background: var(--green-bg);  color: var(--green);  }
.pill-progress  { background: var(--orange-bg); color: var(--orange); }
.pill-upcoming  { background: var(--border);    color: var(--text-muted); }

/* ── PHOTOS ───────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.photo-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #ddd;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.photo-item:hover img { transform: scale(1.04); }

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
}

.photo-item:hover .photo-caption { opacity: 1; }

.photo-show-more {
  text-align: center;
  margin-top: 1.5rem;
}

.show-more-btn {
  padding: 0.65rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.show-more-btn:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

.photo-placeholder {
  background: #F3F4F6;
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  border: 2px dashed var(--border);
}

.photo-placeholder p { font-size: 14px; margin-top: 0.5rem; }

/* ── LIGHTBOX ─────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }

/* ── DECISIONS ────────────────────────────── */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.decision-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
}

.decision-card.urgent {
  border-left: 4px solid var(--orange);
}

.decision-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.decision-card h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.decision-context {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.decision-options {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.decision-options li {
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.decision-options li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 700;
}

.decision-owner {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-weight: 600;
}

/* ── TABLES ───────────────────────────────── */
.data-table-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: #F9FAFB;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-primary);
  line-height: 1.5;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #F9FAFB; }

.data-table .date-col {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── TEAM ─────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.team-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
}

.team-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--emerald-dark);
  margin-bottom: 0.4rem;
}

.team-firm {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.team-contact {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── FOOTER ───────────────────────────────── */
.site-footer {
  background: var(--hero-bg);
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 2rem;
  font-size: 12px;
  margin-top: 2rem;
}

.site-footer strong { color: rgba(255,255,255,0.65); }

/* ── LOADING ──────────────────────────────── */
.loading-shimmer {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 3px;
  height: 1em;
  display: inline-block;
  width: 100px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.error-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-bg);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.25rem 2.5rem; }
  .section { padding: 2.5rem 1.25rem; }
  .site-nav { padding: 0 1.25rem; }
  .budget-overview { grid-template-columns: 1fr; }
  .budget-bottom { grid-template-columns: 1fr; }
  .stat-card { min-width: 130px; }
  .stat-card .stat-value { font-size: 1.3rem; }
  .decision-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-logo { display: none; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; align-items: center; }
  .stat-card { width: 100%; max-width: 300px; }
}
