/* ============================================================
   RENCO Block Schedule — EID / BIM6x Demo Page
   Fonts: Playfair Display, DM Sans, DM Mono
   Colors: #868D54 olive, #C2C8A2 sage, #1a1a1a dark
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; width: 100%; }
body { overflow-x: clip; width: 100%; }

:root {
  --olive:    #868D54;
  --olive-d:  #6b7243;
  --sage:     #C2C8A2;
  --sage-lt:  #e8ebda;
  --dark:     #1a1a1a;
  --dark-2:   #2a2a2a;
  --dark-3:   #333;
  --light:    #f8f7f4;
  --white:    #ffffff;
  --red:      #c0392b;
  --red-bg:   #fce4e4;
  --mono:     'DM Mono', monospace;
  --sans:     'DM Sans', sans-serif;
  --serif:    'Playfair Display', Georgia, serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === Hero === */
.hero {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* no divider line — hero flows into preview */
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero-brand {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--sage);
}
.brand-renco {
  color: #7CB342;
  font-weight: 700;
  font-size: 1rem;
}
.brand-sep { margin: 0 0.6rem; opacity: 0.3; color: #fff; }
.brand-bim6x {
  color: var(--sage);
  font-weight: 700;
  font-size: 1rem;
}

/* Image logos */
.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}
.logo-renco, .logo-bim6x {
  height: 48px;
  width: 120px;
  object-fit: contain;
}
.logo-sep {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--olive);
  opacity: 0.5;
  margin: 0 1rem;
}
.logo-bim6x-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  border-radius: 8px;
  padding: 6px 12px;
  width: 144px;
  height: 60px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero-project {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--sage);
}
.hero-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.5rem;
}

/* === Project Preview === */
.preview {
  background: var(--dark);
  padding: 0 2rem 3rem;
  text-align: center;
}
.preview-inner {
  max-width: 960px;
  margin: 0 auto;
}
.preview-img {
  width: 100%;
  max-width: 1024px;
  max-height: 576px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.08);
  display: block;
  margin: 0 auto;
}
.preview-caption {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 0.75rem;
  padding-bottom: 1.5rem;
}

/* === KPI Strip === */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--olive);
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.kpi-card {
  background: var(--white);
  padding: 2rem 1.5rem;
  text-align: center;
}
.kpi-value {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--olive-d);
  line-height: 1.1;
}
.kpi-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #888;
  margin-top: 0.5rem;
}

/* === Sections === */
.section { padding: 4rem 2rem; }
.section-dark { background: var(--dark); color: var(--white); }
.section-dark .section-title { color: var(--sage); }
.section-dark .data-table { background: var(--dark-2); }
.section-dark .data-table th { background: var(--dark-3); color: var(--sage); }
.section-dark .data-table td { color: #ddd; border-color: #444; }
.section-dark .data-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
.section-dark .data-table tbody tr:hover td { background: rgba(134,141,84,0.15); }

.section-inner { max-width: 1400px; margin: 0 auto; }
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--olive-d);
}
.shipping-recommendation {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--olive-d);
  margin-bottom: 0.5rem;
}
.shipping-alternatives {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.alt-option {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #888;
  padding: 0.2rem 0.6rem;
  background: var(--sage-lt);
  border-radius: 4px;
}
.section-subtitle {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #999;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* === Two-col layout === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-title { font-size: 2.2rem; }
  .logo-renco, .logo-bim6x { height: 36px; width: 90px; }
  .logo-bim6x-pill { width: 114px; height: 48px; }
  .logo-sep { margin: 0 0.6rem; font-size: 0.8rem; }
  .section { padding: 2rem 1rem; }
  .section-inner { max-width: 100%; }
  .section-title { font-size: 1.4rem; }
  .kpi-value { font-size: 1.8rem; }
  .kpi-card { padding: 1.2rem 1rem; }
  .chart-container { max-width: 220px; }
  .block-table-wrap { width: 100%; }
  .shipping-grid { grid-template-columns: 1fr; }
  .preview { padding: 0 1rem 2rem; }
  .preview-img { max-width: 100%; }
  .project-grid { grid-template-columns: 1fr; }
  .accuracy-callout { padding: 0 1rem; }
  .consumables-grid { grid-template-columns: repeat(2, 1fr); }
  .breadcrumb { padding: 0.5rem 1rem; }
  .pending-list { padding-left: 1.2rem; }
  .shipping-alternatives { flex-direction: column; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .hero-project { font-size: 0.95rem; }
  .hero-brand { font-size: 0.75rem; }
  .logo-renco, .logo-bim6x { height: 28px; width: 72px; }
  .logo-bim6x-pill { width: 96px; height: 40px; padding: 4px 8px; border-radius: 6px; }
  .logo-sep { margin: 0 0.4rem; font-size: 0.7rem; }
  .brand-renco, .brand-bim6x { font-size: 0.85rem; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .kpi-value { font-size: 1.3rem; }
  .kpi-label { font-size: 0.5rem; letter-spacing: 0.08em; }
  .kpi-card { padding: 0.8rem 0.4rem; }
  .chart-container { max-width: 200px; }
  .data-table { font-size: 0.7rem; }
  .data-table th, .data-table td { padding: 0.3rem 0.35rem; }
  .wall-table { font-size: 0.6rem; }
  .section { padding: 1.5rem 0.75rem; }
  .section-title { font-size: 1.2rem; }
  .pallet-cell { width: 32px; height: 26px; font-size: 0.4rem; }
  .shipping-card { padding: 1rem; }
  .container-spec { font-size: 0.55rem; }
  .stack-height { font-size: 0.55rem; }
  .accuracy-inner { font-size: 0.78rem; padding: 0.75rem 1rem; }
  .consumable-value { font-size: 1.5rem; }
  .consumable-label { font-size: 0.6rem; }
  .pending-list li { font-size: 0.8rem; }
  .footer { padding: 1.5rem 1rem; }
  .project-card-img { height: 140px; }
  .project-card-body { padding: 1rem; }
  .project-card-title { font-size: 1rem; }
}

/* === Chart === */
.chart-wrap { min-width: 0; overflow: hidden; }
.chart-container {
  position: relative;
  max-width: 350px;
  min-height: 350px;
  margin: 0 auto;
}

/* === Tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
}
.data-table th {
  background: var(--olive);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.data-table th.num, .data-table td.num { text-align: right; }
.data-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}
.data-table tbody tr:nth-child(even) td { background: var(--sage-lt); }
.data-table tbody tr:hover td { background: rgba(134,141,84,0.12); }
.data-table tfoot td {
  background: var(--olive);
  color: var(--white);
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.table-scroll { width: 100%; overflow-x: auto; border-radius: 8px; -webkit-overflow-scrolling: touch; }
.block-table-wrap { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Wall table specifics */
.wall-table { font-family: var(--mono); font-size: 0.95rem; white-space: nowrap; width: auto; min-width: 100%; }
.wall-table td:first-child { font-weight: 700; }
.wall-flagged td {
  background: #FDF6C6 !important;
  color: #313131 !important;
}

.totals-row td {
  border-top: 2px solid var(--olive);
  font-weight: 700;
  background: var(--pale-sage, #f5f6f0);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-confirmed { background: var(--olive); color: var(--white); }
.badge-estimated { background: var(--sage); color: var(--olive-d); }

/* === Shipping Grid === */
.shipping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.shipping-card {
  background: var(--white);
  border: 2px solid var(--sage);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow-x: auto;
  max-width: 100%;
}
.shipping-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--olive);
}
.shipping-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--olive-d);
  margin-bottom: 0.75rem;
}
.container-spec {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--olive-d);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.shipping-card .stat {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.3rem;
}
.shipping-card .stat strong { color: var(--dark); }

/* Layer labels and stack height */
.layer-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--olive-d);
  font-weight: 700;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}
.layer-gap { height: 0.5rem; }
.stack-height {
  font-family: var(--mono);
  font-size: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  line-height: 1.4;
}
.container-stats {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--olive-d);
  margin: 0.3rem 0 0.5rem;
}

/* Pallet mini-grid — horizontal layout, loaded front-to-back (widthwise) */
.pallet-grid {
  display: grid;
  gap: 2px;
  margin-top: 0.25rem;
}
.pallet-cell {
  aspect-ratio: 1.2;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  line-height: 1.2;
}
.pallet-com { background: var(--olive); }
.pallet-res { background: var(--sage); color: var(--olive-d); }
.pallet-empty { background: #ddd; color: #999; }

/* === Warnings === */
.warning-list { list-style: none; }
.warning-list li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(192,57,43,0.1);
  border-left: 4px solid var(--red);
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
  color: #ffcccc;
}
.warning-list li strong { color: var(--white); }

/* === Data Pending === */
.section-pending {
  background: #f5f3ed;
}
.section-pending .section-title {
  color: var(--olive-d);
}
.pending-list {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.pending-list li {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--dark-3);
  padding: 0.4rem 0;
  line-height: 1.5;
}
.pending-list li::marker {
  color: var(--olive);
  font-weight: 700;
}
.pending-disclaimer {
  font-size: 0.8rem;
  font-style: italic;
  color: #999;
  line-height: 1.5;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
  margin-top: 1.5rem;
}
.pending-note {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #aaa;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* === Footer === */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  border-top: 4px solid var(--olive);
}
.footer strong { color: var(--sage); }
.footer-link { color: var(--sage); text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
.footer-note { margin-top: 0.5rem; font-size: 0.7rem; opacity: 0.6; }
.footer-disclaimer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.6rem;
  font-style: italic;
  color: rgba(255,255,255,0.3);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* === Accuracy Callout === */
.accuracy-callout {
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.accuracy-inner {
  border-left: 4px solid var(--olive);
  background: var(--sage-lt);
  padding: 1rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--dark-3);
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.5rem;
}
.accuracy-inner strong {
  color: var(--olive-d);
}

/* === Consumables === */
.consumables-section { margin-top: 2rem; }
.consumables-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--olive-d);
  margin-bottom: 1rem;
}
.consumables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.consumable-item {
  background: var(--sage-lt);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}
.consumable-value {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--olive-d);
}
.consumable-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-top: 0.25rem;
}
.consumable-detail {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #999;
  margin-top: 0.25rem;
}
.consumables-note {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-style: italic;
  color: #888;
  margin-top: 1rem;
}

/* === Breadcrumb === */
.breadcrumb {
  background: var(--dark);
  padding: 0.6rem 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.breadcrumb a { color: var(--sage); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: rgba(255,255,255,0.5); }

/* === Project Cards === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--white);
  border: 2px solid var(--sage);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--dark);
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.project-card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--sage-lt);
}
.project-card-body { padding: 1.25rem; }
.project-card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--olive-d);
  margin-bottom: 0.5rem;
}
.project-card-stats {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #666;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}
.project-card-date {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #999;
}
.loading-msg {
  font-family: var(--mono);
  color: #999;
  font-size: 0.85rem;
}

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kpi-card, .section-inner, .shipping-card {
  animation: fadeUp 0.6s ease-out both;
}
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.2s; }
.kpi-card:nth-child(4) { animation-delay: 0.3s; }
