/* ===================== Engineered For Density ===================== */
/* Interactive isometric warehouse-racking visualization section, matching
   the site's existing dark/amber industrial design system. Scoped under
   .efd-* so it can't leak into or be affected by any other section. */

.efd-section {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #090c11 0%, #0b0f15 100%);
  border-top: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1);
  padding: 104px 0;
}
.efd-bg-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image: linear-gradient(var(--border-1) 1px, transparent 1px), linear-gradient(90deg, var(--border-1) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,0.9), transparent 72%);
}
.efd-container { position: relative; z-index: 1; }

.efd-intro { max-width: 700px; margin: 0 auto 40px; text-align: center; }
.efd-lead { color: var(--text-2); font-size: 15.5px; line-height: 1.7; margin-top: 14px; }

.efd-selector { display: flex; justify-content: center; gap: 10px; margin-bottom: 36px; flex-wrap: wrap; }
.efd-selector-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 24px; border: 1px solid var(--border-2); border-radius: var(--radius-md);
  background: var(--bg-1); cursor: pointer; min-width: 148px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.efd-selector-label { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em; color: var(--text-1); text-transform: uppercase; }
.efd-selector-sub { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.efd-selector-btn:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.efd-selector-btn.active { border-color: var(--accent); background: var(--accent-bg); box-shadow: var(--shadow-accent-glow); }
.efd-selector-btn.active .efd-selector-label { color: var(--accent-strong); }

.efd-stage {
  display: grid; grid-template-columns: 1fr 300px; gap: 30px;
  background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  padding: 32px;
}
.efd-stage-scene {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 440px; overflow: hidden; border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 32%, rgba(226,166,59,0.06), transparent 62%);
}
.efd-scene-viewport { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.efd-svg { width: 100%; max-width: 660px; height: auto; overflow: visible; display: block; }

.efd-face { transition: fill 0.15s ease; }
.efd-rack-level { cursor: pointer; outline: none; }
.efd-face-top { fill: #232b36; stroke: #0a0d12; stroke-width: 1; }
.efd-face-side { fill: #171d25; stroke: #0a0d12; stroke-width: 1; }
.efd-face-side-x { fill: #11161c; stroke: #0a0d12; stroke-width: 1; }
.efd-rack-level:hover .efd-face-top, .efd-rack-level.active .efd-face-top { fill: var(--accent); }
.efd-rack-level:hover .efd-face-side, .efd-rack-level.active .efd-face-side { fill: #a97c2c; }
.efd-rack-level:hover .efd-face-side-x, .efd-rack-level.active .efd-face-side-x { fill: #6d5323; }
.efd-rack-level:focus-visible .efd-face-top { fill: var(--accent-strong); }
.efd-pallet-mark { opacity: 0.85; pointer-events: none; }
.efd-upright { stroke: rgba(226, 166, 59, 0.22); stroke-width: 1.3; }
.efd-floor { opacity: 0.9; }
.efd-floor-outline { fill: none; stroke: var(--border-2); stroke-width: 1; }

.efd-scene-zoom { position: absolute; top: 14px; right: 14px; display: flex; gap: 4px; z-index: 2; }
.efd-scene-zoom button {
  min-width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--border-2);
  background: var(--surface-1); color: var(--text-2); font-size: 12px; cursor: pointer; padding: 0 6px;
}
.efd-scene-zoom button:hover { border-color: var(--accent); color: var(--accent); }

.efd-drawing-btn {
  position: absolute; bottom: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-1); border: 1px solid var(--border-2); color: var(--text-2);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 12px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.efd-drawing-btn:hover { border-color: var(--accent); color: var(--accent); }

.efd-info-panel { border-left: 1px solid var(--border-1); padding-left: 26px; display: flex; flex-direction: column; min-width: 0; }
.efd-info-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.efd-info-title { margin: 6px 0 18px; font-size: 18px; line-height: 1.3; }
.efd-info-row-group { display: flex; flex-direction: column; gap: 10px; }
.efd-info-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; border-bottom: 1px dashed var(--border-1); padding-bottom: 8px; }
.efd-info-row span { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.03em; font-size: 10.5px; }
.efd-info-row strong { color: var(--text-0); text-align: right; font-family: var(--font-mono); font-size: 12px; }
.efd-info-note { margin-top: 16px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.efd-info-source { margin-top: 8px; font-size: 11px; color: var(--text-3); font-style: italic; }

.efd-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-1);
  margin-top: 40px; border: 1px solid var(--border-1); border-radius: var(--radius-md); overflow: hidden;
}
.efd-stat { background: var(--bg-1); padding: 22px 14px; text-align: center; }
.efd-stat-value { font-family: var(--font-display); font-size: 27px; color: var(--accent-strong); letter-spacing: 0.02em; }
.efd-stat-label { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px; }

.efd-cta-row { display: flex; justify-content: center; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .efd-stage { grid-template-columns: 1fr; }
  .efd-info-panel { border-left: none; border-top: 1px solid var(--border-1); padding-left: 0; padding-top: 22px; }
  .efd-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .efd-section { padding: 70px 0; }
  .efd-stage { padding: 18px; }
  .efd-stage-scene { min-height: 320px; }
  .efd-selector-btn { min-width: 0; flex: 1 1 auto; padding: 10px 14px; }
  .efd-cta-row { flex-direction: column; align-items: stretch; }
  .efd-cta-row .btn { width: 100%; text-align: center; justify-content: center; }
}

/* ---- Technical drawing lightbox ---- */
.efd-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(6, 8, 11, 0.88); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.efd-lightbox {
  background: var(--surface-1); border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  width: 100%; max-width: 1120px; max-height: 92vh; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: var(--shadow-elevated);
}
.efd-lightbox-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border-1); gap: 16px; flex-wrap: wrap; }
.efd-lightbox-title { font-weight: 700; font-size: 14px; color: var(--text-0); }
.efd-lightbox-caption { font-size: 12px; color: var(--text-3); margin-top: 4px; max-width: 560px; }
.efd-lightbox-controls { display: flex; align-items: center; gap: 6px; }
.efd-lightbox-controls button { min-width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--border-2); background: var(--bg-1); color: var(--text-2); cursor: pointer; font-size: 13px; }
.efd-lightbox-controls button:hover { border-color: var(--accent); color: var(--accent); }
.efd-lightbox-zoom-level { font-size: 11px; color: var(--text-3); width: 42px; text-align: center; font-family: var(--font-mono); }
.efd-lightbox-close { font-size: 18px !important; }
.efd-lightbox-viewport { flex: 1; overflow: hidden; cursor: grab; display: flex; align-items: center; justify-content: center; background: #05070a; touch-action: none; }
.efd-lightbox-viewport:active { cursor: grabbing; }
.efd-lightbox-viewport img { max-width: none; max-height: 74vh; user-select: none; }
.efd-lightbox-hint { text-align: center; font-size: 11px; color: var(--text-3); padding: 10px; margin: 0; border-top: 1px solid var(--border-1); }
@media (max-width: 620px) { .efd-lightbox-viewport img { max-height: 50vh; } }

@media (prefers-reduced-motion: reduce) {
  .efd-scene-viewport, .efd-selector-btn, .efd-face { transition: none !important; }
}
